473,668 Members | 2,600 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Storing/retrieving BLOBs with JSPs

I am in extremely urgent need (by tomorrow) of a way to store files in and
retrieve files from an Oracle database using TopLink as an intermediary. I
have the JSPs for it, and it works for small files, but larger ones like
Word documents and Excel Spreadsheets give an error saying that the data is
too large for the field. Can anyone help with this? Our file object has a
fileData field which is an array of bytes which is mapped in TopLink to the
BLOB field of the database. As I said, it works for very small files like a
small GIF image, but with larger ones, I believe the error number is 17002,
a database error. I'm sorry I don't have any more details, but I don't have
access to the project at the moment. Any solutions/help/nudges in the right
direction are greatly appreciated

--
Ryan Stewart, A1C USAF
805 CSPTS/SCBE
Jul 19 '05 #1
12 5316
Hello,

it seem´s like an error because the file-size. with jdbc there is a
max-size to instert with jdbc (original oracle-jdbc driver). if you
inserted a file was greater if fails and generate an error. i didn´t now
at the moment, but i think the size is like 4M or 4K or so.

see for more information metalink!

best regards
thorsten häs
On Thu, 11 Dec 2003 11:54:29 -0600, Ryan Stewart
<za****@no.texa s.spam.net> wrote:
I am in extremely urgent need (by tomorrow) of a way to store files in
and
retrieve files from an Oracle database using TopLink as an intermediary.
I
have the JSPs for it, and it works for small files, but larger ones like
Word documents and Excel Spreadsheets give an error saying that the data
is
too large for the field. Can anyone help with this? Our file object has a
fileData field which is an array of bytes which is mapped in TopLink to
the
BLOB field of the database. As I said, it works for very small files
like a
small GIF image, but with larger ones, I believe the error number is
17002,
a database error. I'm sorry I don't have any more details, but I don't
have
access to the project at the moment. Any solutions/help/nudges in the
right
direction are greatly appreciated


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jul 19 '05 #2
"Ryan Stewart" <za****@no.texa s.spam.net> wrote in message
news:TI******** ************@te xas.net...
I am in extremely urgent need (by tomorrow)
As it happens, I don't care - you are not
paying me enough.

And in future, please do not cross-post
so widely. You are not that important,
trust me.
..of a way to store files in and
retrieve files from an Oracle database using TopLink as an intermediary. I
have the JSPs for it,
Good for you. Just how do you expect
others to debug them for you? Telepathy?
..and it works for small files, but larger ones like
Word documents and Excel Spreadsheets give an error saying that the data is too large for the field.
What field?
..Can anyone help with this?
The only thing this absolute server-side noob
can suggest to somebody that does not supply
code, for free, is..

Maybe you are 'getting' the data rather than
posting it. ..but..
..Our file object has a
fileData field which is an array of bytes which is mapped in TopLink to the BLOB field of the database. As I said, it works for very small files like a small GIF image, but with larger ones, I believe the error number is 17002, a database error.
That number sounds too large, I thought 'get's were
limited to much smaller sizes than that.
..I'm sorry I don't have any more details, but I don't have
access to the project at the moment.
See first comment.
..Any solutions/help/nudges in the right
direction are greatly appreciated


The ones I have to give, you've got..

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
Jul 19 '05 #3
"Andrew Thompson" <an******@bigNO SPAMpond.com> wrote in message news:<wN******* ***********@new s-server.bigpond. net.au>...

[snip]
As it happens, I don't care - you are not
paying me enough.

And in future, please do not cross-post
so widely. You are not that important,
trust me.

[snip]

Good for you. Just how do you expect
others to debug them for you? Telepathy?


Geez, could you be any more of a jackass?
[snip]
..Any solutions/help/nudges in the right
direction are greatly appreciated


The ones I have to give, you've got..


After all that you can't even help.
And in future, please do not post if
you can't help. You are not that important,
trust me.
Jul 19 '05 #4
"Ryan Stewart" <za****@no.texa s.spam.net> wrote in
news:TI******** ************@te xas.net:
and it works for small files,
but larger ones ... give an
error saying that the data is too large for the field.
Any solutions/help/nudges in the right
direction are greatly appreciated


