<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I'm not to familiar with maven, but I don't think I checked in the latest poms.<div><br></div><div>I'm not clear as to why it would get a ClassDefNotFoundError. That sounds like a class path error.</div><div><br><div>-- DM</div><div><br><div><div>On Apr 17, 2010, at 1:50 PM, Chris Burrell wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">Hi<div><br></div><div>I'm trying to get my project to compile/run against the JSword POM. I'm hitting a couple of issues (which might be related)</div>
<div><br></div><div>1st: mvn clean install fails to retrieve a dependency, which is not very helpful. However it does seem &nbsp;to build common and JSword properly. I posted a message recently on this, but there was no feedback?</div>
<div><br></div><div>2nd, when trying to use it to install some bible versions, I get a ClassDefNotFoundError which is due to a NullPointerException in NetUtil class.</div><div><br></div><div>It seems that we're not forming a proper URL from:</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;URL index = ResourceUtil.getResource(ReadingsBookDriver.class, "readings.txt"); //$NON-NLS-1$</div><div><br></div><div>I'm not familiar with what the correct behaviour should be. I've checked that JAR that the Maven plugin builds, and readings.txt does indeed exist. Does anyone have any ideas?</div>
<div><br></div><div>This only happens through Maven when I run my packaged jar. When I run this through Eclipse it seems fine, which sounded to me like it be a dependency issue, but I can't figure our what the problem is...</div>
<div>Any ideas anyone?</div><div>Cheers,</div><div>Chris</div><div><br></div><div><br></div><div>Output from Maven:</div><div><div>[DEBUG] Collected project classpath [D:\temp\release_final_test\step-dataloader\target\classes]</div>
<div>[DEBUG] Adding to classpath : file:/D:/temp/release_final_test/step-dataloader/target/classes/</div><div>[DEBUG] Adding project dependency artifact: jsword to classpath</div><div>[DEBUG] Adding project dependency artifact: log4j to classpath</div>
<div>[DEBUG] Adding project dependency artifact: jsword-common to classpath</div><div>[DEBUG] Adding project dependency artifact: commons-codec to classpath</div><div>[DEBUG] Adding project dependency artifact: commons-httpclient to classpath</div>
<div>[DEBUG] Adding project dependency artifact: commons-logging to classpath</div><div>[DEBUG] Adding project dependency artifact: commons-net to classpath</div><div>[DEBUG] Adding project dependency artifact: oro to classpath</div>
<div>[DEBUG] Adding project dependency artifact: javatar to classpath</div><div>[DEBUG] Adding project dependency artifact: jdom to classpath</div><div>[DEBUG] Adding project dependency artifact: lucene-core to classpath</div>
<div>[DEBUG] Adding project dependency artifact: lucene-snowball to classpath</div><div>[DEBUG] Adding project dependency artifact: lucene-smartcn to classpath</div><div>[DEBUG] Adding project dependency artifact: lucene-analyzers to classpath</div>
<div>[DEBUG] Adding project dependency artifact: commons-dbutils to classpath</div><div>[DEBUG] Adding project dependency artifact: commons-io to classpath</div><div>[DEBUG] Adding project dependency artifact: commons-lang to classpath</div>
<div>[DEBUG] Adding project dependency artifact: opencsv to classpath</div><div>[DEBUG] Adding project dependency artifact: derbyclient to classpath</div><div>[DEBUG] Adding project dependency artifact: derby to classpath</div>
<div>[DEBUG] joining on thread Thread[com.tyndalehouse.step.dataloader.Dataloader.main(),5,com.tyndalehouse.step.dataloader.Dataloader]</div><div>[DEBUG] Setting accessibility to true in order to invoke main().</div><div>
Using connection string: jdbc:derby:C:\Documents and Settings\CJBurrell/TyndaleStep/StepDB;create=true</div><div>0 &nbsp; &nbsp;[com.tyndalehouse.step.dataloader.Dataloader.main()] WARN &nbsp;com.tyndalehouse.step.dataloader.loaders.JSwordModuleInstaller &nbsp;- Creating new installer for JSw</div>
<div>ord</div><div>Currently hardcoded installer host to:<a href="http://www.crosswire.org/" target="_blank" style="color: rgb(0, 0, 204); ">www.crosswire.org</a></div><div>Currently hardcoded property names for step</div>
<div>Setting to (<a href="http://www.crosswire.org/" target="_blank" style="color: rgb(0, 0, 204); ">www.crosswire.org</a>&nbsp;via&nbsp;<a href="http://10.154.1.44:8080/" target="_blank" style="color: rgb(0, 0, 204); ">10.154.1.44:8080</a>)</div>
<div>Setting package and catalog directories</div><div>641 &nbsp;[com.tyndalehouse.step.dataloader.Dataloader.main()] INFO &nbsp;com.tyndalehouse.step.dataloader.loaders.JSwordModuleInstaller &nbsp;- installing ESV</div><div>[INFO] ------------------------------------------------------------------------</div>
<div>[ERROR] BUILD ERROR</div><div>[INFO] ------------------------------------------------------------------------</div><div>[INFO] An exception occured while executing the Java class. null</div><div><br></div><div>[INFO] ------------------------------------------------------------------------</div>
<div>[DEBUG] Trace</div><div>org.apache.maven.lifecycle.LifecycleExecutionException: An exception occured while executing the Java class. null</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at java.lang.reflect.Method.invoke(Method.java:597)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.codehaus.classworlds.Launcher.main(Launcher.java:375)</div><div>Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. null</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:338)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;... 17 more</div><div>Caused by: java.lang.reflect.InvocationTargetException</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at java.lang.reflect.Method.invoke(Method.java:597)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at java.lang.Thread.run(Thread.java:619)</div><div><b>Caused by: java.lang.ExceptionInInitializerError</b></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at java.lang.reflect.Method.invoke(Method.java:597)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.crosswire.jsword.book.Books.autoRegister(Books.java:426)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.crosswire.jsword.book.Books.initialize(Books.java:407)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.crosswire.jsword.book.Books.&lt;init&gt;(Books.java:59)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.crosswire.jsword.book.Books.&lt;clinit&gt;(Books.java:473)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at com.tyndalehouse.step.dataloader.loaders.JSwordModuleInstaller.installBible(JSwordModuleInstaller.java:46)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at com.tyndalehouse.step.dataloader.loaders.JSwordModuleInstaller.installDefaultModules(JSwordModuleInstaller.java:33)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at com.tyndalehouse.step.dataloader.Dataloader.main(Dataloader.java:33)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;... 6 more</div><div><b>Caused by: java.lang.NullPointerException</b></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.crosswire.common.util.NetUtil.getInputStream(NetUtil.java:415)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.crosswire.common.util.NetUtil.listByIndexFile(NetUtil.java:544)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at&nbsp;<b>org.crosswire.jsword.book.readings.ReadingsBookDriver.getInstalledReadingsSets(ReadingsBookDriver.java:91)</b></div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.crosswire.jsword.book.readings.ReadingsBookDriver.&lt;init&gt;(ReadingsBookDriver.java:50)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;at org.crosswire.jsword.book.readings.ReadingsBookDriver.&lt;clinit&gt;(ReadingsBookDriver.java:119)</div>
</div><div><br></div><div><br></div><div>my dependencies:</div><div><div><span style="white-space: pre; ">&lt;dependency&gt;
                                &lt;groupId&gt;org.crosswire&lt;/groupId&gt;
                                &lt;artifactId&gt;jsword&lt;/artifactId&gt;
                                &lt;version&gt;1.6.1-SNAPSHOT&lt;/version&gt;
