FYI https://issues.apache.org/jira/browse/TOMEE-1851
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> | JavaEE Factory <https://javaeefactory-rmannibucau.rhcloud.com> 2016-06-24 7:57 GMT+02:00 rvinjamu <[email protected]>: > I am done with making Jersey work with Tomee with my application REST > resources bundled in my REST Webapp/web-inf/lib instead of in EAR/lib. But > I > have another problem to solve now - that of classes being loaded from > EAR/lib first. I tried to leverage the tomee.webapp-first=true attribute. > But still I see that classes from EAR/lib are loaded first. Attached is a > EAR that demonstrates this behavior. This ear has a library placed in the > EAR/lib as well as in WEB-INF/lib of the constituent web module. The web > page in the web module invokes a method of this library class and prints > the > return value on the page. The method just returns the classloader name that > loaded the class. To check, deploy the ear in Tomee and then access the > following URL: > > http://localhost:8080/TomeeClassLoaderIssue-war/index.jsp > > For me it just prints "I have been loaded by class > org.apache.openejb.util.classloader.URLClassLoaderFirst" > > However when I remove the library from EAR/lib, it loads from WEB-INF/lib. > > I have checked with the option tomee.webapp-first=true in system.properties > - but without any change in behavior. The sample EAR has been attached > here. > > TomeeClassLoaderIssue.ear > < > http://tomee-openejb.979440.n4.nabble.com/file/n4679042/TomeeClassLoaderIssue.ear > > > > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/Classloading-issues-integrating-Jersey-2-16-and-apache-tomee-plus-7-0-0-tp4678794p4679042.html > Sent from the TomEE Dev mailing list archive at Nabble.com. >
