JDBC connection pools problems: weblogic doesn't release connections
Hi all,
we use Weblogic 5.1 in conjunction with Content Server 3.6 and Oracle
8.1.6;
We have this strange problem:
Calling a page the connections, in the content server connection pool,
grows up till the maximum. We think the problem is that Weblogic
doesn't release used connections.
Does anybody can help us? Did anybody had the same problem?
Best Regards,
Marcello Villani
Hi. I'd have to see the code. When a pool connection is closed, it gets
back into the pool. Until it's closed, it doesn't.
Marcello Villani wrote:
Hi all,
we use Weblogic 5.1 in conjunction with Content Server 3.6 and Oracle
8.1.6;
We have this strange problem:
Calling a page the connections, in the content server connection pool,
grows up till the maximum. We think the problem is that Weblogic
doesn't release used connections.
Does anybody can help us? Did anybody had the same problem?
Best Regards,
Marcello Villani
Similar Messages
-
JDBC Connector Pool problem?
I deployed my app to Sun App Server 8.2 and keep getting this error sequence:[#|2007-09-06T16:45:27.421-0400|INFO|sun-appserver-pe8.2|javax.enterprise.resource.resourceadapter|_ThreadID=18;|
RAR7005 : Cannot register pool from monitoring registry: null |#]
[#|2007-09-06T16:45:40.453-0400|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=17;|
WebModule[/Design_2]null
java.lang.NullPointerException
at com.sun.rave.web.ui.appbase.AbstractPageBean.afterPhase(AbstractPageBean.java:147)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:441)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:235)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at sun.reflect.GeneratedMethodAccessor456.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
|#]The documentation says this is an internal server error and that I should notify Sun, but I'm not sure how to do that.
One thing I noticed is that none of the connections to MySQL get released. So I eventually run out of connections. (I plan to operationally deploy to Tomcat, so I hope this problem doesn't migrate there.)
Has anyone else encountered this problem?If I explicitly open a connection, I always close close it when I am done with it. I assume code "written" by JSC does its own cleanup, which I believe it does.
Note that this is not a problem when I deploy my app to Tomcat. DB connections do no accumulate the way they do when I deploy to SunAppServer.
That's why I think it's an app server bug. -
Problem w. transaction notSupported / releasing JDBC connections
We are making a call from our EJB client to a stateless session EJB (1) with transaction attribute 'Required' for all methods. From this EJB (1) we get a JDBC connection from the pool and do some JDBC calls (no updates). We then make a call to a method in another stateles session EJB (2) with transaction attribute 'NotSupported' for all methods. In EJB2 we get a JDBC connection from the pool and do some JDBC calls (no updates). Something goes wrong and we catch a SqlException. We then throw a EJBException. So far everything is OK. But now we get a SqlException from the transaction: 'java.sql.SQLException: Connection is currently associated with xid: 970661671558_182.Rollback attempted in the scope of a different transaction'. It seems like the container tries to perform a rollback on the EJB tat doesn't support transactions. Shouldn't the transaction have been suspended when we entered the method in EJB2? Our problem is that the JDBC connection we got from the pool doesn't get released even though we closed it in a finally-statement in both EJB:s. So after some time we are out of free JDBC connections in our connection pool. Does anyone know why this happens?
/Per
We are making a call from our EJB client to a stateless session EJB (1) with transaction attribute 'Required' for all methods. From this EJB (1) we get a JDBC connection from the pool and do some JDBC calls (no updates). We then make a call to a method in another stateles session EJB (2) with transaction attribute 'NotSupported' for all methods. In EJB2 we get a JDBC connection from the pool and do some JDBC calls (no updates). Something goes wrong and we catch a SqlException. We then throw a EJBException. So far everything is OK. But now we get a SqlException from the transaction: 'java.sql.SQLException: Connection is currently associated with xid: 970661671558_182.Rollback attempted in the scope of a different transaction'. It seems like the container tries to perform a rollback on the EJB tat doesn't support transactions. Shouldn't the transaction have been suspended when we entered the method in EJB2? Our problem is that the JDBC connection we got from the pool doesn't get released even though we closed it in a finally-statement in both EJB:s. So after some time we are out of free JDBC connections in our connection pool. Does anyone know why this happens?
/Per
-
Xa-problems when releasing jdbc connection
We have a very strange problem with our WL setup.
Weblogic 8.1.4 (2 cluster nodes)
Oracle 9i stand alone db (although tested on RAC with 2 nodes)
The application architecture is quite complicated, with several EJB-applications that communicate via JMS and RMI. Everything (except logging) runs under xa-transactions that span multiple applications. We use both xa (for everything but logging) and non-xa jdbc connection pools (Oracle thin driver).
When we release a jdbc connection then the following node manager log entry is written:
<Mar 13, 2006 11:11:02 AM UTC> <Error> <JDBC> <BEA-001112> <Test "SELECT 1 FROM DUAL" set up for pool "myPoolXA" failed with exception: "oracle.jdbc.xa.OracleXAException".>
<Mar 13, 2006 11:11:02 AM UTC> <Error> <JDBC> <BEA-001035> <The following error has occured: XA operation failed : java.lang.NullPointerException
at weblogic.jdbc.wrapper.VendorXAResource.rollback(VendorXAResource.java:78)
at weblogic.jdbc.jta.DataSource.rollback(DataSource.java:1047)
at weblogic.transaction.internal.XAServerResourceInfo.rollback(XAServerResourceInfo.java:1358)
at weblogic.transaction.internal.XAServerResourceInfo.rollback(XAServerResourceInfo.java:687)
at weblogic.transaction.internal.ServerSCInfo.startRollback(ServerSCInfo.java:729)
at weblogic.transaction.internal.ServerTransactionImpl.localRollback(ServerTransactionImpl.java:1909)
at weblogic.transaction.internal.ServerTransactionImpl.globalRollback(ServerTransactionImpl.java:2592)
at weblogic.transaction.internal.ServerTransactionImpl.internalRollback(ServerTransactionImpl.java:385)
at weblogic.transaction.internal.ServerTransactionImpl.rollback(ServerTransactionImpl.java:364)
at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:279)
at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(StatelessEJBObject.java:140)
at com.xx.myapp.ejb.MessageMgmt_s1i1u8_EOImpl.processMessage(MessageMgmt_s1i1u8_EOImpl.java:56)
at com.xx.myapp.ejb.MessageMgmt_s1i1u8_EOImpl_CBV.processMessage(Unknown Source)
at com.xx.myapp.ejb.TextMessageReceiverBean.onMessage(TextMessageReceiverBean.java:120)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:370)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:262)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2678)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
As we understand the message this means that the jdbc resource wrapper crashes with a NPE.
Are there any hints on this situation ?
Regards
Nikolaus RummAdditional information:
We use Hibernate as the persistence layer. The problem arises when the application detects a business problem and calls setRollbackOnly() on the session bean's ejb context, followed by a "throw ApplicationException" (extends java.lang.Exception).
When we use unchecked exceptions for business exceptions (which violates the EJB spec) everything works fine. -
Problem when getting resultset when using connection pooling in weblogic
Hello,
I am new to database connection pooling. I am using weblogic server, Java 1.6, MySql database. I have done connection pooling in weblogic server. The problem arise when I try to run select query I cannot fetch data in ResultSet. For insert it works fine...
import java.io.Serializable;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;
public class DatabaseToText implements Serializable {
public DatabaseToText() {
super();
// TODO Auto-generated constructor stub
public static void main(String[] args) {
Connection conn;
Statement stmt;
ResultSet rs;
String str1, str2;
List l1 = new ArrayList();
try {
System.out.println("in try block");
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
prop.put(Context.PROVIDER_URL, "t3://localhost:7001");
System.out.println("properties are set ");
Context ctx = new InitialContext(prop);
System.out.println("b4 lookup(mysqljndi)");
Object obj = ctx.lookup("mysqljndi"); // java:comp/env/CPDS
System.out.println("afta lookup(mysqljndi)");
DataSource ds = (DataSource) obj;
conn = ds.getConnection();
stmt = conn.createStatement();
String query = "select * from logindb.userregister";
System.out.println("query is = " + query);
rs = stmt.executeQuery(query);
System.out.println("size of rs is :: " + rs.getFetchSize());
if (rs != null) {
while (rs.next()) {
str1 = rs.getString(0);
str2 = rs.getString(1);
System.out.println("username is :: " + str1 + "password is : " + str2);
} else {
System.out.println("no values get fetched");
ctx.close();
} catch (Exception e) {
e.printStackTrace();
OUTPUT IN CONSOLE
in try block
properties are set
b4 lookup(mysqljndi)
afta lookup(mysqljndi)
query is = select * from logindb.userregister
size of rs is :: 0
java.sql.SQLException: weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception - with nested exception:
[java.rmi.MarshalException: error marshalling return; nested exception is:
java.io.NotSerializableException: com.mysql.jdbc.ResultSet]
at weblogic.jdbc.rmi.SerialResultSet.next(SerialResultSet.java:89)
at DatabaseToText.main(DatabaseToText.java:69)
Record is getting inserted but when i use select query i cannot get the output...
Regards,This problem is solved in JDBC section of this forum
-
Weblogic 7.0 , MySQL 3.23 JDBC Connection Pools
i am using weblogic 7.0 and MySQL 3.23 and right now my objective is to create,
configure and test a JDBC
connection pool using the Administrative console.
Here is what i have done till now
- set the classpath of the MySQL driver in the startWLS.cmd like this
SET MYSQL_DRIVER=C:\mysqldriver\mysql-connector-java-2.0.14\mysql-connector-java-2.0.14-bin.jar
set CLASSPATH=%MYSQL_DRIVER%;%CLASSPATH%
- using the weblogic administrative console i have created a new connection pool
named as
testpool.
- Here is what i have in the testpool general tab
Name: testpool
URL: jdbc:mysql//localhost:3306/test (test is the name of the database in mysql)
Driver Classname: org.gjt.mm.mysql.Driver
I have not entered any Properties, ACL Name, Password or Open String Password.
- Now i go the the Testing tab and enter a name of a table in my test database
and click on Apply
and on the command window i am getting the following exception
java.sql.SQLException No suitable driver
Thanks in advance,
AshishThanks a lot Slava. After reading your mail and the post i was able to get it working.
"Slava Imeshev" <[email protected]> wrote:
Hi Ashish,
I figured out what's the problem. URL in the connection pool
definition is malformed. It's
jdbc:mysql//localhost:3306/test
while the correct one should have colon after mysql:
jdbc:mysql://localhost:3306/test
Regards,
Slava Imeshev
"Ashish Sureka" <[email protected]> wrote in message
news:[email protected]...
I am sorry, the program that i posted here is not comming properlyformatted but
i am able to run a simple java program that connects to MySQL and alsoa
servlet
that connects to the MySQL. The only problem i am having is includingthe
MySQL
driver jar files to the weblogic server classpath.
Thanks,
Ashish.
"Ashish Sureka" <[email protected]> wrote:
Hello Joseph Weinstein,
Actually, i already tried the same approach that you have mentioned
in
your reply
before i posted my message here. Following is the program that i use
to check
MySQL connection.
import java.sql.*;
public class MySQLConnect
public static void main(String[] args) throws Exception
try {
Class.forName ( "org.gjt.mm.mysql.Driver" );
System.out.println ( "MySQL Driver Found" );
} catch ( java.lang.ClassNotFoundException e ) {
System.out.println("MySQL JDBC Driver not found ... ");
throw ( e );
String url = "";
Connection con = null;
try {
url = "jdbc:mysql://" + "localhost:3306" + "/" + "test";
con = DriverManager.getConnection(url);
System.out.println("Connection established to " + url + "");
} catch ( java.sql.SQLException e ) {
System.out.println("Connection couldn't be established to " + url);
String sqlStatement = "SELECT * FROM testtable";
try {
Statement s = con.createStatement();
s.execute (sqlStatement);
s.close ( );
} catch ( SQLException e ) {
System.out.println ( "Error executing sql statement" );
con.close();
The classpath that i use to run this program is
SET PATH=C:\bea\jdk131_03\bin
SETCLASSPATH=C:\bea\jdk131_03\jre\lib\rt.jar;C:\bea\weblogic700\ebcc\lib\ext\se
rvlet.jar;C:\CSC413\Demos\HelloApp\HelloAppJAR
SET CLASSPATH=%CLASSPATH%;C:\bea\weblogic700\server\lib\weblogic.jar
SETMYSQL_DRIVER=C:\mysqldriver\mysql-connector-java-2.0.14\mysql-connector-java
-2.0.14-bin.jar
set CLASSPATH=.;%MYSQL_DRIVER%;%CLASSPATH%
I have also written a Servlet which checks the MySQL connection. For
the servlet
i added the MySQL driver jar files in the WEB-INF/lib directory ofthe
servlet
web application and it is working fine.
do you want me to attach the startWLS.cmd file that i changed to include
the MySQL
driver classpath.
Thanks for your replies,
Ashish.
Joseph Weinstein <[email protected]> wrote:
Ashish Sureka wrote:
When i start the weblogic server using the command prompt by executingthe startWLS.cmd,
i can see the classpath the server is using on the command window
and
that includes
the jar file for the MySQL driver but still it is throwing a
SQLException
and
saying that No Suitable driver.
How do i include a external library or jar file on the weblogic
server's
classpath.
is there a specific directory where i should put the MySQL driver
jar
file .
Thanks,
Ashish.No. Let's simplfy the problem. Please run a tiny standalone Java
program
that
just makes a JDBC connection to your MySQL DBMS, with no weblogic
code in the picture. When you succeed at this, show me the CLASSPATH
and
PATH of the shell that ran the program successfully, and show methe
few lines
of code that made the connection. Then we will know the problem.It
may
be that
the URL you're passing to the pool is not exactly correct for that
driver.
Joe
Joseph Weinstein <[email protected]> wrote:
Ashish Sureka wrote:
i am using weblogic 7.0 and MySQL 3.23 and right now my objective
is
to create,
configure and test a JDBC
connection pool using the Administrative console.
Here is what i have done till now
- set the classpath of the MySQL driver in the startWLS.cmd
like
this
SET
MYSQL_DRIVER=C:\mysqldriver\mysql-connector-java-2.0.14\mysql-connector-java
-2.0.14-bin.jar
set CLASSPATH=%MYSQL_DRIVER%;%CLASSPATH%
- using the weblogic administrative console i have created anew
connection
pool
named as
testpool.
- Here is what i have in the testpool general tab
Name: testpool
URL: jdbc:mysql//localhost:3306/test (test is the name of
the
database
in mysql)
Driver Classname: org.gjt.mm.mysql.Driver
I have not entered any Properties, ACL Name, Password or
Open
String
Password.
- Now i go the the Testing tab and enter a name of a table in
my
test
database
and click on Apply
and on the command window i am getting the following exception
java.sql.SQLException No suitable driverWatch the first lines that the server prints out when the script
starts
it. The script
shows the classpath that was constructed for the server. It is
likely
that you need
to do something else to ensure your driver is really in the classpath
the server uses.
Joe
Thanks in advance,
Ashish -
Jdbc connection pool for oracle problem - not creating
hi,
iam not able to connect to oraclepool, iamusing weblogic 5.1 ,i started the
server but i am able to connect oracle pool
iam getting a sqlexception as
Sat Jul 22 01:46:09 PDT 2000:<I> <JDBC Pool> Creating connection pool oraclePool
with:
{refreshMinutes=10, poolName=oraclePool, loginDelaySecs=1, testTable=dual, maxCa
pacity=10, props=user=SCOTT;password=tiger;server=DEMO, allowShrinking=true, dri
ver=weblogic.jdbc.oci.Driver, aclName=weblogic.jdbc.connectionPool.oraclePool,
c
apacityIncrement=2, initialCapacity=4, url=jdbc:weblogic:oracle, shrinkPeriodMin
s=15}
Delaying 1 seconds before making a oraclePool pool connection.
java.sql.SQLException: System.loadLibrary threw java.lang.UnsatisfiedLinkError
with the message 'no weblogicoci36 in java.library.path'.
at weblogic.jdbcbase.oci.Driver.connect(Driver.java:116)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:149)
can anyone tell me why is this happening ,thanks in advance
sanPlace the bin/oci815_5 in the weblogic installation in your path. You can set this path in
your startweblogic script. If you are on a unix environment, set this in the LD_LIBRARY path.
Shiva.
san wrote:
hi shiva,
iam using oralce8i , so what i hv to do to rectify this problem, any idea, suggestions,
san
Shiva Paranandi <[email protected]> wrote:
Your path should contain the oracle libraries and the oci815_8 directory
(if say you
are using oracle 8i).
Shiva.
san wrote:
hi,
iam not able to connect to oraclepool, iamusing weblogic 5.1 ,i startedthe
server but i am able to connect oracle pool
iam getting a sqlexception as
Sat Jul 22 01:46:09 PDT 2000:<I> <JDBC Pool> Creating connection pooloraclePool
with:
{refreshMinutes=10, poolName=oraclePool, loginDelaySecs=1, testTable=dual,
maxCa> >> pacity=10, props=user=SCOTT;password=tiger;server=DEMO, allowShrinking=true,> >dri> >> ver=weblogic.jdbc.oci.Driver, aclName=weblogic.jdbc.connectionPool.oraclePool,> >> c> >> apacityIncrement=2, initialCapacity=4, url=jdbc:weblogic:oracle, shrinkPeriodMin> >> s=15
Delaying 1 seconds before making a oraclePool pool connection.
java.sql.SQLException: System.loadLibrary threw java.lang.UnsatisfiedLinkError
with the message 'no weblogicoci36 in java.library.path'.
at weblogic.jdbcbase.oci.Driver.connect(Driver.java:116)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:149)
can anyone tell me why is this happening ,thanks in advance
san -
Problem JDBC Connection using OCI Driver on Weblogic Portal on Linux
Hi Team,
I want a JDBC connection using OCI Driver in Weblogic Portal 8.1 sp4 on Linux. When I had tested using JDBC connection using Plain Java Code it is working. Also when I create the OCI Connection Weblogic Connection Pool it is working.
But My Requirement is to create the connection using Java Code in Portal Application
But When I create OCI connection in the code it is throwing NO SUITABLE DRIVER Found.
---------- Code in Plain Java Code ------------ Same code is used in Weblogic Portal Application --------------------------------
public static void main(String[] args) throws Exception{
Class.forName("oracle.jdbc.driver.OracleDriver");
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
String url="jdbc:oracle:oci8:@TESTDB";
Properties props = new Properties();
props.put("user","scott");
props.put("password","tiger");
conn=DriverManager.getConnection(url,props);
When I am using the same code in Weblogic Portal and Deployed on Weblogic Portal Server 8.1 SP4 it is throwing following error.
-------------- Exception on Server Log --------------------
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.util.Properties;Ljava.lang.ClassLoader;)Ljava.sql.Connection;(Unknown Source)
at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.util.Properties;)Ljava.sql.Connection;(Unknown Source)
My Environment is
LINUX
Weblogic 8.1 SP4
Oracle 9i Client on Same Machine
Oracle 10g Server on Different Machine
My Environment Variables on the Linux Server also set properly as following
PATH=/apps/pmaaum/ant/apache-ant-1.6.5/bin:.:/apps/beahomedev/jdk142_05/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/apps/oracle/ora9i/product/9.2.0/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/apps/oracle/ora9i/bin
LD_LIBRARY_PATH=/usr/lib:/apps/oracle/ora9i/product/9.2.0/lib:/apps/oracle/ora9i/product/9.2.0/lib32:/apps/oracle/ora9i/product/9.2.0/rdbms/lib:/usr/openwin/lib:/apps/oracle/ora9i/product/9.2.0/jdbc/lib
JAVA_HOME=/apps/beahomedev/jdk142_05
JDBC_LIB=/apps/oracle/ora9i/product/9.2.0/jdbc/lib
CLASSPATH=:.:/apps/beahomedev/jdk142_05/lib/rt.jar:/apps/oracle/ora9i/product/9.2.0/jdbc/lib/classes12.jar
Please help me, Let me know if you required anything.
Thanks in Advance
Vishnu
Edited by: vishnuk on Oct 23, 2009 4:07 AM
Edited by: vishnuk on Oct 23, 2009 4:10 AMHi Vishnu
Looks like a classloader issue. BEA class loader is very tricky. Any jar added manually in classpath, will end up loading only those classes. Any imports that we have in any of those classes do not get loaded. Anyhow, coming to your point, add classes12.jar inside your portal web project Web-Inf/lib folder and see if that helps. Usually thats where we put all the JARs for 8.1 SPxx applications. If this still breaks, then remove the jar from web-inf/lib folder and add under your portal app App-Inf/lib folder. First try with app-inf/lib folder having this jar. If not then with web-inf/lib. Basically web-inf is specific to that web app only. If you have a different app having this jdbc code, then put under app-inf/lib folder. Make sure that you remove the classes12.jar that you added in classpath either in env variable or in setdomainenv.cmd file.
When weblogic uses native OCI Drivers, it refers to jars at this location: ....\beawlp814\weblogic81\server\ext\jdbc\oracle\10g or 9g. Try using one of these jars and see if that works. Most of the times I used these jars only for oracle specific native drivers.
Word of caution. Try to use Connection Pool and a DataSource created in weblogic console for your jdbc code. This Datasource can still use the Oracle drivers that you want (instead of BEA Weblogic wrapper oci drivers) located in above location. Use JNDI Lookup and get Datasource and then connection. This is more recommended approach with many advantages then using DriverManager approach..
Goud -
JDBC Connection Pool to DB2 database - Problem
When trying to create a new JDBC Connection Pool in WebLogic using BEA Type 4 driver
for DB2, I get the following error:
[BEA][DB2 JDBC Driver]A commitment command has been received on a protected conversation.
The commit and rollback commands are not allowed on protected conversations.
DB2 v8.1 Enterprise Edition on Sun Solaris v8
WebLogic 8.1 SP2 on Windows 2000/XP
Please help!Sorry forgot to add the exception, this is the exception,
java.sql.SQLException: RSR0029: Missing Password for Application Authorization
Any idea as when we get this exception? -
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,
UsamahHi. 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 -
Creating jdbc connection pool in weblogic 8.x server using oracle database
Hi
i am having oracle 9.2.0 and weblogic 8.1. i am new to oracle and jdbc connection pool. can any one explain how to make connection pool in weblogic.
what will be the host name, port number??
can any one explain
regards,
sekar.rThe host name is the name or IP address of the machine running Oracle.
The port number is the port the DBMS is listening on for connection requests. -
BLOB / CLOB operations using JDBC connections taken from WebLogic 6.0 connectrion pool
Hi..
I need to do some CLOB operations using JDBC connection taken
from WebLogic 6.0 connection pool. Will weblogic 6.0 supports it.?
I am getting errors when trying to do it in normal way .
It seems like ResultSet.getClob() returns an RMI (kind of ) object
instead of the Clob object.
If you have any idea . Pls respond to [email protected]
NazilinHi..
I need to do some CLOB operations using JDBC connection taken
from WebLogic 6.0 connection pool. Will weblogic 6.0 supports it.?
I am getting errors when trying to do it in normal way .
It seems like ResultSet.getClob() returns an RMI (kind of ) object
instead of the Clob object.
If you have any idea . Pls respond to [email protected]
Nazilin -
HELP:Problem in creating a temporary CLOB using JDBC connection pooling
Hi All,
i am inserting a large xml document in an xml type column by creating a temporary clob of this document
tempClob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION);
I am not having any success getting the following statement working using a JDBC connection pool rather than a hard coded URL connection
it works with:
"jdbc:oracle:thin:@server:port:dbname" connection
Does NOT work with:
datasource.getConnection()
Does any one know how to successfully get this to work?
urgently plz........Hi Dharmi
Here is a quote of Dafna's post in [another thread in this forum|Re: Copy VC controls]
CE7.1.1 will be released at September 2008 for ramp-up customers.
There are many improvements and new capabilities in the new release of Visual Composer for CE7.1.1. Among the new features you can find:
The missing features from Visual Composer 7.0 (Html view, portal Eventing support (EPCM), JDBC, Undo/Redo, and more..)
Many layout & modeling improvements
Additional ALV table functionality - export to Excel, switch to chart, configure ALV behavior at design time
Integration of Visual Composer in Eclipse - additional entry point to the Visual Composer models from the NWDS. This integration provides the option to add a WD component (in case of missing functionality in Visual Composer), as a black box component to the Visual Composer model. Right-clicking the component will open the Web Dynpro perspective for creating/modifying the component.
Regards,
Shai -
ResultSet problem with a jdbc connection pool implementation
Hi
I'm trying to use jdbc connection pool in my java application (js2e 1.4.0_01)
from the example at http://www.developer.com/tech/article.php/626141
In my main() code, in addition to JDBCConnection, JDBCConnectionImpl and JDBCPool classes, i use
JDBCConnection conn;
conn = new JDBCConnection(dbName);
// make a statement
sqlString = "SELECT........."
ResultSet rs = null;
rs = conn.sendRequest(sqlString, rs);
// print result
while (rs.next()) {
Unfortunately i get an error like "ResultSet is closed" in the line corresponding to rs.next. The error disappears if i remove the line
stmt.close();
in the method sendRequest of the JDBCConnectionImpl class.
1) Does anybody knows the solution?
2) How to close all connections?
Thanks you in advance.Hi ,
You are closing the statement and then trying to use resultset , which is not going to work .So close then statment after using resultset .Ideally the code should be like this
try {
conn = // get the connection
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
while ( rs.next()){
// do something
catch (Exception ex) {
finally {
try {
if (rs != null)
rs.close();
if (pstmt != null)
pstmt.close();
if(conn!=null )
conn.close(); -
Obtaining an oracle.sql.STRUCT through a pooled JDBC connection
Hello,
I am using WebLogic Server 10 and and Oracle 10 and I am trying to obtain a vendor-specific oracle.sql.STRUCT from a ResultSet using a pooled connection defined in Weblogic. I need the vendor-specific object, rather than simply the java.sql.Struct implementation, because a third party library requires it.
What gets returned in the ResultSet is a non-exposed WebLogic wrapper object which implements java.sql.Struct, but which cannot be cast to an oracle.sql.STRUCT. I can use reflection on this object to find and call the getVendorObj() method to obtain the oracle.sql.STRUCT, but this solution is not acceptable because this is not a published API and is not guaranteed not to change in future versions.
How can I reliably obtain a vendor-specific implementation of java.sql.Struct through a WebLogic connection pool in WebLogic Server 10?
Thanks for any advice,
-Dan Schwemleindan schwemlein wrote:
Joe,
Thanks again. With your guidance, I have arrived at the following approach, which I'll post for the benefit of others, and which I'd be thankful if you would validate:
1) Import the jar com.bea.core.datasource-1.0.0.0.jar from %BEA_HOME%\modules, which is the only location of the class WLConnection, which is the only class with the getVendorConnection() method you refer to.
2) Get the logical connection from the pooled data source, cast it to a WLConnection, call getVendorConnection() to obtain an OracleConnection (from the ojdbc jar), and use this connection to obtain the required oracle.sql.STRUCT from an OracleResultSet.
3) Be aware of the limitations and follow the guidelines in the document http://e-docs.bea.com/wls/docs81/jdbc/thirdparty.html#1043646 regarding security, error handling, releasing resources (close only the logical connection), etc.
Does this sound like the approach you had in mind?
Thanks again,
-Danyes.
Joe
>
Re: Obtaining an oracle.sql.STRUCT through a pooled JDBC connection
Posted: Jul 16, 2007 3:21 PM
dan schwemlein wrote:
Thanks for the quick response!I was working today...
Thank you for the information about the connection being closed.
I will look into using this configuration setting.
You say that you can describe a way to get a handle on an unwrapped
pool object using some documented WLS-specific code. Are you referring
here to the getVendorConnection() method?yes.
This method does not help me
get the oracle.sql.STRUCT object, because even the connection returned
by getVendorConnection() returns a wrapped WL java.sql.Struct object
from a call to getObject().I don't believe it. If you are running in WLS, with a local pool,
the getVendorConnection() will give you the Oracle connection,
which will give you an Oracle statement, etc, down to an oracle
STRUCT object. Once you have a direct reference to the oracle connection,
we're not in the picture when it returns something to you.
It would be great if getVendorObj() were
documented and could be counted on in future versions. To use this
method, one would still have to access it via Java reflection, because
the wrapper class and its getVendorObj() method would be exposed in an
API, correct? Could this method be exposed in the API, so that reflection
doesn't need to be used, or it is exposed somewhere that isn't documented?getVendorObj() is not yet exposed or therefore supported for the general
wrapped object, so you would have to start from the connection and
derive all subobjects from it.
Thanks again,
-Dan Schwemlein
Hello,
I am using WebLogic Server 10 and and Oracle 10 and I am trying to obtain a
vendor-specific oracle.sql.STRUCT from a ResultSet using a pooled connection
defined in Weblogic. I need the vendor-specific object, rather than simply
the java.sql.Struct implementation, because a third party library requires it.
What gets returned in the ResultSet is a non-exposed WebLogic wrapper object
which implements java.sql.Struct, but which cannot be cast to an oracle.sql.STRUCT.
I can use reflection on this object to find and call the getVendorObj() method to
obtain the oracle.sql.STRUCT, but this solution is not acceptable because this is
not a published API and is not guaranteed not to change in future versions.Understood. We all benefit from sticking to the J2EE standards,
but we could also wish Oracle had done so with it's driver objects.
I will assume your code is running in the WebLogic server, because
an external JVM can never access the real driver object, which will
always really be in the WLS JVM. No active JDBC object is serializable.
How can I reliably obtain a vendor-specific implementation of java.sql.Struct
through a WebLogic connection pool in WebLogic Server 10?There is no way to get a handle on an unwrapped pool object without using some
WLS-specific code, though I can describe a way with documented methods,
and/or I can get our documentation altered to say we'll support the
getVendorObj() method. We introspect every vendor object, and for those
implementations that have done the wise thing, projecting any non-standard
methods as an Interface, we are able to also project that Interface so
the vndor example code should work. However, in some poorly-done
cases, such as for some Oracle stuff, there is either no Interface,
or the Oracle code has extensions that take java.sql objects as input,
(at least that's the signature of the method) but two lines into the
method, the Oracle code assumes and casts the java.sql object to a concrete
Oracle object. In these use cases you need the direct unwrapped object.
We provide and document Connection.getVendorConnection(), and intend
getVendorObj() to serve the same for subobjects, but note the dangers
and responsibilities: We rely on our wrappers to implement the security
and thread-safety of our pooling system. Because user code can get
unrestricted access to the actual connection from most JDBC objects,
we can never trust that we have complete control once a vendor object
is exposed. Therefore, by default we will close and replace every JDBC
connection so exposed, as soon as the current thread is finished with
the pool connection. This hurts performance. We also document a pool
config setting that will tell us that you take responsibility for any such
problems, and not to close connections just because they've been exposed.
HTH,
Joe
Thanks for any advice,
-Dan Schwemlein
Maybe you are looking for
-
Automator Workflow for Quicktime 7.6.4
Hello. I need to hang my head in shame, for I am normally pretty good with computers. I started looking up automator, but this is the only task I have even needed to do often enough to resort to automator. So I am being lazy and I would LOVE you fore
-
Calling a C program as an RFC from SAP : VERY URGENT
Hi All, I have got a SAP program which is trying to call a C program on the UNIX server of the SAP system. I have created the RFC destination in SM59 and have tested the connection to be working fine. inside the C program , a code has been written to
-
Hi, all. Please advise, how I can load hierarchies from ODS, if ODS stores data about structure of hierarchies. If any solutions exists excluding, extract data to flat file and load it again to hierarchies. Max.
-
Web Service XMLA non WS-I compliant
I tried to create a J2ME application using web service XMLA but when I tried to generate the client stub with SUN Wireless Toolkit 2.2 an error occured: "The web service is not WS-I compliant" XMLA is not WS-I compliant ? XMLA not support J2ME ?
-
Thre is no response from WAE´s console
Hi, I received 3 new appliances (02 WAVE274 and 01 WAVE574). All these equipments have the same problem: There is no response from console port. I have a console cable that works fine in the console port of our router, but when I put this consol