&lt;/dependency&gt;</span></div></div><div><br></div><div>My plugin to run the jar:</div><div><br></div><div><div><span style="white-space: pre; ">                </span>&lt;plugins&gt;</div><div><span style="white-space: pre; ">                        </span>&lt;plugin&gt;</div>
<div><span style="white-space: pre; ">                                </span>&lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;</div><div><span style="white-space: pre; ">                                </span>&lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;</div><div><span style="white-space: pre; ">                                </span>&lt;configuration&gt;</div>
<div><span style="white-space: pre; ">                                        </span>&lt;mainClass&gt;com.tyndalehouse.step.dataloader.Dataloader&lt;/mainClass&gt;</div><div><span style="white-space: pre; ">                                        </span>&lt;systemProperties&gt;</div><div><span style="white-space: pre; ">                                                </span>&lt;systemProperty&gt;</div>
<div><span style="white-space: pre; ">                                                        </span>&lt;key&gt;db.location&lt;/key&gt;</div><div><span style="white-space: pre; ">                                                        </span>&lt;value&gt;${db.directory}&lt;/value&gt;</div><div><span style="white-space: pre; ">                                                </span>&lt;/systemProperty&gt;</div>
<div><span style="white-space: pre; ">                                                </span>&lt;systemProperty&gt;</div><div><span style="white-space: pre; ">                                                        </span>&lt;key&gt;step.http.proxy&lt;/key&gt;</div><div><span style="white-space: pre; ">                                                        </span>&lt;value&gt;${step.http.proxy}&lt;/value&gt;</div>
<div><span style="white-space: pre; ">                                                </span>&lt;/systemProperty&gt;</div><div><span style="white-space: pre; ">                                                </span>&lt;systemProperty&gt;</div><div><span style="white-space: pre; ">                                                        </span>&lt;key&gt;step.http.port&lt;/key&gt;</div>
<div><span style="white-space: pre; ">                                                        </span>&lt;value&gt;${step.http.port}&lt;/value&gt;</div><div><span style="white-space: pre; ">                                                </span>&lt;/systemProperty&gt;</div><div><span style="white-space: pre; ">                                        </span>&lt;/systemProperties&gt;</div>
<div><span style="white-space: pre; ">                                        </span>&lt;classpathScope&gt;runtime&lt;/classpathScope&gt;</div><div><span style="white-space: pre; ">                                </span>&lt;/configuration&gt;</div><div><span style="white-space: pre; ">                        </span>&lt;/plugin&gt;</div>
</div><div><br></div><div><br></div></span>
_______________________________________________<br>jsword-devel mailing list<br><a href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a><br>http://www.crosswire.org/mailman/listinfo/jsword-devel<br></blockquote></div><br></div></div></body></html>