1 Reply Latest reply on Feb 3, 2003 4:51 PM by 3004

    javax.naming.NamingException

    3004

      I've been trying to search the sight and the newsgroups for a solution, and haven't
      found one. I have an application running in WL 6.1 on linux, which uses and Oracle
      backend and JMS. When trying to submit a form which should write to the database,
      I get this:

      ####<Jan 30, 2003 10:44:29 PM CST> <Error> <HTTP> <mcp.unboundtech.com> <mcp>
      <ExecuteThread: '11' for queue: 'default'> <> <> <101020> <[WebAppServletContext(3820372,planotg,/planotg)]
      Servlet failed with Exception>
      System Error:
      Message: Could not create UserTransaction.
      Original message: javax.naming.AuthenticationException [Root exception is java.lang.SecurityException:
      Authentication for user system denied in realm weblogic]
      Stack trace: javax.naming.AuthenticationException. Root exception is
      java.lang.SecurityException: Authentication for user system denied in realm weblogic
      at weblogic.security.acl.Realm.authenticate(Realm.java:212)

      There's more files listed in the stack trace, I just truncated for brevity. I
      believe the offending code is this (the one with the arrow at the end)

      Context context = null;
      UserTransaction transaction = null;
      Hashtable hashtable = new Hashtable( 10 );

      hashtable.put( Context.INITIAL_CONTEXT_FACTORY, DMHelper.JNDI_INITIAL_CONTEXT_FACTORY
      );
      hashtable.put( Context.PROVIDER_URL, DMHelper.JNDI_PROVIDER_URL );
      hashtable.put( Context.SECURITY_PRINCIPAL, ApplicationProperties.getInstance().getProperty(
      "application.wlserver.login" ));
      hashtable.put( Context.SECURITY_CREDENTIALS, ApplicationProperties.getInstance().getProperty(
      "application.wlserver.password" ));

      try
      {
      context = new InitialContext( hashtable ); <---------------
      transaction = (UserTransaction) context.lookup( "javax.transaction.UserTransaction"
      );
      transaction.setTransactionTimeout(100);
      }

        • 1. Re: javax.naming.NamingException
          3004

          It turned out to be a propoerties file with invalid settings. Everything seems
          to be working fine now.

          "Justin Georgeson" <jgeorgeson@unboundtech.com> wrote:
          >
          I've been trying to search the sight and the newsgroups for a solution,
          and haven't
          found one. I have an application running in WL 6.1 on linux, which uses
          and Oracle
          backend and JMS. When trying to submit a form which should write to the
          database,
          I get this:

          ####<Jan 30, 2003 10:44:29 PM CST> <Error> <HTTP> <mcp.unboundtech.com>
          <mcp>
          <ExecuteThread: '11' for queue: 'default'> <> <> <101020> <[WebAppServletContext(3820372,planotg,/planotg)]
          Servlet failed with Exception>
          System Error:
          Message: Could not create UserTransaction.
          Original message: javax.naming.AuthenticationException [Root exception
          is java.lang.SecurityException:
          Authentication for user system denied in realm weblogic]
          Stack trace: javax.naming.AuthenticationException. Root exception is
          java.lang.SecurityException: Authentication for user system denied in
          realm weblogic
          at weblogic.security.acl.Realm.authenticate(Realm.java:212)

          There's more files listed in the stack trace, I just truncated for brevity.
          I
          believe the offending code is this (the one with the arrow at the end)

          Context context = null;
          UserTransaction transaction = null;
          Hashtable hashtable = new Hashtable( 10 );

          hashtable.put( Context.INITIAL_CONTEXT_FACTORY, DMHelper.JNDI_INITIAL_CONTEXT_FACTORY
          );
          hashtable.put( Context.PROVIDER_URL, DMHelper.JNDI_PROVIDER_URL );
          hashtable.put( Context.SECURITY_PRINCIPAL, ApplicationProperties.getInstance().getProperty(
          "application.wlserver.login" ));
          hashtable.put( Context.SECURITY_CREDENTIALS, ApplicationProperties.getInstance().getProperty(
          "application.wlserver.password" ));

          try
          {
          context = new InitialContext( hashtable ); <---------------
          transaction = (UserTransaction) context.lookup( "javax.transaction.UserTransaction"
          );
          transaction.setTransactionTimeout(100);
          }