1 2 Previous Next 15 Replies Latest reply: Dec 7, 2011 10:44 AM by Pavlos Polianidis RSS

Deploying services and clients

Pavlos Polianidis Newbie

Hi everybody,

 

I am following the instructions included in the development guide. More particullary, i put the war file in the C:\jboss-5.1.0.GA\server\default\deploy directory. The code of my client is the following:

 

.....

 

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

                    response.setContentType("text/html");

                    PrintWriter out = response.getWriter();

                    /*

                    * Write the HTML to the response

                    */

                    out.println("<html>");

                    out.println("<head>");

                    out.println("<title> A very simple servlet example</title>");

                    out.println("</head>");

                    out.println("<body>");

                    out.println("<h1>This is a text</h1>");

 

                     URL wsdlURL = TradeFlightServicePorts.WSDL_LOCATION;

            

                 

                  /**Code taken from jbossts xts example*/

                        System.out.println("CLIENT: obtaining userTransaction...");

                      

                  UserTransaction ut = UserTransactionFactory.userTransaction();

 

 

                  System.out.println("CLIENT: starting the transaction...");

 

 

                  try {

 

 

                                        ut.begin();

                              } catch (WrongStateException e) {

                                        // TODO Auto-generated catch block

                                        e.printStackTrace();

                              } catch (SystemException e) {

                                        // TODO Auto-generated catch block

                                        e.printStackTrace();

                              }

 

 

                  out.println("CLIENT: transaction ID= " + ut.toString());

 

 

                  out.println("CLIENT: calling business Web Services...");

                 

                

                

               /*   ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry();

                  String activationCoordinatorURI = serviceRegistry

                                      .getServiceURI(CoordinationConstants.ACTIVATION_ENDPOINT_NAME);

                  String coordinationType = "http://docs.oasis-open.org/ws-tx/wsat/2006/06";

 

 

                  CoordinationContextType contextType = ActivationCoordinator.createCoordinationContext(activationCoordinatorURI, "msgID", coordinationType, null, null);*/

                 

                  TradeFlightServicePorts ss = new TradeFlightServicePorts(wsdlURL, SERVICE_NAME);

                  TradeFlightService port = ss.getTradeFlightService(); 

                 

              

                  

                  {

                            /**Calling flight web service*/

                            System.out.println("Invoking checkFlightAvailability...");

                            System.out.println("Dummy Implementation of operation checkAvailability in FlightService");

                            FlightRequestInfo req = new FlightRequestInfo();

                            req.setDestination("Athens");

                            FlightStatus status = port.checkFlightAvailability(req);

                  

                            out.println("Flight service checkFlightAvailability the source city is=" + status.getSource() + "\n");

                

 

 

                  }

 

 

                  System.exit(0);

                 

                  out.println("</body>");

                              out.println("</html>");

                              out.close();

              }

 

......

 

However it throws me an exception on  ut.begin();. Obviously UserTransactionFactory.userTransaction(); return null.

 

