openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Thompson" <at2...@columbia.edu>
Subject RE: JPA and streams
Date Mon, 01 Mar 2010 14:58:03 GMT
Did you try @Lob?

http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_mapping_jpa.html
http://www.ibmpressbooks.com/articles/article.asp?p=1192350&seqNum=4

I struggled with this also about a year ago when I was trying to refactor some legacy code
and eventually gave up due to an imminent deadline - so I'm curious to hear how you solve
this also.

-Andy


-----Original Message-----
From: Hiran Chaudhuri [mailto:hiran.chaudhuri@amadeus.com]
Sent: Mon 3/1/2010 9:46 AM
To: users@openjpa.apache.org
Subject: JPA and streams
 

Hi there. 

I'm trying to get OpenJPA running with Inputstreams. Somehow I always get Exceptions using
OpenJPA 1.2.1, Oracle JDBC driver 10.2.0.4.0 and Oracle Database 10g Enterprise Edition Release
10.2.0.4.0 - 64bit Production. 
The entity in question contains one field maked as: 
    @Persistent 
    InputStream data; 

This is the exception obtained: 

Exception in thread "main" <openjpa-1.2.1-r752877:753278 fatal store error> org.apache.openjpa.persistence.RollbackException:
null 
        at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:523)

        at ... 
Caused by: <openjpa-1.2.1-r752877:753278 nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
null 
        at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1834) 
        at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)

        at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1350) 
        at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:877) 
        at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:512)

        ... 1 more 
Caused by: java.lang.NullPointerException 
        at org.apache.openjpa.jdbc.sql.DBDictionary.updateBlob(DBDictionary.java:4304) 
        at org.apache.openjpa.jdbc.meta.strats.LobFieldStrategy.customInsert(LobFieldStrategy.java:112)

        at org.apache.openjpa.jdbc.meta.FieldMapping.customInsert(FieldMapping.java:701) 
        at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager$CustomMapping.execute(AbstractUpdateManager.java:375)

        at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:94)

        at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:72)

        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:717)

        at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)

        at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2010) 
        at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1908) 
        at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1826) 
        ... 5 more 

Any ideas or workarounds? 

Hiran 


Hiran Chaudhuri
System Support Programmer / Analyst
IT Service Assurance
E-Commerce Service Assurance
Amadeus Data Processing GmbH
Berghamer Strasse 6
85435 Erding
T: +49-8122-43x3662
hiran.chaudhuri@amadeus.com
http://www.amadeus.com <http://www.amadeus.com/>  

Amadeus logo <http://www.amadeus.com/> 







Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message