-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: weblogic connection pool
PostPosted: Fri Dec 11, 2009 6:41 am 
Newbie

Joined: Fri Dec 11, 2009 6:24 am
Posts: 2
hi ,
i m getting problem with weblogic connection pool used with hibernate..
can u tell how to configure weblogic8.1 supplied connection pool in hibernate.cfh.xml file

code in hibernate.cfg.xml:
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.provider-class">org.hibernate.connectrion.DataSourceConnectionProvider</property>
<property name="hibernate.connection.datasource">myjndi</property>
<property name="hibernate.jndi.url">t3://localhost:7001</property>
<property name="hibernate.jndi.class">weblogic.jndi.WLInitialContextFactory</property>

<property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
<property name="show_sql">true</property>
<mapping resource="Employee.hbm.xml"/>
</session-factory>
</hibernate-configuration>


[b]Exception is:[/b]
Dec 11, 2009 3:40:32 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {}
Dec 11, 2009 3:40:32 PM org.hibernate.connection.UserSuppliedConnectionProvider
configure
WARNING: No connection properties specified - the user must supply JDBC connecti
ons
Dec 11, 2009 3:40:32 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Scrollable result sets: disabled
Dec 11, 2009 3:40:32 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC3 getGeneratedKeys(): disabled
Dec 11, 2009 3:40:32 PM org.hibernate.transaction.TransactionFactoryFactory buil
dTransactionFactory
INFO: Using default transaction strategy (direct JDBC transactions)
Dec 11, 2009 3:40:32 PM org.hibernate.transaction.TransactionManagerLookupFactor
y getTransactionManagerLookup
INFO: No TransactionManagerLookup configured (in JTA environment, use of process
level read-write cache is not recommended)
Dec 11, 2009 3:40:32 PM org.hibernate.cfg.SettingsFactory createCacheProvider
INFO: Cache provider: org.hibernate.cache.EhCacheProvider
Dec 11, 2009 3:40:32 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Second-level cache: enabled
Dec 11, 2009 3:40:32 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: disabled
Dec 11, 2009 3:40:32 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query cache: disabled
Dec 11, 2009 3:40:32 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Echoing all SQL to stdout
Dec 11, 2009 3:40:32 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Statistics: disabled
Dec 11, 2009 3:40:32 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Deleted entity synthetic identifier rollback: disabled
Dec 11, 2009 3:40:32 PM org.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
Dec 11, 2009 3:40:32 PM org.hibernate.impl.SessionFactoryObjectFactory addInstan
ce
INFO: Not binding factory to JNDI, no JNDI name configured
Dec 11, 2009 3:40:32 PM org.hibernate.impl.SessionFactoryImpl checkNamedQueries
INFO: Checking 0 named queries
Exception in thread "main" java.lang.UnsupportedOperationException: The user mus
t supply a JDBC connection
at org.hibernate.connection.UserSuppliedConnectionProvider.getConnection
(UserSuppliedConnectionProvider.java:32)
at org.hibernate.jdbc.AbstractBatcher.openConnection(AbstractBatcher.jav
a:338)
at org.hibernate.impl.SessionImpl.connect(SessionImpl.java:1629)
at org.hibernate.impl.SessionImpl.connection(SessionImpl.java:1609)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:
40)
at org.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDB
CTransactionFactory.java:19)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1184
)
at TestClient.main(TestClient.java:28)

