10 Replies Latest reply on Jul 1, 2013 8:17 PM by sfcoy

    Issue with JNDI Namespace while migrating from jboss EAP 5.1 to 6.0.1

    madhusudhanraju_26

      Facing the datasource configuration issue while migrating from jboss EAP 5.1 to jBoss v6.0.1 GA.

       

      Am using MS SQL Server 2005 version as a database and code written in v5.1 connects to the database in the following way:

       

      - The Server_Name.prop property file is placed under the src/resources folder with the following information

       

      Server_Name.prop:

      database=java:Datasource

      query=select * from table_name

      min_dbconn=6

      max_dbconn=25

      dbuser=user_name

      qryTimeOut=30

      loglevel=DEBUG

      password=pwd

       

      - The above datasource is binded to JNDI name in the jboss-web.xml file under WEB-INF folder by using the depends tag as following;

       

      jboss-web.xml

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

      <jboss-web>

      <replication-config>

        <replication-trigger>SET</replication-trigger>

        <replication-granularity>ATTRIBUTE</replication-granularity>

      </replication-config>

      <depends>jboss.jca:service=DataSourceBinding,name=Datasource</depends>

      </jboss-web>

       

      - In jboss-5.1, i deployed the mssql-ds.xml file with the jndi name as following

       

      <jndi-name>Datasource</jndi-name>

       

      - Since all configurations goes to standalone.xml file, in the datasource tag in have configured as following

       

      <datasources>

                      <datasource jndi-name="java:/Datasource" pool-name="Datasource" enabled="true" use-java-context="true">

                          <connection-url>jdbc:sqlserver://Server_Name:Port_number;DatabaseName=Datasource</connection-url>

                          <driver>sqlserver</driver>

                          <security>

                              <user-name>x</user-name>

                              <password>y</password>

                          </security>

         <datasource>

      <datasources>

       

      - Got to know that depends tag is no longer supported according to jboss-web_7_1.xsd. Can someone let me know whart is the replacement tag for this?

       

      Am getting the following error:

       

      16:38:35,710 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.subunit."app.ear"."appWeb.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."app.ear"."appWeb.war".PARSE: JBAS018733: Failed to process phase PARSE of subdeployment "appWeb.war" of deployment "app.ear"
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_41]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_41]
      at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_41]
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018014: Failed to parse XML descriptor "/D:/jboss-eap-6.0.1/standalone/deployments/app.ear/appWeb.war/WEB-INF/jboss-web.xml" at [8,2]
      at org.jboss.as.web.deployment.JBossWebParsingDeploymentProcessor.deploy(JBossWebParsingDeploymentProcessor.java:79)
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
      ... 5 more
      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[8,2]
      Message: Unexpected element 'depends' encountered
      at org.jboss.metadata.parser.util.MetaDataElementParser.unexpectedElement(MetaDataElementParser.java:109)
      at org.jboss.metadata.parser.jbossweb.JBossWebMetaDataParser.parse(JBossWebMetaDataParser.java:212)
      at org.jboss.as.web.deployment.JBossWebParsingDeploymentProcessor.deploy(JBossWebParsingDeploymentProcessor.java:71)
      ... 6 more

      16:38:36,130 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "myjar.jar"
      16:38:36,130 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "app.ear"
      16:38:36,140 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
      JBAS014777:   Services which failed to start:      service jboss.deployment.subunit."app.ear"."appWeb.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."app.ear"."appWeb.war".PARSE: JBAS018733: Failed to process phase PARSE of subdeployment "appWeb.war" of deployment "app.ear"

      16:38:36,260 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
      16:38:36,260 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
      16:38:36,260 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss EAP 6.0.1.GA (AS 7.1.3.Final-redhat-4) started (with errors) in 23123ms - Started 163 of 247 services (2 services failed or missing dependencies, 81 services are passive or on-demand)

       

      I am deploying an app.EAR file in the deployments folder where the it contains appWeb.war file and a myjar.jar file. Classes in the war file extends the classes in the jar file so i deployed the myjar.jar file directly to deployments folder.

       

      Can someone please assist how can i modify my code so that i will be able to establish database connection?

        • 1. Re: Issue with JNDI Namespace while migrating from jboss EAP 5.1 to 6.0.1
          sfcoy

          The errors you have above are the same errors you were getting in Facing error with the <depends> tag in jboss-web.xml file.

           

          You need to remove that <depends> tag, because it is causing a parsing failure:

          {quote}Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[8,2]

          Message: Unexpected element 'depends' encountered{quote}

           

          Then you need to show how you're perfoming the DataSource lookup and how the Server_Name.prop file is supposed to work.

           

          At the moment I can see that you have

          {quote}database=java:Datasource{quote}

          but you have

          {quote}java:/Datasource{quote}

          defined in your configuration. Note the additional slash.

          • 2. Re: Issue with JNDI Namespace while migrating from jboss EAP 5.1 to 6.0.1
            madhusudhanraju_26

            I have commented out the depends tag and didn't saw the above PARSE errors.

             

            The Datasource lookup is done in the following way in code:

             

            protected void connectToDS() throws NamingException,
               javax.naming.CommunicationException
               {
              // connect to datasource
              javax.naming.Context ctx = null;
              try
                {
               java.util.Properties parms = new java.util.Properties();
               parms.setProperty( Context.INITIAL_CONTEXT_FACTORY,
                      "org.jnp.interfaces.NamingContextFactory" );
               ctx = new InitialContext( parms );
               ds = ( DataSource )ctx.lookup( datasource );
                }
              catch( CommunicationException e )
                {
               throw e;
                }
              catch( NamingException e )
                {
               Logger.error( getClass().getName(),
                    "[ConnectionPool].connectToDS()",
                    "failed to connect to " + datasource,
                    e.getMessage() );
               throw e;
                }
               }

             

            While accessing a url, getting the below error.

             

            19:29:57,815 ERROR [app.com.ConnectionPool] (http-localhost/127.0.0.1:8080-1) [ConnectionPool].connectToDS() : failed to connect to java:/Datasource JBAS011843: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.app.ear.appWeb.war:main" from Service Module Loader
            19:29:57,815 ERROR [app.com.ConnectionPool] (http-localhost/127.0.0.1:8080-1) .init() : failed to connect to java:Datasource JBAS011843: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.app.ear.appWeb.war:main" from Service Module Loader
            19:29:57,815 ERROR [app.com.ConnectionPool] (http-localhost/127.0.0.1:8080-1) WUConnectionPool : cannot start ds connpool  JBAS011843: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.app.ear.appWeb.war:main" from Service Module Loader
            19:29:57,815 FATAL [app.ConnPool] (http-localhost/127.0.0.1:8080-1) getInstance() : Connection pool creation failed: java.sql.SQLException: JBAS011843: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.app.ear.appWeb.war:main" from Service Module Loader
            at com.WUConnectionPool.<init>(WseUniConnectionPool.java:84) [myjar.jar:]
            at com.ConnPool.<init>(ConnPool.java:30) [classes:]
            at com.ConnPool.getInstance(ConnPool.java:54) [classes:]
            at com.Config.init(Config.java:52) [classes:]
            at com.WseDbConfig.<init>(WseDbConfig.java:88) [myjar.jar:]
            at com.Config.<init>(Config.java:25) [classes:]
            at com.Config.getInstance(Config.java:37) [classes:]
            at com.servlet.ShowConfig.getConfig(ShowConfig.java:18) [classes:]
            at com.ShowConfigServlet.process(WseShowConfigServlet.java:78) [myjar.jar:]
            at com.Servlet.preProcess(WseServlet.java:164) [myjar.jar:]
            at com.WseServlet.doGet(WseServlet.java:76) [myjar.jar:]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-2.jar:1.0.1.Final-redhat-2]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-2.jar:1.0.1.Final-redhat-2]
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.17.Final-redhat-1.jar:]
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.17.Final-redhat-1.jar:]
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.17.Final-redhat-1.jar:]
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.17.Final-redhat-1.jar:]
            at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.17.Final-redhat-1.jar:]
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.17.Final-redhat-1.jar:]
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.17.Final-redhat-1.jar:]
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372) [jbossweb-7.0.17.Final-redhat-1.jar:]
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.17.Final-redhat-1.jar:]
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.17.Final-redhat-1.jar:]
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.17.Final-redhat-1.jar:]
            at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_41]

             

            What could be the reason for the error?

            • 3. Re: Issue with JNDI Namespace while migrating from jboss EAP 5.1 to 6.0.1
              sfcoy

              You don't need a properties file when performing JNDI lookups in a JavaEE server.

               

              Try

              {code:java}protected void connectToDS() throws NamingException {

                   // connect to datasource

                   try {

                        javax.naming.Context ctx = new InitialContext( );

                        ds = ( DataSource )ctx.lookup( datasource);

                  

                   } catch( NamingException e ) {

                        Logger.error( getClass().getName(),

                           "[ConnectionPool].connectToDS()",

                           "failed to connect to " + datasource,

                           e.getMessage() );

                      throw e;

                   }

              }{code}

              • 4. Re: Issue with JNDI Namespace while migrating from jboss EAP 5.1 to 6.0.1
                madhusudhanraju_26

                Stephen, with the above changes i was getting the same errors. so i hardcoded the datasource variable with the jndi-name "java:/Datasource" and when am pinging a url am getting the connecion-url issues as in below error log

                 

                Datasource in the standalone.xml is given below

                 

                <subsystem xmlns="urn:jboss:domain:configadmin:1.0"/>
                        <subsystem xmlns="urn:jboss:domain:datasources:1.1">
                            <datasources>
                                     <datasource jndi-name="java:/swstore" pool-name="swstore" enabled="true" use-java-context="true">        

                                         <connection-url>jdbc:sqlserver://Server_Name:[port_number];DatabaseName=myDatabase</connection-url>

                                    <driver>sqlserver</driver>
                                    <security>
                                        <user-name>x</user-name>
                                        <password>y</password>
                                    </security>
                                    <statement>
                                        <prepared-statement-cache-size>100</prepared-statement-cache-size>
                                        <share-prepared-statements>true</share-prepared-statements>
                                    </statement>
                                </datasource>
                                <drivers>
                                    <driver name="sqlserver" module="com.microsoft.sqlserver">
                                        <xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>
                                    </driver>
                                </drivers>
                            </datasources>
                        </subsystem>

                 

                - i've mentioned the server name and port at which the mssql server 2005 is listening in the above url

                 

                20:50:46,326 INFO  [app.com.sbc.myjar2.util3.db.myjarDsConnectionPool] (http-localhost/127.0.0.1:8080-1) .init() : initialized : datasource=java:Datasource min=6 max=0 qrytimeout=30  
                20:51:02,900 WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (http-localhost/127.0.0.1:8080-1) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection
                at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:282)
                at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:240)
                at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:775)
                at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:345)
                at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)
                at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)
                at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)
                at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)
                at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)
                at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:159)
                at com.DsConnectionPool.getConnection(myjarDsConnectionPool.java:228) [myjar3.jar:]
                at com.UniConnectionPool.getConnection(myjarUniConnectionPool.java:137) [myjar3.jar:]
                at com..ConnPool.displayDbProperties(ConnPool.java:90) [classes:]
                at com..ConnPool.<init>(ConnPool.java:34) [classes:]
                at com..ConnPool.getInstance(ConnPool.java:54) [classes:]
                at com..Config.init(Config.java:52) [classes:]
                at com.sbc.myjar2.util3.myjarDbConfig.<init>(myjarDbConfig.java:88) [myjar3.jar:]
                at com..Config.<init>(Config.java:25) [classes:]
                at com..Config.getInstance(Config.java:37) [classes:]
                at com..servlet.ShowConfig.getConfig(ShowConfig.java:18) [classes:]
                at com..myjarShowConfigServlet.process(myjarShowConfigServlet.java:78) [myjar3.jar:]
                at com..myjarServlet.preProcess(myjarServlet.java:164) [myjar3.jar:]
                at com..myjarServlet.doGet(myjarServlet.java:76) [myjar3.jar:]
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-2.jar:1.0.1.Final-redhat-2]
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-2.jar:1.0.1.Final-redhat-2]
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.17.Final-redhat-1.jar:]
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.17.Final-redhat-1.jar:]
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.17.Final-redhat-1.jar:]
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.17.Final-redhat-1.jar:]
                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.17.Final-redhat-1.jar:]
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.17.Final-redhat-1.jar:]
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.17.Final-redhat-1.jar:]
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372) [jbossweb-7.0.17.Final-redhat-1.jar:]
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.17.Final-redhat-1.jar:]
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.17.Final-redhat-1.jar:]
                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.17.Final-redhat-1.jar:]
                at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_41]
                Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host Server_Name, port [port_number]has failed. Error: "null. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
                at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190)
                at com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:241)
                at com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2243)
                at com.microsoft.sqlserver.jdbc.TDSChannel.open(IOBuffer.java:491)
                at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1309)
                at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
                at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
                at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
                at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:254)
                ... 37 more

                 

                what could be the reason?

                • 5. Re: Issue with JNDI Namespace while migrating from jboss EAP 5.1 to 6.0.1
                  sfcoy

                  According to the stack trace this "jdbc:sqlserver://Server_Name:[port_number];DatabaseName=myDatabase" is literally the URL that you have used.

                   

                  You need to replace "Server_Name" with the host name or ip address of the computer that is hosting the SQLServer database. In addition, you need to replace "[port_number]" with the TCP port that the SQLServer database is using (the default is 1433).

                   

                  I also note that you seem to using your own connection pool implementation. When you get your connectivity sorted out I recommend that you discard your custom connection pool. JBossAS already does connection pooling for you.

                  • 6. Re: Issue with JNDI Namespace while migrating from jboss EAP 5.1 to 6.0.1
                    madhusudhanraju_26

                    Got the mistake. in the connection url i mentioned as following:

                     

                    <connection-url>jdbc:sqlserver://Server_Name\DbInstance_Name:port_number;DatabaseName=myDatabase</connection-url>

                     

                     

                     

                    So i removed the Instance_Name in the above connection url and now my java application is able to connect to  database and i was able to access the jsp pages in it.

                     

                    Only issue now is, i have an Web-Server (IIS 7.5) running in the same server which communicates with the jboss as. When running the applicaction as a whole first the request comes to web server and web-server is unable to contact jboss 6.0.1 and getting the following message:

                     

                    Service temporary unavailable!

                     

                    Any idea for such behaviour?

                     

                    • 7. Re: Issue with JNDI Namespace while migrating from jboss EAP 5.1 to 6.0.1
                      sfcoy

                      I can't help you with IIS. Try starting a new discussion with IIS in the subject.

                      • 8. Re: Issue with JNDI Namespace while migrating from jboss EAP 5.1 to 6.0.1
                        madhusudhanraju_26

                        Thanks Stephen for hepling mw with the issue

                        • 9. Re: Issue with JNDI Namespace while migrating from jboss EAP 5.1 to 6.0.1
                          madhusudhanraju_26

                          Hi,

                           

                          Now am able to establish the connection between the IIS and jboss 6.0.1 EAP, the issue was around the AJP configuration which was not configured earlier.

                           

                          Now when IIS redirects request to Jboss, am getting the following error.

                           

                          05:55:20,554 ERROR [app.servlet.StatusControl] (ajp-/127.0.0.1:8009-1) [Servlet].preProcess() : Exception caught: java.lang.NoClassDefFoundError: esGateKeeper/esGateKeeper
                                      at com.Dispatcher.checkAuthentication(Dispatcher.java:92) [myjar.jar:]
                                      at com.Dispatcher.process(Dispatcher.java:218) [myjar.jar:]
                                      at com.Servlet.preProcess(WseServlet.java:164) [myjar.jar:]
                                      at com.Servlet.doPost(WseServlet.java:91) [myjar.jar:]
                                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-2.jar:1.0.1.Final-redhat-2]
                                      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-2.jar:1.0.1.Final-redhat-2]
                                      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.17.Final-redhat-1.jar:]
                                      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.17.Final-redhat-1.jar:]
                                      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.17.Final-redhat-1.jar:]
                                      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.17.Final-redhat-1.jar:]
                                      at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
                                      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.17.Final-redhat-1.jar:]
                                      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.17.Final-redhat-1.jar:]
                                      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.17.Final-redhat-1.jar:]
                                      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372) [jbossweb-7.0.17.Final-redhat-1.jar:]
                                      at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:505) [jbossweb-7.0.17.Final-redhat-1.jar:]
                                      at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:453) [jbossweb-7.0.17.Final-redhat-1.jar:]
                                      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.17.Final-redhat-1.jar:]
                                      at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
                          Caused by: java.lang.ClassNotFoundException: esGateKeeper.esGateKeeper from [Module "deployment.myapp.ear.myappWeb.war:main" from Service Module Loader]
                                      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
                                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
                                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
                                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
                                      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
                                      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
                                      ... 19 more

                           

                          In the checkAuthentication() method of Dispatch class the code is follows:

                           

                          protected String checkAuthentication( HttpServletRequest req ) throws NotAuthenticated,
                             UpgradePassword
                             {
                            String cookie = null;
                            Cookie[] cl = req.getCookies();
                            if( cl == null )
                              {
                             throw new NotAuthenticated();
                              }
                            for( int i = 0; i < cl.length; ++i )
                              {
                             if( cl[i].getName().equals(COOKIE ) )
                               {
                              cookie = cl[i].getValue();
                              break;
                               }
                              }
                            if( cookie == null )
                              {
                              throw new NotAuthenticated();

                              }
                            String dcCookie = esGateKeeper
                              .esGateKeeper( cookie)
                            if(dcCookie.equals( "" ) )
                              {
                             throw new NotAuthenticated();
                              }
                            else
                              {
                             String[] fieldsNew = dcCookie.split( pipe_regexp );
                                if( this.getRequiredAuthStrength() <= Integer.parseInt( fieldsNew[3], 10 ) )
                               {
                              return fieldsNew[5];
                               }
                             else
                               {
                                  throw new UpgradePassword();
                               }
                              }
                             }

                           

                          I see gatekeeper.jar being used in the jboss-5.1 EAP. What could be the reason for this error?

                          • 10. Re: Issue with JNDI Namespace while migrating from jboss EAP 5.1 to 6.0.1
                            sfcoy

                            I don't think gatekeeper.jar is part of any JBoss EAP distribution. You need to find out where it came from and what it's for.