3 Replies Latest reply on Apr 23, 2002 9:26 PM by davidjencks

    JBoss 3.0RC1 & Informix & XADatasource

    matias_salvador

      When I try to make a getConnection() with no parameters, it throws me the following Exception:

      20:27:44,365 ERROR [STDERR] java.sql.SQLException: Unable to get Connection: javax.resource.ResourceException: Unable to create DB XAConnection: java.sql.SQLExc
      eption: user/Password does not match with datasource.

      But when I call the method getConnection(username, password), it works fine... what am i setting wrong in my login-conf.xml and in my informix-xa-service.xml?

      I attached them both so you can take a look at them... thanks for any help you can give me ASAP.

        • 1. Re: JBoss 3.0RC1 & Informix & XADatasource
          davidjencks

          If you want the login module in login-conf to be used, this line must be uncommented:

          <!-- java:/jaas/InformixXaDbRealm -->

          as the comment immediately above it indicates.

          Be sure the names still match.

          Otherwise you are logging in with no username/pw.

          • 2. Re: JBoss 3.0RC1 & Informix & XADatasource
            matias_salvador

            I've uncommented this line you told me about, but the login-config.xml is not read, because it throws me the following Exception when I call the getConnection() with no parameters:

            21:25:46,761 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files
            java.io.IOException: Properties file users.properties not found at org.jboss.security.auth.spi.UsersRolesLoginModule.loadProperties(UsersRolesLoginModule.java:212)
            at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:193)
            at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:95)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
            java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at javax.security.auth.login.LoginContext.invoke(LoginContext.java:651)
            at javax.security.auth.login.LoginContext.access$000(LoginContext.java:129)
            at javax.security.auth.login.LoginContext$4.run(LoginContext.java:599)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:596)
            at javax.security.auth.login.LoginContext.login(LoginContext.java:523)
            at org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:390)
            at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:357)
            at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:214)
            at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:536)
            at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:398)
            at org.jboss.resource.adapter.jdbc.JDBCDataSource.getConnection(JDBCDataSource.java:110)
            at interest.src.InterestBean.getUsers(InterestBean.java:43)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invokeMethod.java:324)
            at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:653)
            at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:147)
            at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
            at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)
            at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
            at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
            at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)
            at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
            at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
            at org.jboss.ejb.Container.invoke(Container.java:706)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:492)
            at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:364)
            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:324)
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
            at sun.rmi.transport.Transport$1.run(Transport.java:148)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
            at sun.rmi.transport.tcp.TCPTransport.handleMessagesTCPTransport.java:460)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
            .java:701)
            at java.lang.Thread.run(Thread.java:536)
            21:25:46,792 ERROR [STDERR] java.lang.SecurityException: Invalid authentication
            attempt, principal=null

            I don't have these property files... are they neccesary? How do I declare them?

            Thank You.

            • 3. Re: JBoss 3.0RC1 & Informix & XADatasource
              davidjencks