7 Replies Latest reply on May 8, 2009 10:03 AM by Oguzhan YALCIN

    DataModel java.lang.IllegalAccessError

    Oguzhan YALCIN Newbie

      Hi,
      I've converted my project to EAR. I've created a SFSB like below.



      @Stateful
      @Scope(ScopeType.CONVERSATION)
      @Name("listTask")
      public class TaskList extends DataModelList<Task> implements ITaskList {
      
              @In
              PageParamHandler paramHandler;
              
              @Logger
              Log log;
              
              @DataModel
              public List<Task> dmTask;
              
              @In
              EntityManager entityManager;
              
              @DataModelSelection
              @Out(required=false,scope=ScopeType.PAGE)
              public Task dmsTask;
              
              @Create
              public void initializeSuper(){
                      super.initialize(entityManager,new Task());
              }       
      
              @Factory("dmTask")
              public void create(){
                      dmTask=super.search();
              }
              
              public List<Task> getAllTasks(){
                      return super.search();
              }
              
              @Remove @Destroy
              public void finalize(){
                      
              }
              
      }
      
      @Local
      interface ITaskList {
      
              public List<Task> getAllTasks();
              public void initializeSuper();
              public void create();
              public void finalize();
              
      }




      When I try to access the bean, I get the error below:



      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.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:235)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
              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:158)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
              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:619)
      Caused by: java.lang.IllegalAccessError: class com.taykos.list.$Proxy206 cannot access its superinterface com.taykos.list.ITaskList
              at java.lang.reflect.Proxy.defineClass0(Native Method)
              at java.lang.reflect.Proxy.getProxyClass(Proxy.java:504)
              at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
              at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.redefineProxyInTcl(ProxyObjectFactory.java:349)
              at org.jboss.ejb3.proxy.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:134)
              at org.jboss.ejb3.proxy.objectfactory.session.stateful.StatefulSessionProxyObjectFactory.getProxy(StatefulSessionProxyObjectFactory.java:64)
              at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:156)
              at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
              at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1438)
              at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1455)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:809)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
              at javax.naming.InitialContext.lookup(InitialContext.java:392)
              at org.jboss.seam.Component.instantiateSessionBean(Component.java:1367)
              at org.jboss.seam.Component.instantiate(Component.java:1331)
              at org.jboss.seam.Component.newInstance(Component.java:2084)
              at org.jboss.seam.Component.getInstance(Component.java:1988)
              at org.jboss.seam.Component.getInstance(Component.java:1950)
              at org.jboss.seam.Component.getInstance(Component.java:1944)
              at org.jboss.seam.Component.getInstanceFromFactory(Component.java:2036)
              at org.jboss.seam.Component.getInstance(Component.java:1978)
              at org.jboss.seam.Component.getInstance(Component.java:1950)
              at org.jboss.seam.Component.getInstance(Component.java:1944)
              at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
              at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
              at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
              at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
              at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
              at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
              at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
              at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
              at javax.faces.component.UIData.getValue(UIData.java:609)
              at org.ajax4jsf.component.UIDataAdaptor.getValue(UIDataAdaptor.java:1644)
              at org.ajax4jsf.component.SequenceDataAdaptor.getDataModel(SequenceDataAdaptor.java:65)
              at org.ajax4jsf.component.SequenceDataAdaptor.createDataModel(SequenceDataAdaptor.java:59)
              at org.richfaces.component.UIDataTable.createDataModel(UIDataTable.java:125)
              at org.ajax4jsf.component.UIDataAdaptor.getExtendedDataModel(UIDataAdaptor.java:621)
              at org.ajax4jsf.component.UIDataAdaptor.setRowKey(UIDataAdaptor.java:339)
              at org.richfaces.renderkit.AbstractTableRenderer.encodeTableStructure(AbstractTableRenderer.java:124)
              at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:206)
              at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:194)
              at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101)
              at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813)
              at javax.faces.component.UIData.encodeBegin(UIData.java:962)
              at org.ajax4jsf.component.UIDataAdaptor.encodeBegin(UIDataAdaptor.java:1220)
              at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:280)
              at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
              at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
              at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
              at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
              at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
              at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
              at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
              at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
              at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
              at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:234)
              at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:180)
              at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:127)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
              at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
              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:110)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              ... 42 more




      I'm not experienced in EJB. So what am I doing wrong?
      Thanks for your helpssssssssss:)

        • 1. Re: DataModel java.lang.IllegalAccessError
          Arbi Sookazian Master

          I thought your problem is the access modifier for the local interface:


          @Local
          interface ITaskList {
          ...        
          }



          typically, we use:


          public interface foo



          But I changed one of my local interfaces by removing the public access modifier keyword and it works fine.


          Anyways, you should add the public keyword and recompile/deploy/test.


          Maybe that will fix it...

          • 2. Re: DataModel java.lang.IllegalAccessError
            Oguzhan YALCIN Newbie

            Hi,
            My interrface was in the same file with the Tasklist so I used the Interface as above. Then  I tried moving the ITaskList interface to another file .That sounds mysterious than before. The stack trace is below. Thx for your help



            org.jboss.seam.InstantiationException: Could not instantiate Seam component: listTask
                 at org.jboss.seam.Component.newInstance(Component.java:2106)
                 at org.jboss.seam.Component.getInstance(Component.java:1988)
                 at org.jboss.seam.Component.getInstance(Component.java:1950)
                 at org.jboss.seam.Component.getInstance(Component.java:1944)
                 at org.jboss.seam.Component.getInstanceFromFactory(Component.java:2036)
                 at org.jboss.seam.Component.getInstance(Component.java:1978)
                 at org.jboss.seam.Component.getInstance(Component.java:1950)
                 at org.jboss.seam.Component.getInstance(Component.java:1944)
                 at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
                 at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
                 at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
                 at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
                 at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
                 at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
                 at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
                 at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
                 at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
                 at javax.faces.component.UIData.getValue(UIData.java:609)
                 at org.ajax4jsf.component.UIDataAdaptor.getValue(UIDataAdaptor.java:1644)
                 at org.ajax4jsf.component.SequenceDataAdaptor.getDataModel(SequenceDataAdaptor.java:65)
                 at org.ajax4jsf.component.SequenceDataAdaptor.createDataModel(SequenceDataAdaptor.java:59)
                 at org.richfaces.component.UIDataTable.createDataModel(UIDataTable.java:125)
                 at org.ajax4jsf.component.UIDataAdaptor.getExtendedDataModel(UIDataAdaptor.java:621)
                 at org.ajax4jsf.component.UIDataAdaptor.setRowKey(UIDataAdaptor.java:339)
                 at org.richfaces.renderkit.AbstractTableRenderer.encodeTableStructure(AbstractTableRenderer.java:124)
                 at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:206)
                 at org.richfaces.renderkit.html.DataTableRenderer.doEncodeBegin(DataTableRenderer.java:194)
                 at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101)
                 at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813)
                 at javax.faces.component.UIData.encodeBegin(UIData.java:962)
                 at org.ajax4jsf.component.UIDataAdaptor.encodeBegin(UIDataAdaptor.java:1220)
                 at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:280)
                 at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
                 at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
                 at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
                 at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
                 at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
                 at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
                 at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
                 at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
                 at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
                 at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
                 at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
                 at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:234)
                 at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:180)
                 at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:127)
                 at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
                 at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
                 at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
                 at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
                 at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
                 at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
                 at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
                 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:110)
                 at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
                 at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
                 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
                 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.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:235)
                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
                 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
                 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
                 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                 at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                 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:158)
                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
                 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:619)
            Caused by: java.lang.RuntimeException: by java.lang.NoClassDefFoundError: com/taykos/list/ITaskList
                 at org.jboss.seam.util.ProxyFactory.createClass(ProxyFactory.java:190)
                 at org.jboss.seam.Component.createProxyFactory(Component.java:2388)
                 at org.jboss.seam.Component.getProxyFactory(Component.java:1480)
                 at org.jboss.seam.Component.wrap(Component.java:1471)
                 at org.jboss.seam.Component.instantiateSessionBean(Component.java:1368)
                 at org.jboss.seam.Component.instantiate(Component.java:1331)
                 at org.jboss.seam.Component.newInstance(Component.java:2084)
                 ... 102 more
            Caused by: javassist.CannotCompileException: by java.lang.NoClassDefFoundError: com/taykos/list/ITaskList
                 at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:169)
                 at org.jboss.seam.util.ProxyFactory.createClass(ProxyFactory.java:186)
                 ... 108 more
            Caused by: java.lang.NoClassDefFoundError: com/taykos/list/ITaskList
                 at java.lang.ClassLoader.defineClass1(Native Method)
                 at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
                 at sun.reflect.GeneratedMethodAccessor280.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:597)
                 at javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:181)
                 at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:163)
                 ... 109 more
            Caused by: java.lang.ClassNotFoundException: com.taykos.list.ITaskList
                 at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
                 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
                 at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
                 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
                 at java.lang.Class.forName0(Native Method)
                 at java.lang.Class.forName(Class.java:247)
                 at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:276)
                 at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1099)
                 at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:735)
                 at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:378)
                 at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
                 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
                 ... 116 more


            • 3. Re: DataModel java.lang.IllegalAccessError
              Arbi Sookazian Master
              java.lang.ClassNotFoundException: com.taykos.list.ITaskList
              



              means that the class in not in JBoss classpath.  run an 'ant explode' and see if the class exists in that package/directory.  it's possible your build script is not picking it up in the WAR/EAR target for some reason.

              • 4. Re: DataModel java.lang.IllegalAccessError
                Oguzhan YALCIN Newbie

                hi,
                I've double checked the sources and build. Files are in the same EJB.jar and exists . No files  are missing. I  think there is stg very strange. I have another SFSB (below)



                @Stateful
                @Scope(ScopeType.PAGE)
                @Name("listProgram")
                public class ProgramList extends DataModelList<Program> implements IProgramList {
                
                     @In
                     EntityManager entityManager;
                     
                     public List<Program> getAllPrograms(){
                          return super.search();
                     }
                     
                     @Create
                     public void initializeSuper(){
                          super.initialize(entityManager,new Program());
                     }
                     
                } 



                This one works without error.

                • 5. Re: DataModel java.lang.IllegalAccessError
                  Arbi Sookazian Master

                  try ant clean unexplode explode just to be sure.  Something very basic is wrong here...


                  If that doesn't work, I would convert your SFSB in question to a JavaBean temporarily and re-build/deploy, just to see what happens...

                  • 6. Re: DataModel java.lang.IllegalAccessError
                    Oguzhan YALCIN Newbie

                    Hi,


                    If I change the sfsb to a javabean everything works as expected. After googling for two days I think I've found the problem. Because one of my ejb classes uses richfaces to generate htmlPanelMenu dynamically I've moved the richfaces and related jars and some jboss jars to the lib directory of the server.(Because if I use two different jars to  generate menu -on in war one in ejb- an instantination error occurs just because of each jar is  loaded by different classloaders and you can not bind them.) After I moved the jars everything was working except SFSB & SLSB. So the (no)solution lies here. I started re-moving the moved jars to earContent. As soon as I finish I'll report the result here.


                    Thanks for your great efforts Arbi

                    • 7. Re: DataModel java.lang.IllegalAccessError
                      Oguzhan YALCIN Newbie

                      Hi,
                      Moving Jars to EarContent solved the problem. FYI ;)