3 Replies Latest reply on Apr 18, 2002 2:04 PM by yasirsk

    JBOSS3/no PostgreSQL user name specified

    yasirsk

      I have used the following entry in postgres-service.xml






      ConnectionURL=jdbc:postgresql://deathstar:5400/karakorams
      DriverClass=org.postgresql.Driver
      UserName="salsa"
      Password="salsa12"
      PostgresDS
      java:/TransactionManager
      <depends optional-attribute-name="ResourceAdapterName">jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter
      <depends optional-attribute-name="ConnectionManagerFactoryLoaderName">jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory
      #
      #Wed Aug 15 16:17:29 EDT 2001
      BlockingTimeoutMillis=500000
      IdleTimeoutMinutes=30
      MaxSize=10
      CleanupIntervalMinutes=10
      MinSize=0
      MaxIdleTimeoutPercent=1.0


      org.jboss.resource.security.ManyToOnePrincipalMapping

      UserName=





      this was taken from the CVS in the documentation specific database example.

      I get the following error when i try and deploy an application that uses the database.

      18:35:40,713 ERROR [PostgresDS] Unable to create ManagedConnection:
      javax.resource.ResourceException: Unable to create DB connection for url: jdbc:postgresql://deathsta
      r:5400/karakorams, user: , exception: Something unusual has occured to cause the driver to fail. Ple
      ase report this exception: java.sql.SQLException: FATAL 1: no PostgreSQL user name specified in sta
      rtup packet


      the driver is the latest that worked FINE on 2.4.4 ....is this a JBOSS 3 bug or something?

      YSK

        • 1. Re: JBOSS3/no PostgreSQL user name specified
          davidjencks

          You need to specify userName and password in principal mapping properties.

          I recommend you use jboss 3 rc1. The db configuration has changed completely: examples for that are at
          http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jbosscx/src/etc/example-config/

          I don't think the examples made it into the binary distribution, and they have improved since then anyway.

          • 2. Re: JBOSS3/no PostgreSQL user name specified
            yasirsk

            dj, thanks for that!! I've gotten it to work on the binary distribution and jus checked out the CVS. Will try your new example on that. The file that worked for JBOSS3 beta--binary is pasted below for others







            ConnectionURL=jdbc:postgresql://deathstar:5400/karakorams
            DriverClass=org.postgresql.Driver
            UserName=salsa
            Password=salsa12
            PostgresDS
            java:/TransactionManager
            <depends optional-attribute-name="ResourceAdapterName">jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter
            <depends optional-attribute-name="ConnectionManagerFactoryLoaderName">jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory
            #
            #Wed Aug 15 16:17:29 EDT 2001
            BlockingTimeoutMillis=500000
            IdleTimeoutMinutes=30
            MaxSize=10
            CleanupIntervalMinutes=10
            MinSize=0
            MaxIdleTimeoutPercent=1.0


            org.jboss.resource.security.ManyToOnePrincipalMapping

            UserName=salsa
            password=salsa12








            However, i have gotten a different problem now, i get a

            org.xml.sax.SAXParseException: External parameter entity "%[dtd];" has characters after markup.
            at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3108)
            at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3102)

            when i deploy. Is this a postgres problem or something with my WAR/EAR deployment descriptor file?? If so, what? It deoloys fine in 2.4.4


            YSK

            • 3. Re: JBOSS3/no PostgreSQL user name specified
              yasirsk

              okay, the DTD problem was solved. the <?xml ....> directive at the top is necessary.