Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CascadingClassLoadHelper cannot load when there is a space in the file path #13

Closed
Franknozly opened this issue Sep 3, 2015 · 6 comments

Comments

@Franknozly
Copy link
Contributor

If you put the jar file into a path with a space (like c:\program files (x86)\etc) it will fail to find the file path to the jar file and throws java.io.FileNotFoundException: C:\Program%20Files%20(x86).....\etc.jar (The system cannot find the file specified).

@timmolter
Copy link
Member

Can you provide a stack trace as well?

@Franknozly
Copy link
Contributor Author

INFO [2015-09-08 17:37:27,973] com.xeiam.sundial.plugins.AnnotationJobTriggerPlugin: Loading annotated jobs from com.xxxx.xxx.jobs.
INFO [2015-09-08 17:37:27,973] org.quartz.classloading.CascadingClassLoadHelper: Package: 'com.xxxx.xxx.jobs' becomes Resource: 'jar:file:/C:/Program%20Files%20(x86)/Google/google/xxx.xxxx.com-1.0.jar!/com/xxxx/xxx/jobs'
ERROR [2015-09-08 17:37:27,976] com.xeiam.sundial.ee.SundialInitializerListener: Sundial Scheduler failed to initialize:
! java.io.FileNotFoundException: C:\Program%20Files%20(x86)\Google\google\xxx.xxxx.com-1.0.jar (The system cannot find the path specified)
! at java.util.zip.ZipFile.open(Native Method) ~[na:1.8.0_60]
! at java.util.zip.ZipFile.(Unknown Source) ~[na:1.8.0_60]
! at java.util.zip.ZipFile.(Unknown Source) ~[na:1.8.0_60]
! at java.util.jar.JarFile.(Unknown Source) ~[na:1.8.0_60]
! at java.util.jar.JarFile.(Unknown Source) ~[na:1.8.0_60]
! at org.quartz.classloading.CascadingClassLoadHelper.processJarfile(CascadingClassLoadHelper.java:264) ~[xxx.xxxx.com-1.0.jar:na]
! ... 42 common frames omitted
! Causing: java.lang.RuntimeException: Unexpected IOException reading JAR File '/C:/Program%20Files%20(x86)/Google/google/xxx.xxxx.com-1.0.jar'
! at org.quartz.classloading.CascadingClassLoadHelper.processJarfile(CascadingClassLoadHelper.java:266) ~[xxx.xxxx.com-1.0.jar:na]
! at org.quartz.classloading.CascadingClassLoadHelper.getJobClasses(CascadingClassLoadHelper.java:223) ~[xxx.xxxx.com-1.0.jar:na]
! at com.xeiam.sundial.plugins.AnnotationJobTriggerPlugin.start(AnnotationJobTriggerPlugin.java:72) ~[xxx.xxxx.com-1.0.jar:na]
! at org.quartz.QuartzScheduler.startPlugins(QuartzScheduler.java:1102) ~[xxx.xxxx.com-1.0.jar:na]
! at org.quartz.QuartzScheduler.start(QuartzScheduler.java:211) ~[xxx.xxxx.com-1.0.jar:na]
! at com.xeiam.sundial.ee.SundialInitializerListener.contextInitialized(SundialInitializerListener.java:123) ~[xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [xxx.xxxx.com-1.0.jar:na]
! at com.codahale.metrics.jetty9.InstrumentedHandler.doStart(InstrumentedHandler.java:103) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:140) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.server.handler.StatisticsHandler.doStart(StatisticsHandler.java:232) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.server.Server.start(Server.java:387) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.server.Server.doStart(Server.java:354) [xxx.xxxx.com-1.0.jar:na]
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [xxx.xxxx.com-1.0.jar:na]
! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [xxx.xxxx.com-1.0.jar:na]
! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:43) [xxx.xxxx.com-1.0.jar:na]
! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:76) [xxx.xxxx.com-1.0.jar:na]
! at io.dropwizard.cli.Cli.run(Cli.java:70) [xxx.xxxx.com-1.0.jar:na]
! at io.dropwizard.Application.run(Application.java:73) [xxx.xxxx.com-1.0.jar:na]
! at com.xxx.xxxx.Application.main(Application.java:30) [xxx.xxxx.com-1.0.jar:na]

@timmolter
Copy link
Member

Try setting your path with leading /// instead of /. I don't think it has to do with the spaces.

http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx

@Franknozly
Copy link
Contributor Author

It is not a path I set, it is where the dropwizard jar is located. I have
already forked your sundial project and successfully made a simple fix by
replacing %20 with ' '.

I'll try your suggestion later and see if it is an improperly formatted uri
string instead.

On Wed, Sep 9, 2015, 1:16 AM Tim Molter notifications@github.com wrote:

Try setting your path with leading /// instead of /. I don't think it has
to do with the spaces.

http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx


Reply to this email directly or view it on GitHub
#13 (comment).

@timmolter
Copy link
Member

@Franknozly OK, yeah that makes sense actually. If you forh it and have found a fix, please create a pull request, and I'll happily merge it. Thanks!

@timmolter
Copy link
Member

done via PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants