9 Replies Latest reply on Feb 17, 2009 3:04 AM by Hugo Wurzelbutz

    LinkageError: loader constraint violation

    Hugo Wurzelbutz Newbie

      Hi

      I'm using Richfaces 3.3.0.GA and SEAM 2.1.1 GA. When i try to implement a rich:tree i get the following exception(other rich components work fine):

      09:14:58,656 WARN [ExceptionFilter] handling uncaught exception
      javax.servlet.ServletException: Servlet execution threw an exception
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      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:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      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:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "org.richfaces.component.state.TreeState.isExpanded(Lorg/richfaces/model/TreeRowKey;)Z" the class loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) of the current class, org/richfaces/component/UITree, and the class loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) for resolved class, org/richfaces/component/state/TreeState, have different Class objects for the type org/richfaces/model/TreeRowKey used in the signature
      at org.richfaces.component.UITree.isExpanded(UITree.java:544)
      at org.richfaces.renderkit.TreeRendererBase$RendererDataModelEventNavigator.<init>(TreeRendererBase.java:106)
      at org.richfaces.renderkit.TreeRendererBase$RendererDataModelEventNavigator.<init>(TreeRendererBase.java:87)
      at org.richfaces.renderkit.TreeRendererBase.writeContent(TreeRendererBase.java:624)
      at org.richfaces.renderkit.TreeRendererBase.encodeChildren(TreeRendererBase.java:601)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
      at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
      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)
      ... 41 more
      09:14:58,656 WARN [ExceptionFilter] exception root cause
      09:14:58,656 WARN [ExceptionFilter] running exception handlers
      09:14:59,062 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/deploy/Project-ear.ear/Project.war/WEB-INF/lib/jboss-seam-mail.jar!/META-INF/seam-mail.taglib.xml
      09:14:59,062 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/deploy/Project-ear.ear/Project.war/WEB-INF/lib/jboss-seam-pdf.jar!/META-INF/seam-pdf.taglib.xml
      09:14:59,062 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/deploy/Project-ear.ear/Project.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/s.taglib.xml
      09:14:59,062 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/deploy/Project-ear.ear/Project.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
      09:14:59,062 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/deploy/Project-ear.ear/Project.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
      09:14:59,078 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/deploy/Project-ear.ear/Project.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
      09:14:59,078 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/deploy/Project-ear.ear/Project.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
      09:14:59,078 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/deploy/Project-ear.ear/Project.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
      09:14:59,078 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/deploy/Project-ear.ear/Project.war/WEB-INF/lib/richfaces-ui-3.3.0.GA.jar!/META-INF/a4j.taglib.xml
      09:14:59,078 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/lib/richfaces-ui-3.3.0.GA.jar!/META-INF/a4j.taglib.xml
      09:14:59,093 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/deploy/Project-ear.ear/Project.war/WEB-INF/lib/richfaces-ui-3.3.0.GA.jar!/META-INF/ajax4jsf.taglib.xml
      09:14:59,093 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/lib/richfaces-ui-3.3.0.GA.jar!/META-INF/ajax4jsf.taglib.xml
      09:14:59,093 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/deploy/Project-ear.ear/Project.war/WEB-INF/lib/richfaces-ui-3.3.0.GA.jar!/META-INF/jsp.taglib.xml
      09:14:59,093 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/lib/richfaces-ui-3.3.0.GA.jar!/META-INF/jsp.taglib.xml
      09:14:59,109 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/deploy/Project-ear.ear/Project.war/WEB-INF/lib/richfaces-ui-3.3.0.GA.jar!/META-INF/rich.taglib.xml
      09:14:59,109 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/lib/richfaces-ui-3.3.0.GA.jar!/META-INF/rich.taglib.xml
      09:14:59,109 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/deploy/Project-ear.ear/Project.war/WEB-INF/lib/richfaces-ui-3.3.0.GA.jar!/META-INF/richfaces.taglib.xml
      09:14:59,109 ERROR [STDERR] 10.02.2009 09:14:59 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/D:/Prg/JBossSeam/jboss/jboss-4.2.2.GA/server/default/lib/richfaces-ui-3.3.0.GA.jar!/META-INF/richfaces.taglib.xml


      xhtml page:
      <h:form>
       <rich:tree switchType="ajax" >
       <rich:recursiveTreeNodesAdaptor id="config"
       roots="#{listAction.rootNodes}"
       var="config"
       nodes="#{config.subProjekte}"
       >
       <rich:treeNode>
       <h:outputText value="#{config.projektName}" />
       </rich:treeNode>
      
       </rich:recursiveTreeNodesAdaptor>
       </rich:tree>
       </h:form>


      the bean looks like this:
      @Name("listAction")
      public class ListAction implements ListActionInterface{
      
       @In
       FacesMessages facesMessages;
       @PersistenceContext(unitName="UnitA")
       EntityManager em;
       @In
       JbpmContext jbpmContext;
      
       private TreeState treeState;
       @DataModel
       private List<Projekt> rNodes;
      
       @DataModel
       private List<Projekt> childNodes = null;
      
       public List<Projekt> getRootNodes() {
      
       if (rNodes == null) {
      
       rNodes = em.createQuery(
       "from Projekt c where c.rootProjekt is null")
       .getResultList();
       }
       return rNodes;
       }
      
       @Remove @Destroy
       public void remove(){
      
       }
      }


      Class Projekt has a Method getSubProjekte which returns a List.

      I really don't know what i am doing wrong :/

      Hope you can help,
      BR Hugo

        • 1. Re: LinkageError: loader constraint violation
          Ilya Shaikovsky Master

          did you using EAR deployment? If so, where did you placed RF libraries?

          • 2. Re: LinkageError: loader constraint violation
            Hugo Wurzelbutz Newbie

            Yes.
            here is an overview of my server\deploy folder:

            Project-ear.ear
            -META-INF
            -Project.war
            -Project-ejb.jar
            --WEB-INF
            ---lib
            ----richfaces-api-3.3.0.GA.jar
            ----richfaces-impl-3.3.0.GA.jar
            ----richfaces-ui-3.3.0.GA.jar
            -richfaces-api-3.3.0.GA.jar
            -richfaces-impl-3.3.0.GA.jar
            -richfaces-ui-3.3.0.GA.jar
            


            • 3. Re: LinkageError: loader constraint violation
              Ilya Shaikovsky Master

              api only libs should be in ear and impl and ui should be in war.

              • 4. Re: LinkageError: loader constraint violation
                Hugo Wurzelbutz Newbie

                now it works very well, thanks a lot!

                • 5. Re: LinkageError: loader constraint violation
                  Hugo Wurzelbutz Newbie

                  ok i was wrong.
                  The tree is displayed and i can see the top levels but as soon as i try to expand a node i get the following exception:

                  21:10:52,140 ERROR [STDERR] 10.02.2009 21:10:52 com.sun.facelets.FaceletViewHandler handleRenderException
                  SCHWERWIEGEND: Error Rendering View[/test.xhtml]
                  javax.faces.FacesException: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: at.Project.ProjectTicket.Model.Projekt.subProjekte, no session or session was closed
                   at org.richfaces.renderkit.TreeRendererBase.encodeAjaxChildren(TreeRendererBase.java:494)
                   at org.ajax4jsf.component.UIDataAdaptor.encodeAjaxChild(UIDataAdaptor.java:454)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:104)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:67)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:115)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxChildren(AjaxChildrenRenderer.java:67)
                   at org.ajax4jsf.renderkit.AjaxChildrenRenderer.encodeAjaxComponent(AjaxChildrenRenderer.java:115)
                   at org.ajax4jsf.renderkit.AjaxContainerRenderer.encodeAjax(AjaxContainerRenderer.java:123)
                   at org.ajax4jsf.component.AjaxViewRoot.encodeAjax(AjaxViewRoot.java:677)
                   at org.ajax4jsf.component.AjaxViewRoot.encodeChildren(AjaxViewRoot.java:548)
                   at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
                   at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
                   at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
                   at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
                   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.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
                   at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                   at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                   at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                   at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
                   at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
                   at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
                   at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
                   at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
                   at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                   at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                   at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
                   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
                   at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                   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:230)
                   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
                   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                   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:262)
                   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                   at java.lang.Thread.run(Unknown Source)
                  Caused by: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: at.Project.ProjectTicket.Model.Projekt.subProjekte, no session or session was closed
                   at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
                   at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
                   at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:97)
                   at org.hibernate.collection.PersistentBag.size(PersistentBag.java:225)
                   at org.richfaces.model.SequenceDataModel.getRowCount(SequenceDataModel.java:91)
                   at org.richfaces.model.StackingTreeModel.isEmpty(StackingTreeModel.java:110)
                   at org.richfaces.model.StackingTreeModel.isLeaf(StackingTreeModel.java:267)
                   at org.richfaces.component.UITree.isLeaf(UITree.java:534)
                   at org.richfaces.renderkit.html.TreeNodeRenderer.doEncodeBegin(TreeNodeRenderer.java:125)
                   at org.richfaces.renderkit.html.TreeNodeRenderer.doEncodeBegin(TreeNodeRenderer.java:106)
                   at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101)
                   at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
                   at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:280)
                   at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement.process(TreeRendererBase.java:254)
                   at org.richfaces.model.AbstractTreeDataModel.processElement(AbstractTreeDataModel.java:116)
                   at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:296)
                   at org.richfaces.model.StackingTreeModel.walk(StackingTreeModel.java:377)
                   at org.richfaces.component.UITree.walk(UITree.java:422)
                   at org.richfaces.renderkit.TreeRendererBase.writeContent(TreeRendererBase.java:655)
                   at org.richfaces.renderkit.TreeRendererBase.encodeAjaxChildren(TreeRendererBase.java:474)
                   ... 59 more


                  this is my entity:

                  @Entity
                  @Name("projekt")
                  @Table(name="PROJEKT",schema = "A")
                  public class Projekt implements Serializable {
                  
                   private static final long serialVersionUID = 6790259134654495125L;
                  
                   long ProjektID
                   Projekt RootProjekt;
                   List<Projekt> SubProjekte;
                  
                   @Id @Column(name="PROJEKTID")
                   public long getProjektID() {
                   return ProjektID;
                   }
                   public void setProjektID(long projektID) {
                   ProjektID = projektID;
                   }
                  
                   @ManyToOne
                   @NotFound(action=NotFoundAction.IGNORE)
                   @JoinColumn(name="ROOTPROJEKTID")
                   public Projekt getRootProjekt() {
                   return RootProjekt;
                   }
                   public void setRootProjekt(Projekt rootProjekt) {
                   RootProjekt = rootProjekt;
                   }
                  
                   @OneToMany(mappedBy="rootProjekt",fetch=FetchType.EAGER)
                   @NotFound(action=NotFoundAction.IGNORE)
                   @JoinColumn(name="ROOTPROJEKTID",referencedColumnName="PROJEKTID")
                   public List<Projekt> getSubProjekte() {
                   return SubProjekte;
                   }
                   public void setSubProjekte(List<Projekt> subProjekte) {
                   SubProjekte = subProjekte;
                   }
                  }


                  and this is my bean:
                  @Stateful
                  @Name("listAction")
                  @Scope(ScopeType.CONVERSATION)
                  public class ListAction implements ListActionInterface{
                  
                  
                   @PersistenceContext(unitName="unitA",type = PersistenceContextType.EXTENDED)
                  
                  
                   private TreeState treeState;
                   @DataModel
                   private List<Projekt> rNodes;
                  
                   @DataModel
                   private List<Projekt> childNodes = null;
                  
                   @Begin(join=true)
                   public List<Projekt> getRootNodes() {
                  
                   if (rNodes == null) {
                  
                   System.out.println("In configTreeManager getrootNodes.....");
                  
                   rNodes = em.createQuery(
                   "from Projekt c where c.rootProjekt is null")
                   .getResultList();
                   System.out.println("Done");
                   System.out.println("rNodes size:"+rNodes.size());
                   }
                   return rNodes;
                   }
                  
                   @Remove @Destroy
                   public void remove(){
                  
                   }
                  }


                  as you can see i use fetchType.EAGER so i dont understand why there is a LazyInitializationException.

                  do you have an idea why this happens?

                  • 6. Re: LinkageError: loader constraint violation
                    Hugo Wurzelbutz Newbie

                     

                    "wurzelbutz" wrote:
                    now it works very well, thanks a lot!

                    strange things are going on...
                    today i started my application and i again get the
                    java.lang.LinkageError: loader constraint violation: when resolving method "org.richfaces.component.state.TreeState.isExpanded(Lorg/richfaces/model/TreeRowKey;)Z" the class loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) of the current class, org/richfaces/component/UITree, and the class loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) for resolved class, org/richfaces/component/state/TreeState, have different Class objects for the type org/richfaces/model/TreeRowKey used in the signature

                    error. i checked the file system, it is the same as yesterday.
                    :/

                    • 7. Re: LinkageError: loader constraint violation
                      Hugo Wurzelbutz Newbie

                      any hint on what is going wrong?

                      thanks in advance.
                      hugo

                      • 8. Re: LinkageError: loader constraint violation
                        Nick Belaevski Master

                         

                        as you can see i use fetchType.EAGER so i dont understand why there is a LazyInitializationException.

                        do you have an idea why this happens?

                        Please try to use Seam-managed persistence context borrowed by @In annotation (see Seam reference for more information).

                        • 9. Re: LinkageError: loader constraint violation
                          Hugo Wurzelbutz Newbie

                          thanks for the answer. i'll have a try as soon as i manage to solve the error of the post on Feb 11.