Any help would be appreciated.
Thanks in advance.
Vas
Here's the stack trace.
------------------------------------------
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleStatement
at java.lang.Class.getMethods0(Native Method)
at java.lang.Class.getMethods(Class.java:737)
at weblogic.rmi.utils.Utilities.getRemoteMethods(Utilities.java:382)
at weblogic.rmi.internal.StubGenerator.<init>(StubGenerator.java:79)
at weblogic.rmi.internal.StubGenerator.<init>(StubGenerator.java:60)
at weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:637)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:656)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:651)
at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:59)
at weblogic.common.internal.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:249)
at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:134)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectStreamClass.invokeMethod(ObjectStreamClass.java:1610)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:388)
at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2258)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:514)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1407)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:140)
at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:91)
at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:56)
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:161)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:128)
at weblogic.jdbc.common.internal.RmiDataSource_WLStub.getConnection(Unknown Source)
at com.actiontech.jmetro.server.core.DBSession.executeQuery(DBSession.java:109)
at com.actiontech.jmetro.server.query.NamespaceMappings.loadMappings(NamespaceMappings.java:76)
at com.actiontech.jmetro.server.query.NamespaceMappings.<init>(NamespaceMappings.java:56)
at com.actiontech.jmetro.server.query.NamespaceMappings.getInstance(NamespaceMappings.java:50)
at com.actiontech.jmetro.server.query.NamespaceMappingsTest.testSave(NamespaceMappingsTest.java:21)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:360)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:246)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:146)
Make sure you have classes12.zip available for eclipse classloader. Try just
making it a part of classpath.
Regards,
Slava Imeshev
"vas pulipati" <vpul...@actiontech.com> wrote in message
news:3efb26ba$1...@newsgroups.bea.com...
vas pulipati wrote:
> Hi all,
> I have a strange problem with weblogic. I use weblogic7.0 with MS SQLServer database.
> All my jdbc related code from anywhere within my web application works without
> a problem.
> But when I try to access the database as a client using weblogic's datasource(obtained
> by JNDI lookup), I get the NoClassDefFoundError.
Would you please show me your jdbc code? Are you using our pools and datasources?
Let me see your pool definition.
thanks,
Joe
I have the jdbc driver for SQL server in eclipse classpath.
Thanks a lot for the help.
Vas
>..java:146)
>>
>>
>
>
<JDBCConnectionPool CapacityIncrement="2"
DriverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
InitialCapacity="4" LoginDelaySeconds="1"
Name="MyJDBC Connection Pool" Password="{3DES}WBgxI691AWU="
PreparedStatementCacheSize="10"
Properties="user=jmetro;database=jmetro" RefreshMinutes="1"
SupportsLocalTransaction="true" Targets="myserver"
TestTableName="AW_PROCESS" URL="jdbc:microsoft:sqlserver://localhost:1433;selectMethod=cursor"/>
<JDBCTxDataSource JNDIName="JMetroJDBCDataSource"
Name="MyJDBC Tx Data Source" PoolName="MyJDBC Connection Pool" Targets="myserver"/>
Its hard present the jdbc code here as its spread over multiple classes.
Basically I use an abstraction class DBSession that looks for data source
by JNDI name 'JMetroJDBCDataSource', gets connection with getConnection()
call on the data source, and uses it to execute statements.
conn = ds.getConnection(); // ds is obtained by JNDI lookup
stmt = conn.createStatement();
rs = stmt.executeQuery(sqlString);
Thanks
Thanks again for you help. The response was much quicker than I expected.
I have another unresolved jdbc/weblogic problem, I'll post it here soon with all
the stack trace.
Vas
"Slava Imeshev" <ime...@yahoo.com> wrote:
>"vas pulipati" <vpul...@actiontech.com> wrote in message
>news:3efb3910$1...@newsgroups.bea.com...
>> Excellent, it works!
>
>Glad to help.
>
>
>> So its a problem with Eclipse IDE?
>> I understand that jdbc drivers should be in eclipse's classpath as
>the
>client
>> code
>> does something with ResultSet etc.(I was wrong before)
>> But, why is eclipse looking for Oracle classes? My database is SQL
>Server,
>and
>
>It's because weblogic stubs refere to oracle classes.
>
>> I have the jdbc driver for SQL server in eclipse classpath.
>
>Regards,
>
>Slava Imeshev
>
>
Does weblogic internally use classes12.zip no matter what database you use?
Thanks
Joseph Weinstein <joe.rem...@bea.com.remove_this> wrote:
>Ok, is there any oracle stuff defined in your config.xml?
>What version of 7.0? sp2?
>thanks,
>Joe
Glad to help.
> So its a problem with Eclipse IDE?
> I understand that jdbc drivers should be in eclipse's classpath as the
client
> code
> does something with ResultSet etc.(I was wrong before)
> But, why is eclipse looking for Oracle classes? My database is SQL Server,
and
It's because weblogic stubs refere to oracle classes.
> I have the jdbc driver for SQL server in eclipse classpath.
Regards,
Slava Imeshev
Slava Imeshev wrote:
> "vas pulipati" <vpul...@actiontech.com> wrote in message
> news:3efb5688$1...@newsgroups.bea.com...
> > I guess the mistery here is why do weblogic stubs use Oracle jdbc classes?
> > As you can see there's person from BEA trying to resolve this, so lets
> hope we
> > get this clear very soon.
>
> Remote client gets SerialResultSet. This guy implements oracle's
> OracleResultSet. In order to load this class client classloader must
> have OracleResultSet. This class resides in classes12.zip.
>
> I don't think this "issue" can be resolved at the vesion of weblogic
> you've got.
Yep. Slava has it right on the button. For 7.X, you are going to need
some verson of the oracle driver in the client classpath, in order to
use our RMI driver for any DBMS at the WLS!
Joe
>
>
> Regards,
>
> Slava Imeshev
Remote client gets SerialResultSet. This guy implements oracle's
OracleResultSet. In order to load this class client classloader must
have OracleResultSet. This class resides in classes12.zip.
I don't think this "issue" can be resolved at the vesion of weblogic
you've got.
Regards,
Slava Imeshev
Vas
vas pulipati wrote:
> Thanks for the clarification.
> Is this true in later versions as well? Can you please confirm?
8.1 removes this restriction. In fact, could make a tiny jar that would suffice
instead of the whole oracle driver... Let me know if that helps...
Joe
Thanks a lot for all the help.
They are trying to use the OracleThinClob interface and rmi extensions to work with CLOBs.
===
The method, getChars should return a character array for us to use.
However, when trying to use this method, the following error occurs.
Exception occured, first catch
blockweblogic.rmi.extensions.RemoteRuntimeExcepti
on: Unexpected Exception - with nested exception:
[java.rmi.ServerError: A error occurred the server; nested exception is:
java.lang.AbstractMethodError:
weblogic.jdbc.rmi.internal.OracleTClobImpl_
weblogic_jdbc_wrapper_Clob_oracle_sql_CLOB.getChars(JI)[C]
It seems as if this method is still defined as abstract. How do we read(get
data out) the objects cast to this interface?
===
Could this happen if they simply forgot to add an import statement?
Thanks,
Wayne Scott
"Wayne W. Scott" wrote:
> I am working with a customer on an issue that has a slight twist to this.
>
> They are trying to use the OracleThinClob interface and rmi extensions to work with CLOBs.
>
> ===
>
> The method, getChars should return a character array for us to use.
>
> However, when trying to use this method, the following error occurs.
Could you show me the full serverside SQLException stacktrace? It would be
in the jdbc.log file.
thanks,
Joe