• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jboss, myfaces, tomahawk - HELP badly needed....

 
Karol Oslowski
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I'm using Jboss 4.0.3 SP1 and myfaces 1.1.1, I'm having a project
consisting of an EJB application and a web application. Both projects are
in one ear. I'm having an entity bean whose method is returning an instace
of the class TreeNodeBase which can be found in tomahawk.jar, This method
is called by an backing bean... But - I'm having really hard problems with
tomahawk.jar, if I put it inside the WEB-INF/lib of the web project, and
make it visible to the EJB project by an entry in manifest.mf I get:

****
Caused by: java.lang.LinkageError: Class
org/apache/myfaces/custom/tree2/TreeNodeBase violates loader constraints
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1629)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2365)
at java.lang.Class.getDeclaredMethod(Class.java:1907)
at
java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1327)
at
java.io.ObjectStreamClass.access$1600(ObjectStreamClass.java:47)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:394)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:373)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:268)
at java.io.ObjectStreamClass.initProxy(ObjectStreamClass.java:464)
at
java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1502)
at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1457)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at
org.jboss.invocation.MarshalledValue.get(MarshalledValue.java:78)
at
org.jboss.invocation.InvokerInterceptor.invokeMarshalled(InvokerInterceptor.java:203)
... 72 more

****

Usually this exception means that a jar is located in two places in the
classpath but this time I'm completely sure it's not the case.

If I put tomahawk.jar outside the web project that is:

in the ear's main directory or
in the jboss'es lib,
in the tomcat's lib

I get the following message:

****


javax.servlet.ServletException: /admin/console.jsp(20,0) The absolute uri:
http://myfaces.apache.org/extensions cannot be resolved in either web.xml
or the jar files deployed with this application
javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

root cause

javax.faces.FacesException: /admin/console.jsp(20,0) The absolute uri:
http://myfaces.apache.org/extensions cannot be resolved in either web.xml
or the jar files deployed with this application

org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)

org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)

org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


****

Please help me, I would be grateful for any advice, I spend working on it
like 30 hours, once it has even worked but after deleting the tmp and work
directories it stopped, that makes me believe that it is possible to make
it work somehow...

Thanks in andvance for any help

Karol Oslowski
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not sure if this is the same problem I had, but try setting UseJBossWebLoader to true in jboss-4.x.x\server\XXX\deploy\jbossweb-tomcat50.sar\jboss-service.xml

These two docs may help as well:
http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases
 
Karol Oslowski
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

unfortunatelly it didn't work in my case I tried it, thank you for the link's I am unable to find anything about it there but maybe I'll read it more deeply later. I would be grateful for any other suggestions.

Kind regards,

k.

Originally posted by Jessica Sant:
not sure if this is the same problem I had, but try setting UseJBossWebLoader to true in jboss-4.x.x\server\XXX\deploy\jbossweb-tomcat50.sar\jboss-service.xml

These two docs may help as well:
http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases
 
Karol Oslowski
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Someone on another forum had the same problem and here is the solution:

extract all tld's from the myfaces-all.jar,
copy the myfaces-all.jar to the lib of the server,

and that's it !

I guess it is not the nicest solution but it is working..

k.
 
Mert Nuhoglu
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The new application servers detect tld files in jars automatically. I don't know about jboss but tomcat-5 or jetty-5 doesn't need you to define each tld in web.xml.

http://mert-on-software.blogspot.com
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic