1 Reply Latest reply on Apr 21, 2008 9:20 AM by kconner

    Deploy to JBossAS using service bindings (and non default po

    jimpo991

      Using JBossAS 4.2.1-GA and jbossesb 4.2.1-GA

      I have condifured two JBoss instances in different ports using service bindings approach described in http://wiki.jboss.org/wiki/ConfiguringMultipleJBossInstancesOnOneMachine

      Using the default ports-01 and ports-02 configurations, server directories are direct copies from "default" server.

      When I try to deploy jbossesb:

      D:\tre-soa-poc\sandbox\1\jboss-dual\jbossesb-4.2.1GA\jbossesb-4.2.1GA\install>ant deploy
      Buildfile: build.xml
      
      check.deploy.props:
      
      dependencies.source:
      
      dependencies.jbossesb:
      
      dependencies:
      
      jms.config.check:
      
      jbmq.config:
      
      jbm.config:
      
      jms.config:
      
      internal.deploy:
       [copy] Copying 39 files to D:\tre-soa-poc\sandbox\1\jboss-dual\combined-ports\jboss-4.2.1.GA\jboss-4.2.1.GA\server\ports-02\deploy\jbossesb.sar
       [copy] Copying 22 files to D:\tre-soa-poc\sandbox\1\jboss-dual\combined-ports\jboss-4.2.1.GA\jboss-4.2.1.GA\server\ports-02\deploy\jbossesb.esb
       [copy] Copying 31 files to D:\tre-soa-poc\sandbox\1\jboss-dual\combined-ports\jboss-4.2.1.GA\jboss-4.2.1.GA\server\ports-02\deploy\jbpm.esb
       [copy] Copying 14 files to D:\tre-soa-poc\sandbox\1\jboss-dual\combined-ports\jboss-4.2.1.GA\jboss-4.2.1.GA\server\ports-02\deploy\jbrules.esb
       [copy] Copying 17 files to D:\tre-soa-poc\sandbox\1\jboss-dual\combined-ports\jboss-4.2.1.GA\jboss-4.2.1.GA\server\ports-02\deploy\smooks.esb
       [copy] Copying 11 files to D:\tre-soa-poc\sandbox\1\jboss-dual\combined-ports\jboss-4.2.1.GA\jboss-4.2.1.GA\server\ports-02\deploy\spring.esb
       [copy] Copying 13 files to D:\tre-soa-poc\sandbox\1\jboss-dual\combined-ports\jboss-4.2.1.GA\jboss-4.2.1.GA\server\ports-02\deploy\soap.esb
       [copy] Copying 30 files to D:\tre-soa-poc\sandbox\1\jboss-dual\combined-ports\jboss-4.2.1.GA\jboss-4.2.1.GA\server\ports-02\deploy\soapui-client.sar
      
      replace:
      
      init.bindings.props:
      
      deploy.bindings:
       [xslt] Processing D:\tre-soa-poc\sandbox\1\jboss-dual\combined-ports\jboss-4.2.1.GA\jboss-4.2.1.GA\docs\examples\binding-manager\sample-bindings.xml t
      o D:\tre-soa-poc\sandbox\1\jboss-dual\combined-ports\jboss-4.2.1.GA\jboss-4.2.1.GA\docs\examples\binding-manager\sample-bindings.xml.tmp
       [xslt] Loading stylesheet D:\tre-soa-poc\sandbox\1\jboss-dual\jbossesb-4.2.1GA\jbossesb-4.2.1GA\install\bindings.xslt
       [move] Moving 1 file to D:\tre-soa-poc\sandbox\1\jboss-dual\combined-ports\jboss-4.2.1.GA\jboss-4.2.1.GA\docs\examples\binding-manager
       [move] Moving 1 file to D:\tre-soa-poc\sandbox\1\jboss-dual\combined-ports\jboss-4.2.1.GA\jboss-4.2.1.GA\docs\examples\binding-manager
      
      deploy:
      
      BUILD SUCCESSFUL
      Total time: 2 seconds


      The deployment fails:

      15:31:53,531 INFO [Server] JBoss (MX MicroKernel) [4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)] Started in 30s:406ms
      15:35:44,156 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=juddiDB' to JNDI name 'java:juddiDB'
      
      15:35:44,171 INFO [JuddiRMIService] starting juddi RMI service
      15:35:49,234 ERROR [STDERR] javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with
       error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is ja
      vax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connec
      t to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
      15:35:49,234 ERROR [STDERR] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1416)
      15:35:49,234 ERROR [STDERR] at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:484)
      15:35:49,234 ERROR [STDERR] at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:477)
      15:35:49,234 ERROR [STDERR] at javax.naming.InitialContext.rebind(InitialContext.java:367)
      15:35:49,234 ERROR [STDERR] at org.apache.juddi.registry.rmi.JNDIRegistration.register(JNDIRegistration.java:95)
      15:35:49,234 ERROR [STDERR] at org.jboss.internal.soa.esb.dependencies.JuddiRMIService.startService(JuddiRMIService.java:149)
      15:35:49,234 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      15:35:49,250 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      15:35:49,250 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
      15:35:49,250 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      15:35:49,250 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      15:35:49,250 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      15:35:49,250 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      15:35:49,250 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      15:35:49,250 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      15:35:49,250 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      15:35:49,250 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      15:35:49,250 ERROR [STDERR] at $Proxy0.start(Unknown Source)
      15:35:49,250 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:417)
      15:35:49,250 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:435)
      15:35:49,250 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
      15:35:49,250 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      15:35:49,250 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      15:35:49,250 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      15:35:49,250 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      15:35:49,250 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      15:35:49,250 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      15:35:49,265 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      15:35:49,265 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      15:35:49,265 ERROR [STDERR] at $Proxy4.start(Unknown Source)
      15:35:49,265 ERROR [STDERR] at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
      15:35:49,265 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      15:35:49,265 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      15:35:49,265 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      15:35:49,265 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
      15:35:49,265 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      15:35:49,265 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      15:35:49,265 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      15:35:49,265 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      15:35:49,265 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      15:35:49,265 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      15:35:49,265 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      15:35:49,265 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      15:35:49,265 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      15:35:49,265 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      15:35:49,265 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      15:35:49,265 ERROR [STDERR] at $Proxy10.deploy(Unknown Source)
      15:35:49,281 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      15:35:49,281 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
      15:35:49,281 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
      15:35:49,281 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
      15:35:49,281 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      15:35:49,281 ERROR [STDERR] Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.Serv
      iceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
      15:35:49,281 ERROR [STDERR] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
      15:35:49,281 ERROR [STDERR] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1387)
      15:35:49,281 ERROR [STDERR] ... 51 more
      15:35:49,281 ERROR [STDERR] Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.Con
      nectException: Connection refused: connect]
      15:35:49,281 ERROR [STDERR] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:243)
      15:35:49,281 ERROR [STDERR] ... 52 more
      15:35:49,281 ERROR [STDERR] Caused by: java.net.ConnectException: Connection refused: connect
      15:35:49,281 ERROR [STDERR] at java.net.PlainSocketImpl.socketConnect(Native Method)
      15:35:49,281 ERROR [STDERR] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
      15:35:49,281 ERROR [STDERR] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
      15:35:49,281 ERROR [STDERR] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
      15:35:49,281 ERROR [STDERR] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
      15:35:49,296 ERROR [STDERR] at java.net.Socket.connect(Socket.java:516)
      15:35:49,296 ERROR [STDERR] at java.net.Socket.connect(Socket.java:466)
      15:35:49,296 ERROR [STDERR] at java.net.Socket.<init>(Socket.java:366)
      15:35:49,296 ERROR [STDERR] at java.net.Socket.<init>(Socket.java:266)
      15:35:49,296 ERROR [STDERR] at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
      15:35:49,296 ERROR [STDERR] at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
      15:35:49,296 ERROR [STDERR] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:239)
      15:35:49,296 ERROR [STDERR] ... 52 more
      15:35:52,953 INFO [Server] Runtime shutdown hook called, forceHalt: true
      15:35:52,968 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
      15:35:53,031 INFO [JuddiRMIService] Unbinding juddi services
      15:35:53,781 ERROR [MainDeployer] Could not create deployment: file:/D:/tre-soa-poc/sandbox/1/jboss-dual/combined-ports/jboss-4.2.1.GA/jboss-4.2.1.GA/serve
      r/ports-02/deploy/jbossesb.esb/jbmq-queue-service.xml
      org.jboss.deployment.DeploymentException: create operation failed for package file:/D:/tre-soa-poc/sandbox/1/jboss-dual/combined-ports/jboss-4.2.1.GA/jboss
      -4.2.1.GA/server/ports-02/deploy/jbossesb.esb/jbmq-queue-service.xml; - nested throwable: (java.lang.NullPointerException)


      and it looks like jbossesb is still using the default port (1099)

        • 1. Re: Deploy to JBossAS using service bindings (and non defaul
          kconner

          From the stacktrace it would appear that the service bindings have not been applied into the sample-bindings.xml file.

          The console also appears to show a deployment of jbossesb *after* the server has been started, is that what you have done? If so, this will not work. The sample-bindings.xml file will be read at startup and will not contain the ESB modifications.

          Can you try a deployment of the ESB into a clean AS and then start it up? Does this work?

          Kev