CLOB fields with XmlDataSet

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

CLOB fields with XmlDataSet

jimpo
How can I insert CLOB fields using XmlDataSet? I attempted to just include the field contents normally as in:

            <column>id</column>
        <column>message_type</column>
        <column>message</column>
        <row>
            <value description="id">1</value>
            <value description="message_type">1</value>
            <value description="message">foomessage</value>
        </row>
   
   
(message_cache.message is CLOB field), but this results in error:

[INFO] [dbunit:operation {execution: default}]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error executing database operation: CLEAN_INSERT

Embedded error: IO-poikkeus: Software caused connection abort: socket write error
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error executing database operation: CLEAN_INSERT
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
        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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error executing database operation: CLEAN_INSERT
        at org.codehaus.mojo.dbunit.OperationMojo.execute(OperationMojo.java:110)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        ... 16 more
Caused by: java.sql.SQLException: IO-poikkeus: Software caused connection abort: socket write error
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
        at oracle.jdbc.driver.OracleConnection.close(OracleConnection.java:1442)
        at org.dbunit.database.DatabaseConnection.close(DatabaseConnection.java:78)
        at org.codehaus.mojo.dbunit.OperationMojo.execute(OperationMojo.java:105)
        ... 18 more

I am using Oracle 10, org.dbunit.ext.oracle.OracleDataTypeFactory, Maven 2 & dbunit-maven-plugin 1.0-beta-1 (which uses dbunit 2.2)