Details
-
Type: Bug
-
Status: Closed (View Workflow)
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.6
-
Fix Version/s: See Resolution
-
Component/s: build
-
Labels:None
Description
When trying to use the JSword jars to install some bible versions, I get a ClassDefNotFoundError which is due to a NullPointerException in NetUtil class.
During debug, I am able to figure out the reason for the URISyntaxException
"Illegal character in opaque part at index 22: jar:file:/C:/Documents and" (indicating spaces in the URL)
The following method in NetUtils returns a null because a URISyntaxException is being caught
public static URI toURI(URL url) {
try
catch (URISyntaxException e)
{ return null; }}
The exception is being caught because of url.toExternalForm() leaving space characters.
The following stack trace is seen during the test phase of the maven build:
Caused by: java.lang.ExceptionInInitializerError
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.crosswire.jsword.book.Books.autoRegister(Books.java:426)
at org.crosswire.jsword.book.Books.initialize(Books.java:407)
at org.crosswire.jsword.book.Books.<init>(Books.java:59)
at org.crosswire.jsword.book.Books.<clinit>(Books.java:473)
at com.tyndalehouse.step.dataloader.loaders.JSwordModuleInstaller.installBible(JSwordModuleInstaller.java:46)
at com.tyndalehouse.step.dataloader.loaders.JSwordModuleInstaller.installDefaultModules(JSwordModuleInstaller.java:33)
at com.tyndalehouse.step.dataloader.Dataloader.main(Dataloader.java:33)
... 6 more
Caused by: java.lang.NullPointerException
at org.crosswire.common.util.NetUtil.getInputStream(NetUtil.java:415)
at org.crosswire.common.util.NetUtil.listByIndexFile(NetUtil.java:544)
at org.crosswire.jsword.book.readings.ReadingsBookDriver.getInstalledReadingsSets(ReadingsBookDriver.java:91)
at org.crosswire.jsword.book.readings.ReadingsBookDriver.<init>(ReadingsBookDriver.java:50)
at org.crosswire.jsword.book.readings.ReadingsBookDriver.<clinit>(ReadingsBookDriver.java:119)