openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milosz Tylenda (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-525) Inserts new entity with NULL value for Clob column actually inserts empty string
Date Wed, 24 Jun 2009 18:08:07 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723662#action_12723662
] 

Milosz Tylenda commented on OPENJPA-525:
----------------------------------------

Could you please check the possible impact this change has on the streaming LOB functionality?
Not very sure it is because of this this but that functionality is now broken. The tests are
named ReaderLobTest and InputStreamLobTest. Although they are not executed by the test suite,
the functionality is described in user manual (I have no idea why someone named the tests
that way causing the test suite to skip them - oversight?). Note that the tests require a
database other than Derby to run on.

One of stack traces I am receiving with MySQL:

        at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:984)
        at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:878)
        at org.apache.openjpa.kernel.DelegatingBroker.find(DelegatingBroker.java:201)
        at org.apache.openjpa.persistence.EntityManagerImpl.find(EntityManagerImpl.java:464)
        at org.apache.openjpa.jdbc.meta.strats.AbstractLobTest.testSetResetAndFlush(AbstractLobTest.java:254)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at org.apache.openjpa.persistence.test.PersistenceTestCase.runBare(PersistenceTestCase.java:475)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at org.apache.openjpa.persistence.test.PersistenceTestCase.run(PersistenceTestCase.java:190)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Caused by: java.lang.ClassCastException: org.apache.openjpa.jdbc.schema.DynamicSchemaFactory$DynamicColumn
        at org.apache.openjpa.jdbc.sql.ResultSetResult.getCharacterStreamInternal(ResultSetResult.java:305)
        at org.apache.openjpa.jdbc.sql.AbstractResult.getCharacterStream(AbstractResult.java:499)
        at org.apache.openjpa.jdbc.meta.strats.LobFieldStrategy.load(LobFieldStrategy.java:181)
        at org.apache.openjpa.jdbc.meta.FieldMapping.load(FieldMapping.java:912)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1015)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:967)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:628)
        at org.apache.openjpa.kernel.DelegatingStoreManager.load(DelegatingStoreManager.java:116)
        at org.apache.openjpa.datacache.DataCacheStoreManager.load(DataCacheStoreManager.java:393)
        at org.apache.openjpa.kernel.DelegatingStoreManager.load(DelegatingStoreManager.java:116)
        at org.apache.openjpa.kernel.ROPStoreManager.load(ROPStoreManager.java:78)
        at org.apache.openjpa.kernel.StateManagerImpl.loadFields(StateManagerImpl.java:2989)
        at org.apache.openjpa.kernel.StateManagerImpl.load(StateManagerImpl.java:405)
        at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:971)
        ... 32 more


> Inserts new entity with NULL value for Clob column actually inserts empty string
> --------------------------------------------------------------------------------
>
>                 Key: OPENJPA-525
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-525
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.0.0, 1.0.2, 1.1.0, 2.0.0
>         Environment: OpenJPA 1.0.0, 1.0.2
> Oracle XE 10g (JDBC driver 10.2.0.3.0
> JRE 1.5.0_13
>            Reporter: Frank Le
>             Fix For: 1.1.1, 2.0.0
>
>         Attachments: OPENJPA525.patch, OPENJPA525_1_1_x.patch
>
>
> Inserts new entity with NULL value for Clob column with "nullable = true" actually inserts
empty string as the value!
> Here's the persistence class:
> public class Exam... {
>     @Lob
>     private String text;
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message