You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by RamAESIS <rs...@hcl.in> on 2009/03/05 15:51:04 UTC

Oracle LONG datatypes as persistent field problem

Hi,

I have an Oracle LONG type as a column for persistence in the entity. While
retrieving this entity JPA throws and exception saying "Stream already
closed". The reason for this exception is that the connection stream is
closed once we retrieve the data from LONG columns in oracle JDBC driver.
The solution/workaround is to retrieve the value of LONG column  in the end.
But even if i change the order of declaration so that the LONG column is at
the end the SQL PrepareStatement is generated with column names arranged in
alphabetical order i.e. LONG column comes in the middle. Is there any way to
force the ordering of columns in generated PreparedStatement, please help...

Regards,
Ram
-- 
View this message in context: http://n2.nabble.com/Oracle-LONG-datatypes-as-persistent-field-problem-tp2429848p2429848.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Re: Oracle LONG datatypes as persistent field problem

Posted by Craig L Russell <Cr...@Sun.COM>.
Hi Ram,

I haven't heard of this issue (retrieving blob data is a basic feature).

It sounds like the best way forward would be to have a reproducing  
test case attached to a JIRA issue to see what might be causing this  
particular failure. Can you file an issue?

Thanks,

Craig

On Mar 5, 2009, at 6:51 AM, RamAESIS wrote:

>
> Hi,
>
> I have an Oracle LONG type as a column for persistence in the  
> entity. While
> retrieving this entity JPA throws and exception saying "Stream already
> closed". The reason for this exception is that the connection stream  
> is
> closed once we retrieve the data from LONG columns in oracle JDBC  
> driver.
> The solution/workaround is to retrieve the value of LONG column  in  
> the end.
> But even if i change the order of declaration so that the LONG  
> column is at
> the end the SQL PrepareStatement is generated with column names  
> arranged in
> alphabetical order i.e. LONG column comes in the middle. Is there  
> any way to
> force the ordering of columns in generated PreparedStatement, please  
> help...
>
> Regards,
> Ram
> -- 
> View this message in context: http://n2.nabble.com/Oracle-LONG-datatypes-as-persistent-field-problem-tp2429848p2429848.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Craig L Russell
Architect, Sun Java Enterprise System http://db.apache.org/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!