Topic
  • 5 replies
  • Latest Post - ‏2012-09-18T15:50:23Z by Trampy
PW1R_Ponkumaran_Annadurai
6 Posts

Pinned topic Encountering loader constraint violation while trying to run JSF app

‏2012-01-20T14:07:10Z |
Hello,

I am using Eclipse (Indigo), Wasce 3.0 and DB2 for my project. I am just trying to deploy a JSF project with a single html file. I have added the JSF Mojarra library to the build path while creating the project. I am encountering the following error....
loader constraint violation: when resolving overridden method "org.apache.myfaces.taglib.core.SubviewTag.createVerbatimComponentFromBodyContent()Ljavax/faces/component/UIComponent;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/apache/myfaces/taglib/core/SubviewTag, and its superclass loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader), have different Class objects for the type javax/faces/component/UIComponent used in the signature
java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.apache.myfaces.taglib.core.SubviewTag.createVerbatimComponentFromBodyContent()Ljavax/faces/component/UIComponent;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/apache/myfaces/taglib/core/SubviewTag, and its superclass loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader), have different Class objects for the type javax/faces/component/UIComponent used in the signature
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethods(Class.java:1791)
at org.apache.xbean.finder.AbstractFinder.readClassDef(AbstractFinder.java:603)
at org.apache.xbean.finder.ClassFinder.<init>(ClassFinder.java:134)
at org.apache.geronimo.jasper.deployment.JspModuleBuilderExtension.addGBeans(JspModuleBuilderExtension.java:164)
at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:700)
at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:174)
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:763)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:344)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)
at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265)
at java.security.AccessController.doPrivileged(Native Method)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1367)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Please help me resolve the problem.
Can anyone suggest the proper way to configure eclipse for using JSF 2.0(including the pre-requisite conditions)? I have tried all the methods given in most of the internet sites.

Thank you.
Updated on 2012-09-18T15:50:23Z at 2012-09-18T15:50:23Z by Trampy
  • Ivan.Xu
    Ivan.Xu
    14 Posts

    Re: Encountering loader constraint violation while trying to run JSF app

    ‏2012-01-28T06:43:03Z  
    From the stacktrace, it seems that there is a conflict issue between the server shipped MyFaces library and RI in the application, could you try to stop the myfaces-deployer from the console, then try to redeploy your application.
  • PW1R_Ponkumaran_Annadurai
    6 Posts

    Re: Encountering loader constraint violation while trying to run JSF app

    ‏2012-02-07T06:52:58Z  
    • Ivan.Xu
    • ‏2012-01-28T06:43:03Z
    From the stacktrace, it seems that there is a conflict issue between the server shipped MyFaces library and RI in the application, could you try to stop the myfaces-deployer from the console, then try to redeploy your application.
    It worked correctly when I unchecked the option "Include this library with the application" while creating a new project in eclipse.
  • PW1R_Ponkumaran_Annadurai
    6 Posts

    Re: Encountering loader constraint violation while trying to run JSF app

    ‏2012-02-07T06:55:01Z  
    Uncheck the option "include library with this application" while creating a new project in eclipse
  • SystemAdmin
    SystemAdmin
    2233 Posts

    Re: Encountering loader constraint violation while trying to run JSF app

    ‏2012-02-14T00:56:03Z  
    Uncheck the option "include library with this application" while creating a new project in eclipse
    Even after unchecking the option "Include library with this application", I am facing the same problem.
    Is there a different fix on top of this? Could some one help?

    Thanks in advacne,
    shakthi
  • Trampy
    Trampy
    1 Post

    Re: Encountering loader constraint violation while trying to run JSF app

    ‏2012-09-18T15:50:23Z  
    Even after unchecking the option "Include library with this application", I am facing the same problem.
    Is there a different fix on top of this? Could some one help?

    Thanks in advacne,
    shakthi
    Hi shakthi,
    remove any jar that contains jsf classes, axis classes and any package similar to javax.XXXXXXX.
    Set parent_first and restart your application with