11 Replies Latest reply on Mar 11, 2011 6:53 PM by ekon

    Jboss 5 won't start

    ekon

      Hi,

      I installed Jboss eap 5.0.1 and without any modifications, right out of the box, it starts perfectly.

       

      I have the need to have jboss include a remote xml file for deployment though, and this is something I was able to do with jboss 4.2.0 by modifying the jboss-service.xml and adding my http://myserver/myfile.xml to the attribute name URLs. Now, with jboss 5 I found this guide: http://www.mastertheboss.com/jboss-application-server/204-jboss-deployment-directory-configuration.html , it says that all I need to do is to add my additional deploy directory to the server/xxxx/conf/bootstrap/profile.xml to the BootstrapProfileFactory, as an additional value to the URIs list.

       

      I did that but jboss won't start, instead, it gives me the error below. Can you please let me know what am I missing? I don't think that the ability to deploy a remote file has been dropped on jboss eap 5, is that right?

       

      2011-03-11 10:32:15,520 14058      ERROR [main                     ] logging.Logger            (              Logger.java:  419) - Error installing to Create: name=ProfileKey@e9927a[domain=default, server=default, name=applications] state=Configured mode=On Demand requiredState=Installed

      java.lang.reflect.InvocationTargetException

              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:597)

              at org.jboss.system.server.profileservice.repository.AbstractProfileLifeCycleAction.invoke(AbstractProfileLifeCycleAction.java:97)

              at org.jboss.system.server.profileservice.repository.AbstractProfileLifeCycleAction.invoke(AbstractProfileLifeCycleAction.java:77)

              at org.jboss.system.server.profileservice.repository.AbstractProfileLifeCycleAction.install(AbstractProfileLifeCycleAction.java:49)

              at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

              at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:775)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)

              at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)

              at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)

              at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

              at org.jboss.Main.boot(Main.java:221)

              at org.jboss.Main$1.run(Main.java:556)

              at java.lang.Thread.run(Thread.java:619)

      Caused by: java.io.IOException: No context factory for http://myserver/myfile.xml

              at org.jboss.virtual.VFS.getVFS(VFS.java:168)

       

       

      2011-03-11 10:32:15,521 14059      INFO  [main                     ] logging.Logger            (              Logger.java:  296) - Loading profile: ProfileKey@ff0d4b[domain=default, server=default, name=scheduler_dev_01]

      2011-03-11 10:32:15,522 14060      ERROR [main                     ] util.LoggerStream         (        LoggerStream.java:  156) - Failed to boot JBoss:

      2011-03-11 10:32:15,522 14060      ERROR [main                     ] util.LoggerStream         (        LoggerStream.java:  156) - java.lang.IllegalStateException: Incompletely deployed:

       

       

      *** PROFILES IN ERROR: Name -> Error

      Profile: ProfileKey@e9927a[domain=default, server=default, name=applications] in error due to java.lang.reflect.InvocationTargetException

        • 1. Jboss 5 won't start
          ekon

          Just adding more information, this is what I added:

           

                  <bean name="BootstrapProfileFactory" class="org.jboss.system.server.profileservice.repository.StaticProfileFactory">

                <property name="bindingsURI">${jboss.server.home.url}conf/bindingservice.beans</property>

                <property name="bootstrapURI">${jboss.server.home.url}conf/jboss-service.xml</property>

                          <property name="deployersURI">${jboss.server.home.url}deployers</property>

                          <property name="applicationURIs">

                                  <list elementClass="java.net.URI">

                                          <value>${jboss.server.home.url}deploy</value>

                                          <value>http://myserver/myfile.xml</value>

                                  </list>

                          </property>

                          <property name="attachmentStoreRoot">${jboss.server.data.dir}/attachments</property>

                          <property name="profileFactory"><inject bean="ProfileFactory" /></property>

                  </bean>

           

           

          In reading the FAQ, am I using the wrong syntax here? Doing file:///myserver/myfile.xml doesn't work either.

          • 2. Jboss 5 won't start
            alesj

            http:// won't work, as we only allow local directories.

            file:// should work, but you need to target a directory, not direct file

            • 3. Jboss 5 won't start
              ekon

              so, only local directories are allowed, no remote files like it used to be in 4.2.0? Has that support to deploy remote files been dropped altogether?

              • 4. Jboss 5 won't start
                ekon

                Furthermore, if indeed that support to deploy remote file has been dropped, what would be the workaround?

                • 5. Jboss 5 won't start
                  alesj

                  What you're trying to do is not add a remote file deployment.

                  But you're trying to add a directory which is scanned for new deployments.

                   

                  Check legacy MainDeployer for how it can still be done.

                  • 6. Jboss 5 won't start
                    ekon

                    Sorry, I am a little lost, where do I go to check for legacy MainDeployer to see how it is done? I am not sure I am following completely...

                     

                    Yes, what I am trying to do is to setup a seconday directory (remote) that jboss can look at and deploy whatever is in there.

                     

                    Thanks again.

                    • 7. Jboss 5 won't start
                      ekon

                      I am currently "googling" legacy maindeployer jboss 5 but I don't get any useful articles, I'd appreciate any pointers you can give me. Thanks.

                      • 9. Re: Jboss 5 won't start
                        ekon

                        Oh, I thought I was going to see an article describing what file I would need to modify so that Jboss 5 could deploy the contents of my remote directory. I think what you're saying is that I need to develop the solution myself following what the MainDeployer.java does. So this means, in other words, that out-of-the-box, there isn't really a way for me to have jboss deploy the contents of a remote directory?

                         

                        Please let me know if this is the case, this way I will just concentrate my efforts in developing such solutions instead of trying to find out if there is still a way of doing it out-of-the-box like it used to be with jboss 4.

                         

                        Thanks.

                        • 10. Re: Jboss 5 won't start
                          alesj

                          You just need to call the right method on MainDeployer.

                          * public void deploy(URL url) throws DeploymentException

                          It's also remotely explosed via JMX.

                          Just make sure legacy MainDeployer is actually deployed as a service.

                          • 11. Jboss 5 won't start
                            ekon

                            So, ok, if I were to develop this, how do I go about doing what you're suggesting? Imagine that I create my class Custom_Deploy.java that does what you said to do, it grabs an URL and it deploys it. Where do I place this Custom_Deploy.java so that when Jboss is starting up, it's able to execute it? would I need to put the Custom_Deploy.java into some kind of war file, put it in the deploy directory and then invoke it through some external jsp? or is there a better way to do this?

                             

                            When I go to my jmx-console, this is what I see... How do I make sure that legacy MainDeployer is being deployed as a service?

                            Object Name Filter

                            Remove Object Name Filter