Postgresql and J2ee - Mailing list pgsql-jdbc

From philippe.mayre
Subject Postgresql and J2ee
Date
Msg-id 3EA93864.8080204@anakeen.com
Whole thread Raw
Responses Re: Postgresql and J2ee
List pgsql-jdbc
dear support,

I would like to use two PostgreSql 7.3 XA Databases rather than XACloudscape with my j2ee application but when I deploy it on the server, this one throws the following exception :

java.lang.ClassCastException
        at com.sun.enterprise.resource.SystemJdbc20XaAllocator.createResource(SystemJdbc20XaAllocator.java:39)
        at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:177)
        at com.sun.enterprise.resource.SystemJdbcDataSource.internalGetConnection(SystemJdbcDataSource.java:72)
        at com.sun.enterprise.resource.SystemJdbcDataSource.getConnection(SystemJdbcDataSource.java:50)
        at com.sun.ejb.persistence.PersistenceManagerImpl.getConnection(PersistenceManagerImpl.java:588)
        at com.sun.ejb.persistence.PersistenceManagerImpl.getConnection(PersistenceManagerImpl.java:573)
        at com.sun.ejb.persistence.PMDeployerImpl.createTable(PMDeployerImpl.java:201)
        at com.sun.ejb.persistence.PMDeployerImpl.ejbJarDeployed(PMDeployerImpl.java:68)
        at com.sun.enterprise.tools.deployment.backend.JarManagerImpl.loadJar(JarManagerImpl.java:141)
        at com.sun.enterprise.tools.deployment.backend.JarInstallerImpl.deployEjbs(JarInstallerImpl.java:727)
        at com.sun.enterprise.tools.deployment.backend.JarInstallerImpl.deployApplication(JarInstallerImpl.java:221)
        at org.omg.stub.com.sun.enterprise.tools.deployment.backend._JarInstallerImpl_Tie._invoke(Unknown Source)
        at com.sun.corba.ee.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:355)
        at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:255)
        at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:84)
        at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:99)


I use j2ee 1.3 with j2sdk 1.4 .1

the features on my linux system are :

in .bash_profile export CLASSPATH=.:$JAVA_HOME/lib/j2ee.jar:/usr/share/pgsql/pg73jdbc3.jar

in $J2EE_HOME/bin/userconfig.sh export J2EE_CLASSPATH=/usr/share/pgsql/pg73jdbc3.jar

in $J2EE_HOME/bin/cloudscape file I change COM.cloudscape.core.JDBCDriver by org.postgresql.Driver for setting the good class in DriverManager

then I launch the following command

./j2eeadmin -addJdbcXADatasource jdbc/name org.postgresql.jdbc3.Jdbc3ConnectionPool -props serverName=myServer portNumber=5432 databaseName=nameDB user=myPostgresqlUser

when I start the server I haven't any problems but after .....


Do you know if I can use this driver and how I must declare my databases


Thank you in advance


phMayre

pgsql-jdbc by date:

Previous
From: Scot Floess
Date:
Subject: Re: setting postgres for java
Next
From: Barry Lind
Date:
Subject: Re: Postgresql and J2ee