Re: big text in string as object over the network: very strange?

2001-06-22 Thread Tobias Streckel

I think the specification has declareted this but orion support the BLOB
under CMP.

See the database schema oracle.xml:

type-mapping type=java.io.Serializable name=blob /

this entry is a default!



-Ursprüngliche Nachricht-
Von: Simon Evans [EMAIL PROTECTED]
An: Orion-Interest [EMAIL PROTECTED]
Datum: Donnerstag, 21. Juni 2001 23:02
Betreff: RE: big text in string as object over the network: very strange?


CMP Entity beans do not support CLOB and BLOB fields...neither 1.1 or 2.0
EJB Specification. you will need to use a Bean Managed Entity Bean and use
the JDBC API with CLOB and BLOB. You save them and retrieve them as Streams
rather than objects.

-Original Message-
From: Metla, Suri [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 9:48 AM
To: Orion-Interest
Subject: RE: big text in string as object over the network: very
strange?


Are there any Data types in Java to access the Long and CLOB columns of the
Oracle Database? The first bottleneck comes with the JDBC driver to map the
Database columns of these types (BLOBS, CLOBS).

Regards,
Suri

-Original Message-
From: Tobias Streckel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 9:32 AM
To: Orion-Interest
Subject: Re: big text in string as object over the network: very strange?

Very strange

Okay, now I want to create a entity bean which have as attribute a
object(this object have a only StringBuffer() object).

The create method of the entity will be access from a session bean(in the
same apps). The client have access on the session bean.

If the session bean call the create method of the entity and the
StingBuffer
is small it will work.

If the StringBuffer() containts a String about 200 KB it throws the message

javax.ejb.CreateException: Error creating EntityBean: E/A-Exception:
Connection
reset by peer: socket write error

If the String is bigger than 600 kb I will get the Message:

com.evermind.server.rmi.RMIConnectionException
com.evermind.server.rmi.OrionRemoteException: Disconnected: Disconnected


WHAT HAPPENS´???
I HAVE NO ANSWER HOW I CAN GET IT TO WORK!

THANKS!

Tobi

-Ursprüngliche Nachricht-
Von: Tobias Streckel [EMAIL PROTECTED]
An: [EMAIL PROTECTED] [EMAIL PROTECTED]
Datum: Donnerstag, 21. Juni 2001 13:11
Betreff: Re: big text in string as object over the network:


Hy,

I want to save a file. In the database I have used a BLOB datatyp for the
field. What kind of variable is used in the Entity Bean to save the File.

Is it a java.io.File object?

Thanks a lot

by

Tobi








RE: big text in string as object over the network:

2001-06-22 Thread elephantwalker

AFAIK, the Oracle 1.2 jdbc driver has problems with clobs and blobs. They
don't work.  The oci drivers don't seem to have this issue, but that doesn't
help you if you are using linux.

You should try a simple servlet w/jdbc code  Oracle database. Skip the
ejb's in this step just to see if it is a driver problem. If this doens't
work, you know what your problem is.

Binary data is serialized with the Long Raw datatype as noted in the
oracle-schema.xml. So if you have a cmp ejb, Long Raw would be used. You
might try that in your datatype for the simple servlet test.

regards,

the elephantwalker


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Tobias
Streckel
Sent: Thursday, June 21, 2001 4:07 AM
To: Orion-Interest
Subject: big text in string as object over the network:


Hello,

if I want to save a String(he is in a object which will save in a Oracle DB
as a BLOB) I get by huge texts a Error:

com.evermind.server.rmi.RMIConnectionException
com.evermind.server.rmi.OrionRemoteException: Disconnected: Disconnected

Have anyone a answer why it doesn't work?

Thanks

Tobi







Re: big text in string as object over the network:

2001-06-21 Thread Tobias Streckel

It dosn't work with a StringBuffer object.

I will get the same error message, I think it was a connection problem - but
I don't know what to do?

Anyone a idea?

-Ursprüngliche Nachricht-
Von: Jens Stutte [EMAIL PROTECTED]
An: Orion-Interest [EMAIL PROTECTED]
Datum: Donnerstag, 21. Juni 2001 14:36
Betreff: AW: big text in string as object over the network:


This may be related to an old Java problem, that strings over 65535
characters or so could not be serialized. I don't know, by when if ever it
was fixed by Sun, but try using StringBuffer instead. If this works, you
found the problem...

Regards,

Jens Stutte

 -Ursprüngliche Nachricht-
 Von: Tobias Streckel [mailto:[EMAIL PROTECTED]]
 Gesendet am: Donnerstag, 21. Juni 2001 13:07
 An: Orion-Interest
 Betreff: big text in string as object over the network:

 Hello,

 if I want to save a String(he is in a object which will save
 in a Oracle DB
 as a BLOB) I get by huge texts a Error:

 com.evermind.server.rmi.RMIConnectionException
 com.evermind.server.rmi.OrionRemoteException: Disconnected:
 Disconnected

 Have anyone a answer why it doesn't work?

 Thanks

 Tobi









Re: big text in string as object over the network: very strange?

2001-06-21 Thread Tobias Streckel

Very strange

Okay, now I want to create a entity bean which have as attribute a
object(this object have a only StringBuffer() object).

The create method of the entity will be access from a session bean(in the
same apps). The client have access on the session bean.

If the session bean call the create method of the entity and the StingBuffer
is small it will work.

If the StringBuffer() containts a String about 200 KB it throws the message

javax.ejb.CreateException: Error creating EntityBean: E/A-Exception:
Connection
reset by peer: socket write error

If the String is bigger than 600 kb I will get the Message:

com.evermind.server.rmi.RMIConnectionException
com.evermind.server.rmi.OrionRemoteException: Disconnected: Disconnected


WHAT HAPPENS´???
I HAVE NO ANSWER HOW I CAN GET IT TO WORK!

THANKS!

Tobi

-Ursprüngliche Nachricht-
Von: Tobias Streckel [EMAIL PROTECTED]
An: [EMAIL PROTECTED] [EMAIL PROTECTED]
Datum: Donnerstag, 21. Juni 2001 13:11
Betreff: Re: big text in string as object over the network:


Hy,

I want to save a file. In the database I have used a BLOB datatyp for the
field. What kind of variable is used in the Entity Bean to save the File.

Is it a java.io.File object?

Thanks a lot

by

Tobi






RE: big text in string as object over the network:

2001-06-21 Thread Setlur, Atul (MED)

You need to select the row for update, then open a stream and write the
string by opening an output stream.
I am including a link to the Oracle documentation:
http://oradoc.photo.net/ora81/DOC/java.815/a64685/oraext4.htm#1043272
Hope it helps.
-Atul


-Original Message-
From: Tobias Streckel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 8:13 AM
To: Orion-Interest
Subject: Re: big text in string as object over the network:


It dosn't work with a StringBuffer object.

I will get the same error message, I think it was a connection problem -
but
I don't know what to do?

Anyone a idea?

-Ursprüngliche Nachricht-
Von: Jens Stutte [EMAIL PROTECTED]
An: Orion-Interest [EMAIL PROTECTED]
Datum: Donnerstag, 21. Juni 2001 14:36
Betreff: AW: big text in string as object over the network:


This may be related to an old Java problem, that strings over 65535
characters or so could not be serialized. I don't know, by when if ever
it
was fixed by Sun, but try using StringBuffer instead. If this works,
you
found the problem...

Regards,

Jens Stutte

 -Ursprüngliche Nachricht-
 Von: Tobias Streckel [mailto:[EMAIL PROTECTED]]
 Gesendet am: Donnerstag, 21. Juni 2001 13:07
 An: Orion-Interest
 Betreff: big text in string as object over the network:

 Hello,

 if I want to save a String(he is in a object which will save
 in a Oracle DB
 as a BLOB) I get by huge texts a Error:

 com.evermind.server.rmi.RMIConnectionException
 com.evermind.server.rmi.OrionRemoteException: Disconnected:
 Disconnected

 Have anyone a answer why it doesn't work?

 Thanks

 Tobi









RE: big text in string as object over the network:

2001-06-21 Thread Smith Jason

Is there some sort of connection time out stuff on the Oracle server?

Is there something on the Oracle server that kills connections after X
seconds?

Can you save another binary object of the same size as your String to the
BLOB field?

There is an inactivity timeout variable in the Orion datasources. Probably
won't help you, but what happens if you change that from the default of 30
to something bigger?

Good luck!

Jason

-Original Message-
From: Tobias Streckel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 3:13 PM
To: Orion-Interest
Subject: Re: big text in string as object over the network:


It dosn't work with a StringBuffer object.

I will get the same error message, I think it was a connection problem - but
I don't know what to do?

Anyone a idea?

-Ursprüngliche Nachricht-
Von: Jens Stutte [EMAIL PROTECTED]
An: Orion-Interest [EMAIL PROTECTED]
Datum: Donnerstag, 21. Juni 2001 14:36
Betreff: AW: big text in string as object over the network:


This may be related to an old Java problem, that strings over 65535
characters or so could not be serialized. I don't know, by when if ever it
was fixed by Sun, but try using StringBuffer instead. If this works, you
found the problem...

Regards,

Jens Stutte

 -Ursprüngliche Nachricht-
 Von: Tobias Streckel [mailto:[EMAIL PROTECTED]]
 Gesendet am: Donnerstag, 21. Juni 2001 13:07
 An: Orion-Interest
 Betreff: big text in string as object over the network:

 Hello,

 if I want to save a String(he is in a object which will save
 in a Oracle DB
 as a BLOB) I get by huge texts a Error:

 com.evermind.server.rmi.RMIConnectionException
 com.evermind.server.rmi.OrionRemoteException: Disconnected:
 Disconnected

 Have anyone a answer why it doesn't work?

 Thanks

 Tobi









RE: big text in string as object over the network: very strange?

2001-06-21 Thread Metla, Suri

Are there any Data types in Java to access the Long and CLOB columns of the
Oracle Database? The first bottleneck comes with the JDBC driver to map the
Database columns of these types (BLOBS, CLOBS).

Regards,
Suri

-Original Message-
From: Tobias Streckel [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, June 21, 2001 9:32 AM
To: Orion-Interest
Subject: Re: big text in string as object over the network: very strange?

Very strange

Okay, now I want to create a entity bean which have as attribute a
object(this object have a only StringBuffer() object).

The create method of the entity will be access from a session bean(in the
same apps). The client have access on the session bean.

If the session bean call the create method of the entity and the StingBuffer
is small it will work.

If the StringBuffer() containts a String about 200 KB it throws the message

javax.ejb.CreateException: Error creating EntityBean: E/A-Exception:
Connection
reset by peer: socket write error

If the String is bigger than 600 kb I will get the Message:

com.evermind.server.rmi.RMIConnectionException
com.evermind.server.rmi.OrionRemoteException: Disconnected: Disconnected


WHAT HAPPENS´???
I HAVE NO ANSWER HOW I CAN GET IT TO WORK!

THANKS!

Tobi

-Ursprüngliche Nachricht-
Von: Tobias Streckel [EMAIL PROTECTED]
An: [EMAIL PROTECTED] [EMAIL PROTECTED]
Datum: Donnerstag, 21. Juni 2001 13:11
Betreff: Re: big text in string as object over the network:


Hy,

I want to save a file. In the database I have used a BLOB datatyp for the
field. What kind of variable is used in the Entity Bean to save the File.

Is it a java.io.File object?

Thanks a lot

by

Tobi






RE: big text in string as object over the network:

2001-06-21 Thread Eduardo Estefano

We also had a similar problem and so far have not found any fix. 
I think the error is in the oracle driver but I'm not sure.

Strings less than 4000 chars can be converted to binary and saved using a
stmt.setBinaryStream()
Strings over 4000 chars do not get saved.



 -Original Message-
From:   Jens Stutte [mailto:[EMAIL PROTECTED]] 
Sent:   Thursday, June 21, 2001 4:49 AM
To: Orion-Interest
Subject:AW: big text in string as object over the network:

This may be related to an old Java problem, that strings over 65535
characters or so could not be serialized. I don't know, by when if ever it
was fixed by Sun, but try using StringBuffer instead. If this works, you
found the problem...

Regards,

Jens Stutte

 -Ursprüngliche Nachricht-
 Von: Tobias Streckel [mailto:[EMAIL PROTECTED]]
 Gesendet am: Donnerstag, 21. Juni 2001 13:07
 An: Orion-Interest
 Betreff: big text in string as object over the network:
 
 Hello,
 
 if I want to save a String(he is in a object which will save 
 in a Oracle DB
 as a BLOB) I get by huge texts a Error:
 
 com.evermind.server.rmi.RMIConnectionException
 com.evermind.server.rmi.OrionRemoteException: Disconnected: 
 Disconnected
 
 Have anyone a answer why it doesn't work?
 
 Thanks
 
 Tobi