Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using Oracle thin driver with Weblogic 6.1

0 views
Skip to first unread message

Marco

unread,
Dec 3, 2001, 6:39:22 AM12/3/01
to

hi all,
i am trying to create a ConnectionPool using WLS6.1 and Oracle 8.0.5.
Since i cannot use the weblogic driver (due to the old version of oracle that
i have)
i am trying to use instead the oracle thin driver.
i configured my pool as follows:
URL jdbc:oracle:th...@127.0.0.1:1521:ORC1
Driver oracle.jdbc.Driver.OracleDriver
Propeties user=SCOTT


when i try to assing the created pool to a server (using the 'Target' link),
i always got this exception

weblogic.management.DeploymentException: Error creating connection pool - with
n
ested exception:
[weblogic.common.ResourceException: Cannot load driver class: oracle.jdbc.Driver
OracleDriver]
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:110)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:144)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:608)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
java:592)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:352)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBean
s(ConfigurationMBeanImpl.java:484)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:354)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
at $Proxy7.addDeployment(Unknown Source)
at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(Dynam
icMBeanImpl.java:1448)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBe
anImpl.java:858)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBe
anImpl.java:810)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(Conf
igurationMBeanImpl.java:288)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.j
ava:1356)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.j
ava:1331)
at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:
303)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy75.setTargets(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.console.info.FilteredMBeanAttribute.doSet(Filtere
dMBeanAttribute.java:89)
at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(D
oEditMBeanAction.java:116)
at weblogic.management.console.actions.internal.ActionServlet.doAction(A
ctionServlet.java:167)
at weblogic.management.console.actions.internal.ActionServlet.doPost(Act
ionServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.management.DistributedOperationUpdateException: Error creating connecti
on pool - with nested exception:
[weblogic.management.DeploymentException: Error creating connection pool - with
nested exception:
[weblogic.common.ResourceException: Cannot load driver class: oracle.jdbc.Driver
OracleDriver]]
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBean
s(ConfigurationMBeanImpl.java:494)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:354)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
55)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
23)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:44>

However, i set the CLASSPATH & PATH of my startWebLogic.cmd as follows:

set PATH=c:\orant\bin;d:\bea\wlserver6.1\bin\oci817_8;.\bin;%PATH%

set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;.\samples\eval\cloudscape\lib\cloudscape.jar;.\config\examples\serverclasses;c:\orant\jdbc\lib\classes111.zip


AND, i have written a small program that uses JDBC (without weblogic) to query
a table
on the Oracle (using the pool's URL in the properties for getting the Connection

conn = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:ORC1", "scott",
"tiger");
)

and that program works fine.

Can anyone tell me what is wrong?? it seems that everything is in order (with
respect to CLASSPATH, PATH etc..)

hope someone can solve my problem

thanx and regards
marco

Sree Bodapati

unread,
Dec 3, 2001, 9:24:57 AM12/3/01
to
You have to place the classes11.zip file in the beginning of the classpath.

/
sree

"Marco" <marco.m...@nokia.com> wrote in message
news:3c0b646a$1...@newsgroups.bea.com...

Marco

unread,
Dec 4, 2001, 3:33:50 AM12/4/01
to

Hi Sree,

>You have to place the classes11.zip file in the beginning of the classpath.

i did it. my CLASSPATH is now
CLASSPATH=c:\orant\jdbc\lib\classes111.zip;.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;.\samples\eval\cloudscape\lib\cloudscape.jar;.\config\examples\serverclasses

But now, when i assign the target, the exception is:

--------------- nested within: ------------------
weblogic.management.DistributedOperationUpdateException: Error creating connecti
on pool - with nested exception:
[weblogic.management.DeploymentException: Error creating connection pool - with
nested exception:

[weblogic.common.ResourceException: weblogic.common.ResourceException:
Could not create pool connection. The DBMS driver exception was:
java.sql.SQLException: Sub Protocol must be specified in connection URL
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:352)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:102)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:192)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:134)
at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
cator.java:698)
at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
ava:282)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
ava:629)
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)

at $Proxy8.addDeployment(Unknown Source)
at weblogic.management.internal.DynamicMB>

what is SubProtocol???

my ConnectionPool is configured as follows:

Name: MyJDBC Connection Pool


URL : jdbc:oracle:th...@127.0.0.1:1521:ORC1

Driver: oracle.jdbc.driver.OracleDriver
Properties: user=SCOTT

Password : tiger

can u help me???

thanx in advance and regards

marco

Sree Bodapati

unread,
Dec 4, 2001, 11:20:20 AM12/4/01
to
your url should be

jdbc:oracle:thin:@127.0.0.1:1521:ORC1

notice the ':' before the '@'.

/
sree

"Marco" <marco.m...@nokia.com> wrote in message

news:3c0c8a6e$1...@newsgroups.bea.com...

0 new messages