E:\JavaPrograms\Hibernate\UsingWeblogicConnectionPool>java TestClient
Dec 11, 2009 4:09:38 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.0 alpha
Dec 11, 2009 4:09:38 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Dec 11, 2009 4:09:38 PM org.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
Dec 11, 2009 4:09:38 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Dec 11, 2009 4:09:38 PM org.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
Dec 11, 2009 4:09:38 PM org.hibernate.cfg.Configuration getConfigurationInputStr
eam
INFO: Configuration resource: /hibernate.cfg.xml
Dec 11, 2009 4:09:38 PM org.hibernate.cfg.Configuration addResource
INFO: Mapping resource: Employee.hbm.xml
Dec 11, 2009 4:09:38 PM org.hibernate.cfg.Binder bindRootClass
INFO: Mapping class: EmpBean -> EMPLOYEE
Dec 11, 2009 4:09:38 PM org.hibernate.cfg.Configuration doConfigure
INFO: Configured SessionFactory: null
Dec 11, 2009 4:09:38 PM org.hibernate.cfg.Configuration secondPassCompile
INFO: processing one-to-many association mappings
Dec 11, 2009 4:09:38 PM org.hibernate.cfg.Configuration secondPassCompile
INFO: processing one-to-one association property references
Dec 11, 2009 4:09:38 PM org.hibernate.cfg.Configuration secondPassCompile
INFO: processing foreign key constraints
Dec 11, 2009 4:09:38 PM org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.OracleDialect
Dec 11, 2009 4:09:38 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Generate SQL with comments: disabled
Dec 11, 2009 4:09:38 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {}
Dec 11, 2009 4:09:38 PM org.hibernate.util.NamingHelper getInitialContext
INFO: JNDI InitialContext properties:{java.naming.provider.url=t3://localhost:70
01, java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory}
Dec 11, 2009 4:09:39 PM org.hibernate.connection.DatasourceConnectionProvider co
nfigure
INFO: Using datasource: myjndi
Dec 11, 2009 4:09:39 PM org.hibernate.cfg.SettingsFactory buildSettings
WARNING: Could not obtain connection metadata
java.sql.SQLException: SQL operations are not allowed with no global transaction
by default for XA drivers. If the XA driver supports performing SQL operations
with no global transaction, explicitly allow it by setting "SupportsLocalTransac
tion" JDBC connection pool property to true. In this case, also remember to comp
lete the local transaction before using the connection again for global transact
ion, else a XAER_OUTSIDE XAException may result. To complete a local transaction
, you can either set auto commit to true or call Connection.commit() or Connecti
on.rollback().
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.j
ava:108)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:138)
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTACo
nnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_OracleConnection_
812_WLStub.getMetaData(Unknown Source)
at weblogic.jdbc.rmi.SerialConnection.getMetaData(SerialConnection.java:
286)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:
95)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1285
)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
a:913)
at TestClient.main(TestClient.java:15)
Caused by: java.sql.SQLException: SQL operations are not allowed with no global
transaction by default for XA drivers. If the XA driver supports performing SQL
operations with no global transaction, explicitly allow it by setting "SupportsL
ocalTransaction" JDBC connection pool property to true. In this case, also remem
ber to complete the local transaction before using the connection again for glob
al transaction, else a XAER_OUTSIDE XAException may result. To complete a local
transaction, you can either set auto commit to true or call Connection.commit()
or Connection.rollback().
at weblogic.jdbc.wrapper.JTAConnection.checkIfLocalTxSupported(JTAConnec
tion.java:90)
at weblogic.jdbc.wrapper.JTAConnection.checkConnection(JTAConnection.jav
a:79)
at weblogic.jdbc.wrapper.Connection.getMetaData(Connection.java:289)
at weblogic.jdbc.rmi.internal.ConnectionImpl.getMetaData(ConnectionImpl.
java:268)
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTACo
nnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_OracleConnection_
WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:353)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
144)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Dec 11, 2009 4:09:39 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Scrollable result sets: disabled
Dec 11, 2009 4:09:39 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC3 getGeneratedKeys(): disabled
Dec 11, 2009 4:09:39 PM org.hibernate.transaction.TransactionFactoryFactory buil
dTransactionFactory
INFO: Using default transaction strategy (direct JDBC transactions)
Dec 11, 2009 4:09:39 PM org.hibernate.transaction.TransactionManagerLookupFactor
y getTransactionManagerLookup
INFO: No TransactionManagerLookup configured (in JTA environment, use of process
level read-write cache is not recommended)
Dec 11, 2009 4:09:39 PM org.hibernate.cfg.SettingsFactory createCacheProvider
INFO: Cache provider: org.hibernate.cache.EhCacheProvider
Dec 11, 2009 4:09:39 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Second-level cache: enabled
Dec 11, 2009 4:09:39 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: disabled
Dec 11, 2009 4:09:39 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query cache: disabled
Dec 11, 2009 4:09:39 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Echoing all SQL to stdout
Dec 11, 2009 4:09:39 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Statistics: disabled
Dec 11, 2009 4:09:39 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Deleted entity synthetic identifier rollback: disabled
Dec 11, 2009 4:09:39 PM org.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
Dec 11, 2009 4:09:40 PM org.hibernate.impl.SessionFactoryObjectFactory addInstan
ce
INFO: Not binding factory to JNDI, no JNDI name configured
Dec 11, 2009 4:09:40 PM org.hibernate.impl.SessionFactoryImpl checkNamedQueries
INFO: Checking 0 named queries
Dec 11, 2009 4:09:40 PM org.hibernate.transaction.JDBCTransaction begin
SEVERE: Begin failed
java.sql.SQLException: SQL operations are not allowed with no global transaction
by default for XA drivers. If the XA driver supports performing SQL operations
with no global transaction, explicitly allow it by setting "SupportsLocalTransac
tion" JDBC connection pool property to true. In this case, also remember to comp
lete the local transaction before using the connection again for global transact
ion, else a XAER_OUTSIDE XAException may result. To complete a local transaction
, you can either set auto commit to true or call Connection.commit() or Connecti
on.rollback().
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.j
ava:108)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:138)
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTACo
nnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_OracleConnection_
812_WLStub.getAutoCommit(Unknown Source)
at weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_Connect
ionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_o
racle_jdbc_driver_OracleConnection_812_WLStub.getAutoCommit(Unknown Source)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:
40)
at org.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDB
CTransactionFactory.java:19)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1184
)
at TestClient.main(TestClient.java:28)
Caused by: java.sql.SQLException: SQL operations are not allowed with no global
transaction by default for XA drivers. If the XA driver supports performing SQL
operations with no global transaction, explicitly allow it by setting "SupportsL
ocalTransaction" JDBC connection pool property to true. In this case, also remem
ber to complete the local transaction before using the connection again for glob
al transaction, else a XAER_OUTSIDE XAException may result. To complete a local
transaction, you can either set auto commit to true or call Connection.commit()
or Connection.rollback().
at weblogic.jdbc.wrapper.JTAConnection.checkIfLocalTxSupported(JTAConnec
tion.java:90)
at weblogic.jdbc.wrapper.JTAConnection.checkConnection(JTAConnection.jav
a:79)
at weblogic.jdbc.wrapper.JTAConnection.getAutoCommit(JTAConnection.java:
266)
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTACo
nnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_OracleConnection.
getAutoCommit(Unknown Source)
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTACo
nnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_OracleConnection_
WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:353)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
144)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Exception in thread "main" org.hibernate.TransactionException: Begin failed with
SQL exception:
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:
49)
at org.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDB
CTransactionFactory.java:19)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1184
)
at TestClient.main(TestClient.java:28)
Caused by: java.sql.SQLException: SQL operations are not allowed with no global
transaction by default for XA drivers. If the XA driver supports performing SQL
operations with no global transaction, explicitly allow it by setting "SupportsL
ocalTransaction" JDBC connection pool property to true. In this case, also remem
ber to complete the local transaction before using the connection again for glob
al transaction, else a XAER_OUTSIDE XAException may result. To complete a local
transaction, you can either set auto commit to true or call Connection.commit()
or Connection.rollback().
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.j
ava:108)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:138)
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTACo
nnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_OracleConnection_
812_WLStub.getAutoCommit(Unknown Source)
at weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_Connect
ionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_o
racle_jdbc_driver_OracleConnection_812_WLStub.getAutoCommit(Unknown Source)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:
40)
... 3 more
Caused by: java.sql.SQLException: SQL operations are not allowed with no global
transaction by default for XA drivers. If the XA driver supports performing SQL
operations with no global transaction, explicitly allow it by setting "SupportsL
ocalTransaction" JDBC connection pool property to true. In this case, also remem
ber to complete the local transaction before using the connection again for glob
al transaction, else a XAER_OUTSIDE XAException may result. To complete a local
transaction, you can either set auto commit to true or call Connection.commit()
or Connection.rollback().
at weblogic.jdbc.wrapper.JTAConnection.checkIfLocalTxSupported(JTAConnec
tion.java:90)
at weblogic.jdbc.wrapper.JTAConnection.checkConnection(JTAConnection.jav
a:79)
at weblogic.jdbc.wrapper.JTAConnection.getAutoCommit(JTAConnection.java:
266)
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTACo
nnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_OracleConnection.
getAutoCommit(Unknown Source)
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTACo
nnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_OracleConnection_
WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:353)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
144)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
------------------------------------------------------------------------
how to solve this exception?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.