As a workaround store big files as several slices of 4k (or whatever the
limit is) (maybe in a new table - with a slice-# as part of the key) and
reassemble them at retrieval time.
Jul 19 '05 #5

"moose" <sk********@exc ite.com> wrote in message
news:57******** *************** **@posting.goog le.com...
"Andrew Thompson" <an******@bigNO SPAMpond.com> wrote in message news:<wN******* ***********@new s-server.bigpond. net.au>...
[snip]
As it happens, I don't care - you are not
paying me enough.

And in future, please do not cross-post
so widely. You are not that important,
trust me.

[snip]

Good for you. Just how do you expect
others to debug them for you? Telepathy?


Geez, could you be any more of a jackass?
[snip]
..Any solutions/help/nudges in the right
direction are greatly appreciated


The ones I have to give, you've got..


After all that you can't even help.


Did you miss..
"Maybe you are 'getting' the data rather than
posting it. ..but.."
[ As it turns out, I was completely wrong. ]
And in future, please do not post if
you can't help. You are not that important,
trust me.


:)

So let's sum this up.

I offered the OP 1 (albeit wrong) suggestion
23 hrs prior to a deadline that lay (presumedly)
within 24 hrs.

You offered the OP the above (which I did not
trim a character of), that is, nothing at all - some
120+ hours past the deadline.

That would seem to make you as useful as
an udder on a male moose, no?
Jul 19 '05 #6
Funny, your math doesn't add up.
I never critisized the OP or offered any help to the OP.
That was YOU, in your astounding arrogance.

I stand by my first statement regarding your behavior.
What a jackass!

"Andrew Thompson" <an******@bigNO SPAMpond.com> wrote in message news:<Zc******* ***********@new s-server.bigpond. net.au>...
So let's sum this up.

I offered the OP 1 (albeit wrong) suggestion
23 hrs prior to a deadline that lay (presumedly)
within 24 hrs.

You offered the OP the above (which I did not
trim a character of), that is, nothing at all - some
120+ hours past the deadline.

That would seem to make you as useful as
an udder on a male moose, no?

Jul 19 '05 #7
This is cool stuff, Is there anyway to implement a sort of Network
File System using Oracle using blobs. The question is, will this kill
the oracle server?
Will the performance being in better using File I/O for example using
servlets?

I would like to try it but I hate to mess up our server for doing so.
Are there any benchmarks?
Thomas Schodt <news0310@xenoc .$DEMON.co.uk> wrote in message news:<Xn******* ************@15 8.152.254.254>. ..
"Ryan Stewart" <za****@no.texa s.spam.net> wrote in
news:TI******** ************@te xas.net:
and it works for small files,
but larger ones ... give an
error saying that the data is too large for the field.
Any solutions/help/nudges in the right
direction are greatly appreciated