Could you help? What am i doing wrong

  • 1. Re: Deploying services and clients
    Paul Robinson Master

    Pavlos,

     

    When you say ut.Begin() throws an Exception, I presume you mean a NullPointerException?

     

    This will happen if the XTS service has not started correctly. Depending on the version of JBossAS you are using, you will have to do different things to get the service installed and running. You will need to follow the instructions provided in the XTS documentation for the version of XTS that ships with the version of JBossAS you are using.

     

    You should also check the JBossAS boot log for any exceptions that might suggest that the XTS service failed to start.

     

    Without knowing which version of JBossAS you are using, I can't be any more specific. However, I would recommend you use the latest release of JBossAS 7. This release comes with XTS pre-installed and all you have to do to enable the service, is start the server with the "standalone-xts" configuration. This is done as follows:

     

    cd $JBOSS_HOME
    sh bin/standalone.sh --server-config=standalone-xts.xml
    

     

    Hope this helps,

     

    Paul.

  • 2. Re: Deploying services and clients
    Andrew Dinn Master

    Pavlos Polianidis wrote:

     


    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

                      

                      . . .

                      UserTransaction ut = UserTransactionFactory.userTransaction();

     

     

                      System.out.println("CLIENT: starting the transaction...");

     

     

                      try {

     

     

                                            ut.begin();

                                  } catch (WrongStateException e) {

                                            // TODO Auto-generated catch block

                                            e.printStackTrace();

                                  } catch (SystemException e) {

                                            // TODO Auto-generated catch block

                                            e.printStackTrace();

                                  }

     

                      . . .

     

     

    I noticed that you don't appear to have a ut.commit() or ut.rollback() call in your code. So,when you sort out deploying XTS you will need to insert at least one of those calls.

     

    Pavlos Polianidis wrote:

     

                   /*   ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry();

                      String activationCoordinatorURI = serviceRegistry

                                          .getServiceURI(CoordinationConstants.ACTIVATION_ENDPOINT_NAME);

                      String coordinationType = "http://docs.oasis-open.org/ws-tx/wsat/2006/06";

     

     

                      CoordinationContextType contextType = ActivationCoordinator.createCoordinationContext(activationCoordinatorURI, "msgID", coordinationType, null, null);*/

     

    I see that this is commented out but I have to ask why was it there in the first place? This is taken from the depths of the XTS client library code which implements ut.begin(). It is neither necessary nor, indeed, appropriate for your client code to be using the types, behaviours and remote invocations defined at this level. It may be helpful to understand that this sort of activity is going on behind the scenes when you start a transaction but you would do better to stick to the client APIs and forget about the implementation code when you are writing a transactional client.

     

    Also, as a way of explaining what the underlying library does to implement begin() the above code is only half the story. The client library does indeed talk to the ActivationCoordinator service to obtain and save a coordination context on your behalf. However, it also uses the URL contained in the context to locate the RegistrationCoordinator service and sends the latter a request to register with the CompletionCoordinator service, saving the results for later. The CompletionCoordinator service is the one with which the client library negotiates when your client makes a commit() or rollback() call. The result returned at registration time includes its address (URL).

  • 3. Re: Deploying services and clients
    Pavlos Polianidis Newbie

    You are right Andrew, i just forgot to erase that commented code. I wrote it at the beggining, when i did not know how the XTS API works, however i understand the concept of xts and how it operates behind the scene. As for ut.commit() i just forgot to write because i got the NullPointerException at ut.begin().

     

    So let me show you the modified client, which again does not work:

     

     

     

    public void init(final ServletConfig config) throws ServletException {
              System.out.println("init-------------------------------------------------------------------------------");
              
              context = config.getServletContext();
         }
    
    
         /**
          * Initialise if necessary
          */
         private synchronized void initialise() throws ServletException {
              if (!initialised) {
                   try {
                        System.out.println("Initializing....");
                        URL wsdlURL = TradeFlightServicePorts.WSDL_LOCATION;
                        TradeFlightServicePorts ss = new TradeFlightServicePorts(
                                  wsdlURL, SERVICE_NAME);
                       port = ss.getTradeFlightService();
                       
                       final String  address = "http://localhost:8080/flightService-0.0.1/" ;
    
                       BindingProvider bindingProvider = ((BindingProvider) port);
                        bindingProvider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, address);
                        configureClientHandler((BindingProvider)port);
                   } catch (final Exception ex) {
                        ex.printStackTrace();
                        throw new ServletException(ex);
                   }
                   initialised = true;
              }
         }
    
         
         /**
          * configure the XTS client handler which manages transaction flow for
          * invocations of the services
          * 
          * @param bindingProvider
          */
         private void configureClientHandler(BindingProvider bindingProvider) {
              System.out.println("configureClientHandler....");
              Handler handler = new JaxWSHeaderContextProcessor();
              List handlers = Collections.singletonList(handler);
              bindingProvider.getBinding().setHandlerChain(handlers);
         }
         
         protected void doPost(HttpServletRequest request,
                   HttpServletResponse response) throws ServletException, IOException {
              
              initialise() ;
              
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              /*
               * Write the HTML to the response
               */
              out.println("");
              out.println("");
              out.println("");
              out.println("");
              out.println("");
              
    
              
    
              /** Code taken from jbossts xts example */
              System.out.println("CLIENT: obtaining userTransaction...");
    
              UserTransaction ut = UserTransactionFactory.userTransaction();
    
              System.out.println("CLIENT: starting the transaction...");
    
              try {
    
                   ut.begin();
              } catch (WrongStateException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (SystemException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              }
    
              out.println("CLIENT: transaction ID= " + ut.toString());
    
              out.println("CLIENT: calling business Web Services...");
    
    
              {
                   /** Calling flight web service */
                   System.out.println("Invoking checkFlightAvailability...");
                   System.out.println("Dummy Implementation of operation checkAvailability in FlightService");
                   FlightRequestInfo req = new FlightRequestInfo();
                   req.setDestination("Athens");
                   FlightStatus status = port.checkFlightAvailability(req);
    
                   out.println("Flight service checkFlightAvailability the source city is="
                             + status.getSource() + "\n");
    
              }
              
               System.out.println("CLIENT: calling commit on the transaction...");
    
             try {
                   ut.commit();
              } catch (Exception e) {
                   
              }
    
             System.out.println("done.");
             System.out.flush();
                 
              System.exit(0);
    
              out.println("");
              out.println("");
              out.close();
         }
    
    
  • 4. Re: Deploying services and clients
    Pavlos Polianidis Newbie

    I forgot to mention that i use jboss-5.1.0.GA and that XTS is succesfully deployed.

  • 5. Re: Deploying services and clients
    Pavlos Polianidis Newbie

    Paul i have done that as well, but again NullPointerExceprion...

  • 6. Re: Deploying services and clients
    Andrew Dinn Master

    Pavlos Polianidis wrote:

     

    Paul i have done that as well, but again NullPointerExceprion...

    Hmm,I am disinclined to believe that XTS is successfully deployed. It might be deployed but that's a different matter. Can you please provide a stack trace for the NPE. That might help pin down where the problem is. Also, can you supply the bind address you are using when you start JBoss(or is it just defaulting to localhost?)

  • 7. Re: Deploying services and clients
    Pavlos Polianidis Newbie

    Sorry for asking so simple questions, but what is NPE, and where bind address refers to?

    I start JBoss via eclipse.

  • 8. Re: Deploying services and clients
    Andrew Dinn Master

    Pavlos Polianidis wrote:

     

    Sorry for asking so simple questions, but what is NPE, and where bind address refers to?

    I start JBoss via eclipse.

    NPE is a TLA for Null Pointer Exception (TLA is a Three Letter Abbreviation for the phrase Three Letter Abbreviation -- you have obviously never worked for IBM)

     

    The bind address is the host address on which the JBoss AS instance listens for incoming connnections -- specifically it is used by JBoss Web to open server side sockets to field incoming HTTP requests. When you start up JBoss AS it defaults to localhost which is normally bound to 127.0.0.1 i.e.a loopback address. However, it can be overridden on the command line using flag -b. Whetehr or not eclipse does that depends upon how you have configured it.

  • 9. Re: Deploying services and clients
    Pavlos Polianidis Newbie

    Yes you are right Andrew, i have never worked for IBM, in fact i am still a student. Anyway, Thanks for NPE definition,

     

    Here is the stack trace for the NPE :

     

     

    17:52:47,911 ERROR [[Client]] Servlet.service() for servlet Client threw exception
    java.lang.NullPointerException
         at org.comp6017.Client.doPost(Client.java:182)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
         at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
         at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:619)
    

     

    Af for bind address, it is localhost.

  • 10. Re: Deploying services and clients
    Pavlos Polianidis Newbie

    I have just noticed that when i start JBoss, there are two exception that are thrown:

     

    1) java.rmi.server.ExportException

    2) org.jboss.deployers.spi.DeploymentException

     

    The stack traces for both of them are:

     

    17:50:05,674 ERROR [AbstractKernelController] Error installing to Start: name=jboss.remoting:protocol=rmi,service=JMXConnectorServer state=Create mode=Manual requiredState=Installed
    java.rmi.server.ExportException: Port already in use: 1090; nested exception is: 
         java.net.BindException: Address already in use: JVM_Bind
         at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:310)
         at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:218)
         at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)
         at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)
         at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:190)
         at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
         at sun.rmi.registry.RegistryImpl.(RegistryImpl.java:68)
         at java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:222)
         at org.jboss.mx.remoting.service.JMXConnectorServerService.start(JMXConnectorServerService.java:117)
         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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
         at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
         at $Proxy38.start(Unknown Source)
         at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
         at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
         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.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
         at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
         at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
         at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
         at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
         at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
         at org.jboss.system.ServiceController.start(ServiceController.java:460)
         at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
         at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
         at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.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:171)
         at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
         at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
         at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
         at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
         at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
         at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
         at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
         at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
         at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
         at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
         at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
         at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
         at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
         at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
         at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
         at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
         at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
         at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
         at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
         at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
         at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
         at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
         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.net.BindException: Address already in use: JVM_Bind
         at java.net.PlainSocketImpl.socketBind(Native Method)
         at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
         at java.net.ServerSocket.bind(ServerSocket.java:319)
         at java.net.ServerSocket.(ServerSocket.java:185)
         at org.jboss.net.sockets.DefaultSocketFactory.createServerSocket(DefaultSocketFactory.java:124)
         at org.jboss.net.sockets.DefaultSocketFactory.createServerSocket(DefaultSocketFactory.java:99)
         at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:649)
         at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:299)
         ... 70 more
    17:50:05,679 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/C:/jboss-5.1.0.GA/server/default/deploy/jmx-remoting.sar/ state=PreReal mode=Manual requiredState=Real
    org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.remoting:service=JMXConnectorServer,protocol=rmi
         at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
         at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:118)
         at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.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:171)
         at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
         at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
         at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
         at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
         at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
         at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
         at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
         at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
         at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
         at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
         at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
         at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
         at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
         at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
         at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
         at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
         at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
         at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
         at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
         at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
         at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
         at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
         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.rmi.server.ExportException: Port already in use: 1090; nested exception is: 
         java.net.BindException: Address already in use: JVM_Bind
         at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:310)
         at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:218)
         at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)
         at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)
         at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:190)
         at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
         at sun.rmi.registry.RegistryImpl.(RegistryImpl.java:68)
         at java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:222)
         at org.jboss.mx.remoting.service.JMXConnectorServerService.start(JMXConnectorServerService.java:117)
         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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
         at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
         at $Proxy38.start(Unknown Source)
         at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
         at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
         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.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
         at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
         at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
         at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
         at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
         at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
         at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
         at org.jboss.system.ServiceController.start(ServiceController.java:460)
         at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
         at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
         ... 34 more
    Caused by: java.net.BindException: Address already in use: JVM_Bind
         at java.net.PlainSocketImpl.socketBind(Native Method)
         at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
         at java.net.ServerSocket.bind(ServerSocket.java:319)
         at java.net.ServerSocket.(ServerSocket.java:185)
         at org.jboss.net.sockets.DefaultSocketFactory.createServerSocket(DefaultSocketFactory.java:124)
         at org.jboss.net.sockets.DefaultSocketFactory.createServerSocket(DefaultSocketFactory.java:99)
         at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:649)
         at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:299)
         ... 70 more
    

     

    It may happen that this is the reason for the problem

  • 11. Re: Deploying services and clients
    Pavlos Polianidis Newbie

    Sorry for the last post. I restarted my computer and there are no more those exceptions.

     

    However the NPE is still there.

  • 12. Re: Deploying services and clients
    Pavlos Polianidis Newbie

    I found the reason for NPE. My client is created as a maven project in eclipse. I changed the scope of jbossxts dependency, from compile to provided and it solved the problem.

  • 13. Re: Deploying services and clients
    Pavlos Polianidis Newbie

    Paul, i tried to run it on jboss 7, however i still get this exception

    java.lang.NullPointerException
         org.comp6017.JaxWsClient.Client.testTransaction(Client.java:227)
         org.comp6017.JaxWsClient.Client.doGet(Client.java:185)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:84 

     

    More specifically, i run jboss-as-7.0.2.Final. In addition i create my service using wsdl to java approach with CXF i build the project wtih maven in eclipse. I add explicitely the dependencies fot jbossxts and jbossjta.

     

    Can the case be that i use the wrong dependencies?

  • 14. Re: Deploying services and clients
    Paul Robinson Master

    Pavlos,

     

    Just to confirm. You had a problem (the NPE) that occurs when you run your application on JBoss AS 5.1.0. You fixed this problem by modifying your jbossxts dependency in your pom.xml. However, when you run your code on JBoss AS 7.0.2, the same NPE re-occurs?

     

    You should make sure that you use the same version of the XTS in your pom.xml, that is shipped with the version of JBoss you intend to deploy to. This is not always the case, but when you are having problems you should rule this issue out first. When deploying to JBoss AS 7.x, you can look in the following location to see what version of XTS is shipped:

     

    $JBOSS_HOME/modules/org/jboss/xts/main

     

    Unfortunatly, there are a number of issues with XTS in JBossAS 7.0.2 that you will hit. I suggest you use JBossAS 7.1.0.Beta1b instead.

     

    Paul.

1 2 Previous Next