5 Replies Latest reply on Mar 27, 2007 9:50 PM by Sandeep Pathak

    UserTransactions through firewall

    Volker Krebs Newbie

      Hello,

      I've got a client running behind a firewall that wants to conect to my JBoss 3.2.0.
      I've open all neccessary ports so far (1099, 4444 ...) and everything works fine when I call the Home and Remote Interfaces of my EJBs. But when I want to use UserTransactions the client wants to open a new port (in my case 45xxx) and I can't find the configuration where I can specify this one to use a specific port.

      Any Ideas ?

      thanks,

      Volker

        • 1. Re: UserTransactions through firewall
          Tobias Seelinger Newbie

          Some of the remote objects in JBoss can be configured with an explicit RMI object port (org.jboss.naming.NamingService and org.jboss.jmx.adaptor.rmi.RMIAdaptorService).

          But there are two remote objects which can not be configured:

          - org.jboss.tm.usertx.server.UserTransactionSessionFactoryImpl
          - org.jboss.tm.usertx.server.UserTransactionSessionImpl

          These two objects are using the default configuration with different anonymous ports. In your case, while using UserTransactions, client and JBoss are communicating over these different ports, so you can't use a firewall.

          I'll add a feature request.

          • 2. Re: UserTransactions through firewall
            sbahal Newbie

            Shack,
            The NamingService and RMIAdaptorService ports are preconfigured - 4444 and 1099 respectively. The issue is a 3rd random port 44xxx. How can we configure this one.
            Thanks
            Sanjay

            • 3. Re: UserTransactions through firewall
              sbahal Newbie

              Well you need to add
              4443
              into the <mbean code="org.jboss.naming.NamingService" sction of jboss-service.xml.

              This restricts the port to 4443.

              Thanks
              Sanjay

              • 4. Re: UserTransactions through firewall
                Ronan-Yann Lorin Newbie

                Hi, are there any news about this topic. I have the same problem.

                This also happens with jboss-3.2.1.

                I defined:

                1099
                4446


                4444 jboss:service=TransactionManager


                The ports 1099, 4444, 4446 are correctly used, but when I try to start a transaction, a dynamic port is used and I get the following error:
                java.lang.RuntimeException: UT factory lookup failed: java.rmi.ConnectException: Connection refused to host: 130.30.12.5; nested exception i
                s:
                java.net.ConnectException: Connection refused: connect

                I've been digging a little bit at the code but didn't see anything significant.

                Regards

                • 5. Re: UserTransactions through firewall
                  Sandeep Pathak Newbie

                  Hi,

                  I am still facing the same problem. My hibernate-service.xml is like this:

                  <?xml version="1.0" encoding="UTF-8"?>




                  jboss:service=Naming
                  jboss:service=TransactionManager
                  java:/testspringdb

                  org.hibernate.dialect.MySQLDialect


                  java:hibernate/HibernateFactory


                  org.hibernate.cache.HashtableCacheProvider

                  create-drop
                  true



                  And this is the exception, i am getting.

                  20:25:25,921 ERROR [JTATransaction] JTA transaction begin failed
                  javax.transaction.SystemException: java.lang.RuntimeException: UT factory lookup failed
                  at org.jboss.tm.usertx.client.ClientUserTransaction.begin(ClientUserTransaction.java:114)
                  at org.hibernate.transaction.JTATransaction.begin(JTATransaction.java:86)
                  at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1290)
                  at com.springapptest.services.infrastructureservices.HibernatePersistenceService.persist(HibernatePersistenceService.java:53)
                  at com.springapptest.presentation.controller.PriceIncreaseFormController.onSubmit(PriceIncreaseFormController.java:61)
                  at org.springframework.web.servlet.mvc.SimpleFormController.onSubmit(SimpleFormController.java:382)
                  at org.springframework.web.servlet.mvc.SimpleFormController.onSubmit(SimpleFormController.java:356)
                  at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:258)
                  at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:249)
                  at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
                  at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
                  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:723)
                  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:663)
                  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:394)
                  at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:358)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                  at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
                  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
                  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
                  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
                  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                  at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                  at java.lang.Thread.run(Thread.java:536)
                  20:25:25,931 INFO [STDOUT] org.hibernate.TransactionException: JTA transaction begin failed
                  at org.hibernate.transaction.JTATransaction.begin(JTATransaction.java:92)
                  at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1290)
                  at com.springapptest.services.infrastructureservices.HibernatePersistenceService.persist(HibernatePersistenceService.java:53)
                  at com.springapptest.presentation.controller.PriceIncreaseFormController.onSubmit(PriceIncreaseFormController.java:61)
                  at org.springframework.web.servlet.mvc.SimpleFormController.onSubmit(SimpleFormController.java:382)
                  at org.springframework.web.servlet.mvc.SimpleFormController.onSubmit(SimpleFormController.java:356)
                  at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:258)
                  at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:249)
                  at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
                  at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
                  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:723)
                  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:663)
                  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:394)
                  at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:358)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                  at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
                  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
                  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
                  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
                  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                  at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                  at java.lang.Thread.run(Thread.java:536)
                  Caused by: javax.transaction.SystemException: java.lang.RuntimeException: UT factory lookup failed
                  at org.jboss.tm.usertx.client.ClientUserTransaction.begin(ClientUserTransaction.java:114)
                  at org.hibernate.transaction.JTATransaction.begin(JTATransaction.java:86)
                  ... 34 more
                  20:25:25,941 ERROR [[springtestapp]] Servlet.service() for servlet springtestapp threw exception
                  java.lang.NullPointerException
                  at com.springapptest.services.infrastructureservices.HibernatePersistenceService.persist(HibernatePersistenceService.java:64)
                  at com.springapptest.presentation.controller.PriceIncreaseFormController.onSubmit(PriceIncreaseFormController.java:61)
                  at org.springframework.web.servlet.mvc.SimpleFormController.onSubmit(SimpleFormController.java:382)
                  at org.springframework.web.servlet.mvc.SimpleFormController.onSubmit(SimpleFormController.java:356)
                  at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:258)
                  at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:249)
                  at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
                  at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
                  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:723)
                  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:663)
                  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:394)
                  at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:358)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                  at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
                  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
                  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
                  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
                  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                  at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                  at java.lang.Thread.run(Thread.java:536)
                  20:35:10,822 INFO [xapool] GenericPool:cleanUp less than minSize objects in the pool min=2 max=10 count=0
                  20:43:14,638 INFO [STDOUT] java.lang.IllegalMonitorStateException: current thread not owner
                  20:43:14,648 INFO [STDOUT] at java.lang.Object.notifyAll(Native Method)
                  20:43:14,658 INFO [STDOUT] at org.enhydra.jdbc.pool.GenericPool.cleanUp(GenericPool.java:763)
                  20:43:14,658 INFO [STDOUT] at org.enhydra.jdbc.pool.PoolKeeper.run(PoolKeeper.java:60)
                  20:43:14,668 INFO [STDOUT] at java.lang.Thread.run(Thread.java:536)


                  PLEASE HELP!!!!!!!!!!!!!!

                  Thanks
                  Sandeep

                  spathak@calance.com