Announcement Announcement Module
Collapse
No announcement yet.
Spring ltw glassfish V3 web app TomcatInstrumentableClassLoader NOT FOUND EXCEPTION Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring ltw glassfish V3 web app TomcatInstrumentableClassLoader NOT FOUND EXCEPTION

    Hi I use Spring LTW for my web app.I use it for tomcat before and it work!.i write my context.xml like this:
    Code:
    <Context>
    	<Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"
    			useSystemClassLoaderAsParent="false"/>
    </Context>
    Yes,it work! but only for tomcat.I trun it out to glassfish,followed the article
    http://static.springsource.org/sprin...-aj-ltw-spring
    Code:
    Note that GlassFish instrumentation-capable ClassLoader is available only in its EAR environment. For GlassFish web applications, follow the Tomcat setup instructions as outlined above.
    YES,it let me just do the same as tomcat,so i just copy it.but the important step is put the spring-instrument-tomcat.jar on the right place.In tomcat,i put it into tomcat/lib and it worked.

    BUT in glassfish,i try to put in glassfish_install/lib,domain_dir/lib,domain_dir/lib/ext,domain_dir/lib/applibs,but it not work,and the exception is that:
    Code:
    java.lang.ClassNotFoundException: org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader not found by org.glassfish.main.web.core [228]
    	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
    	at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
    	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    	at java.lang.Class.forName0(Native Method)
    	at java.lang.Class.forName(Class.java:169)
    	at org.apache.catalina.loader.WebappLoader.createClassLoader(WebappLoader.java:790)
    	at org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:666)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:5298)
    	at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
    	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
    	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
    	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
    	at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2018)
    	at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
    	at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
    	at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
    It can not found my jar,I want to know is that the right place i should put it in or any other step i should do?

    any suggestion thanks.

    My environment is
    Spring 3.1.2.RELEASE
    Glassfish V3.1.2
Working...
X