problematic-microservices icon indicating copy to clipboard operation
problematic-microservices copied to clipboard

Some problem to launch demo in jfrtracer branch.

Open gunlee01 opened this issue 6 years ago • 4 comments

I met the trouble below after run mvn package the project and ./target/bin/xxxService. Did I miss something?

Failed to scan [file:/xxx/problematic-microservices/robotshop-order-service/target/repo/org/glassfish/jaxb/jaxb-jxc/2.4.0-b180725.0644/txw2-2.4.0-b180725.0644.jar] from classloader hierarchy

gunlee01 avatar Oct 26 '18 09:10 gunlee01

Failed to scan [file:/Users/gunlee/Documents/workspace/github/problematic-microservices/robotshop-customer-service/target/repo/org/glassfish/jaxb/jaxb-jxc/2.4.0-b180725.0644/txw2-2.4.0-b180725.0644.jar] from classloader hierarchy
java.io.FileNotFoundException: /Users/gunlee/Documents/workspace/github/problematic-microservices/robotshop-customer-service/target/repo/org/glassfish/jaxb/jaxb-jxc/2.4.0-b180725.0644/txw2-2.4.0-b180725.0644.jar (No such file or directory)
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:219)
	at java.util.zip.ZipFile.<init>(ZipFile.java:149)
	at java.util.jar.JarFile.<init>(JarFile.java:166)
	at java.util.jar.JarFile.<init>(JarFile.java:130)
	at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:188)
	at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(JarFileUrlJar.java:65)
	at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:49)
	at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:374)
	at org.apache.tomcat.util.scan.StandardJarScanner.processURLs(StandardJarScanner.java:309)
	at org.apache.tomcat.util.scan.StandardJarScanner.doScanClassPath(StandardJarScanner.java:266)
	at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:229)
	at org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1888)
	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1116)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:765)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

gunlee01 avatar Oct 26 '18 09:10 gunlee01

I typically only get that when running on JDK8. When running on JDK11, using the generated launchers (target/bin/*Service), I don't see that problem. I haven't bothered to check why the problem occurs, but as far as I can tell it doesn't affect the actual running of the micro service. I.e. even if you get that exception, it is only a failure to scan some zip files (for what I assume is annotations), and it will not affect the running of the micro service.

thegreystone avatar Oct 26 '18 14:10 thegreystone

Thank you. Let me check something more.

gunlee01 avatar Oct 28 '18 11:10 gunlee01

Hi @gunlee01!

Did you find out a good way to do something about this? Since I am registering stuff explicitly, I think it's probably ok to disable the scanning altogether, however that is done.

thegreystone avatar May 03 '19 12:05 thegreystone