9 Replies Latest reply on Sep 14, 2006 2:24 PM by awlzac

    Changing Ports (two nodes, same machine, 4.0.4)

    burakbayramli Newbie

      Hi, in order to test a cluster on the same machine, on 4.0.1, I used to be able to create several copies of server/all folder, and change jboss-service.xml inside those folders to contain references to ports-01, 02, etc and start server with -c node1, node2.

      This seems to have been changed, bcz now I get this error when I use the same technique.

      13:03:35,084 ERROR [MainDeployer] Could not create deployment: file:/C:/devprogs
      /jboss-4.0.4.GA-clustered/server/node1/conf/jboss-service.xml
      org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jboss.services.binding.ServiceBindingManager; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.services.binding.ServiceBindingManager)
      


      I looked inside the 4.0.4 jars, and could not find any ServiceBindingManager class. The JBoss AS Guide for 4.0.4 still recommends the old technique; Has something changed but not reflected in the docs?

      Any help would be appreciated,

        • 1. Re: Changing Ports (two nodes, same machine, 4.0.4)
          burakbayramli Newbie

          The JBoss installation was done using "java -jar jems-installer-1.2.0.BETA.jar" and selecting ejb3-clustered profile.

          • 2. Re: Changing Ports (two nodes, same machine, 4.0.4)
            Ben Wang Master

            Do you see bindingservice-plugin.jar in your lib directory?

            • 3. Re: Changing Ports (two nodes, same machine, 4.0.4)
              burakbayramli Newbie

              Just looked, bindingservice-plugin.jar was not in the JBoss 4.0.4 installation.

              How should I install JBoss in order to get this jar? Or should I deploy this file manually (through Ant) from my project's development lib directory? Either way is fine, I just want to know the right method.

              Thanks,

              • 4. Re: Changing Ports (two nodes, same machine, 4.0.4)
                burakbayramli Newbie

                Adding the jar did not help. The config below in jboss-service.xml still results in same default ports being used.

                <mbean code="org.jboss.services.binding.ServiceBindingManager"
                 name="jboss.system:service=ServiceBindingManager">
                 <attribute name="ServerName">ports-01</attribute>
                 <attribute name="StoreURL">c:/jboss-4.0.4.GA-clustered/docs/examples/binding-manager/sample-bindings.xml</attribute>
                 <attribute name="StoreFactoryClassName">
                 org.jboss.services.binding.XMLServicesStoreFactory
                 </attribute>
                 </mbean>


                Any insights would be appreciated.

                • 5. Re: Changing Ports (two nodes, same machine, 4.0.4)
                  burakbayramli Newbie

                  Further clarification on the issue:

                  It seems you can't have port changing+ejb3 ability all at once.

                  Through jems...jar installation, if you select "all", you get port change support, but NO ejb3. If you do ejb-cluster installation, you get EJB 3 support, but won't be able to change your ports using ServiceBindingManager.

                  This is very odd. The zip 4.0.4GA installation was no help, that doesn't seem to support EJB 3.

                  • 6. Re: Changing Ports (two nodes, same machine, 4.0.4)
                    Ben Wang Master

                    OK, this maybe a packaging issue then.

                    If you can do me one more favor. You mentioned that you have the cvs access, can you build it directly and take the jboss-4.0.5.CR1-ejb3 and try it out? It does have the bindingservice-plugin.jar.

                    Thanks,

                    -Ben

                    • 7. Re: Changing Ports (two nodes, same machine, 4.0.4)
                      burakbayramli Newbie

                      Yes it does seem like a packaging issue.

                      Rebuilding from sources: I tried as best as I could. Following directions in JBoss Dev Process Guide and after downloading 600 MB of CVS src/jar (ant synchronize), I had to mkdir the following directories manually (the build process needs some work IMHO)

                      ../common/output
                      ../common/output/lib
                      ../j2se/output/lib
                      ../j2se/output/
                      ../j2se/output/lib
                      ../j2ee/output
                      ../j2ee/output/lib
                      ../naming/output
                      ../naming/output/lib
                      ../container/output
                      ../container/output/lib
                      ../mbeans/output
                      ../mbeans/output/lib
                      ../mbeans/output
                      ../mbeans/output
                      ../mbeans/output/resources
                      ../mbeans/output/resources/dtd
                      ../jmx/output
                      ../jmx/output/lib
                      ../system/output
                      ../system/output/lib
                      ../system/output/bin
                      ../system/output/resources
                      ../system/output/resources/dtd
                      ../transaction/output
                      ../transaction/output/lib
                      ../server/output
                      ../server/output/lib
                      ../server/output/resources/exception-processor
                      ../server/output/resources/
                      ../server/output/resources/exception-processor
                      ../server/output/resources/client-deployer
                      ../server/output/resources/jmx-invoker-adaptor
                      ../server/output/resources/jmx-invoker-adaptor/META-INF
                      ../server/output/etc
                      ../server/output/etc/deploy
                      ../server/output/etc/conf
                      ../server/output/etc/conf/default


                      And finally I did "ant build" got stuck at this step;
                      BUILD FAILED
                      Error executing 'build.main' for Build@13e754f{id=jbossas}
                      Cause: The following error occurred while executing this line:
                      Error executing 'release.server.jboss-minimal.xml' for Artifact@fb6354{id=jboss-
                      minimal.xml}
                      Cause: Cannot perform operation from directory to file.


                      Ben, if you have any input into this last problem, great. If not, I can wait for a package that let's me do ejb3 and port changes, as I have spent already lots of time on this issue. This is needed for a class I am about to teach, but I can use a Linux box as the second node, so there won't be any need for port change.

                      Thanks,

                      • 8. Re: Changing Ports (two nodes, same machine, 4.0.4)
                        Ben Wang Master

                        Hmmn.. don't know what is your problem specifically. I can check out the cvs and build just fine.

                        I have opened up a Jira:
                        http://jira.jboss.com/jira/browse/JBAS-3394
                        for this.

                        To work around your problem, like I said, you can also use multi-IP approach (-b host) to bind your multiple AS instances.

                        Thanks,

                        -Ben

                        • 9. Re: Changing Ports (two nodes, same machine, 4.0.4)
                          awlzac Newbie


                          I had the same problem, when trying to use a port mappings file in 4.0.4. I got around it by adding the "bindingservice-plugin.jar" from the 4.0.3RC1 release into server/default/lib, and things seem to work ok. If there's a better/more proper way to do this in 4.0.4....I'm all ears :)