glassfish
  1. glassfish
  2. GLASSFISH-11868

Failed to connect to Database(mysql/oracledd) when using password alias

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: v3.0.1
    • Fix Version/s: 3.1_ms04
    • Component/s: configuration
    • Labels:
      None
    • Environment:

      Operating System: Linux
      Platform: All

      Description

      OS: solaris10
      build: promoted build 16

      A test failure was found during security sqe testing with oracledd and
      mysql database in V3.0.1. The test failed to connect to Database when using
      password alias for backend-principal password. The same test case passed with
      derby database in V3.0.1.
      Steps to reproduce the issue:
      1.install V3 promoted b16, start domain
      2. Checkout SQE workspace:
      cvs co appserver-sqe/bootstrap.xml
      (CVSROOT: :pserver:<user>@redcvs.red.iplanet.com:/m/jws)
      cd appserver-sqe
      ant -f bootstrap.xml co-security
      3. cd appserver-sqe, run "ant oracledd-setup"
      4. cd appserver-sqe/pe/security/pwdencrypt, run "ant oracledd setup"
      5. cd appserver-sqe/pe/security/pwdencrypt/backend-principal, run "ant oracledd
      build deployTxPool runclient-common-target"
      The test failed.

      Here is the exception in server.log:
      [#|2010-05-05T15:28:06.632-0700|INFO|glassfish3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=27;_ThreadName=Thread-1;|HelloEJB:dropTable
      Error in allocating a connection. Cause: SQLException: [sunm][Oracle JDBC
      Driver][Oracle]ORA-01017: invalid username/password; logon denied

      #]

      [#|2010-05-05T15:28:06.634-0700|SEVERE|glassfish3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=27;_ThreadName=Thread-1;|java.sql.SQLException:
      Error in allocating a connection. Cause: SQLException: [sunm][Oracle JDBC
      Driver][Oracle]ORA-01017: invalid username/password; logon denied

      at
      com.sun.connector.blackbox.JdbcDataSource.getConnection(JdbcDataSource.java:77)
      at
      com.sun.ejte.j2ee.connector.connPool.hello.HelloEJB.dropTable(HelloEJB.java:131)
      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.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1056)
      at
      org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
      at
      com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:4038)
      at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5223)
      at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5203)
      at
      com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:201)
      at
      com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:118)
      at $Proxy114.dropTable(Unknown Source)
      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
      com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie.dispatchToMethod(ReflectiveTie.java:146)
      at
      com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:176)
      at
      com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:682)
      at
      com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:216)
      at
      com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1841)
      at
      com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1695)
      at
      com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1078)
      at
      com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:221)
      at
      com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:797)
      at
      com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:561)
      at
      com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2558)
      at
      com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:492)
      at
      com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:528)

      6. And I checked the domain.xml and it has correct DB user/password, URL...
      <connector-connection-pool resource-adapter-name="blackbox-tx" name="RACONNPOOL"
      connection-definition-name="javax.sql.DataSource">
      <security-map name="test-security-map">
      <backend-principal user-name="coretest1"
      password="$

      {ALIAS=dbpassword-alias}

      " />
      <principal>j2ee</principal>
      </security-map>
      <property name="user" value="coretest1" /> <-- these are correct DB user
      and password
      <property name="password" value="coretest1" />
      <property name="ConnectionURL"
      value="jdbc:sun:oracle://jws-280r-3.red.iplanet.com:1521;SID=ora11g" /> <--
      correct DB URL
      </connector-connection-pool>
      <connector-resource pool-name="RACONNPOOL" jndi-name="eis/connPoolTestRA" />

      1. domain.xml
        13 kB
        sonialiu
      2. server.log.oracledd
        176 kB
        sonialiu

        Activity

        Hide
        Nazrul added a comment -

        -> Tom

        Show
        Nazrul added a comment - -> Tom
        Hide
        Tom Mueller added a comment -

        Jennifer, this looks to be a token substitution issue.

        Show
        Tom Mueller added a comment - Jennifer, this looks to be a token substitution issue.
        Hide
        Tom Mueller added a comment -

        This issue is referenced in the config subproject document. See:
        http://wikis.sun.com/display/GlassFish/3.1Config

        Sorry for not getting this assigned to you sooner.

        Show
        Tom Mueller added a comment - This issue is referenced in the config subproject document. See: http://wikis.sun.com/display/GlassFish/3.1Config Sorry for not getting this assigned to you sooner.
        Hide
        Bhakti Mehta added a comment -

        Committed svn rev 39907

        Show
        Bhakti Mehta added a comment - Committed svn rev 39907
        Hide
        sonialiu added a comment -

        Verified the bug against latest nightly build (09/06), it is fixed.

        Show
        sonialiu added a comment - Verified the bug against latest nightly build (09/06), it is fixed.

          People

          • Assignee:
            Bhakti Mehta
            Reporter:
            sonialiu
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: