Is there a way to adjust the context.xml of the webapp when launching by cargo

306 views
Skip to first unread message

Hoa Phan

unread,
Mar 9, 2017, 8:03:44 AM3/9/17
to codehau...@googlegroups.com
Hi,

I'm struggle to find a way to insert:
< JarScanner scanManifest="false" >

Into the context.xml of the webapp launched by cargo. I do not see the context.xml in the .war file itself so I think cargo probably was the one who created it. 
Not sure how though and if I can adjust it as such...

Thanks. Regards,

Hoa Phan.


S. Ali Tokmen

unread,
Mar 10, 2017, 2:58:32 PM3/10/17
to codehau...@googlegroups.com

Dear Hoa

Looking at https://github.com/codehaus-cargo/cargo/tree/master/core/containers/tomcat/src/main/java/org/codehaus/cargo/container/tomcat/TomcatCopyingInstalledLocalDeployer.java it seems Codehaus Cargo should only modify an existing context.xml file when needed; but never overwrite the existing.

Could you share more information about what you're trying to achieve?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/
--
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/CAAaXBY1id1bcnMnjCCbF24dvkYEfxRmRCgPhDhyAY_gTeiHjEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Swan

unread,
Dec 10, 2018, 5:39:06 PM12/10/18
to Codehaus Cargo
I suspect he's trying to fix the problem whereby Tomcat is scanning a bunch of JAR files that do not contain web fragments, which results in a stack trace like this for each one:

[INFO] [talledLocalContainer] java.io.FileNotFoundException: /<redacted>/target/container/tomcat8x/cargo-jira-home/common/lib/idb.jar (No such file or directory)
[INFO] [talledLocalContainer] at java.util.zip.ZipFile.open(Native Method)
[INFO] [talledLocalContainer] at java.util.zip.ZipFile.<init>(ZipFile.java:219)
[INFO] [talledLocalContainer] at java.util.zip.ZipFile.<init>(ZipFile.java:149)
[INFO] [talledLocalContainer] at java.util.jar.JarFile.<init>(JarFile.java:166)
[INFO] [talledLocalContainer] at java.util.jar.JarFile.<init>(JarFile.java:130)
[INFO] [talledLocalContainer] at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(JarFileUrlJar.java:60)
[INFO] [talledLocalContainer] at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:48)
[INFO] [talledLocalContainer] at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:338)
[INFO] [talledLocalContainer] at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:288)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1898)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1126)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:775)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841)
[INFO] [talledLocalContainer] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[INFO] [talledLocalContainer] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:748)
Reply all
Reply to author
Forward
0 new messages