[Beginners Corner] - how to package ear and lib, classloader issue
by javatwo
I have an ear application with entity,business and web modules.
<application ...>
foo.par
bar.ejb3
<web-uri>baz.war</web-uri>
<context-root>/</context-root>
The .par, .ejb3 and war files use classes in common.jar. I put the common.jar under /server/default/lib.
In the common.jar,
String className = System.getProperty("FooClassName");
Class.forName(className).newInstance();
trying to instantiate the package.Foo that is defined in web module inside the ear file,
throws a exception:
java.lang.ClassNotFoundException: No ClassLoaders found for: package.Foo
the package.Foo is application specific and can not be put into common.jar that is a common library. However the common lib needs to instantiate the application specific class.
How to solve this issue?
Thanks for any help.
Dave
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131916#4131916
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131916
16 years, 8 months
[Tomcat, HTTPD, Servlets & JSP] - Unable to run facelets numberguess example in JBoss 5
by Annegret
Hi,
We tried to run the numberguess example, which is shipped with the facelets-1.1.13 release on JBoss5.0.0.Beta4.
Just extracted JBoss5 and adding the numberguess.war-file.
The following error occurs during rendering:
"SCHWERWIEGEND: Missing Built-in Tag Libraries! Make sure they are included within the META-INF directory of Facelets' Jar"
Browser stacktrace
| An Error Occurred:
| java.lang.NullPointerException
| +- Stack Trace
| java.lang.NullPointerException
| at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
| at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
| at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
| at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:509)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:552)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:189)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:90)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:96)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:309)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
| +- Component Tree
| <UIViewRoot locale="de_DE" renderKitId="HTML_BASIC" rendered="true" transient="false" viewId="/guess.xhtml"/>
| +- Scoped Variables
| Request Parameters Name Value
| None
| Request Attributes Name Value
| None
| Application Attributes Name Value
| None
|
JBoss logfile
| ag=JBoss_5_0_0_Beta4 date=200802091115)] Started in 29s:10ms
| 15:03:30,298 ERROR [STDERR] 25.02.2008 15:03:30 com.sun.facelets.compiler.Compiler initialize
| SCHWERWIEGEND: Missing Built-in Tag Libraries! Make sure they are included within the META-INF directory of Facelets' Jar
| 15:03:30,371 ERROR [STDERR] 25.02.2008 15:03:30 com.sun.facelets.FaceletViewHandler handleRenderException
| SCHWERWIEGEND: Error Rendering View[/guess.xhtml]
| java.lang.NullPointerException
| at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
| at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
| at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
| at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:509)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:552)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:189)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:90)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:96)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:309)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
|
There was a bug report for WebSphere ApplicationServer concerning this error:
http://www-1.ibm.com/support/docview.wss?uid=swg1PK50311
| Error description
| The NullPointerException is thrown in WebSphere Application
| Server V6.1.0.9 due to the inability of class loader to read the
| META-INF/ directory resource:
|
| Error Message:
| Error Code: 500
| Target Servlet: Faces Servlet
| Error Stack:
| java.lang.NullPointerException
|
| at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHan
| dler.java:49)
| at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandl
| er.java:25)
| at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.jav
| a:95)
| Local fix
| N/A
| Problem summary
| ****************************************************************
| * USERS AFFECTED: IBM WebSphere Application Server users of *
| * JavaServer Facelets. *
| ****************************************************************
| * PROBLEM DESCRIPTION: A NullPointerException is thrown from *
| * the Facelets library. *
| ****************************************************************
| * RECOMMENDATION: *
| ****************************************************************
| The Facelets library is unable to load tag libraries because
| the application class loader resource searching fails to
| return META-INF directories.
| Problem conclusion
| The application class loader resource searching has been
| updated to properly return META-INF directories.
| The fix for this APAR is currently targeted for inclusion in
| fixpaks 5.1.1.16, 6.0.2.23, and 6.1.0.13.
| Please refer to the recommended updates page for delivery
| information:
| http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
|
Is this a bug in JBoss too ?
Anybody got numberguess example running in JBoss 5 ?
Does anybody have an idea what to do ?
Annegret
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131895#4131895
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4131895
16 years, 8 months