Weblogic seems to swallow Oracle Exception
Hi,
Weblogic seems to swallow the Oracle Exception when using EntityManager, can someone also verify this ?
Here is what I did:
SQL> create table AMS_TEST (TEST_ID INTEGER primary key, name VARCHAR2(125), CONSTRAINT X UNIQUE (name));
Table created.
SQL> CREATE SEQUENCE SEQ_TEST_ID;
Sequence created.
And EJB 3 Been as follows:
@Entity
@Table(name = "AMS_TEST")
@SequenceGenerator(name="seg_test_id_gen", sequenceName = "SEQ_TEST_ID")
public class DummyBean {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seg_test_id_gen")
@Column(name = "TEST_ID", length =38)
private Long mTestId;
@Column(name = "NAME", length =125)
private String mName;
public DummyBean(String name) {
mName = name;
public String getName() {
return mName;
And the in StateSessionBean method
public void test() {
getEntityManager().persist(new DummyBean("test"));
If the method call twice, it should throw an Oracle's Unique constraint exception due to the unique constraint on "name".
But instead, weblogic only throws "Unknown reason" exception.
Is there a way to report the real exception so that one know that's the cause of failure ?
Chester
<Feb 8, 2008 9:01:21 PM PST> <Error> <EJB> <BEA-010026> <Exception occurred during commit of transaction Name=[EJB com.ascentmedia.ams.content.AssetManagerBean.test()],Xid=BEA1-00187801BCA41A74F1B8(9411978),Status=Rolled back. [Reason=weblogic.transaction.internal.AppSetRollbackOnlyException],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=60,NonXAServerResourceInfo[WL_JDBC_LLR_POOL.AMS_DS]=(ServerResourceInfo[WL_JDBC_LLR_POOL.AMS_DS]=(state=rolledback,assigned=AdminServer),nonXAResource=JDBC LLR, pool=AMS_DS, table=WL_LLR_ADMINSERVER),SCInfo[ams3+AdminServer]=(state=rolledback),properties=({weblogic.transaction.nonXAResource=WL_JDBC_LLR_POOL.AMS_DS, weblogic.transaction.name=[EJB com.ascentmedia.ams.content.AssetManagerBean.test()], weblogic.jdbc=t3://192.168.2.8:7001, weblogic.jdbc.llr=AMS_DS}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=AdminServer+192.168.2.8:7001+ams3+t3+, XAResources={WLStore_ams3__WLS_AdminServer, WLStore_ams3_JDBCStore},NonXAResources={})],CoordinatorURL=AdminServer+192.168.2.8:7001+ams3+t3+): weblogic.transaction.RollbackException: Unknown reason
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1818)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:333)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:227)
at weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:611)
at weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:57)
at weblogic.ejb.container.internal.BaseRemoteObject.postInvokeTxRetry(BaseRemoteObject.java:431)
at com.ascentmedia.ams.content.AssetManagerBean_whuwo6_AssetManagerRemoteImpl.test(AssetManagerBean_whuwo6_AssetManagerRemoteImpl.java:1677)
at com.ascentmedia.ams.content.AssetManagerBean_whuwo6_AssetManagerRemoteImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:586)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:474)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:470)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
.>
I am getting a similar error with an Hibernate implementation of EntityManager. I had an error on my code that made a EntityManager#persist call on a entity that had another transient entity setted in a ManyToOne relationship that weren't tagged with cascade anotation.
The only way I managed to dig for the error was to force a EntityManager#flush on my EJB bean code that happily threw the correct exception (IllegalStateException, which is correctly documented on section 3.2.3 of the EJB 3.0 specification - persistence).
There should be a standard way to retrieve the cause of an rollback from a EJB call that the EntityManager throws during commit. Without that, it will be kind of difficult to rely on container managed transaction.
This was the stack trace I got on my log:
####<18/02/2008 16h22min33s BRT> <Error> <EJB> <rcouto> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1203362553258> <BEA-010026> <Exception occurred during commit of transaction Name=[EJB br.com.touchtec.lsd.impl.LSDBean.createScript(java.lang.String,java.util.Locale,java.lang.String,br.com.touchtec.net.Reference)],Xid=BEA1-0000B42F7CD37B374FDD(27009473),Status=Rolled back. [Reason=weblogic.transaction.internal.AppSetRollbackOnlyException],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=1,seconds left=30,XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=AdminServer),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@16c0ff5,re-Registered = false),SCInfo[lsd+AdminServer]=(state=rolledback),properties=({weblogic.transaction.name=[EJB br.com.touchtec.lsd.impl.LSDBean.createScript(java.lang.String,java.util.Locale,java.lang.String,br.com.touchtec.net.Reference)], weblogic.jdbc=t3://172.19.64.51:7001}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=AdminServer+172.19.64.51:7001+lsd+t3+admin+7001+, XAResources={weblogic.jdbc.wrapper.JTSXAResourceImpl},NonXAResources={})],CoordinatorURL=AdminServer+172.19.64.51:7001+lsd+t3+admin+7001+): weblogic.transaction.RollbackException: Unknown reason
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1818)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:333)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:227)
at weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:606)
at weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:57)
at weblogic.ejb.container.internal.BaseRemoteObject.postInvokeTxRetry(BaseRemoteObject.java:426)
at br.com.touchtec.lsd.impl.LSDBean_jz0i8w_LSDImpl.createScript(LSDBean_jz0i8w_LSDImpl.java:153)
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:585)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:63)
at $Proxy69.createScript(Unknown Source)
at br.com.touchtec.lsd.it.web.ScriptAction.save(ScriptAction.java:89)
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:585)
at br.com.touchtec.twf.core.TWFActionInvocation.invokeAction(TWFActionInvocation.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
at br.com.touchtec.twf.validation.WorkflowInterceptor.doIntercept(WorkflowInterceptor.java:91)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at br.com.touchtec.twf.validation.ValidationInterceptor.doIntercept(ValidationInterceptor.java:124)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:121)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at br.com.touchtec.twf.process.ProcessContextInterceptor.intercept(ProcessContextInterceptor.java:104)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at br.com.touchtec.twf.process.ProcessStackInterceptor.intercept(ProcessStackInterceptor.java:64)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at br.com.touchtec.twf.userContext.InjectUserContextInterceptor.intercept(InjectUserContextInterceptor.java:54)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at br.com.touchtec.twf.ejb.EJBInjectorInterceptor.intercept(EJBInjectorInterceptor.java:77)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at br.com.touchtec.twf.session.SessionCleanUpInterceptor.intercept(SessionCleanUpInterceptor.java:48)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3368)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2117)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2023)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
.>
Similar Messages
-
Access to Weblogic 7.0 SP1 datasource throws Oracle Exception
Hi,
I am trying to access a DataSource & Connection Pool set up in a Weblogic 7.0
SP1 instance, from a client app running in a different JVM than the app server
itself. The code I used is given below,
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
ctx = new InitialContext(ht);
if (ctx != null) ds = (DataSource) ctx.lookup("sample.SQLServer2KDS");
Connection conn = ds.getConnection("system", "password");
The connection pool points to a SQL Server 2000 database. But the getConnection
throws an Oracle exception, given below. We don't have any reference to oracle
drivers anywhere and we don't have any installations of Oracle. When I put the
Oracle JDBC driver in the classpath of my client application, this problem went
away.
Does anyone else encounter this ? Does anyone know if this is fixed by BEA ?
Thanks,
-Arun
weblogic.rjvm.PeerGoneException: ; nested exception is:
weblogic.utils.NestedException: oracle/sql/BfileDBAccess - with nested exception:
[java.lang.NoClassDefFoundError: oracle/sql/BfileDBAccess]
at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:109)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:127)
at weblogic.jdbc.common.internal.RmiDataSource_WLStub.getConnection(Unknown Source)
at sample.DBClient.getConnection(DBClient.java:37)
at sample.DBClient.main(DBClient.java:57)
Caused by: weblogic.utils.NestedException: oracle/sql/BfileDBAccess - with nested
exception:
[java.lang.NoClassDefFoundError: oracle/sql/BfileDBAccess]
at weblogic.rjvm.RJVMImpl.gotExceptionReceiving(RJVMImpl.java:592)
at weblogic.rjvm.ConnectionManager.gotExceptionReceiving(ConnectionManager.java:896)
at weblogic.rjvm.t3.T3JVMConnection.hasException(T3JVMConnection.java:632)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:399)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
--------------- nested within: ------------------
weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception - with nested
exception:
[weblogic.rjvm.PeerGoneException: ; nested exception is:
weblogic.utils.NestedException: oracle/sql/BfileDBAccess - with nested exception:
[java.lang.NoClassDefFoundError: oracle/sql/BfileDBAccess]]
at weblogic.jdbc.common.internal.RmiDataSource_WLStub.getConnection(Unknown Source)
at sample.DBClient.getConnection(DBClient.java:37)
at sample.DBClient.main(DBClient.java:57)You need to have classes12.zip in your CLASSPATH, even though you are not using Oracle
as your database.
This problem will be fixed in the WLS release coming out in spring, 2003.
"Arun Panicker" <[email protected]> wrote in message news:[email protected]...
>
Hi,
I am trying to access a DataSource & Connection Pool set up in a Weblogic 7.0
SP1 instance, from a client app running in a different JVM than the app server
itself. The code I used is given below,
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
ctx = new InitialContext(ht);
if (ctx != null) ds = (DataSource) ctx.lookup("sample.SQLServer2KDS");
Connection conn = ds.getConnection("system", "password");
The connection pool points to a SQL Server 2000 database. But the getConnection
throws an Oracle exception, given below. We don't have any reference to oracle
drivers anywhere and we don't have any installations of Oracle. When I put the
Oracle JDBC driver in the classpath of my client application, this problem went
away.
Does anyone else encounter this ? Does anyone know if this is fixed by BEA ?
Thanks,
-Arun
weblogic.rjvm.PeerGoneException: ; nested exception is:
weblogic.utils.NestedException: oracle/sql/BfileDBAccess - with nested exception:
[java.lang.NoClassDefFoundError: oracle/sql/BfileDBAccess]
at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:109)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:127)
at weblogic.jdbc.common.internal.RmiDataSource_WLStub.getConnection(Unknown Source)
at sample.DBClient.getConnection(DBClient.java:37)
at sample.DBClient.main(DBClient.java:57)
Caused by: weblogic.utils.NestedException: oracle/sql/BfileDBAccess - with nested
exception:
[java.lang.NoClassDefFoundError: oracle/sql/BfileDBAccess]
at weblogic.rjvm.RJVMImpl.gotExceptionReceiving(RJVMImpl.java:592)
at weblogic.rjvm.ConnectionManager.gotExceptionReceiving(ConnectionManager.java:896)
at weblogic.rjvm.t3.T3JVMConnection.hasException(T3JVMConnection.java:632)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:399)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
--------------- nested within: ------------------
weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception - with nested
exception:
[weblogic.rjvm.PeerGoneException: ; nested exception is:
weblogic.utils.NestedException: oracle/sql/BfileDBAccess - with nested exception:
[java.lang.NoClassDefFoundError: oracle/sql/BfileDBAccess]]
at weblogic.jdbc.common.internal.RmiDataSource_WLStub.getConnection(Unknown Source)
at sample.DBClient.getConnection(DBClient.java:37)
at sample.DBClient.main(DBClient.java:57) -
Comparison of Weblogic Multipools VS. Oracle OCI TAF?
My group is thinking of going with Weblogic's Multipools as opposed to
using Oracle's TAF for failover support.
Has anyone done any benchmarking on the two - or does anyone know of
the pros and cons of going with either solution?
Any first hand feedback on either solution would be extremely helpful,
as would recommendations.
Our setup is:
Linux, oracle 9i and weblogic 7.0
thanks,
- RyanHi Joe,
thanks for the reply - the code change helped a little. It's returning
a bit faster than it was before. However, I'm still experiencing
problems with the Multipool functionality.
After experimenting a little, I have more information on the problem
definition.
I have 2 DB Connection Pools, both set up for one multipool (set up
for HighAvailability).
I can see both pools getting populated (max of 10) at the server
startup.
DB 'getConnection' requests are being created without any problems on
the first connection pool.
As an experiment, I decided to test the health of the connection pools
frequently (every time a connection is requested). The code grabs a
connection and releases it immediately.
This is the code I wrote to do that:
>>>>>>>>>>>>>>
try{
conn1 = d.connect("jdbc:weblogic:pool:RConnPool1", null);
}catch(Exception e)
debug("Conn1 threw exception " + e.getMessage());
finally
try {conn1.close(); } catch (Exception e) { debug("Conn1.Close
E " + e.getMessage());}
try{
conn2 = d.connect("jdbc:weblogic:pool:RConnPool2", null);
}catch(Exception e)
debug("Conn2 threw exception " + e.getMessage());
finally
try {conn2.close(); } catch (Exception e) { debug("Conn2.Close
E " + e.getMessage());}
>>>>>>>>>>>>>>
That code worked inefinitely (I sent about 20-30 requests through
without problems). The actual connection being used was requestd from
the multipool right after that section of code.
>>>>>>>>>>>>>>
conn = d.connect("jdbc:weblogic:pool:RMultiPool", null);
notRetrieved = false;
>>>>>>>>>>>>>>
So, when I shut down one the server for ConnPool1 (through the
console), I expected to have the first try-catch to generate an
exception and the second one to continue to function healthily. I also
expected the multipool to switch over to the second pool.
On the first few requests after the db shutdown, I do get the
exception from the first Connpool1 and a healthy message from
Connpool2. However, the multipool returns exceptions for ConnPool1,
but doesn't return connections from ConnPool2 (it just throws an
exception), and healthy message from ConnPool2 stops after 10 tries,
and then I get this message:
"Error in getConnection Pool connect failed:
weblogic.common.ResourceException:
RMultiPool(RConnPool2): no connections available"
It seems that the multipool is grabbing connections from the backup
connection pool and not releasing them. I thought it was me who was
getting the connection and not releasing it, but all connection
objects I have access to appear accounted for.
I tried to confirm this by removing the multipool 'getConnection'
request (instead retrieving the connection from the second connection
pool explicity after I do the health check). With the multipool code
removed, ConnPool2 never runs out of connections.
So finally, I've implemented this bit of code:
>>>>>>>>>>>>>>
try{
conn1 = d.connect("jdbc:weblogic:pool:RConnPool1", null);
notRetrieved = false;
conn = conn1;
}catch(Exception e)
debug("Conn1 threw exception - FAILING OVER" + e.getMessage());
try{
conn2 = d.connect("jdbc:weblogic:pool:RConnPool2", null);
notRetrieved = false;
conn = conn2;
}catch(Exception eX)
debug("Conn2 threw exception - TOTAL DB FAILURE" +
eX.getMessage());
>>>>>>>>>>>>>>
And that code seems to provide failover support.. At least at the
level we need for now.
We would really rather use MultiPools - they're probably better
implemented than what I wrote above, more flexible and more of a
standard - but we just can't figure out what is preventing the
multipool from returning a good connection right away.
No. Refresh is separate. If you have testConnsOnReserve, you don't need
refresh. Set it to 99999999 to effectively turn it off and save resources.This has been changed - thanks.
I wish. However, if you get the failover URL into the pool definition,
the first pool should benefit from the oracle driver failing over internally.
If you disable a pool, using the admin command or the console, then a
multipool will quickly pass over it to the next, so if/when you know the
primary DBMS is down, you can save a lot of time for connectors, if you
disable it's pool, and re-enable it when the DBMS is back.Could you explain the paragraph above? What do you mean by the
failover URL? Do you mean I'd have to disable the connection pool
manually if the database fails? (I'm sure I'm interpreting that
incorrectly) How else can you disable and re-enable a pool
programatically and in a timely manner? Wasn't that the purpose of the
MultiPool?
Thanks,
- Ryan -
Beta version of Weblogic 6.0 and classcast exception error.
As an FYI to those who have be receiving the "dreaded" classcast
exception error, the new version of Weblogic seems to fix the problem.
It took me awhile to figure out how th deploy the web application, but
once I did the application seemed to work w/o a problem (and w/o the
error).
Paul Garduno
We do not offer a JDBC driver for Linux in version 5.1. In version 6.0,we
do offer a type 4 driver for Linux.
In version 5.1, I suggest trying the platform independent type 4 JDBC driver
available for free from Oracle. It is supported (as is any JDBC driver)
with WebLogic Server. To download it:
Go to http://www.oracle.com and select the "Download" option.
From the resulting page, use the "Select Utility or Driver" dropdown to
select Oracle JDBC drivers
From the resulting page, scroll down a little (since SQLJ stuff appears at
the top).
Or, to go directly there:
http://technet.oracle.com/software/tech/java/sqlj_jdbc/software_index.htm
Thanks,
Michael
Michael Girdley, BEA Systems Inc
Learning WebLogic? Buy the book.
http://www.learnweblogic.com/
"Michael W. Warren, Sr." <[email protected]> wrote in message
news:[email protected]..
I have installed WebLogic 6.0 on Solaris platform and verified that the
server comes up
and that I can connect to it via Netscape. Next step was to verify
installation of WebLogic
jDriver for Oracle. When I run the following:
java utils.dbping ORACLE scott tiger
I get the following error:
Starting Loading jDriver/Oracle .....
Error encountered:
java.sql.SQLException: System.loadLibrary threw
java.lang.UnsatisfiedLinkError
with the message
'/ldatae/bea/wlserver6.0/lib/solaris/oci816_8/libweblogicoci37.so:
ld.so.1: /ldatae/bea/jdk130/jre/bin/../bin/sparc/native_threads/java:
fatal: libgen.so.1: open failed: No such file or directory'.
at
weblogic.jdbcbase.oci.Driver.loadLibraryIfNeeded(Driver.java:202)
at weblogic.jdbcbase.oci.Driver.connect(Driver.java:57)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:146)
at utils.dbping.main(dbping.java:182)
Anyone seen this? Help!!!
Thanks in advance
Mike Warren, Sr.
[email protected] -
Hi,
I am using Weblogic 6.1 with Oracle 8.1.7. I configured a TXDataSource as I wanted
to use Container Managed Transaction through a Session Bean.
Connection Pool Settings: -------------------------
Name - myXAPool URL - jdbc:oracle:thin:@myServer:1521:myDb DriverClassname - oracle.jdbc.xa.client.OracleXADataSource
TXDataSource Settings : -----------------------
Name - myXADS
JNDIName - myXADS
PoolName - myXAPool
Everything works fine but once in a while I get the following exception:
java.sql.SQLException: XA error: XAER_RMERR : A resource manager error has occured
in the transaction branch start() failed on resource 'myXAPool' Unexpected error
during start for XAResource 'myXAPool': null
The connection pool size is 30 and the number connections high reached was 5,
which means there are enough connections in the pool available at all time.
It would be really great if you can help me out.
Thanks in Advance, Sudhir.
Hi Slava,
Sorry about that Oracle instance I am using is 8.1.7.
For the XA Driver I am using the one that comes with Weblogic in weblogic.jar.
And my Weblogic version 6.1 Sp3.
Thanks,
Sudhir.
"Slava Imeshev" <[email protected]> wrote:
Hi Sudhir,
Are you using an instance of 8.1.6 or 8.1.7? In the message header you
say
8.1.6.
Regards,
Slava Imeshev
"Sudhir Babu" <[email protected]> wrote in message
news:[email protected]..
Hi,
I am using Weblogic 6.1 with Oracle 8.1.7. I configured a TXDataSourceas
I wanted
to use Container Managed Transaction through a Session Bean.
Connection Pool Settings: -------------------------
Name - myXAPool URL - jdbc:oracle:thin:@myServer:1521:myDb
DriverClassname - oracle.jdbc.xa.client.OracleXADataSource
TXDataSource Settings : -----------------------
Name - myXADS
JNDIName - myXADS
PoolName - myXAPool
Everything works fine but once in a while I get the following exception:
java.sql.SQLException: XA error: XAER_RMERR : A resource manager errorhas
occured
in the transaction branch start() failed on resource 'myXAPool' Unexpectederror
during start for XAResource 'myXAPool': null
The connection pool size is 30 and the number connections high reachedwas
5,
which means there are enough connections in the pool available at alltime.
It would be really great if you can help me out.
Thanks in Advance, Sudhir. -
XA error: using Weblogic 6.1 and Oracle 8.1.6
Hi,
I am using Weblogic 6.1 with Oracle 8.1.7. I configured a TXDataSource as I wanted
to use Container Managed Transaction through a Session Bean.
Connection Pool Settings: -------------------------
Name - myXAPool URL - jdbc:oracle:thin:@myServer:1521:myDb
DriverClassname - oracle.jdbc.xa.client.OracleXADataSource
TXDataSource Settings : -----------------------
Name - myXADS
JNDIName - myXADS
PoolName - myXAPool
Everything works fine but once in a while I get the following exception:
java.sql.SQLException: XA error: XAER_RMERR : A resource manager error has occured
in the transaction branch start() failed on resource 'myXAPool' Unexpected error
during start for XAResource 'myXAPool': null
The connection pool size is 30 and the number connections high reached was 5,
which means there are enough connections in the pool available at all time.
It would be really great if you can help me out.
Thanks in Advance, Sudhir.Hi Slava,
Sorry about that Oracle instance I am using is 8.1.7.
For the XA Driver I am using the one that comes with Weblogic in weblogic.jar.
And my Weblogic version 6.1 Sp3.
Thanks,
Sudhir.
"Slava Imeshev" <[email protected]> wrote:
Hi Sudhir,
Are you using an instance of 8.1.6 or 8.1.7? In the message header you
say
8.1.6.
Regards,
Slava Imeshev
"Sudhir Babu" <[email protected]> wrote in message
news:[email protected]..
Hi,
I am using Weblogic 6.1 with Oracle 8.1.7. I configured a TXDataSourceas
I wanted
to use Container Managed Transaction through a Session Bean.
Connection Pool Settings: -------------------------
Name - myXAPool URL - jdbc:oracle:thin:@myServer:1521:myDb
DriverClassname - oracle.jdbc.xa.client.OracleXADataSource
TXDataSource Settings : -----------------------
Name - myXADS
JNDIName - myXADS
PoolName - myXAPool
Everything works fine but once in a while I get the following exception:
java.sql.SQLException: XA error: XAER_RMERR : A resource manager errorhas
occured
in the transaction branch start() failed on resource 'myXAPool' Unexpectederror
during start for XAResource 'myXAPool': null
The connection pool size is 30 and the number connections high reachedwas
5,
which means there are enough connections in the pool available at alltime.
It would be really great if you can help me out.
Thanks in Advance, Sudhir. -
Hi,
i am trying to configure JDBC with weblogic. Can any one tell me which deriver needs to be selected for weblogic 10.3 and Oracle DB 11g both on MS2008 separate server.
if i use BEA oracle Driver (Type 4) version 9.0.1, 9.2.0,10,11, i find error (see snap:2)
Connection test failed.
[BEA][Oracle JDBC Driver]Error establishing socket. Unknown host: hdyhtc137540d<br/>weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)<br/>weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)<br/>weblogic.jdbc.oracle.OracleImplConnection.makeConnectionHelper(Unknown Source)<br/>weblogic.jdbc.oracle.OracleImplConnection.makeConnection(Unknown Source)<br/>weblogic.jdbc.oracle.OracleImplConnection.connectAndAuthenticate(Unknown Source)<br/>weblogic.jdbc.oracle.OracleImplConnection.open(Unknown Source)<br/>weblogic.jdbc.base.BaseConnection.connect(Unknown Source)<br/>weblogic.jdbc.base.BaseConnection.setupImplConnection(Unknown Source)<br/>weblogic.jdbc.base.BaseConnection.open(Unknown Source)<br/>weblogic.jdbc.base.BaseDriver.connect(Unknown Source)<br/>com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:505)<br/>c om.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConn ectionConfiguration(CreateJDBCDataSource.java:369)<br/>sun.reflect.GeneratedMethodAccessor 826.invoke(Unknown Source)<br/>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl. java:25)<br/>java.lang.reflect.Method.invoke(Method.java:597)<br/>org.apache.beehive.netui .pageflow.FlowController.invokeActionMethod(FlowController.java:870)<br/>org.apache.beehiv e.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)<br/>org.ap ache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)<br/>or g.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java :306)<br/>org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336 )<br/>...
and
when i use oracle's driver (thin) version 9.0.1, 9.2.0,10,11, i find error
Connection test failed.
Io exception: The Network Adapter could not establish the connection<br/>oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:10 1)<br/>oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)<br/>oracle .jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)<br/>oracle.jdbc.drive r.DatabaseError.throwSqlException(DatabaseError.java:229)<br/>oracle.jdbc.driver.DatabaseE rror.throwSqlException(DatabaseError.java:458)<br/>oracle.jdbc.driver.T4CConnection.logon( T4CConnection.java:411)<br/>oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnectio n.java:490)<br/>oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:202)<br/>oracle .jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)<br/>oracle.jdbc. driver.OracleDriver.connect(OracleDriver.java:474)<br/>com.bea.console.utils.jdbc.JDBCUtil s.testConnection(JDBCUtils.java:505)<br/>com.bea.console.actions.jdbc.datasources.createjd bcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:36 9)<br/>sun.reflect.GeneratedMethodAccessor826.invoke(Unknown Source)<br/>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl. java:25)<br/>java.lang.reflect.Method.invoke(Method.java:597)<br/>org.apache.beehive.netui .pageflow.FlowController.invokeActionMethod(FlowController.java:870)<br/>org.apache.beehiv e.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)<br/>org.ap ache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)<br/>or g.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java :306)<br/>org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336 )<br/>...i am finding this error when i click on Test Configuration button to test the connection wth oracle DB
-
Calling JFrame seems to produce an exception with 10g
Hi all,
I have written a couple of line of JAVA to calculate the width of of some text (font dependant). While the small program works fine under windows the same source code crashes in the Oracle PL/SQL environment. As soon as the code 'new JFrame' is executed the exception is raised (the program return -1)
Is this a normal behaviour for 10g ? Do you see a workaround to get the width of strings ?
Thanks for help.
appendix:
CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "StringMetricFile" AS
package metrics;
import java.awt.Font;
import java.awt.FontMetrics;
import javax.swing.JFrame;
public class Metrics
public static int getWidth(String text, String font_name, int font_size, int font_type) {
try {
JFrame jf = new JFrame(); // this seems to produce the exception
FontMetrics fm = jf.getFontMetrics(new Font(font_name, font_type, font_size));
return fm.stringWidth(text);
catch (Exception ex) {
System.out.println(ex.getLocalizedMessage());
return -1;
CREATE OR REPLACE FUNCTION stringWidth(text IN VARCHAR2,
font_name IN VARCHAR2,
font_size IN NUMBER,
font_type IN NUMBER
Return
NUMBER
AS LANGUAGE JAVA NAME 'metrics.Metrics.getWidth(java.lang.String,java.lang.String,
int, int)
return java.lang.int';
go
BEGIN
DBMS_OUTPUT.PUT_LINE(stringWidth('Hello world','Arial',12,0));
END;I have written a new implementation without JFrame. Calling the getWidth method produce a strange socket errors (no exception is raised).
The same source works fine in a Windows environment.
I have attached the modified source. Any suggestion is welcome.
appendix:
CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "StringMetricFile" AS
package metrics;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
public class Metrics
public static int getWidth(String text, String font_name, int font_size, int font_type) {
try {
Graphics g = (new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB)).createGraphics();
FontMetrics fm = g.getFontMetrics(new Font(font_name, font_type, font_size));
return fm.stringWidth(text);
catch (Exception ex) {
System.out.println(ex.getLocalizedMessage());
return -1;
} -
Weblogic server10.3.3 (Oracle Weblogic Server 11gR1) and sql server 2008db
Is SQL Server 2008 db supported for use with weblogic server 10.3.3
we use connection pools and XA and weblogic bundled drivers
we are planning an upgrade from 9.2mp3 to 10.3.3 weblogic server
http://download.oracle.com/docs/cd/E13196_01/platform/suppconfigs/configs103/103_over/supported_db.html#1179245
seems to indicate that only sqlserver 2005 is supported
Is there a more current version of the suported configurations that I am missing ?
Appreciate any feedback on this
Thanks
Best
Yeshwantcontact support for official policy. Technically, the drivers do support the DBMS version.
If you use any higher API than JDBC, there might be a question as to whether a
particulare API was certified with the latter DBMS version, but unless the DBMS
changed so it behaved differently than the previous for the same activity, then
there should be no problem.... -
Connecting Weblogic 8.1 to Oracle 10g
Hi,
I have created connection in weblogic 8.1 of a type4 driver. And associated that connection with a JNDI name and DataSource. And I'm looking up that jndi and getting the connection. It is connecting but when executing the statement it is throwing exception. Please adivce. Thanks.
Both code and exception are below:
Here is the Program:
public class JDBCConnectionPool {
Connection connection = null;
InitialContext initialContext = null;
Context context = null;
DataSource datasource = null;
Properties properties = null;
public Connection getConnection() {
properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.T3InitialContextFactory");
properties.put(Context.PROVIDER_URL, "t3://CBR-SRV-HPORA:7001/");
try {
initialContext = new InitialContext(properties);
datasource = (DataSource) initialContext.lookup("sample_jndi");
try {
connection = datasource.getConnection();
} catch (SQLException e) {
e.printStackTrace();
} catch (NamingException e) {
e.printStackTrace();
return connection;
public static void main(String args[]) throws SQLException {
JDBCConnectionPool conpool = new JDBCConnectionPool();
Connection con = conpool.getConnection();
if (con != null) {
System.out.println("Connected.........");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT ENAME FROM EMP");
while (rs.next()){
System.out.println(rs.getString("ENAME"));
Here is the EXCEPTION:
Connected.........
<Jun 15, 2010 4:42:20 PM IST> <Info> <JDBC> <BEA-001155> <The following exception has occurred:
java.rmi.UnmarshalException: Could not unmarshal method ID; nested exception is:
java.rmi.UnmarshalException: Method not found: 'createArrayOf(Ljava.lang.String;[Ljava.lang.Object;)'
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:164)
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_weblogic_jdbc_oracle_OracleConnection_816_WLStub.createStatement(Unknown Source)
at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:157)
at com.code.sample.connectionDB.JDBCConnectionPool.main(JDBCConnectionPool.java:54)
Caused by: java.rmi.UnmarshalException: Method not found: 'createArrayOf(Ljava.lang.String;[Ljava.lang.Object;)'
at weblogic.rmi.internal.MethodDescriptor.init(MethodDescriptor.java:156)
at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:272)
at weblogic.rjvm.RJVMImpl.dispatchRequest(RJVMImpl.java:1114)
at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:1032)
at weblogic.rjvm.ConnectionManagerServer.handleRJVM(ConnectionManagerServer.java:225)
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:809)
at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:782)
at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:105)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
--------------- nested within: ------------------
weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception - with nested exception:
[java.rmi.UnmarshalException: Could not unmarshal method ID; nested exception is:
java.rmi.UnmarshalException: Method not found: 'createArrayOf(Ljava.lang.String;[Ljava.lang.Object;)']
at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_weblogic_jdbc_oracle_OracleConnection_816_WLStub.createStatement(Unknown Source)
at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:157)
at com.code.sample.connectionDB.JDBCConnectionPool.main(JDBCConnectionPool.java:54)
>Hi,
Please try to use the ojdbc14.jar Oracle Jdbc Driver ...which comes with WebLogic8.1 SP6 Installation and Placed inside the following Location:
C:\bea816\weblogic816\server\lib\ojdbc14.jar
Please remove any additional ojdbc14.jar from the Server Classpath if u are using any new version of this Jar. Looks like ur Servers Classpath has some very Latest Oracle Jdbc Driver which is causing the issue.
<b><font color=maroon>
One more thing ..As i dont see any Oracle Jdbc Driver class in the Stack trace ....so i m not 100% sure that it is a Driver issue...
But Please check if u have applied any Wrong Patch in the Server Classpath... Because the Stack trace clearly says that ...somewhere WLS APIs are causing this issue.
</font></b>
<b><font color=red>
Or better if u can post your thread in Jdbc Experts Forum: http://forums.oracle.com/forums/forum.jspa?forumID=579 there u may get the Best and Accurate Pointers very soon.
</font></b>
Thanks
Jay SenSharma
http://weblogic-wonders.com (WebLogic Wonders Are Here) -
Why getting WebLogic Connection when using Oracle Driver?
Does anyone know why I would be getting back an instance of weblogic.jdbc.rmi.SerialConnection
when retrieving a connection out of the connection pool, via my JDBC TX DataSource,
when my JDBC Connection pool is configured to use oracle.jdbc.OracleDriver. Seems
that since I'm using the Oracle driver I should not be getting back this WebLogic
connection.
Any insight is appreciated :)
thanks,
Daninnumonenu wrote:
Even we are facing the same problem of ClassCastException when we try to cast to
OracleCallableStatement from the weblogic pool made of Oracle JDBC driver.
What is the URL which explains,
"Our wrappers do provide access to various non-standard
Oracle methods, and we document how to cast (to our concret class or to an interface
we define) in order to access these calls." as said by Joseph.http://e-docs.bea.com/wls/docs70/jdbc/thirdparty.html#1043705
>
>
"Dan Branley" <[email protected]> wrote:
Joseph,
Thanks for the insight. This answers a lot of questions. I appreciate
the thorough
explanation. Your assumption is correct. I am trying to use an Oracle
extension,
specifically I need to call PreparedStatement.setBlob() passing an instance
of
an Oracle BLOB.empty_lob(). I'll take a look at the WLS documentation
for an
alternative.
thanks,
Dan Branley
Joseph Weinstein <[email protected]> wrote:
We never give application code direct access to pooled connections.We
always
supply a wrapper class. These wrapper classes have various extra functionality,
such as cooperating under-the-covers with the transaction coordinator
to provide
EJB/UserTransaction transactional semantics/guarantees, regardless of
the number
of EJBs involved in a given transaction. For instance, when in an EJB/UserTransaction,
our wrapper will cheerfully ignore if application code calls a Connection.commit().
The
application code has no idea really when the transaction is done and
commitable, only
the transaction coordinator does. Most simply, our pools guarantee that
whatever
application reserves a pool connection will have sole use of it until
they close the connection
to return it to the pool. If we allowed direct access to a pooled connection,
one application
could cache the reference, and re-use it later when we presumed to allow
another user to
use it from the pool. Some of our wrapper objects are RMI-enabled so
they work in
external client JVMs and will do JDBC over the wire to the weblogicserver
and it's
pool connections. This wayt application code need not change to work
inside or
outside weblogic.
I suspect this question is because you want to use some of Oracle's
non-standard
extensions to JDBC. Our wrappers do provide access to various non-standard
Oracle methods, and we document how to cast (to our concret class or
to an interface we
define) in order to access these calls. Not all calls can be successfully
proxied by our wrappers
because some Oracle methods (which claim to take java.sql object asarguments)
actually
require oracle specific classes, and reject our proxies, even if they
are standard JDBC objects.
Joe
Dan Branley wrote:
Does anyone know why I would be getting back an instance of weblogic.jdbc.rmi.SerialConnection
when retrieving a connection out of the connection pool, via my JDBCTX DataSource,
when my JDBC Connection pool is configured to use oracle.jdbc.OracleDriver.Seems
that since I'm using the Oracle driver I should not be getting backthis WebLogic
connection.
Any insight is appreciated :)
thanks,
Dan -
Weblogic plugin for eclipse: License Exception
Hi,
I am using weblogic server 6.1 installed in my local workstation. When i start
the server from a system prompt it starts without a problem but when i try to
start it from my IDE (Eclipse 2.1 with weblogicplugin_1.0.0) i get the following
error
$$$$$$$$$$$$$$$$ License Exception $$$$$$$$$$$$$$$$
Unable to start WebLogic Server !!
Missing license file for: WebLogic Server 6.1
$$$$$$$$$$$$$$$$ License Exception $$$$$$$$$$$$$$$$
Has anyone got any idea as to why it produces this error?
thanks
maxMax,
I am also receiving a license exception with eclipse v3.0 and the wl plugin v1.1.1.
I tried moving the license.bea file to various locations including the eclipse/plugins folder where the wlpu lives - nothing seems to work.
Have you made any progress?
Let me know, thx.
C. -
I have a new hard drive as my old one crashed. Everything seemed to transfer fine except for my entire iTunes library. It shows all of my old songs, but when I click on one it states "the song could not be used as the original file could not be found.would you like to locate it".
Either how do I locate it, and I've tried every trick I know, or how do I restore all of my songs from one of two sources. I have my old hard drive backedup on an external drive which should have all of my songs, and I have most of my songs on my old iPhone 3S which I'm using as a backup iPod.The "missing file" error happens if the file is no longer where iTunes expects to find it. Possible causes are that you or some third party tool has moved, renamed or deleted the file, one of its parent folders, or the drive it lives on has had a change of drive letter. It is also possible that iTunes has changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout, or vice-versa, and so is looking in slightly the wrong place. In the case of a library moved from one system to another there are also potential permissions issues. See Repair security permissions for iTunes for Windows.
Select a track with an exclamation mark, use Ctrl-I to Get Info, then click No when asked to try to locate the track. (Due to a bug in iTunes 12 you currently have to say No twice!) Look on the summary tab for the location that iTunes thinks the file should be. Now take a look around your hard drive(s). Hopefully you can locate the track in question. If a section of your library has simply been moved, a folder renamed, or a drive letter has changed, it should be possible to reverse the actions. If the difference between the two paths is an additional Music folder in one path then this is a layout issue. I can explain further if that is the case.
In some cases iTunes may be able to repair itself if you go through the same steps with Get Info but this time click Locate and browse to the lost track. It may then offer to attempt to automatically fix other broken links.
If another application like Windows Media Player has moved/renamed the files then the chances are that subtle differences in naming strategies will make it hard to restore the media to the precise path that iTunes is expecting. In such cases, as long as the missing files can be found somewhere, you should be able to use my FindTracks script to reconnect them to iTunes. See this post for an explanation of how it works.
See also Recover your iTunes library from your iPod or iOS device.
tt2 -
Problem in using Weblogic 6.1 with Oracle 9i
Hi,
Has anybody experiensing problems in creating connection from Weblogic6.1 to Oracle
9i using thin driver?
We have a piece of codes that works fine with Weblogic 6.1 and Oracle 8.1.7 but
failed to create database connection when we upgrade to database to 9i (the same
code works fine without weblogic).
Thanks
Li
[email protected]It works after I put the new oracle driver ahead of the weblogic stuff.
Thanks
Li
Joseph Weinstein <[email protected]> wrote:
You should make sure you have the same Oracle driver in the server
classpath, as works in the standalone case. Note that we ship a
thin driver too, so your newer one will ahve to be ahead of all
the weblogic stuff in the server classpath.
Joe
Li Wang wrote:
After upgraded our oracle server to 9i, we found that our applicationdoes not
work. So, I wrote a simple test program that just creates a connectionand exec
a query. The program works find with 9i by itself (of cause). But,when I put
it in Weblogic 6.1 (as Startup class), there are problems.
First, it takes 833700ms to create a connection (It takes 981ms tocreate a connection
outside wls, it takes 900ms to create a connection to oracle8.1.7 insidewls).
Then, it gets "java.sql.SQLException: ORA-00600: internal error code,arguments:
[ttcgcshnd-1], [0], [], [], [], [], [], []"
while executing the query.
We run weblogic and oracle on Windows2000.
The code looks like:
Class.forName("oracle.jdbc.driver.OracleDriver");
String username = "yourusername";
String password = "yourpassword";
String host = "yourhost";
String sid = "yoursid";
String dbURL = "jdbc:oracle:thin:@" + host +":1521:" + sid;
String sql = "select * from yourtable";
System.out.println(dbURL);
Connection connection = DriverManager.getConnection (dbURL, username,password);
Statement statement = connection.createStatement();
statement.executeQuery(sql);
statement.close();
connection.close();
"Jignesh Patel" <[email protected]> wrote:
1. Are you able to create connection pool using Oracle 9i THIN driver
? i.e Define
connection pool & make initial connection => 1. At the time of startup
weblogic
will create connections defined in connection pool.
2. Can you post your error message ?
Thanks
Jignesh Patel
"Li Wang" <[email protected]> wrote:
Hi,
Has anybody experiensing problems in creating connection from Weblogic6.1
to Oracle
9i using thin driver?
We have a piece of codes that works fine with Weblogic 6.1 and Oracle
8.1.7 but
failed to create database connection when we upgrade to database
to
9i
(the same
code works fine without weblogic).
Thanks
Li
[email protected] -
Configuring Weblogic's jDriver for Oracle to use in distributed transactions
Here is some errata to the instructions at "Configuring XA JDBC drivers" section of the online beta documentation:
http://www.weblogic.com/docs60/adminguide/managetx.html#1041268
The sample JDBC connection pool using Weblogic jDriver for Oracle should be:
<JDBCConnectionPool
Name="fundsXferAppPool"
Targets="myserver"
URL="jdbc:weblogic:oracle:localdb"
DriverName="weblogic.jdbc.oci.xa.XADataSource"
InitialCapacity="0"
MaxCapacity="5"
CapacityIncrement="1"
Properties="user=scott;password=tiger;server=localdb;rmid=0"
/>
<JDBCTxDataSource
Name="fundsXferDataSource"
Targets="myserver,server1"
JNDIName="myapp.fundsXfer"
PoolName="fundsXferAppPool"
/>
Here is an example of an additional XA connection pool for a second database instance:
<JDBCConnectionPool
Name="fundsXferAppPool2"
Targets="myserver"
URL="jdbc:weblogic:oracle:localdb2"
DriverName="weblogic.jdbc.oci.xa.XADataSource"
InitialCapacity="0"
MaxCapacity="5"
CapacityIncrement="1"
Properties="user=scott;password=tiger;server=localdb2;rmid=1"
/>
<JDBCTxDataSource
Name="fundsXferDataSource2"
Targets="myserver,server1"
JNDIName="myapp.fundsXfer2"
PoolName="fundsXferAppPool2"
/>
Please note the different "rmid" values for the 2 different database instances. Note also that the above sample only applies for Beta 1. Instructions may change in the future for Beta 2.
Also, all the names of the data source properties shown in "Table 8-2 Data Source Properties for WebLogic jDriver for Oracle" should start with lower case.
The Beta 1 online documentation will soon be updated to reflect the above. Our apologies for any inconvenience caused.
-- Priscilla Fung, BEA Systems, Inc.
Thanks
Mark
"Sree Bodapati" <[email protected]> wrote:
>Hi Mark,
>
>Yes you need 8.1.6 DB Server or higher for WebLogic's jDriver for Oracle/XA
>as well.
>
>/
>sree
>
>
>"Mark Cordobal" <[email protected]> wrote in message
>news:[email protected]..
>>
>> I read that XA features require version Oracle8i release 8.1.6 or later
>of
>the Oracle
>> server.
>> Does this apply only to Oracle JDBC drivers (which implement 2pc on top
>of
>JAVA_XA
>> package) or also to Weblogic's jDriver for Oracle/XA ?
>> I mean, if I have two Oracle 8.06 (or however < 8.1.6) jdbc Resource
>Manager, can
>> I implement (wlserver 6.1sp2) a distributed xa transaction using
>Weblogic's jDriver
>> for Oracle/XA ?
>> Or is it (jdriver) built also on top of JAVA_XA package, and so the db
>server XA
>> compliancy is a must ?
>>
>> Thanks in advance
>>
>> Mark
>
>
Maybe you are looking for
-
Reg. ALV- Sub total?
Hi Experts, How to hide the column values in ALV? That is I need to display the sub-total values alone and not to show the other values in the ALV output. Take for e.g 1 2 2 andre 2 3 4 brown 3 5 6 subtotal 2 2 3 A 1 1 1 B
-
Hi, I received an error when attempting to install the Business Intelligence installation from the Universal Installer panel. The error states, "Oracle 9iAS cannot be installed into an existing Oracle 9i 9.2.0.1.0 or higher Oracle home". Any suggesti
-
ORA-01536 Space Quota with resource and unlimited tablespace privilege
Good morning. I've got the following error ORA-01536: space quota exceeded for tablespace, but my owner has the following grants: - RESOURCE - UNLIMITED TABLESPACE The tablespace transaction has allocated 150GB and when it's about 90% of space used t
-
Create table with variables enviroment
Hi all, I would create a table by a schedule procedure when an event occurs. Can I create a table with these or similar syntax: create table acme_%s_%t as select * from a; I would use this syntax because this event could happen more time a day and so
-
Photoshopmarkeplace Publisher status denied?
My status for publisher was rejected before I even upload any offerings. The message was "Please review the Marketplace Terms and Conditions regarding the terms for becoming a publisher." I've check my profile (edit), but there is no option or button