Type cast weblogic.jdbc.wrapper.ResultSet to OracleResultSet
Hello, I have a application using Spring 3.5 , Hibernate 3.6 and deployed over weblogic 10.3.4.
This application running fine when i was using the c3po connection pooling, but when i switch to use the weblogic connection pooling, I started getting issues while retriving the XMLTYPE object from database.
This issue what i am facing is when i am trying to type cast the weblogic wrapper resultset to Oracleresultset i am getting a type casting issue.
Below is the code...
Can anyone please help me to find out how to type cast the weblogic wrapper objects. I am stuck on this issue for more thn a week now.. Please help me..
public Object nullSafeGet( ResultSet rs, String [ ] names, Object arg2 )
throws HibernateException, SQLException
System.out.println("rs ========= "+rs.getClass());
System.out.println("rs ========= "+rs.getClass().getName());
weblogic.jdbc.wrapper.ResultSet wlsResultSet = (weblogic.jdbc.wrapper.ResultSet) rs;
System.out.println("wlsResultSet ========= "+wlsResultSet.getClass().getName());
OracleResultSet oracleResultSet = (OracleResultSet) wlsResultSet.getVendorObj();
System.out.println("ors ========= "+oracleResultSet.getClass().getName());
XMLType xmlType = XMLType.createXML(oracleResultSet.getOPAQUE(names[0]));
//XMLType xmlType = (XMLType)rs.getObject(names[0]);
return (xmlType != null)?xmlType.getDOM():null;
}
Wrong forum, try WebLogic Server - General
Frank
Similar Messages
-
Hello. I'm trying to bring back a BLOB object from a PL/SQL procedure. I keep getting a class cast exception when I do it
java.lang.ClassCastException: weblogic.jdbc.wrapper.Blob_oracle_sql_BLOB cannot be cast to oracle.sql.BLOB
I get similar results with oracle.sql.BLOB or java.sql.Blob.
What I've noticed is that when I'm not using a JDBC URL with my AM to do the SQL it does not fail. It's when I change to a JDBC Datasource I get the class cast exception. Any ideas?
Thanks, Graeme.In the connection pool uncheck the property "Wrap Data Types".
By default, data type objects for Array, Blob, Clob, NClob, Ref, SQLXML, and Struct, plus ParameterMetaData and ResultSetMetaData objects are wrapped with a WebLogic wrapper. This allows for features like debugging and connection usage to be done by the server.
The wrapping can be turned off by setting this value to false. This improves performance, in some cases significantly, and allows for the application to use the native driver objects directly. -
Weblogic.jdbc.wrapper.Blob_oracle_sql_BLOB ERROR
Hi,
we have an application developed with Oracle ADF with several CRUD screens. We deploy it on Weblogic and use as database oracle10G 10.2.0.4.
On one specific screen, a delete button fails and gives following error:
ERROR: weblogic.jdbc.wrapper.Blob_oracle_sql_BLOB
Anybody who encountered a similiar problem and did you find a solution?
Cheers,
RobbyHi. The issue is that some oracle-specific BLOB JDBC code (which
requires casting to concrete Oracle classes) is conflicting with
WebLogic's prudent and correct behavior of wrapping every
java.sql object delivered from it's WLS datasources. If you are
able to alter the relevant JDBC code, I can describe what you
can do.
Joe -
JDBC Problems -- NoClassDefFoundError: weblogic/jdbc/wrapper/JTSConnection
Ben Belchak wrote:
Hi, newsgroup:
I have been developing with the Workshop for about a month now, and everything has been going great until last week. I have been connected and able to retrieve data from our AS/400 using the jt400 drivers, but all of a sudden something happened that caused me to get the following error. If anybody can assist, it would be greatly appreciated.
Some background: I have the JDBC JAR inside the classpath for my server, and it is loading it properly because I can test the connection pool from within the appserver's admin console.
In appserver:
java.lang.NoClassDefFoundError: weblogic/jdbc/wrapper/JTSConnectionHi. Did you get a response for this?
Make sure you don't have the JDBC jar in the client classpath too. Just make
sure it's in the server classpath. Let me know if that helps.
Joe
at java.lang.ClassLoader.defineClass(Ljava.lang.String;[BIILjava.securit
y.ProtectionDomain;)Ljava.lang.Class;(Unknown Source)
at java.security.SecureClassLoader.defineClass(Ljava.lang.String;[BIILja
va.security.CodeSource;)Ljava.lang.Class;(SecureClassLoader.java:123)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Ljava.l
ang.String;)Ljava.lang.Class;(GenericClassLoader.java:476)
at weblogic.utils.classloaders.GenericClassLoader.findClass(Ljava.lang.S
tring;)Ljava.lang.Class;(GenericClassLoader.java:181)
at java.lang.ClassLoader.loadClass(Ljava.lang.String;Z)Ljava.lang.Class;
(Unknown Source)
Inside browser:
An error has occurred:
EJB Exception: ; nested exception is:
weblogic.jws.control.ControlException: Exception in onAcquirecontext event handler[Context failure: onAcquire[Failed to Generate Wrapper Class.
Nested Exception: java.lang.RuntimeException: Failed to Generate Wrapper Class
at weblogic.utils.wrapper.WrapperFactory.createWrapper(Ljava.lang.Class;Ljava.lang.Object;Z)Ljava.lang.Object;(WrapperFactory.java:183)
at weblogic.jdbc.wrapper.JDBCWrapperFactory.getWrapper(ILjava.lang.Object;Z)Ljava.lang.Object;(JDBCWrapperFactory.java:171)
at weblogic.jdbc.jts.Driver.newConnection(Ljava.lang.String;Lweblogic.transaction.Transaction;Ljava.lang.String;)Lweblogic.jdbc.wrapper.JTSConnection;(Driver.java:737)
at weblogic.jdbc.jts.Driver.createLocalConnection(Lweblogic.transaction.Transaction;Ljava.lang.String;Ljava.util.Properties;)Lweblogic.jdbc.wrapper.JTSConnection;(Driver.java:197)
at weblogic.jdbc.jts.Driver.connect(Ljava.lang.String;Ljava.util.Properties;)Ljava.sql.Connection;(Driver.java:155)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection()Ljava.sql.Connection;(RmiDataSource.java:305)
at com.bea.wlw.runtime.core.control.DatabaseControlImpl.getConnection()Ljava.sql.Connection;(DatabaseControlImpl.jcs:1424)
at com.bea.wlw.runtime.core.control.DatabaseControlImpl.context_onAcquire()V(DatabaseControlImpl.jcs:1316)
at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang..Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:367)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
at com.bea.wlw.runtime.core.container.Invocable.fireEvent(Lcom.bea.wlw.runtime.core.context.WlwThreadContext;Ljava.lang.String;Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:612)
at com.bea.wlw.runtime.core.context.WlwThreadContext.sendEvent(Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(WlwThreadContext.java:980)
at com.bea.wlw.runtime.core.context.WlwThreadContext.raiseEvent()Ljava.lang.Object;(WlwThreadContext.java:910)
at com.bea.wlw.runtime.core.container.Container.raiseContextEvent()Ljava.lang.Object;(Container.java:567)
at com.bea.wlw.runtime.jcs.container.JcsContainer.onAcquire()V(JcsContainer.java:529)
at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:367)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
at com.bea.wlw.runtime.core.container.Invocable.sendContextEvent(Ljava.lang.String;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:533)
at com.bea.wlw.runtime.jcs.container.JcsContainer.sendContextEvent(Ljava.lang.String;[Ljava.lang.Object;)Ljava.lang.Object;(JcsContainer.java:480)
at com.bea.wlw.runtime.jcx.container.JcxContainer.preInvoke(Lcom.bea.wlw.runtime.core.context.WlwThreadContext;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Request;(JcxContainer.java:110)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(Invocable.java:187)
at com.bea.wlw.runtime.jcs.container.JcsContainer.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(JcsContainer.java:84)
at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(BaseContainerBean.java:198)
caused by: : weblogic.jws.control.ControlException: Exception in onAcquirecontext event handler[Context failure: onAcquire[Failed to Generate Wrapper Class.
Nested Exception: java.lang.RuntimeException: Failed to Generate Wrapper Class
at weblogic.utils.wrapper.WrapperFactory.createWrapper(Ljava.lang.Class;Ljava.lang.Object;Z)Ljava.lang.Object;(WrapperFactory.java:183)
at weblogic.jdbc.wrapper.JDBCWrapperFactory.getWrapper(ILjava.lang.Object;Z)Ljava.lang.Object;(JDBCWrapperFactory.java:171)
at weblogic.jdbc.jts.Driver.newConnection(Ljava.lang.String;Lweblogic.transaction.Transaction;Ljava.lang.String;)Lweblogic.jdbc.wrapper.JTSConnection;(Driver.java:737)
at weblogic.jdbc.jts.Driver.createLocalConnection(Lweblogic.transaction.Transaction;Ljava.lang.String;Ljava.util.Properties;)Lweblogic.jdbc.wrapper.JTSConnection;(Driver.java:197)
at weblogic.jdbc.jts.Driver.connect(Ljava.lang.String;Ljava.util.Properties;)Ljava.sql.Connection;(Driver.java:155)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection()Ljava.sql.Connection;(RmiDataSource.java:305)
at com.bea.wlw.runtime.core.control.DatabaseControlImpl.getConnection()Ljava.sql.Connection;(DatabaseControlImpl.jcs:1424)
at com.bea.wlw.runtime.core.control.DatabaseControlImpl.context_onAcquire()V(DatabaseControlImpl.jcs:1316)
at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:367)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:396)
at com.bea.wlw.runtime.core.container.Invocable.fireEvent(Lcom.bea.wlw.runtime.core.context.WlwThreadContext;Ljava.lang.String;Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:612)
at com.bea.wlw.runtime.core.context.WlwThreadContext.sendEvent(Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(WlwThreadContext.java:980)
at com.bea.wlw.runtime.core.context.WlwThreadContext.raiseEvent()Ljava.lang.Object;(WlwThreadContext.java:910)
at com.bea.wlw.runtime.core.container.Container.raiseContextEvent()Ljava.lang.Object;(Container.java:567)
at com.bea.wlw.runtime.jcs.container.JcsContainer.onAcquire()V(JcsContainer.java:529)
at jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(DispMethod.java:367)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Ljava.lang.Object;Ljava.lang.String;Lcom.bea.wlw.runtime.core.dispatcher.DispMethod;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:423)
at com.bea.wlw.runtime.core.container.Invocable.sendContextEvent(Ljava.lang.String;[Ljava.lang.Object;)Ljava.lang.Object;(Invocable.java:533)
at com.bea.wlw.runtime.jcs.container.JcsContainer.sendContextEvent(Ljava.lang.String;[Ljava.lang.Object;)Ljava.lang.Object;(JcsContainer.java:480)
at com.bea.wlw.runtime.jcx.container.JcxContainer.preInvoke(Lcom.bea.wlw.runtime.core.context.WlwThreadContext;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Request;(JcxContainer.java:110)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(Invocable.java:187)
at com.bea.wlw.runtime.jcs.container.JcsContainer.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(JcsContainer.java:84)
at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.dispatcher.InvokeResult;(BaseContainerBean.java:198)
Message was edited by bbelchak at Aug 9, 2004 1:16 PM
Message was edited by bbelchak at Aug 9, 2004 1:20 PM
Message was edited by bbelchak at Aug 9, 2004 1:50 PM -
ClassCastException while asting ResultSet to OracleResultSet. Using weblogic connection pool
Hi,
I am using weblogic server 5.1 and connection pools for accessing Oracle database.
We wanted to use BLOB in oracle and I coded the java class to insert data into BLOB
field.
When I code a sample calss without using weblogic pool, I do not have any problem.
But when I use the weblogic connection pool, I get classcastException as described
below:
I am using
"insert into shipmentCorrection (" + insfields + ") VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,empty_blob())"
to insert a dummy record with empty_blob and then getting the BLOB locater by the
following code:
java.sql.ResultSet rset = stmt.executeQuery ("SELECT zipped_pdf FROM shipmentCorrection
WHERE shipment_id ='"+ ShipmentId + "' and correction_num ="+ CorrectionNum +" and
Bl_Type = '"+ blType +"'" );
rset.next();
BLOB blob = ((OracleResultSet)rset).getBLOB(1);
java.io.OutputStream outstream = blob.getBinaryOutputStream();
IN the above line of code where I cast the ResultSet to OracleResultSet, I get the
classcastException as follows:
I donno how to solve this problem. Could any one please help me on this ?
java.lang.ClassCastException: weblogic.jdbc.pool.ResultSet
at fmweb.SQL.PdfDataSQL.insertPdfData(PdfDataSQL.java:347)
at fmweb.framework.ShipmentManagerImpl.insertPdfData(ShipmentManagerImpl
.java:2471)
at fmweb.framework.ShipmentManager_WLSkel.invoke(ShipmentManager_WLSkel.
java:1316)
at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerOb
jectAdapter.java:347)
at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
tHandler.java:69)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:15)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
Thanks,
Muralidaran ChakravarthyWhen using weblogic pool drivers it is not possible to cast to an Oracle
JDBC driver, (or any other driver )
pool driver hides the driver you have configured.
"Muralidaran Chakravarthy" <[email protected]> wrote in message
news:3ce16855$[email protected]..
>
Hi,
I am using weblogic server 5.1 and connection pools for accessing Oracledatabase.
We wanted to use BLOB in oracle and I coded the java class to insert datainto BLOB
field.
When I code a sample calss without using weblogic pool, I do not have anyproblem.
But when I use the weblogic connection pool, I get classcastException asdescribed
below:
I am using
"insert into shipmentCorrection (" + insfields + ") VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,empty_blob())"
>
to insert a dummy record with empty_blob and then getting the BLOB locaterby the
following code:
java.sql.ResultSet rset = stmt.executeQuery ("SELECT zipped_pdf FROMshipmentCorrection
WHERE shipment_id ='"+ ShipmentId + "' and correction_num ="+CorrectionNum +" and
Bl_Type = '"+ blType +"'" );
rset.next();
BLOB blob = ((OracleResultSet)rset).getBLOB(1);
java.io.OutputStream outstream = blob.getBinaryOutputStream();
IN the above line of code where I cast the ResultSet to OracleResultSet, Iget the
classcastException as follows:
I donno how to solve this problem. Could any one please help me on this ?
java.lang.ClassCastException: weblogic.jdbc.pool.ResultSet
at fmweb.SQL.PdfDataSQL.insertPdfData(PdfDataSQL.java:347)
atfmweb.framework.ShipmentManagerImpl.insertPdfData(ShipmentManagerImpl
java:2471)
atfmweb.framework.ShipmentManager_WLSkel.invoke(ShipmentManager_WLSkel.
java:1316)
atweblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerOb
jectAdapter.java:347)
atweblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
tHandler.java:69)
atweblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
java:15)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
Thanks,
Muralidaran Chakravarthy -
Hey Guys,
We are running our application on weblogic8.1 server (AIX box). Our application keeps throwing this error. Has anyone of you come across this error before.
java.sql.SQLException: This JDBC 2.0 method is not implemented at weblogic.jdbc.mssqlserver4.TdsResultSet.getType(TdsResultSet.java:684) at weblogic.jdbc.wrapper.ResultSet_weblogic_jdbc_mssqlserver4_TdsResultSet.getType(Unknown Source) at weblogic.jdbc.rmi.internal.ResultSetImpl.isResultSetCacheable(ResultSetImpl.java:140) at weblogic.jdbc.rmi.internal.ResultSetImpl.isRowCaching(ResultSetImpl.java:109) at weblogic.jdbc.rmi.internal.ResultSetImpl_weblogic_jdbc_wrapper_ResultSet_weblogic_jdbc_mssqlserver4_TdsResultSet_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(AuthenticatedSubject.java:363) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144) at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415) at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java(Compiled Code)) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) Thanks Regards RichiRachith Srinivas wrote:
Hey Guys,
We are running our application on weblogic8.1 server (AIX box).
Our application keeps throwing this error. Has anyone of you come across
this error before.
java.sql.SQLException: This JDBC 2.0 method is not implemented
at weblogic.jdbc.mssqlserver4.TdsResultSet.getType(TdsResultSet.java:684)
...Hi. That old driver is telling you the truth. That JDBC 2.0 method is not implemented.
There has been no development of that driver since soon after the JDBC 2.0 spec was
finalized. We provide the weblogic.jdbc.sqlserver.SQLServerDriver in the 8.1 server,
and heartily recommend you switch to it. It's a much superior driver, and has the
considerable benefit if being fully supported and updated. The old ms4 driver is
strongly deprecated and won't exist in the next release of WebLogic.
Joe -
How do I regenerate the JDBC wrapper class?
I am seeing the following in Weblogic 10.3.
java.lang.IllegalAccessError: tried to access class oracle/bi/jdbc/AnaJdbcResultSetImpl from class weblogic/jdbc/wrapper/ResultSet_oracle_bi_jdbc_AnaJdbcResultSet
As I understand it, the wrapper class is auto-generated. How do I re-grenerate the wrapper class to get it in sync?It should never not be in sync. It is generated dynamically according to the BI classes currently
available, which doesn't change while the JVM is running. Open a BI JDBC SR.
Joe -
Is it possible to make a type cast in TestStand?
I've got the following problem.
I use a receive function which waits for an undefined package. (struct package).
The problem is i can't specify the module with the exaxt package.
Generally in C i define a Pointer and create enough buffer for it. Is it the same in TestStand?
Is it possible to make a type cast?
for example:
i've got these packages
struct packet;
struct data;
the function does not know which structure to receive.
err = receive(buffer,maxlen);
how do i specify the buffer variable?
can i create a type "void" with a String to have enough buffer.
and then to make a type cast, for example "Locals.dataobject = ((data)Locals.buffer)"
any ideas?
thx for helpUnfortunately there is no way to do type-casts in TestStand. What you could do is write a wrapper-dll in C, that has for example two parameters for both possible structs. The dll then takes one of the parameters, does the typecast and passes it on to your original dll.
From TestStand you can pass the struct(or better container in the "TestStand language") you want to use to the accoridng parameter of the wrapper-dll, leaving the other parameter empty or with some default-value.
Hope this helps!
André -
Hello,
we are running WLS 6.1 SP2. The following code sometimes (rather rarely) throws
a NullPointerException:
Connection dbConnection = DBUtil.getDBConnection();//here we get the Connection
stmt = dbConnection.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);//it's
where NPE happens
The error report says:
java.sql.SQLException:
java.lang.NullPointerException at
weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:396)
So, I think, this is something in WebLogic's code... Is this a known issue (I
couldn't find a similar report in the newsgroup)? Is there a workaround?
regards,
VitalyVitaly Sourikov wrote:
"Vitaly Sourikov" <[email protected]> wrote:
The patches that we use with SP2 are
CR061106_61sp2.jar
CR072612_61sp2.jar
CR077919_61sp2.jar
As far as we know, those fixes (or some of them) were not introduced in SP4. Are
there new versions of the patches for SP4?I have found that all these bugs are fixed in sp4, so no patches are needed if you
upgrade to 6.1sp4.
Joe
>
>
regards,
Vitaly
Hi Joseph,
Thank you for the reply. Unfortunately, we cannot move to SP3 or SP4
- they have
conflicts with other patches from WebLogic we use. This error happens
rather rarely.
In most of cases this very stuff works. But it would be intresing to
have this
patch for diagnostics, in case of future failures. Would you send it
to me, please?
Thank you in advance,
Vitaly
Joseph Weinstein <[email protected]> wrote:
Vitaly Sourikov wrote:
Hello,
we are running WLS 6.1 SP2. The following code sometimes (rather rarely)throws
a NullPointerException:
Connection dbConnection = DBUtil.getDBConnection();//here we get theConnection
stmt = dbConnection.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);//it's
where NPE happens
The error report says:
java.sql.SQLException:
java.lang.NullPointerException at
weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:396)
So, I think, this is something in WebLogic's code... Is this a knownissue (I
couldn't find a similar report in the newsgroup)? Is there a workaround?Hi. The NPE is probably happening in the actual DBMS driver. What is
happening
is that the rmi driver is having to catch any non-SQLException, andthrow
a SQLException
with the message of the original exception. Unfortunately, the fullstacktrace
of the
original NPE is lost. If you want, I can send you a small diagnostic
patch, which will
just make the rmi object retain the whole original stacktrace in the
exception it throws,
and that will help lead to the real problem.
This may well be a bug that was fixed in sp3 or 4. Is it possible
for you to upgrade to
the latest stuff?
Joe
regards,
Vitaly -
ClassCastException: weblogic.jdbc.rmi.SerialResultSet
HI,
I am using WebLogic 6.0 SP2 connection pooling to get CLOB data from Oracle database.
It is working fine to get the connection and get non-CLOB data like string, but
when I retrieve the CLOB column in my program such as, theClob = ((oracle.jdbc.OracleResultSet)
rs).getCLOB(1),
Weblogic throws ClassCastException: weblogic.jdbc.rmi.SerialResultSet, does anybody
experience the same problem ? How can I get around this problem ?
Thanks
JohnHi,
I've got the same error. The only diference is that I read BLOBs out of the table
((oracle.jdbc.OracleResultSet)rset).getBLOB(1) from oracle.jdbc.OracleResultSet).
Best regards,
Kai
"John Chen" <[email protected]> wrote:
>
HI,
I am using WebLogic 6.0 SP2 connection pooling to get CLOB data from
Oracle database.
It is working fine to get the connection and get non-CLOB data like string,
but
when I retrieve the CLOB column in my program such as, theClob = ((oracle.jdbc.OracleResultSet)
rs).getCLOB(1),
Weblogic throws ClassCastException: weblogic.jdbc.rmi.SerialResultSet,
does anybody
experience the same problem ? How can I get around this problem ?
Thanks
John -
i m reading an array of int from ObjectOutPutStream. can any body tell how do we type cast an object to array ??
karansha:
I'm sure you mean you're trying to read in an int[] from an ObjectInputStream that was written to an ObjectOutputStream since you can't read from an OutputStream. Use something like this:
ObjectInputStream in = <whatever>;
int[] intArray = (int[])in.readObject();adramolek:
Why should you use an Integer[] instead of an int[] for serialization? All arrays of primitives -- boolean[], byte[], double[], float[], int[], long[], short[] -- are serializable as is; there is no need to convert them to arrays of their wrapper types simply to serialize them.
In fact, the output from the following piece of code shows exactly which interfaces are implements by an int[]:
Class cls = int[].class;
Class[] interfaces = cls.getInterfaces();
for (int i = 0; i < interfaces.length; i++) {
System.out.println(interfaces.getName());
The output is:
java.lang.Cloneable
java.io.SerializableThe output is identical for each of boolean[], byte[], double[], float[], int[], long[], and short[], showing that each type is both serializable [i]and cloneable.
Shaun -
Hi,
I am facing following issue in my one environment. but in other environment same class path is working fine. I have compared all jar and classpath for both weblogic server.
I am using weblogic 11g.
27 Mar 2013 15:21:09,507 ERROR XXXServlet:293 - oracle.sql.ARRAY incompatible with weblogic.jdbc.vendor.oracle.OracleArray
java.lang.ClassCastException: oracle.sql.ARRAY incompatible with weblogic.jdbc.vendor.oracle.OracleArray
at com.emc.nems.wsd.ui.beans.reports.mpapi.FacilityBeanType.nullSafeGet(FacilityBeanType.java:126)
at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:128)
at org.hibernate.type.AbstractType.hydrate(AbstractType.java:105)
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2114)
at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1404)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1332)
at org.hibernate.loader.Loader.getRow(Loader.java:1230)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:603)
at org.hibernate.loader.Loader.doQuery(Loader.java:724)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2232)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
at org.hibernate.loader.Loader.list(Loader.java:2124)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:312)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1723)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:175)
at com.emc.nems.oms.dao.hibernate.util.OMSHibBaseDAO.executeNamedQueryWithoutTransaction(Unknown Source)
at com.emc.nems.wsd.dao.hibernate.reports.mpapi.MpapiReportHibDAO.findMCR020(Unknown Source)
at com.emc.nems.wsd.ui.handler.reports.ReportsHandler.getMPAPIData(Unknown Source)
at com.emc.nems.wsd.ui.servlets.reports.mpapi.MpapiServlet.executeReport(XXXServlet.java:1009)
at com.emc.nems.wsd.ui.servlets.reports.mpapi.MpapiServlet.generateAuditFile(XXXServlet.java:318)
at com.emc.nems.wsd.ui.servlets.reports.mpapi.MpapiServlet.execute(XXXServlet.java:273)
at com.emc.nems.wsd.ui.servlets.reports.mpapi.MpapiServlet.doGet(XXXServlet.java:207)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3731)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3695)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2285)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2184)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1459)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Regards,
AbhishekCreating my Oracle connection works fine ... code as follows:
<i>Context ctxt = getInitialContext();
DataSource dataSource = (DataSource) ctxt.lookup(poolName);
Connection conn = dataSource.getConnection();
OracleConnection oracleConn = (OracleConnection)((WLConnection)conn).getVendorConnection();</i>
I also have reviewed documentation:
http://e-docs.bea.com/wls/docs81/jdbc/thirdparty.html. In section 'Using OracleStruct Extension Methods' it highlights that
<i>java.sql.Struct struct =(weblogic.jdbc.vendor.oracle.OracleStruct)(rs.getObject(2));</i>
None of the documentation actually mentions <b>oracle.sql.STRUCT</b>. For Weblogic to truely provide support for Oracle it needs an easy way of converting to this data type. At present I cannot interact with Oracle APIs until I can create an oracle.sql.STRUCT. -
DataNavigator: numeric type cast
I have a simple data form of jTextField1, jTextField2 and TextField3.
jTextField1's document = nBCachedRowSet1: id (integer, primary key)
jTextField2's document = nBCachedRowSet1: name (string type)
jTextField3's document = nBCachedRowSet1: price (numeric type)
I'm using DataNavigator to manipulate all records.
The problem occured when I edit jTextField2 (name) and update it.
The error message is ...
ERROR: Unable to identify an operator '=' for types 'numeric' and 'double precision'
You will have to retype this query using an explicit cast
java.sql.SQLException: acceptChanges Failed
at sun.jdbc.rowset.CachedRowSet.acceptChanges(CachedRowSet.java:791)
at org.netbeans.lib.sql.NBCachedRowSet.acceptChangesInternal(NBCachedRowSet.java:712)
This message told me to cast NUMERIC type BUT I have no idea.
HOW to cast
WHERE to code
WHAT type to cast to ?private void initComponents() {
connectionSource1 = new org.netbeans.lib.sql.ConnectionSource();
try {
nBCachedRowSet1 = new org.netbeans.lib.sql.NBCachedRowSet();
} catch (java.sql.SQLException e1) {
e1.printStackTrace();
dataNavigator1 = new org.netbeans.lib.sql.DataNavigator();
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
connectionSource1.setDatabase("jdbc:postgresql://localhost/drugstore004");
connectionSource1.setDriver("org.postgresql.Driver");
connectionSource1.setPassword("028a061f882763ad48ddbc977f45e2eca7c8cc685ab9", true);
connectionSource1.setUsername("Sup");
nBCachedRowSet1.setCommand("select * from trade");
nBCachedRowSet1.setConnectionSource(connectionSource1);
try {
nBCachedRowSet1.setTableName("trade");
} catch (java.sql.SQLException e1) {
e1.printStackTrace();
nBCachedRowSet1.addInsertRowListener(new org.netbeans.lib.sql.InsertRowListener() {
public void rowInserted(javax.sql.RowSetEvent evt) {
nBCachedRowSet1RowInserted(evt);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
dataNavigator1.setRowSet(nBCachedRowSet1);
getContentPane().add(dataNavigator1, java.awt.BorderLayout.NORTH);
jTable1.setModel(new org.netbeans.lib.sql.models.TableModel(nBCachedRowSet1, new org.netbeans.lib.sql.models.TableModel.Column[] {
new org.netbeans.lib.sql.models.TableModel.Column("id", "Id", false),
new org.netbeans.lib.sql.models.TableModel.Column("name", "Name", true),
new org.netbeans.lib.sql.models.TableModel.Column("admin", "Admin", true),
new org.netbeans.lib.sql.models.TableModel.Column("formular", "Formular", true),
new org.netbeans.lib.sql.models.TableModel.Column("company", "Company", true),
new org.netbeans.lib.sql.models.TableModel.Column("price", "Price", true),
new org.netbeans.lib.sql.models.TableModel.Column("addiction", "Addiction", true),
new org.netbeans.lib.sql.models.TableModel.Column("minimum", "Minimum", true),
new org.netbeans.lib.sql.models.TableModel.Column("min_unit", "Min unit", true),
new org.netbeans.lib.sql.models.TableModel.Column("unit_size", "Unit size", true),
new org.netbeans.lib.sql.models.TableModel.Column("measure_unit", "Measure unit", true),
new org.netbeans.lib.sql.models.TableModel.Column("form", "Form", true),
new org.netbeans.lib.sql.models.TableModel.Column("shape", "Shape", true),
new org.netbeans.lib.sql.models.TableModel.Column("life_span", "Life span", true),
new org.netbeans.lib.sql.models.TableModel.Column("priority", "Priority", true),
new org.netbeans.lib.sql.models.TableModel.Column("picture", "Picture", true),
new org.netbeans.lib.sql.models.TableModel.Column("register", "Register", true),
new org.netbeans.lib.sql.models.TableModel.Column("barcode", "Barcode", true),
new org.netbeans.lib.sql.models.TableModel.Column("verifydate", "Verifydate", true),
new org.netbeans.lib.sql.models.TableModel.Column("remark_ds", "Remark ds", true),
new org.netbeans.lib.sql.models.TableModel.Column("remark_mk", "Remark mk", true),
new org.netbeans.lib.sql.models.TableModel.Column("remark_db", "Remark db", true)
jTable1.setSelectionModel(new org.netbeans.lib.sql.models.SQLListSelectionModel (nBCachedRowSet1));
jScrollPane1.setViewportView(jTable1);
getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
pack();
All code are created by "JDBC Application Wizard" (Sun One Studio 4 Community Edition).
This is table "trade" structure (PostGreSQL)
drugstore004=# \d trade
Table "trade"
Column | Type | Modifiers
id | integer | not null default nextval('"trade_id_seq"'::text)
name | character varying(255) | not null
admin | integer | not null default 1
formular | integer | not null default 1
company | integer | not null default 1
price | numeric(7,2) |
addiction | smallint |
minimum | smallint |
min_unit | integer | not null default 1
unit_size | smallint |
measure_unit | integer | not null default 1
form | integer | not null default 1
shape | integer | not null default 1
life_span | smallint |
priority | integer | not null default 1
picture | character varying(100) |
register | character varying(50) |
barcode | character varying(50) |
verifydate | date |
remark_ds | character varying(255) |
remark_mk | character varying(255) |
remark_db | character varying(255) |
Primary key: trade_pkey
Unique keys: trade_name_key
Triggers: RI_ConstraintTrigger_113874,
RI_ConstraintTrigger_113880,
RI_ConstraintTrigger_113886,
RI_ConstraintTrigger_113892,
RI_ConstraintTrigger_113898,
RI_ConstraintTrigger_113904,
RI_ConstraintTrigger_113910,
RI_ConstraintTrigger_113921,
RI_ConstraintTrigger_113923,
RI_ConstraintTrigger_113942,
RI_ConstraintTrigger_113944,
RI_ConstraintTrigger_113957,
RI_ConstraintTrigger_113959,
RI_ConstraintTrigger_113966,
RI_ConstraintTrigger_113968
drugstore004=#
When I edit column "name" (some record where column "price" is null), their is not error.
But when I edit column "name" where "price" have some price data in it, .... the same error as shown above has come.
(No Trigger involved in this test because I just add some characters in column "name")
Some code should be add in "RowChanged" to do some type casting for column "price" but....how? -
Could not type cast in java embedding
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
org.xml.sax.InputSource in = (org.xml.sax.InputSource) getVariableData("Invoke_1_getRoutingAndFrameJumpers_OutputVariable","getRoutingAndFrameJumpersResponse");
Document doc = db.parse(in);
In the above code I am trying to type cast the variable getRoutingAndFrameJumpersResponse into org.xml.sax.InputSource so that i can parse.
I am not getting any error during compilation
but I am unable to type cast some run time error is coming in the line were I am type casting but I am not able to see the runtime error.
How can I see the runtime error in java embedding, how to type cast a variable into xml so that I can parse it.Hi Arun,
Could you try using the bpelx:rename extension in an assign activity enables a BPEL process to rename an element through use of XSD type casting.
<bpel:assign>
<bpelx:rename elementTo="QName1"? typeCastTo="QName2"?>
<bpelx:target variable="ncname" part="ncname"? query="xpath_str" />
</bpelx:rename>
</bpel:assign>
Cheers
A -
How can i use the weblogic jdbc driver for sqlserver?
hello
i have downloaded and installed the weblogic on my windows2000 server,then i want to use the weblogic jdbc driver for sqlserver2000 outside of the weblogic,as follow:
1 add following string to my classpath environment of the wndows2000: E:\bea\wlserver6.1\lib\mssqlserver4v65.jar
2 then i write a test program as:
import weblogic.jdbc.mssqlserver4.Driver;
import java.sql.*;
public class test{
public static void main(String argv[]){
try{ Class.forName("weblogic.jdbc.mssqlserver4.Driver");
Connection
conn=DriverManager.getConnection"jdbc:weblogic:mssqlserver4:localhost:1433","sa",""); }catch(Exception e){ System.out.println(e.getMessage()); }
4 when i execute it,it throw a exception:
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/version at weblogic.jdbc.mssqlserver4.TdsStatement.getLicenseStr(TdsStatement.java:2665) at weblogic.jdbc.mssqlserver4.TdsStatement.microsoftLogin(TdsStatement.java:2474) at weblogic.jdbc.mssqlserver4.MicrosoftConnection.beginLogin(MicrosoftConnection.java:42) at weblogic.jdbc.mssqlserver4.TdsConnection.login(TdsConnection.java:57) at weblogic.jdbc.mssqlserver4.MicrosoftConnection.login(MicrosoftConnection.java:53) at weblogic.jdbc.mssqlserver4.BaseConnection.prepareConnection(BaseConnection.java:187) at weblogic.jdbc.mssqlserver4.Driver.newConnection(Driver.java:34) at weblogic.jdbc.mssqlserver4.ConnectDriver.connect(ConnectDriver.java:151) at java.sql.DriverManager.getConnection(DriverManager.java:517) at java.sql.DriverManager.getConnection(DriverManager.java:177) at test.main(test.java:7)
who can help me?thank you!Hi,
Mail me the jar file as I am using Weblogic 6.1 to my email id [email protected]
Else tell me the site from where u have downloaded and i will do the same.
I will test the same and let you know.
Thanks,
Seetesh
Maybe you are looking for
-
Dear members, I need help. I have bought Blackberry 9700 bold 2 from other person, who is living in Lithuania. So, I decided to upgrade my os from 5 to 6, which I have tried in different ways: 1) I download official os from the Blackberry website, wi
-
How do I get my music from Media Center to my iphone 4s. Itunes 10.5 won't import the MC music library, and MC won't recognize and synch to the iphone plugged into the USB port so I can't load playlists from MC to my iphone. Itunes help doesn't work.
-
FM for changing system status in Service Notification
Hi all, I have a tough situation here. To change the system status in service notification, the system use "IQS4_CHANGE_STAT_NOTIFICATION". CALL FUNCTION 'IQS4_CHANGE_STAT_NOTIFICATION' EXPORTING i_qmnum = i_vrgng
-
Adobe Audition won't open. Windows constantly closes it down. Have no idea of what to do?
-
New Time Capsule Ethernet operating at 100mbps
Hi, A collegue of mine just bought a new time capsule for our office (3TB one) which features '3 gigabit ethernet ports'. I have my Macbook Pro plugged into a Belkin Thunderbolt Dock and the ethernet from that to the TC (the ethernet socket in dock i