Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

maven - dbunit - derby

 
peter cooke
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to set up dbunit to load tables in netbeans derby, am having problems.

can someone tell me what is wrong with my pom.xml or what "Embedded error: dss chained with same id at end of same id chain parse" is?



When I run maven I get

[dbunitperation]
------------------------------------------------------------------------
[ERROR]BUILD ERROR
------------------------------------------------------------------------
Error executing database operation: CLEAN_INSERT

Embedded error: dss chained with same id at end of same id chain parse
------------------------------------------------------------------------
Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error executing database operation: CLEAN_INSERT
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
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:597)
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:109)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: org.apache.derby.client.am.DisconnectException: dss chained with same id at end of same id chain parse
at org.apache.derby.client.net.Reply.zThrowSyntaxError(Unknown Source)
at org.apache.derby.client.net.Reply.endOfSameIdChainData(Unknown Source)
at org.apache.derby.client.net.NetConnectionReply.readAccessDatabase(Unknown Source)
at org.apache.derby.client.net.NetConnection.readSecurityCheckAndAccessRdb(Unknown Source)
at org.apache.derby.client.net.NetConnection.flowSecurityCheckAndAccessRdb(Unknown Source)
at org.apache.derby.client.net.NetConnection.flowUSRIDPWDconnect(Unknown Source)
at org.apache.derby.client.net.NetConnection.flowConnect(Unknown Source)
at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
at org.codehaus.mojo.dbunit.AbstractDbUnitMojo.createConnection(AbstractDbUnitMojo.java:185)
at org.codehaus.mojo.dbunit.OperationMojo.execute(OperationMojo.java:92)
... 19 more
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I can tell, your Derby database is corrupt. It's not a Maven error.

Of course, by "corrupt", that might mean that the plugin is looking in the wrong location for your database directory if you're running the standalone (non-server) mode of Derby. There's an environment variable you should be able to set on the Maven command line that I think will address that, but its name is buried in the Derby documentation somewhere.
 
peter cooke
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am running the default netbeans 6.8 (the "all" distribution)

derby came with netbeans. I can use netbeans to sign into the DB and add/remove/query data from netbeans.
 
peter cooke
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I could not find anything for this error.
Ended up installing mysql and problem did not occur.
I may revisit trying to get dbunit working with derby
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic