Connection Pool using weblogic.jdbc.pool.Driver
I am trying to use connection pooling in my JSP data access classes (which
work fine without connection pooling) on weblogic 4.5.1. I tried using the
weblogic.jdbc.pool.Driver but it exits with the following exception:
java.lang.ClassNotFoundException: weblogic.jdbc.pool.Driver
The path c:\weblogic\classes which contains this driver is specified in the
weblogic.class.path . I can not include it in the java class path because
then weblogic server fails to start at all (with an error message). I would
appreciate any help !
Thanks,
Usamah
Hi. Please don't repost identical posts to different news groups. See a response
in the JDBC group. thanks, joe
Usamah Malik wrote:
I am trying to use connection pooling in my JSP data access classes (which
work fine without connection pooling) on weblogic 4.5.1. I tried using the
weblogic.jdbc.pool.Driver but it exits with the following exception:
java.lang.ClassNotFoundException: weblogic.jdbc.pool.Driver
The path c:\weblogic\classes which contains this driver is specified in the
weblogic.class.path . I can not include it in the java class path because
then weblogic server fails to start at all (with an error message). I would
appreciate any help !
Thanks,
Usamah--
PS: Hey folks, we're hiring Java engineers for our WebLogic
Engineering group in downtown S.F. Send me your resume.
The Weblogic Application Server from BEA
JavaWorld Editor's Choice Award: Best Web Application Server
Java Developer's Journal Editor's Choice Award: Best Web Application Server
Crossroads A-List Award: Rapid Application Development Tools for Java
Intelligent Enterprise RealWare: Best Application Using a Component Architecture
http://weblogic.beasys.com/press/awards/index.htm
Similar Messages
-
Can't create connection pool using weblogic 6.1 with Oracle thin driver
Hi !
I have tried to create a connection pool from adminconsole. My CLASSPATH setting
is as follows :
F:\SOAP\soap-2_2\lib;F:\SOAP\soap-2_2;
D:\Oracle\Ora81\jdbc\lib\classes12.zip;
D:\Oracle\Ora81\jdbc\lib\nls_charset12.zip;
D:\Oracle\Ora81\jdbc\lib\classes111.zip;
F:\SOAP\soap-2_2\lib\jaf-1.0.1\activation.jar;
D:\Oracle\Ora8\Apache\Jsdk\src\javax\servlet\http;
D:\Oracle\Ora81\Apache\Jsdk\src\javax\servlet;
D:\Oracle\Ora81\lib;
F:\ant\jakarta-ant1.\bin;
E:\weblogic\oci\classes;
E:\weblogic\oci\classes\weblogic\xml\license;
E:\weblogic\oci\license;
E:\bea\wlserver6.1\lib;
E:\PetStoreHome\petstore1.3;
Following is the configuration.
#Oracle thin driver Method #2
weblogic.jdbc.connectionPool.thin=\
url=jdbc:oracle:thin:@test:1521:PROJECT,\
driver=oracle.jdbc.driver.OracleDriver,\
initialCapacity=4,\
maxCapacity=10,\
capacityIncrement=1,\
props=user=xxx;password=xxx;server=test
#Add a TXDataSource for the connection pool:
weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.thin=thin
# Add an ACL for the connection pool:
weblogic.allow.reserve.weblogic.jdbc.connectionPool.thin=everyone
I did append the file weblogic.properties with the above config. Now when I start
the Weblogic server I get the following error :
Starting WebLogic Server ....
<Nov 29, 2001 2:24:16 PM EST> <Notice> <Management> <Loading configuration file
.\config\petstore\config.xml ...>
<Nov 29, 2001 2:24:22 PM EST> <Notice> <WebLogicServer> <Starting WebLogic Admin
Server "petstoreServer" for domain "petstore">
<Nov 29, 2001 2:24:26 PM EST> <Notice> <Management> <Starting discovery of Manag
ed Server... This feature is on by default, you may turn this off by passing -Dw
eblogic.management.discover=false>
<Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
weblogic.common.ResourceException: DataSource(jdbcthin.SignOnDB) can't be creat
ed with non-existent Pool (connection or multi) (thin)>
<Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
weblogic.common.ResourceException: DataSource(jdbcthin.EstoreDB) can't be creat
ed with non-existent Pool (connection or multi) (thin)>
<Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
weblogic.common.ResourceException: DataSource(jdbcthin.InventoryDB) can't be
cr
eated with non-existent Pool (connection or multi) (thin)>
<Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
weblogic.common.ResourceException: DataSource(weblogic.jdbc.jts.thin) can't be
created with non-existent Pool (connection or multi) (thin)>
<Nov 29, 2001 2:24:41 PM EST> <Notice> <Management> <Application Poller not star
ted for production server.>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
After the server has booted, your browser should
automatically launch and point to the WebLogic Server
Tour running on this server. If your browser fails to
launch, point your browser to the URL
"http://burtsun:7001"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <ListenThread listening
on port 7001>
<Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <SSLListenThread listeni
ng on port 7002>
<Nov 29, 2001 2:24:42 PM EST> <Notice> <WebLogicServer> <Started WebLogic Admin
Server "petstoreServer" for domain "petstore" running in Production Mode>
Could anyone please help me ?
Thanks
..MadhuriMadhuri wrote:
>
Hi Joe !
I didn't get what you would like to point out. Actully, I am using same config.,
but not to disclose the info. I gave you @test and username/password xxx/xxx.Ok. Now, assuming your pool looks like what I showed, the issue is probably
that there are multiple Oracle driver zips around, and your standlaone program
is using a different, newer, better one than the server. Our weblogic jar files
include a classes12.zip Oracle thin driver, but there are multiple versions of
classes12.zip, and the latest from oracle is better than the one we sealed into
our packaging. Please use jave -verbose to identify exactly which Oracle sip file
you are using in the successful case, then make sure this zip file comes before
any weblogic stuff in your weblogic server's classpath, so we'll use the same
driver. This should work. Edit the script you sue to start weblogic to verify
the classpath does end up with the oracle driver ahead of all weblogic stuff.
Joe
>
Please let me know.
Thanks
.Madhuri
Joseph Weinstein <[email protected]> wrote:
Madhuri wrote:
Hi Joe !
Here is the sample java code. Please let me know how I can test thisin weblogic
6.1.
Thanks
.MadhuriWell fine! That was easy. Your pool definition didn't have the same URL
or
user or password as this code. Try this for your pool definition:
weblogic.jdbc.connectionPool.thin=\
url=jdbc:oracle:thin:@adl-gbsdevel:1521:PROJECT,\
driver=oracle.jdbc.driver.OracleDriver,\
initialCapacity=10,\
maxCapacity=10,\
capacityIncrement=1,\
testConnsOnReserve=true,\
testTable=dual,\
props=user=mkelkar;password=mkelkar
Let me know,,,
Joe
Joseph Weinstein <[email protected]> wrote:
The key is in the log:
Could not create pool connection.
The DBMS driver exception was:
java.sql.SQLException: invalid arguments in call
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
Now we need to simplify the problem. Please make a simple 15-line
standalone
Java program like you'd find with the Oracle driver's examples, with
no
weblogic code in the picture. Just make a JDBC connection using Oracle's
driver, and show me that code. Then I can translate that into a pool
definition.
Joe
Madhuri wrote:
Hi Joe !
Thanks for your prompt reply. I tried the way you suggested but
it
still it gives
me the same error. I am attching here the weblogic.log file.
Thanks again
..Madhuri
Joseph Weinstein <[email protected]> wrote:
We'd want to see the log during booting, where the pool
is being created to see why that failed. Try a pool
definition with no blank lines, no whitespace at the
end of lines, and no server property. The thin driver
doesn't like that:
weblogic.jdbc.connectionPool.thin=\
url=jdbc:oracle:thin:@test:1521:PROJECT,\
driver=oracle.jdbc.driver.OracleDriver,\
initialCapacity=4,\
maxCapacity=10,\
capacityIncrement=1,\
props=user=xxx;password=xxx
Joe
Madhuri wrote:
Hi !
I have tried to create a connection pool from adminconsole. My
CLASSPATH
setting
is as follows :
F:\SOAP\soap-2_2\lib;F:\SOAP\soap-2_2;
D:\Oracle\Ora81\jdbc\lib\classes12.zip;
D:\Oracle\Ora81\jdbc\lib\nls_charset12.zip;
D:\Oracle\Ora81\jdbc\lib\classes111.zip;
F:\SOAP\soap-2_2\lib\jaf-1.0.1\activation.jar;
D:\Oracle\Ora8\Apache\Jsdk\src\javax\servlet\http;
D:\Oracle\Ora81\Apache\Jsdk\src\javax\servlet;
D:\Oracle\Ora81\lib;
F:\ant\jakarta-ant1.\bin;
E:\weblogic\oci\classes;
E:\weblogic\oci\classes\weblogic\xml\license;
E:\weblogic\oci\license;
E:\bea\wlserver6.1\lib;
E:\PetStoreHome\petstore1.3;
Following is the configuration.
#Oracle thin driver Method #2
weblogic.jdbc.connectionPool.thin=\
url=jdbc:oracle:thin:@test:1521:PROJECT,\
driver=oracle.jdbc.driver.OracleDriver,\
initialCapacity=4,\
maxCapacity=10,\
capacityIncrement=1,\
props=user=xxx;password=xxx;server=test
#Add a TXDataSource for the connection pool:
weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.thin=thin
# Add an ACL for the connection pool:
weblogic.allow.reserve.weblogic.jdbc.connectionPool.thin=everyone
I did append the file weblogic.properties with the above config.
Now
when I start
the Weblogic server I get the following error :
Starting WebLogic Server ....
<Nov 29, 2001 2:24:16 PM EST> <Notice> <Management> <Loading
configuration
file
\config\petstore\config.xml ...>
<Nov 29, 2001 2:24:22 PM EST> <Notice> <WebLogicServer> <Starting
WebLogic
Admin
Server "petstoreServer" for domain "petstore">
<Nov 29, 2001 2:24:26 PM EST> <Notice> <Management> <Starting
discovery
of Manag
ed Server... This feature is on by default, you may turn this
off
by
passing -Dw
eblogic.management.discover=false>
<Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
Source
creation:
weblogic.common.ResourceException: DataSource(jdbcthin.SignOnDB)
can't
be creat
ed with non-existent Pool (connection or multi) (thin)>
<Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
Source
creation:
weblogic.common.ResourceException: DataSource(jdbcthin.EstoreDB)
can't
be creat
ed with non-existent Pool (connection or multi) (thin)>
<Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
Source
creation:
weblogic.common.ResourceException: DataSource(jdbcthin.InventoryDB)can't be
cr
eated with non-existent Pool (connection or multi) (thin)>
<Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
Source
creation:
weblogic.common.ResourceException: DataSource(weblogic.jdbc.jts.thin)can't be
created with non-existent Pool (connection or multi) (thin)>
<Nov 29, 2001 2:24:41 PM EST> <Notice> <Management> <Application
Poller
not star
ted for production server.>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
After the server has booted, your browser should
automatically launch and point to the WebLogic Server
Tour running on this server. If your browser fails to
launch, point your browser to the URL
"http://burtsun:7001"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <ListenThreadlistening
on port 7001>
<Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <SSLListenThreadlisteni
ng on port 7002>
<Nov 29, 2001 2:24:42 PM EST> <Notice> <WebLogicServer> <Started
WebLogic
Admin
Server "petstoreServer" for domain "petstore" running in ProductionMode>
Could anyone please help me ?
Thanks
..Madhuri
Name: weblogic.log
weblogic.log Type: Text Document (application/x-unknown-content-type-txtfile)
Encoding: base64
Name: PrintColumns.java
PrintColumns.java Type: Visual Cafe File (application/x-unknown-content-type-VisualCafeFile.Document)
Encoding: base64 -
What jar contains weblogic.jdbc.pool.Driver connection pool class?
Hi all,
I am trying to use the JDeveloper IDE to generate code that I'll deploy on WebLogic
6.1.
I want to add the necessary files to the JDeveloper classpath so that during development
it can use my
weblogic connection pool. I've looked all over and can't seem to find it. It's
not in weblogic.jar. Anyone know
what file contains weblogic.jdbc.pool.Driver?
Thanks in advance,
NormThanks. I don't know how I missed it in the first place.
"Sree Bodapati" <[email protected]> wrote:
weblogic.jar
sree
"Norm Heske" <[email protected]> wrote in message
news:3ba246c2$[email protected]..
Hi all,
I am trying to use the JDeveloper IDE to generate code that I'll deployon
WebLogic
6.1.
I want to add the necessary files to the JDeveloper classpath so thatduring development
it can use my
weblogic connection pool. I've looked all over and can't seem to findit.
It's
not in weblogic.jar. Anyone know
what file contains weblogic.jdbc.pool.Driver?
Thanks in advance,
Norm -
Hello,
In my servelts only sometime I get this exception. I am using WLS7.0 jDK
1.3.1(the one which comes with WLS7.0). I am using Java Beans which are all
serializable.(I have declared that the classes implements Serilizable)
Exception is as follows
<Jan 27, 2003 4:19:09 AM EST> <Error> <HTTP Session> <triton>
<AccupacServer> <ExecuteThread: '8' for queue: 'default'> <kernel identity>
<> <100028> <Could not deserialize session data>
java.io.NotSerializableException: weblogic.jdbc.pool.Connection
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1822)
at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:475)
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1209)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
at
weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:9
1)
at
weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:6
6)
at
weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.ja
va:570)
at
weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.ja
va:552)
at
weblogic.servlet.internal.session.SessionData.remove(SessionData.java:734)
at
weblogic.servlet.internal.session.MemorySessionContext.invalidateSession(Mem
orySessionContext.java:51)
at
weblogic.servlet.internal.session.SessionContext$SessionInvalidator$Invalida
tionAction.run(SessionContext.java:523)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:744)
at
weblogic.servlet.internal.session.SessionContext$SessionInvalidator.cleanupE
xpiredSessions(SessionContext.java:444)
at
weblogic.servlet.internal.session.SessionContext.deleteInvalidSessions(Sessi
onContext.java:81)
at
weblogic.servlet.internal.session.SessionContext$SessionInvalidator.trigger(
SessionContext.java:392)
at
weblogic.time.common.internal.ScheduledTrigger.run(ScheduledTrigger.java:181
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:744)
at
weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigg
er.java:167)
at
weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java
:161)
at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:38)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
Any help appreciated.
Thanks
Madhu
Hello,
In my servelts only sometime I get this exception. I am using WLS7.0 jDK
1.3.1(the one which comes with WLS7.0). I am using Java Beans which are all
serializable.(I have declared that the classes implements Serilizable)
Exception is as follows
<Jan 27, 2003 4:19:09 AM EST> <Error> <HTTP Session> <triton>
<AccupacServer> <ExecuteThread: '8' for queue: 'default'> <kernel identity>
<> <100028> <Could not deserialize session data>
java.io.NotSerializableException: weblogic.jdbc.pool.Connection
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1822)
at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:475)
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1209)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
at
weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:9
1)
at
weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:6
6)
at
weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.ja
va:570)
at
weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.ja
va:552)
at
weblogic.servlet.internal.session.SessionData.remove(SessionData.java:734)
at
weblogic.servlet.internal.session.MemorySessionContext.invalidateSession(Mem
orySessionContext.java:51)
at
weblogic.servlet.internal.session.SessionContext$SessionInvalidator$Invalida
tionAction.run(SessionContext.java:523)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:744)
at
weblogic.servlet.internal.session.SessionContext$SessionInvalidator.cleanupE
xpiredSessions(SessionContext.java:444)
at
weblogic.servlet.internal.session.SessionContext.deleteInvalidSessions(Sessi
onContext.java:81)
at
weblogic.servlet.internal.session.SessionContext$SessionInvalidator.trigger(
SessionContext.java:392)
at
weblogic.time.common.internal.ScheduledTrigger.run(ScheduledTrigger.java:181
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:744)
at
weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigg
er.java:167)
at
weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java
:161)
at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:38)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
Any help appreciated.
Thanks
Madhu
-
ClassNotFoundException: weblogic/jdbc/pool/Driver
Hi,
I was able to run the sql example in the jsp\tagext directory.
The ConnectionTag tag contains basically code like:
Class.forName("weblogic.jdbc.pool.Driver").newInstance();
which works fine.
Next, I moved the code into a utility package, which I
compiled into the public_html\WEB-INF\classes directory. This
code is called from within a servlet.
Strangely enough, when I run the servlet, I get the
ClassNotFoundException: weblogic/jdbc/pool/Driver error.
It is as if the servlet does not have access to the
weblogic.jdbc.pool.Driver class while the tag library does.
What am I doing wrong?
Thanks,
Vladimir
You must include the path to jdbc driver in the script wich you start the
server.
WEBLOGIC_CLASSPATH
vladimir <[email protected]> escribió en el mensaje de noticias
39bcdf0c$[email protected]..
>
> Hi,
>
> I was able to run the sql example in the jsp\tagext directory.
> The ConnectionTag tag contains basically code like:
>
> Class.forName("weblogic.jdbc.pool.Driver").newInstance();
>
> which works fine.
>
> Next, I moved the code into a utility package, which I
> compiled into the public_html\WEB-INF\classes directory. This
> code is called from within a servlet.
>
> Strangely enough, when I run the servlet, I get the
> ClassNotFoundException: weblogic/jdbc/pool/Driver error.
> It is as if the servlet does not have access to the
> weblogic.jdbc.pool.Driver class while the tag library does.
>
> What am I doing wrong?
>
> Thanks,
> Vladimir
>
-
Repost: ClassNotFoundException: weblogic/jdbc/pool/Driver
Hi,
I was able to run the sql example in the jsp\tagext directory. The ConnectionTag tag contains basically code like:
Class.forName("weblogic.jdbc.pool.Driver").newInstance();
which works fine.
Next, I moved the code into a utility package, which I compiled into the public_html\WEB-INF\classes directory. This code is called from within a servlet.
Strangely enough, when I run the servlet, I get the ClassNotFoundException: weblogic/jdbc/pool/Driver error. It is as if the servlet does not have access to the weblogic.jdbc.pool.Driver class while the tag library does.
What am I doing wrong?
Thanks, Vladimir
Hi,
I was able to run the sql example in the jsp\tagext directory. The ConnectionTag tag contains basically code like:
Class.forName("weblogic.jdbc.pool.Driver").newInstance();
which works fine.
Next, I moved the code into a utility package, which I compiled into the public_html\WEB-INF\classes directory. This code is called from within a servlet.
Strangely enough, when I run the servlet, I get the ClassNotFoundException: weblogic/jdbc/pool/Driver error. It is as if the servlet does not have access to the weblogic.jdbc.pool.Driver class while the tag library does.
What am I doing wrong?
Thanks, Vladimir
-
We are trying to use the Oracle supplied JDBC thin driver directly from within a jar file we add for our application.
The classes in the jar file directly connect to an oracle database via the thin driver.
The problem we've encountered is that if the JDBC Connection object is held in memory, after some time, the connection times out for no reason.
Is there some restriction with weblogic in connecting directly to database from a class file and then caching the connection reference? It almost seems as if weblogic is severing the connections.
thank you,
BJStefan,
You are right, although I would recommend just having the
TestConnectionOnReserve= true and the testTableName set. Refresh Minutes
becomes kind of redundent when you set these values.
TestConnsOnReserve allows the server to verify if a connection that the
client/application has requested is good , otherwise it recreates this
connection and gives it to the client/application.
hth
sree
"Stefan" <[email protected]> wrote in message
news:[email protected]...
Hi Sree,
If instead a WL connection pool would be used this issue could be solved
using
"Refresh Period" and TestTableName right? In this case the connection would
be
alive as long as WL server is up. As a bonus we would have an automatic
reconnection
after an Oracle server reboot?
thanks, stefan
"Sree Bodapati" <[email protected]> wrote:
Hi BJ,
When you get connection directly using the Oracle thin driver, this is
for
sure your database timing out the connection when no activity is detected
for sometime. You should consult with your DBA to ensure this timeout
is set
to a higher value at the server or ensure you dont hold on to theconnection
for long durations or ensure you handle this situation by triggering
a
generic oracle process so that you periodically keep the connection busy
to
ensure that the database does not close it.
This shouldnt be anything to do with WebLogic as you dont seem to be
using
WebLogic connection pool.
hth
sree
"BJ Choi" <bongjin.choi@neoforma> wrote in message
news:[email protected]...
We are trying to use the Oracle supplied JDBC thin driver directly from
within a jar file we add for our application.
The classes in the jar file directly connect to an oracle database via
the
thin driver.
The problem we've encountered is that if the JDBC Connection object is
held
in memory, after some time, the connection times out for no reason.
Is there some restriction with weblogic in connecting directly to database
from a class file and then caching the connection reference? It almost
seems
as if weblogic is severing the connections.
thank you,
BJ -
Connect SQL2000 using weblogic 6.1
Hi,
I am a new to java.
Does anyone can tell me how to connect sql2000 using weblogic 6.1 ?
WilsonThanks !!
"Slava Imeshev" <[email protected]> wrote in message
news:[email protected]..
Hi Wilson,
You need to take path containing spaces into quotes i.e
"C:\Program Files\Microsoft SQL Server 2000 Driver for
JDBC\lib\msbase.jar";
Slava
"Wilson" <[email protected]> wrote in message
news:[email protected]..
I want to setup a connection pool using ms JDBC driver and what i done
are
I have set the class path in startWebLogic.cmd
set CLASSPATH=C:\Program Files\Microsoft SQL Server 2000 Driver for
JDBC\lib\msbase.jar;
C:\Program Files\Microsoft SQL Server 2000 Driver for
JDBC\lib\mssqlserver.jar;
C:\Program Files\Microsoft SQL Server 2000 Driver for
JDBC\lib\msutil.jar;
.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar
and
<JDBCConnectionPool
Name="MyJDBC Connection Pool"
Targets="jdbctest"
URL="jdbc:microsoft:sqlserver://sqlsvr01:1433"
DriverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
InitialCapacity="1"
MaxCapacity="1"
CapacityIncrement="1"
Password=""
Properties="user=sa;server=qa75"
/>
but I get these error :
<2002/12/10 ??10?17?31?> <Error> <JDBC> <Cannot startup connection pool"My
JDBC Connection Pool" Cannot load driver class:
com.microsoft.jdbc.sqlserver.SQL
ServerDriver>
Thanks in advance.
Wilson
"Joseph Weinstein" <[email protected]> wrote in message
news:[email protected]..
Wilson wrote:
Hi,
I am a new to java.
Does anyone can tell me how to connect sql2000 using weblogic 6.1 ?
WilsonFrom what sort of code you you want to connect? Do read our onlinedocumentation
on connection pools. You can tell our pool system what JDBC driver youwant to use,
and the arguments it needs, and then we'll make a pool of connections
for
you. You should
start out with the simple JDBC driver examples.
Joe -
Java.lang.ClassNotFoundException: weblogic/jdbc/mssqlserver4/Driver
Hello,
I am moving my database from Sybase to SQL Server. I have a program that ran fine with JConnect driver (Sybase) on both unix and windows. But now when I try to use the weblogic driver to connect to SQL Server the program fails. I am 100% positive that the weblogic drive is in the classpath. Whether the weblogic drive is in the classpath or not I get the same error:
Unexpected error:java.lang.ClassNotFoundException: weblogic/jdbc/mssqlserver4/Driver
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:124)
at com.trilogy.tools.core.DBUtil.loadDriver(DBUtil.java:16)
at com.trilogy.loader.core.LoadInitUtil.<init>(Compiled Code)
at com.trilogy.loader.mass.MassInitUtil.<init>(MassInitUtil.java:15)
at com.trilogy.loader.mass.Loader2CLI.execute(Compiled Code)
at com.trilogy.tools.core.CLIBase.execute(CLIBase.java:45)
at com.trilogy.loader.mass.Loader2CLI.main(Loader2CLI.java:805)
java.lang.NullPointerException
at com.trilogy.loader.mass.Loader2CLI.execute(Compiled Code)
at com.trilogy.tools.core.CLIBase.execute(CLIBase.java:45)
at com.trilogy.loader.mass.Loader2CLI.main(Loader2CLI.java:805)
Pease help me fix this problem. I am not sure why the weblogic driver is not working. Thanks.The error message says it can't find a class named "weblogic.jdbc.mssqlserver4.Driver". That looks rather odd to me.
Are you sure that you defined the connection information correctly in the configuration file? -
Jbuilder & weblogic.jdbc.mssqlserver4.Driver
I use jbuilder8 and jdbc driver " weblogic.jdbc.mssqlserver4.Driver " to connect mssql2000..
when I use database pilot of jbuilder8 to setup a datasource..
I got an error Error " connecting to database: java.lang.NoClassDefFoundError: weblogic/version "
what should I do now ?..Do you have weblogic.jar in your CLASSPATH?
"owner" <[email protected]> wrote in message news:[email protected]..
I use jbuilder8 and jdbc driver " weblogic.jdbc.mssqlserver4.Driver " to connect mssql2000..
when I use database pilot of jbuilder8 to setup a datasource..
I got an error Error " connecting to database: java.lang.NoClassDefFoundError: weblogic/version "
what should I do now ?.. -
Sql_trace does not work for Java app using Oracle JDBC thin driver
Hi,
I'm using Oracle 8.1.7. I enabled sql trace at instance level by setting sql_trace and timed_statistics to true in init.ora. I restarted the db instance. I wrote a stand-alone java application which used Oracle JDBC thin driver(classes12.zip) to make a connection to my db instance, do some select statements, and close the connection. There were no trace files generated in the folder specified by udump_dest variable. However, if I used sqlplus or dba studio, I saw trace files generated. Has anyone got Oracle sql trace work for JDBC calls from java apps.
Thanks in advance!Hi,
I'm using Oracle 8.1.7. I enabled sql trace at instance level by setting sql_trace and timed_statistics to true in init.ora. I restarted the db instance. I wrote a stand-alone java application which used Oracle JDBC thin driver(classes12.zip) to make a connection to my db instance, do some select statements, and close the connection. There were no trace files generated in the folder specified by udump_dest variable. However, if I used sqlplus or dba studio, I saw trace files generated. Has anyone got Oracle sql trace work for JDBC calls from java apps.
Thanks in advance! -
Applet which uses the JDBC Thin driver
My applet is running from Internet Explorer(Windows NT 4.0) and uses the JDBC
Thin Driver to connect to database. The code complies with J2SDK1.4.0-beta3 and
JDBC 2.0. I am getting following error:java.lang.NoClassDefFoundError:
oracle/jdbc/driver/oracleDriver at applet.button_actionPerformed...
Can anybody help?
help urgently needed...
Best regards and thanks in advanceAFAIK the Oracle drivers still don't work with JDK 1.4, switch to 1.31 and they should be fine.
-
Share the connection pool using weblogic
I want to make shared connection with the JDBC driver, I read that the follow syntax:
jdbc:oracle:thin:<USER>/@(PROTOCOL = TCP)(HOST = <HOST>)(PORT = <PORT>)))(CONNECT_DATA = (SID = <SID>) (SERVER = SHARED)))
would let me have the JDBC connections shared with the others regular connections.
Is it true ?
Where to set such parameters in weblogic ?
I'm currently using the JDBC driver ( SERVICES->JDBC->DATA SOURCES-> connection pool (tab) ) configured in the following manner:
URL: +jdbc:bea:oracle://[dbIP]:1521+
Driver Class Name: weblogic.jdbc.oracle.OracleDriver
Properties:
user=ETL
portNumber=1521
SID=LIVDEV1
+serverName=[dbIP]+
ThanksA 'shared' connection has to do with whether the DBMS spawns a separate OS process at the DBMS end to handle every single connection, or whether it spawns fewer, letting one DBMS-side process handle multiple logically distinct user connections, at some performance cost.
Depending on the DBMS configuration and platform, this may be optional, the default, or impossible. As to clientside properties, try setting
ServerType=shared.
And just to be clear, this has nothing to do with how/whether the connection is to be used at the application end. It will
always be considered as a single logical user, not a port for multiple independent client threads to use at once.... -
No connection left in WebLogic database pool
Hi,
We have a J2EE business web application that runs in WebLogic. We noticed in application log files errors messages that seems like "No resource available in db pool", it means all the connection objects (to Oracle database) are used. Then the application is unstable and unseable.
I think the maximum number of connections configured in Weblogic pool has been reached due to an increase of users and activity. But when the workload decreases the application is still out of service. It seems connections objects are not relased to the pool. What can be the explanation for this issue ? Normally it is managed by the container (EJB3 for the business tier).
Once the limit of the pool is reached it is necessary to restart the server to solve this kind of error ?
Thanks a lot.Hi,
First:
I guess you should check with your DBA about how many allowed concurrent session of the data base connection for your user. After this, check your data source file configuration according it.
Second:
I guess you should check if your application open another session connection with data base.
e.g.
- Another file configuration opens connection without to watch and lookup your configuration in data source file;
- Another code opens JDBC directly without to watch and lookup your configuration in data source file. -
Cannot connect using oracle jdbc oci8 driver
I am using Oracle 8.1.5 JDBC oci8 driver, but when try to connect, always got ERROR: java.lang.UnsatisfiedLinkError:make_c_state
With the same code, but change to connect with thin driver, it works fine. Pls tell me the problem. Thank you.Hi,
Here is the snippet code from oracle,
// You need to import the java.sql package to use JDBC
import java.sql.*;
// We import java.io to be able to read from the command line
import java.io.*;
class JdbcCheckup
public static void main (String args [])
throws SQLException, IOException
// Load the Oracle JDBC driver
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
// Prompt the user for connect information
System.out.println ("Please enter information to test connection to the database");
String user;
String password;
String database;
user = readEntry ("user: ");
int slash_index = user.indexOf ('/');
if (slash_index != -1)
password = user.substring (slash_index + 1);
user = user.substring (0, slash_index);
else
password = readEntry ("password: ");
database = readEntry ("database (a TNSNAME entry): ");
System.out.print ("Connecting to the database...");
System.out.flush ();
System.out.println ("Connecting...");
Connection conn =
DriverManager.getConnection ("jdbc:oracle:oci8:@" + database,
user, password);
System.out.println ("connected.");
// Create a statement
Statement stmt = conn.createStatement ();
// Do the SQL "Hello World" thing
ResultSet rset = stmt.executeQuery ("select 'Hello World' from dual");
while (rset.next ())
System.out.println (rset.getString (1));
System.out.println ("Your JDBC installation is correct.");
// close the resultSet
rset.close();
// Close the statement
stmt.close();
// Close the connection
conn.close();
// Utility function to read a line from standard input
static String readEntry (String prompt)
try
StringBuffer buffer = new StringBuffer ();
System.out.print (prompt);
System.out.flush ();
int c = System.in.read ();
while (c != '\n' && c != -1)
buffer.append ((char)c);
c = System.in.read ();
return buffer.toString ().trim ();
catch (IOException e)
return "";
This code can be run without specifying a TNSNAME connection string, as the oci8 jdbc driver will take localhost as default.
OR
Only specifying the TNSNAME is enough, i.e. edit %ORACLE_HOME%\network\ADMIN\TNSNAMES.ORA file and locate the XXXXX.WORLD entry in the file. This is the TNSNAME entry referred to.
Without TNSNAME entry you can re-run,
%ORACLE_HOME%\jdbc\demo\samples\oci8\basic-samples> java JdbcCheckup
Please enter information to test connection to the database
user: system
password: manager
database (a TNSNAME entry):
Connecting to the database...Connecting...
connected.
Hello World
Your JDBC installation is correct.
Hope that helps.
Best Luck!
Senthil Babu J
Maybe you are looking for
-
Is there a solution to extreme congestion?
At our office building, there are approximately 150 businesses, all of them small, the majority of which are using wireless for their internet access, and I would venture to guess that a majority of those are using airports. My company was using an A
-
API JNA e Threads - FORZEN WINDOW
I'm creating one aplication JAVA DESKTOP for open the WEBCAM USB or NATIVE. I'm using JNA for open library native windows avicap.dll My system operation is Windows 7 I have 3 interfaces: One have name MapHWND package interf; import com.sun.jna.FromNa
-
Printing payslip in smartforms
Dear all, Can anyone tell me how to print an employee's payslip in smartforms? I need to know how to fetch a payslip and display it on a smartform. Any help will be greatly appreciated. regards, Hamza
-
Windows 8.1 does not launch ITunes when i plug my iPhone. Options Automatically sync when this iPhone is connected is checked and Prevent iPods, iPhones, and iPads from syncing automatically is UNchecked. I would like iTunes to launch automatically
-
Keep getting message that trial has expired, but I have a subscription
I cannot access AI. I keep getting a message that my trial has expired, but I have a subscription to creative cloud. I tried to uninstall AI , but then the Adobe Manager states that the app is still installed. What can I do