5 Replies Latest reply on Jul 4, 2007 7:31 AM by stephenwilliams

    Seam cannot find my components

    jdaggs

      At first you may be thinking that I forget to put my seam.properties file in the right place. I wish it was that simple. However. I did look in my server.log and found the following snippet:

      006-12-20 17:17:38,312 DEBUG [org.jboss.seam.deployment.ComponentScanner] found component class: seam-test-ejb.jar/com/rms/beans/UserActionBean.class
      2006-12-20 17:17:38,328 DEBUG [org.jboss.seam.deployment.ComponentScanner] could not load class: seam-test-ejb.jar.com.rms.beans.UserActionBean
      java.lang.ClassNotFoundException: seam-test-ejb.jar.com.rms.beans.UserActionBean
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
      at org.jboss.seam.deployment.ComponentScanner.handleItem(ComponentScanner.java:61)
      at org.jboss.seam.deployment.Scanner.handleDirectory(Scanner.java:131)
      at org.jboss.seam.deployment.Scanner.handleDirectory(Scanner.java:127)
      at org.jboss.seam.deployment.Scanner.handleDirectory(Scanner.java:127)
      at org.jboss.seam.deployment.Scanner.handleDirectory(Scanner.java:127)
      at org.jboss.seam.deployment.Scanner.handleDirectory(Scanner.java:127)
      at org.jboss.seam.deployment.Scanner.scan(Scanner.java:90)
      at org.jboss.seam.deployment.ComponentScanner.getClasses(ComponentScanner.java:41)
      at org.jboss.seam.init.Initialization.scanForComponents(Initialization.java:440)
      at org.jboss.seam.init.Initialization.init(Initialization.java:426)
      at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
      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:585)
      at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
      at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.apache.catalina.core.StandardContext.init(StandardContext.java:5052)
      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:585)
      at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
      at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)
      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
      at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
      at org.jboss.web.WebModule.startModule(WebModule.java:83)
      at org.jboss.web.WebModule.startService(WebModule.java:61)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      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:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy38.start(Unknown Source)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
      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:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
      at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
      at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
      at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
      at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy39.start(Unknown Source)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)

      Is this error related to the fact that Seam cannot find my componets. If so how can I fix it? Otherwise what is this error trying to tell me?

      Thanks in Advance,

      Jason

        • 1. Re: Seam cannot find my components
          pmuir

          That's a classloading problem, of your classes. Check your ear structure - post it if you're stuck.

          • 2. Re: Seam cannot find my components
            jdaggs

            It looks like I have solved this problem and the next one. So please consider this issue closed.

            Thanks,

            Jason

            • 3. Re: Seam cannot find my components
              stephenwilliams

              Hi

              I am having this problem when deploying an expanded ear on a linux machine with the same server version.



              my structure looks like...

              04.07.2007 11:28 443.432 antlr-2.7.6.jar
              04.07.2007 11:28 546.498 antlr-3.0ea8.jar
              04.07.2007 11:28 36.846 commons-jci-core-1.0-406301.jar
              04.07.2007 11:28 10.802 commons-jci-janino-2.4.3.jar
              04.07.2007 11:28 635.207 drools-compiler-3.0.5.jar
              04.07.2007 11:28 550.976 drools-core-3.0.5.jar
              04.07.2007 11:28 29.309 el-api.jar
              04.07.2007 11:28 99.659 el-ri.jar
              04.07.2007 11:28 383.546 janino-2.4.3.jar
              04.07.2007 11:28 665.529 jboss-seam.jar
              04.07.2007 11:28 603.060 jbpm-3.1.4.jar
              04.07.2007 11:28 <DIR> META-INF
              04.07.2007 11:28 139 security.drl
              04.07.2007 11:28 358.843 stringtemplate-2.3b6.jar
              04.07.2007 11:28 <DIR> MyProject.jar
              04.07.2007 11:28 <DIR> MyProject.war




              my jar has a seam.properties and the classes that I need to be loaded.

              The deployment works on my local machine but not on my web-server that has an exact copy of my local server on it.

              Could someone please give me a hint towards what could be going wrong.

              Cheers!
              2007-07-04 11:01:14,488 DEBUG [org.jboss.seam.deployment.Scanner] found: com/
              2007-07-04 11:01:14,488 DEBUG [org.jboss.seam.deployment.Scanner] found: com/algodes/
              2007-07-04 11:01:14,488 DEBUG [org.jboss.seam.deployment.Scanner] found: com/algodes/server/
              2007-07-04 11:01:14,488 DEBUG [org.jboss.seam.deployment.Scanner] found: com/algodes/server/Authenticator.class
              2007-07-04 11:01:14,489 DEBUG [org.jboss.seam.deployment.ComponentScanner] found component class: com/algodes/server/Authenticator.class
              2007-07-04 11:01:14,491 DEBUG [org.jboss.seam.deployment.ComponentScanner] could not load class: com.algodes.server.Authenticator
              java.lang.ClassNotFoundException: com.algodes.server.Authenticator
               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:306)
               at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
              


              • 4. Re: Seam cannot find my components
                stephenwilliams

                I have since been able to replicate the problem on my machine by starting the jboss server with the run.bat file.

                If I start it with eclipse then everything works fine.

                The problem now is that I don't know what the IDE is doing differently to the run.bat.

                Does anyone else have any ideas?

                • 5. Re: Seam cannot find my components
                  stephenwilliams

                  It is working now, so I am happy. However I'm not quite sure why.

                  I changed the JRE that eclipse is using and I gave the jre more memory "-Xms256m -Xmx1024m"