Closed dominik42 closed 10 years ago
Works for me. What did you do exactly? E.g. can you paste in the changes you made to the stock wrapper.conf
?
The origin error message is gone ... there was a problem during the maven packaging phase and the resulting executable jar file itself was wrong and the same error was shown for starting the jar the normal way (java -jar ...) without the wrapper. After fixing the packaging phase and including an assembly descriptor in order to assemble a bin-tar including the spring boot jar, the wrapper and all that configuration stuff, everything works except one exception during the startup phase of the spring boot application. But nevertheless, the app is up'n'running.
java.net.MalformedURLException: no !/ in spec
at java.net.URL.<init>(URL.java:619)
at java.net.URL.<init>(URL.java:482)
at java.net.URL.<init>(URL.java:431)
at org.springframework.boot.loader.jar.JarURLConnection.<init>(JarURLConnection.java:73)
at org.springframework.boot.loader.jar.Handler.openConnection(Handler.java:75)
at java.net.URL.openConnection(URL.java:971)
at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:250)
at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:221)
at org.springframework.boot.context.embedded.tomcat.SkipPatternJarScanner.scan(CustomSkipPatternJarScanner.java:51)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:266)
at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:562)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException: no !/ in spec
at sun.net.www.protocol.jar.Handler.parseAbsoluteSpec(Handler.java:170)
at sun.net.www.protocol.jar.Handler.parseURL(Handler.java:150)
at java.net.URL.<init>(URL.java:614)
That might be an issue with the Boot class loader, or it might be a problem with your wrapper config. Can you paste in your wrapper.conf
(or the deltas from the standard one)? A sample project would help a lot. Probably it's fixed in 1.1.3 anyway.
Hi,
here is my working wrapper conf (for wrapper 3.2.3)
wrapper.java.command=java
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.library.path.1=../lib
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperJarApp
wrapper.app.parameter.1=../lib/mdeWebServices-MarcAurel-1.0-SNAPSHOT.jar wrapper.app.parameter.2=--logging.config=../config/log4j.properties
wrapper.java.additional.1=-Dproject.short=ma wrapper.java.additional.2=-Djava.awt.headless=true wrapper.java.additional.3=-Dcom.sun.management.jmxremote.port=10992 wrapper.java.additional.4=-Dcom.sun.management.jmxremote.authenticate=false wrapper.java.additional.5=-Dcom.sun.management.jmxremote.ssl=false wrapper.java.additional.6=-XX:MaxPermSize=64m wrapper.java.additional.7=-Xss512k
wrapper.java.initmemory=128
wrapper.java.maxmemory=512
wrapper.ping.timeout=0 wrapper.disable_shutdown_hook=TRUE
wrapper.max_failed_invocations=15
wrapper.restart.delay=5 wrapper.restart.reload_configuration=TRUE
wrapper.umask=0002 wrapper.java.umask=0002
wrapper.console.format=PM
wrapper.console.loglevel=INFO
wrapper.logfile=../log/wrapper-mdeWebServices.log
wrapper.logfile.format=LPTM
wrapper.logfile.loglevel=INFO
wrapper.logfile.maxsize=2m
wrapper.logfile.maxfiles=10
wrapper.syslog.loglevel=NONE
wrapper.console.title=SICSone MDEWebServices MarcAurel
Gruß:Dominik
Am 12.08.2014 um 13:08 schrieb Patrice:
I know this one is closed, but I have the same issue. Difference is that my Spring Boot App works as an executable jar no problem. But with the tanuki wrapper it stops witn the 'Unable to determine code source archive' . What did you do to make that go away? Can you provide a wrapper conf that worked for you? Thanks!
— Reply to this email directly or view it on GitHub.
BTW, why your email isn't listed at GitHub ???
Am 12.08.2014 um 13:08 schrieb Patrice:
I know this one is closed, but I have the same issue. Difference is that my Spring Boot App works as an executable jar no problem. But with the tanuki wrapper it stops witn the 'Unable to determine code source archive' . What did you do to make that go away? Can you provide a wrapper conf that worked for you? Thanks!
— Reply to this email directly or view it on GitHub.
Hi thanks for the reply. My fault I, deleted my comment thinking it was no use to comment a closed case. Anyway thanks for the wrapper.conf. I see no real difference with my setup. So maybe my problem is in the executable jar. I've setup a simple spring boot app, like gs-spring-boot. (http://spring.io/guides/gs/spring-boot/) Stanalone it runs fine by itself. With the tanuki wrapper I get java.lang.IllegalStateException: Unable to determine code source archive. And that is a Spring exception. may have something to do with Spring not being able to determine a certain (jar)path?
If you can share your wrapper configuration there's a chance someone might be able to see the error.
Ok, here it is. Maybe I should mention I'm on Windows 7, java 8, and wrapper 3.5.24 (all 64 bit)
#********************************************************************
#* Wrapper Java Properties
#********************************************************************
wrapper.java.command=java
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperJarApp
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.library.path.1=../lib
wrapper.java.additional.auto_bits=TRUE
wrapper.java.additional.1=-Dproject.short=ma
wrapper.java.additional.2=-Djava.awt.headless=true
wrapper.java.additional.3=-XX:MaxPermSize=64m
wrapper.java.additional.4=-Xss512k
wrapper.java.initmemory=128
wrapper.java.maxmemory=512
wrapper.ping.timeout=0
wrapper.max_failed_invocations=15
wrapper.restart.delay=5
wrapper.restart.reload_configuration=TRUE
wrapper.app.parameter.1=../lib/gs-spring-boot-0.1.0.jar
#********************************************************************
#* Wrapper Logging Properties
#********************************************************************
wrapper.debug=TRUE
wrapper.console.format=PM
wrapper.console.loglevel=INFO
wrapper.logfile=../logs/wrapper.log
wrapper.logfile.format=LPTM
wrapper.logfile.loglevel=INFO
wrapper.logfile.maxsize=2m
wrapper.logfile.maxfiles=10
wrapper.syslog.loglevel=NONE
#********************************************************************
#* Wrapper General Properties
#********************************************************************
wrapper.ignore_sequence_gaps=TRUE
wrapper.pidfile.strict=TRUE
wrapper.console.title=My simple springboot
I have the same problem. The TanukiSoftware is not used in my case, but the maven-jar-plugin.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Unable to determine code source archive
at org.springframework.boot.loader.Launcher.createArchive(Launcher.java:147)
at org.springframework.boot.loader.PropertiesLauncher.getProperty(PropertiesLauncher.java:427)
at org.springframework.boot.loader.PropertiesLauncher.getProperty(PropertiesLauncher.java:389)
at org.springframework.boot.loader.PropertiesLauncher.getArgs(PropertiesLauncher.java:330)
at org.springframework.boot.loader.PropertiesLaunch
It seems related to the project being a maven project (B) that is dependant on another maven project (A). When I run mvn clean install
on project A and then run mvn clean install
on project B, the problem usually goes away.
@dvtoever Could you please open a new issue if you're still having problems. Please provide some more details and ideally a sample project that replicates the issue.
We use the Java Service Wrapper from TanukiSoftware for production environments of our java applications. Now I want to start a Spring Boot App as executable jar file the same way, but I've got the following exception:
Any suggestions ?