14 Replies Latest reply on Jun 24, 2008 6:13 PM by alesj

    Jboss/Spring Integration, second attempt!

    beyarecords

      Platform: Win XP SP1, JDK 1.6.0_06, Jboss 5.0.0.CR1

      So,
      I, and as per sticky instructions, download 'jboss-spring.deployer' from 'Spring Deployer 3.0'. I then place said .deployer file into the deploy directory and start server. The following error is the issued in the server logs:

      2008-06-05 09:59:11,750 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to PreInstall: name=SpringParserDeployer state=Real
      java.lang.NoClassDefFoundError: org/jboss/deployers/vfs/plugins/structure/file/FileMatcher
       at java.lang.ClassLoader.defineClass1(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
       at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:63)
       at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:502)
       at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:462)
       at java.security.AccessController.doPrivileged(Native Method)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:460)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:437)
       at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:134)
       at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131)
       at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:452)
       at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:254)
       at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:148)
       at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:196)
       at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1009)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:728)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:372)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:247)
       at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.resolveComplexTypeInfo(IntrospectionTypeInfoFactoryImpl.java:389)
       at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getTypeInfo(IntrospectionTypeInfoFactoryImpl.java:358)
       at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactory.getTypeInfo(IntrospectionTypeInfoFactory.java:54)
       at org.jboss.classadapter.plugins.BasicClassAdapterFactory.getClassAdapter(BasicClassAdapterFactory.java:61)
       at org.jboss.config.plugins.AbstractConfiguration.getBeanInfo(AbstractConfiguration.java:86)
       at org.jboss.kernel.plugins.config.AbstractKernelConfig.getBeanInfo(AbstractKernelConfig.java:80)
       at org.jboss.kernel.plugins.config.AbstractKernelConfigurator.getBeanInfo(AbstractKernelConfigurator.java:77)
       at org.jboss.kernel.plugins.config.AbstractKernelConfigurator.getBeanInfo(AbstractKernelConfigurator.java:96)
       at org.jboss.kernel.plugins.dependency.PreInstallAction.installActionInternal(PreInstallAction.java:94)
       at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
       at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
       at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
       at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1394)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:786)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:914)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:836)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:626)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:443)
       at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:88)
       at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:46)
       at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:174)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:970)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:991)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:911)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1394)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:786)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:914)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:836)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:674)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:456)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:594)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:257)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:135)
       at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:409)
       at org.jboss.Main.boot(Main.java:209)
       at org.jboss.Main$1.run(Main.java:544)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.ClassNotFoundException: org.jboss.deployers.vfs.plugins.structure.file.FileMatcher
       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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
       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:207)
       at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1009)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:728)
       at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:372)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
       ... 65 more
      


      What is the issue here?

        • 1. Re: Jboss/Spring Integration, second attempt!
          alesj

          The FileMatcher was moved. :-)
          Before:
          - org.jboss.deployers.vfs.plugins.structure.file.
          Now:
          - org.jboss.deployers.vfs.spi.deployer

          And the SpringDeployer in that release still uses the old one.

          I'll do a new release asap.
          Or you can build it yourself from the trunk - it should be simple ant build call.

          I'll post here when I'm done with the new release.

          • 2. Re: Jboss/Spring Integration, second attempt!
            beyarecords

            Ok, Alesj. I'll wait for your post ;-)

            As I wish to use Spring 2.5 would I simply swap out the existing Spring files from the .deployer directory, which I believe are Spring 2.0 correct?, with 2.5 ?

            Many thanks in advance.

            • 3. Re: Jboss/Spring Integration, second attempt!
              alesj

               

              "beyarecords" wrote:

              As I wish to use Spring 2.5 would I simply swap out the existing Spring files from the .deployer directory, which I believe are Spring 2.0 correct?, with 2.5 ?

              I think the SpringDeployer3.0 is compiled against Spring 2.5, and as such shipped with Spring 2.5.
              But I think there should be minimal or no diff with 2.0.8.

              • 4. Re: Jboss/Spring Integration, second attempt!
                beyarecords

                Hi Alesj,
                on the JbossWiki there is a section concering the creation of .spring archieves:

                my-app.spring/
                 org/
                 acme/
                 ~MyBean.class
                 ~MyBean2.class
                 META-INF/
                 jboss-spring.xml
                


                but in 'Spring Deployer 3' we have 'jboss-spring.jar' which has no jboss-spring.xml file.

                Now, and this is where I have been slightly confused, can one still use the 'my-app.spring' archive format in conjunction with 'jboss-spring.deplyer' on Jboss5 instead of 'jboss-spring.jar'? If so, what is the 'jboss-spring.jar' for, and does one need to use it at all?

                • 5. Re: Jboss/Spring Integration, second attempt!
                  beyarecords

                  Hi Alesj,

                  "alesj" wrote:
                  I'll do a new release asap.

                  I'll post here when I'm done with the new release.


                  just wanted to know whether you have had a chance to address this issue and if not when you feel you may be able to?

                  Many thanks in advance.



                  • 6. Re: Jboss/Spring Integration, second attempt!
                    alesj

                     

                    "beyarecords" wrote:

                    just wanted to know whether you have had a chance to address this issue and if not when you feel you may be able to?

                    Not yet.
                    Been busy over the weekend pushing out new VFS release - fixing some issues to make AS5 run smoother.
                    I guess I'll have some time at the end of this week, and I already put this on my todo list. ;-)

                    • 7. Re: Jboss/Spring Integration, second attempt!
                      alesj

                      Just saw what you can do to easily get jboss-spring.deployer artifact.

                      1) checkout AS5_trunk
                      2) build/build clean most
                      3) testsuite/build clean most
                      4) testsuite/build tests-springdeployer

                      This will create new springdeployer AS configuration, which includes jboss-spring deployer

                      Easy enough?
                      Or should I upload that artifact to sourceforge?

                      • 8. Re: Jboss/Spring Integration, second attempt!
                        beyarecords

                        HI Alesj
                        thanks for the update.

                        I tried 'http://anonsvn.jboss.org/repos/jbossas/AS5_trunk' and got a trunk doesn't exist exist error message.

                        I would appreciate it if you could provide me with the full trunk address but also think it would be a good idea to upload the artifact to sourceforge ;-)

                        Many thanks in advance.

                        • 9. Re: Jboss/Spring Integration, second attempt!
                          alesj
                          • 10. Re: Jboss/Spring Integration, second attempt!
                            beyarecords

                            Hi Alesj
                            many thanks for your assistance.

                            I have the following directory structure:

                            my-app.spring/
                             org/
                             acme/
                             ~MyBean.class
                             ~MyBean2.class
                             META-INF/
                             jboss-spring.xml
                             lib/
                             spring jars + dependencies
                            


                            and all seems to be deplying correctly now.


                            • 11. Re: Jboss/Spring Integration, second attempt!
                              beyarecords

                              Hi Alesj,

                              "alesj" wrote:


                              1) checkout AS5_trunk
                              2) build/build clean most
                              3) testsuite/build clean most
                              4) testsuite/build tests-springdeployer

                              This will create new springdeployer AS configuration, which includes jboss-spring deployer



                              I tried this same procedure with AS 4.2.2.GA (src) but the build fails with a 'missing label' error. What is the procesdure to build a spring-deployer under 4.2.2?

                              I'm using JDK1.6.0_06 and spring-framework 2.5.5.

                              Many thanks in advance.

                              Andrew

                              • 12. Re: Jboss/Spring Integration, second attempt!
                                alesj

                                I think v2.1 ( jboss-spring-jdk5-2.5.jar) from here:
                                - http://sourceforge.net/project/showfiles.php?group_id=22866&package_id=161914
                                should work for you in that env.

                                • 13. Re: Jboss/Spring Integration, second attempt!
                                  beyarecords

                                  Hi Alesj,
                                  my mycompany.spring structure, which sits in the deploy directory with jboss-spring-jdk5-2.5.jar, is so:

                                  my-app.spring/
                                   org/
                                   acme/
                                   ~MyBean.class
                                   ~MyBean2.class
                                   META-INF/
                                   jboss-spring.xml
                                   lib/
                                   spring jars + dependencies
                                  


                                  but I continue to get an incomplete deployment error:


                                  2008-06-24 22:39:50,578 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:
                                  
                                  --- Packages waiting for a deployer ---
                                  org.jboss.deployment.DeploymentInfo@ed2719 { url=file:/C:/Jboss/jboss-4.2.2.GA/server/default/deploy/mycompany.spring }
                                   deployer: null
                                   status: null
                                   state: INIT_WAITING_DEPLOYER
                                   watch: file:/C:/Jboss/jboss-4.2.2.GA/server/default/deploy/beyarecords.spring
                                   altDD: null
                                   lastDeployed: 1214343590562
                                   lastModified: 1214343590562
                                   mbeans:
                                  
                                  --- Incompletely deployed packages ---
                                  org.jboss.deployment.DeploymentInfo@ed2719 { url=file:/C:/Jboss/jboss-4.2.2.GA/server/default/deploy/mycompany.spring }
                                   deployer: null
                                   status: null
                                   state: INIT_WAITING_DEPLOYER
                                   watch: file:/C:/Jboss/jboss-4.2.2.GA/server/default/deploy/mycompany.spring
                                   altDD: null
                                   lastDeployed: 1214343590562
                                   lastModified: 1214343590562
                                   mbeans:
                                  


                                  Any ideas as to what I may be overlooking here?

                                  Many thanks in advance.

                                  Andrew

                                  • 14. Re: Jboss/Spring Integration, second attempt!
                                    alesj

                                    You are missing deployer - a spring deployer to be exact. ;-)
                                    Download one of previous _full_ versions of spring-deployer for JBoss 4.x, and then just replace jboss-spring.jar with the one I pointed you previously.