7 Replies Latest reply on Feb 2, 2006 11:55 AM by Michael Burton

    Missing BeanFactoryLoader

    Michael Burton Newbie

      Using the 2005-08 distribution, I get the following error during boot after copying jboss-spring.deployer into my deploy directory:

      08:33:32,514 ERROR [MainDeployer] could not create deployment: file:/usr/local/jboss/jboss/server/spring/deploy/jboss-spring.deployer/
      org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.reflect.UndeclaredThrowableException)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:143)
      at org.jboss.system.ServiceController.install(ServiceController.java:200)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


      Caused by: java.lang.reflect.UndeclaredThrowableException
      at org.jboss.system.ServiceCreator.install(ServiceCreator.java:204)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:153)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:118)
      ... 81 more
      Caused by: java.lang.NoClassDefFoundError: org/jboss/spring/factory/BeanFactoryLoader
      at java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.lang.Class.privateGetDeclaredConstructors(Class.java:1618)
      at java.lang.Class.getConstructor0(Class.java:1930)
      at java.lang.Class.getConstructor(Class.java:1027)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1211)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:269)
      at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:327)
      at org.jboss.system.ServiceCreator.install(ServiceCreator.java:125)
      ... 83 more

      It seems that BeanFactoryLoader.class is missing from the jboss-spring.deployer/jboss-spring.jar file.

      I found BeanFactoryLoader in jboss-spring-jdk5.jar. If I copy jboss-spring-jdk5.jar from the jboss-spring-jdk5.deployer directory into my jboss-spring.deployer directory, booting completes without exceptions (although I haven't tried deploying a spring bean yet)


        • 1. Re: Missing BeanFactoryLoader
          Ales Justin Master

          Try this new version:
          - http://www.genera-lynx.com/temp/jboss-spring.jar

          Or full JDK5 / EJB3 support:
          - http://www.genera-lynx.com/temp/jboss-spring-jdk5.jar

          You also need updated version of jboss-service.xml
          - http://www.genera-lynx.com/temp/jboss-service.xml

          This is put up temporarly. Until not available on sourceforge.
          I also think it needs Spring 1.2.5 at least.

          • 2. Re: Missing BeanFactoryLoader
            Michael Burton Newbie

            Thanks. I tried it out and now I get a different error.

            Boot up succeeds just fine, but if I copy spring-pojo.spring (from the JBoss-Example.ear file) into the deploy directory, i see the following:

            10:34:10,806 ERROR [MainDeployer] could not create deployment: file:/usr/local/jboss/jboss/server/spring/deploy/spring-pojo.spring
            java.lang.NoClassDefFoundError: org/jboss/spring/factory/NamedXmlApplicationContext
            at org.jboss.spring.factory.ApplicationContextLoaderImpl.createBeanFactory(ApplicationContextLoaderImpl.java:36)
            at org.jboss.spring.factory.AbstractBeanFactoryLoader.create(AbstractBeanFactoryLoader.java:85)
            at org.jboss.spring.deployment.SpringDeployer.create(SpringDeployer.java:117)
            at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
            at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)

            11:39:07,478 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
            Incompletely deployed packages:
            org.jboss.deployment.DeploymentInfo@ff8ffcbf { url=file:/usr/local/jboss/jboss/server/spring/deploy/spring-pojo.spring/ }
            deployer: org.jboss.spring.deployment.SpringApplicationContextDeployer@b2f524
            status: Deployment FAILED reason: org/jboss/spring/factory/NamedXmlApplicationContext
            state: FAILED
            watch: file:/usr/local/jboss/jboss/server/spring/deploy/spring-pojo.spring/
            altDD: null
            lastDeployed: 1138736345873
            lastModified: 1138733297000

            Not sure exactly why I'm getting this error since it seems that the NamedXmlApplicationContext is in the jboss-spring.jar you posted.

            JBoss is clearly finding the proper deployer to invoke... any ideas why the deployer can't find the NamedXmlApplicationContext?


            • 3. Re: Missing BeanFactoryLoader
              Michael Burton Newbie

              I should probably also mention I'm using spring 1.2.6, and of course JBoss 4.0.1 sp1 without ejb3 support as I mentioned before.

              • 4. Re: Missing BeanFactoryLoader
                Ales Justin Master

                Just tried it now - on JBoss4.0.3SP1 without EJB3 support.
                It works normally.

                No idea why it doesn't find NamedXmlApplicationContext.

                I'm using: Spring-Version: 1.3-rc1

                • 5. Re: Missing BeanFactoryLoader
                  Michael Burton Newbie

                  Yeah, don't know. I'm giving up and just going to deploy my spring apps in a war.

                  • 6. Re: Missing BeanFactoryLoader
                    Ales Justin Master

                    Have you tried with JBoss 4.0.3SP1?
                    Changing Spring to 1.3 ... or 2.0m?
                    Some old deployer lib stuck somewhere?

                    btw: great wiki contribution

                    • 7. Re: Missing BeanFactoryLoader
                      Michael Burton Newbie

                      Thanks, glad you like it :) Hopefully this way some of the info about the project will at least be google-able now.

                      No, haven't really tried upgrading anything yet. We're at the tail end of a release cycle and trying to get our product out the door so no time to upgrade technologies. If i have time after the cycle is over I may try again, although for our purposes the wars will probably do just fine.