1 Reply Latest reply on Nov 17, 2005 11:20 AM by Karol Oslowski

    Problems wit myfaces 1.1.1 and tomahawk.jar - help badly nee

    Karol Oslowski Newbie

      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.(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
      much more than 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...

      I've read a lot about classloading but I still cannot help anything...

      Thanks in andvance for any help

      Karol Oslowski