As a workaround store big files as several slices of 4k (or whatever the
limit is) (maybe in a new table - with a slice-# as part of the key) and
reassemble them at retrieval time.

Jul 19 '05 #8
bigbinc wrote:
This is cool stuff,
"Really idiotic" is the expression I'd use.
Is there anyway to implement a sort of Network
File System using Oracle using blobs. The question is, will this kill
the oracle server?
If used even halfway intensively, yes.
Will the performance being in better using File I/O for example using
servlets?


Yes. A LOT better. Easily 100 times better. It's exactly the thing that
modern file systems try so hard to prevent and CS teaches you to avoid like
the plague: fragment big files into small chunks and scatter them all over
the place so that the HD's latency completely dominates its transfer speed.

Jul 19 '05 #9
"bigbinc" <bi*****@hotmai l.com> wrote in message
news:d1******** *************** ***@posting.goo gle.com...
*made bottom post*
Thomas Schodt <news0310@xenoc .$DEMON.co.uk> wrote in message

news:<Xn******* ************@15 8.152.254.254>. ..
"Ryan Stewart" <za****@no.texa s.spam.net> wrote in
news:TI******** ************@te xas.net:
and it works for small files,
but larger ones ... give an
error saying that the data is too large for the field.
Any solutions/help/nudges in the right
direction are greatly appreciated


As a workaround store big files as several slices of 4k (or whatever the
limit is) (maybe in a new table - with a slice-# as part of the key) and
reassemble them at retrieval time.

This is cool stuff, Is there anyway to implement a sort of Network
File System using Oracle using blobs. The question is, will this kill
the oracle server?
Will the performance being in better using File I/O for example using
servlets?

I would like to try it but I hate to mess up our server for doing so.
Are there any benchmarks?


That's pretty much what I was/am doing: making a file-sharing system. We
managed to get around the 4k limit by bypassing certain things and manually
inserting the file data into the database.
Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
5681
by: Juergen Gerner | last post by:
Hello Python fans, I'm trying and searching for many days for an acceptable solution... without success. I want to store files in a database using BLOB fields. The database table has an ID field (INT, auto_increment), an ORDER field (INT, for knowing the right order) and a "normal" BLOB field. It is planned to split large files in 64k-parts and sort these parts by the ORDER field. Here's some pseudo code how I wanted to implement this...
2
6437
by: David Horowitz | last post by:
Hi folks, I want to be able to store and retrieve UNSAVED Word documents as BLOBs. I got all the info for storing them if they're already saved on the file system. But what if they're not already saved? I could save them to a temp file first and then make it a blob, but I'd rather not put them on the file system at all. I could use Document.Contents to get the Range object for the whole doc and then BLOB that, but I'm not sure that would...
3
4715
by: hamvil79 | last post by:
I'm implementig a java web application using MySQL as database. The main function of the application is basically to redistribuite documents. Those documents (PDF, DOC with an average size around 2Mb) are stored in BLOB column. The amount of documents for the first year should not exceed 5/6 Giga, but I cannot make prevision for the next years. Those documents are mainly just accessed (update and delete are not so
2
2059
by: Joolz | last post by:
Hello everyone, Sorry if this is a FAQ, but I've groups.googled the subject and can't find a definite answer (if such a thing exists). I'm working on a db in postgresql on a debian stable server, ext3 filesystem. The db will contain files, not too many (I expect somewehere between 10 and 100 files max to be inserted daily), and not too big (mostly pdf files, some images. The size will rarely be larger than 1Mb). My plan was to store...
1
1069
by: Sniper | last post by:
Hi guys I am retrieving an attachment using a web service. what would be the fastest way to download the attcahment ? WSE Attacahment or byte array or any other methods ??? tahnks in advice -Ruwan
1
2274
by: bruce_phipps | last post by:
JSPs seem to offer more than one way of storing Objects to a session context for session tracking purposes. Both these seem to work Ok in my JSP code on Tomcat 5.0.x: // using pageContext with session scope pageContext.setAttribute("name", myObject, PageContext.SESSION_SCOPE); // using the session context of HttpServlet session.setAttribute("name",myObject);
0
1891
by: coony | last post by:
Hi everyone, I got an annoying thing going on. I've got an MSSQL db which is filled with different data, used by another program (T-Plan). I should read some table to import in another DB. The DB I have to read, contains als BLOB files. In Excel I created a connection string, can read all fields & values as shown in the DB, but I can't manage to convert the Blobs to Strings (which is the data in the BLOBs). I tried all the next, but...
12
177
by: Ryan Stewart | last post by:
I am in extremely urgent need (by tomorrow) of a way to store files in and retrieve files from an Oracle database using TopLink as an intermediary. I have the JSPs for it, and it works for small files, but larger ones like Word documents and Excel Spreadsheets give an error saying that the data is too large for the field. Can anyone help with this? Our file object has a fileData field which is an array of bytes which is mapped in TopLink to...
3
3315
by: Annonymous Coward | last post by:
I remember readng that BLOBs can be stored externally (with reference to the BLOB file stored in tables instead). Does anyone have any experience doing this ? I have a few questions: 1).what are the things to watch out for (apart from obvious ones like 'file not found' type errors). 2). How may a stored proc be written to fetch the BLOB data ? (An example would be very helpful) 3). How are errors handled in the stored proc that...
0
8371
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8889
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2782
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2017
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.