Connection Pooling in Weblogic Server6.1
Hi All..,
I want to implement Connection pooling in my EJB application.When i use a oci
driver i am getting the following error.Can anyone plz help me out?.
Thanks & Regards.,
B.Naveen Kumar
Starting Loading jDriver/Oracle .....
<Jul 2, 1999 12:57:04 PM IST> <Error> <JDBC> <Cannot startup connection pool "oraclePool"
weblogic.common.ResourceException:
Could not create pool connection. The DBMS driver exception was:
java.sql.SQLException: System.loadLibrary(weblogicoci37) threw java.lang.UnsatisfiedLinkError:
no weblogicoci37 in java.library.path
at weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:226)
at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:189)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:131)
at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:698)
at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:620)
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy45.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2706)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:360)
at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy66.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
at weblogic.management.Admin.finish(Admin.java:561)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
at weblogic.Server.main(Server.java:35)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:205)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:131)
at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:698)
at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:620)
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy45.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2706)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:360)
at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy66.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
at weblogic.management.Admin.finish(Admin.java:561)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
at weblogic.Server.main(Server.java:35)
>
This url will help you set the library path correctly:
(I am not sure which os you are seeing!!)
http://e-docs.bea.com/wls/docs61/oracle/install_jdbc.html
"Naveen Kumar" <[email protected]> wrote:
>
Hi All..,
I want to implement Connection pooling in my EJB application.When i use
a oci
driver i am getting the following error.Can anyone plz help me out?.
Thanks & Regards.,
B.Naveen Kumar
Starting Loading jDriver/Oracle .....
<Jul 2, 1999 12:57:04 PM IST> <Error> <JDBC> <Cannot startup connection
pool "oraclePool"
weblogic.common.ResourceException:
Could not create pool connection. The DBMS driver exception was:
java.sql.SQLException: System.loadLibrary(weblogicoci37) threw java.lang.UnsatisfiedLinkError:
no weblogicoci37 in java.library.path
at weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:226)
at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:189)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:131)
at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:698)
at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:620)
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy45.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2706)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:360)
at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy66.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
at weblogic.management.Admin.finish(Admin.java:561)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
at weblogic.Server.main(Server.java:35)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:205)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:131)
at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:698)
at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:620)
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy45.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2706)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:360)
at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
at $Proxy66.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
at weblogic.management.Admin.finish(Admin.java:561)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
at weblogic.Server.main(Server.java:35)
>
Similar Messages
-
Issue while creating connection pool in weblogic using SERVICE NAME
Found two issues while creating connection pool in weblogic using SERVICE NAME
1. While running apps from jdeveloper using xxx-jdbc.xml
weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Io exception: The Network Adapter could not establish the connection
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:253)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1109)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1033)
at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:214)
at weblogic.jdbc.common.internal.ConnectionPool.doStart(ConnectionPool.java:1051)
2. Configuriing the jndi in Weblogic server
weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
localhost:1521:SERVICENAME
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:253)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1109)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1033)
Problem
database url is generated based on SID
eg: jdbc:oracle:thin:@localhost:1521:SID
Solution
(generate seperate url for SERVICE NAME)
jdbc:oracle:thin:@localhost:1521/SERVICENAME
------------------------It is so clear: host not found error for network connection and the other SID servcie name not found means your oracle instance name is not up. check with srvctl status for given servcie name or node, else check CRS_Stat -t if you are using RAC.
-
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
-
Connection pooling in Weblogic using DB2
i am trying to configure the connection pooling in Weblogic console using DB2 and i put the ff informations:
Name: myConnectionPool
URL: jdbc db2://localhost:5000
Driver Class Name: COM.ibm.db2.jdbc.DB2Driver
properties: user=db2admin
for some reason, i got this error:
Cannot startup connection pool "myConnectionPool" weblogic.common
Resource Exception: Cannot load driver class: COM.ibm.db2.jdbc.DB2Driver
i appreciate if someone can help me with this. thx.Include zip file, db2jdbc.zip, containing driver class file, COM.ibm.db2.jdbc.DB2Driver,
to Classpath. -
Unable to create connection pool on weblogic startup
Hi, I have a problem currently with the connection pool of weblogic 8.1 not being able to be created on a scheduled restart daily.
The weblogic server is restarted daily at 6am. However, the oracle database is shut down for maintenance daily till 7am before it is up again. It is not possible to shift either timings of restarting weblogic and oracle.
Is there any script or option settings in weblogic to reconnect the connection pool after 7am daily without restarting the weblogic instance?
Please help. Thanks.Kwee Tin Toh wrote:
Hi, I have a problem currently with the connection pool of weblogic 8.1 not being able to be created on a scheduled restart daily.
The weblogic server is restarted daily at 6am. However, the oracle database is shut down for maintenance daily till 7am before it is up again. It is not possible to shift either timings of restarting weblogic and oracle.
Is there any script or option settings in weblogic to reconnect the connection pool after 7am daily without restarting the weblogic instance?
Please help. Thanks.You can use the weblogic.Admin command line program to create, destroy, disable, or enable pools
in a running server. However, the easiest thing to do is to define your pool to have an initial
capacity of zero, so it is allowed to be created at startup, without needing to make any connections.
Then it will self-populate as needed when application load starts, if/when the DBMS is available.
Joe -
Cannot create connection pool with weblogic jDriver XA for oracle
Hi everybody,
we have serious problems configuring the weblogic jDriver for Oracle with support
for distributed transactions.
Everything works fine with the non-XA driver.
We tried the suggestions given here before like setting the environment variable
ORACLE_SID. However, this does not change the errors we get. We use Weblgic Server
6.1 SP2 with oracle 8.1.7 (client and server) under Windows NT.
When attempting to create the connection pool, we get the following exception:
Starting Loading jDriver/Oracle .....
<14.05.2002 15:48:30 CEST> <Error> <JDBC> <Cannot startup connection pool "DiplPool"
weblogic.common.ResourceException: java.sql.SQLException: open failed for XAResource
'DiplPool' with error XAER_RMERR : A resource manager error has occured in the transaction
branch. Check Oracle XA trace file(s) (if any) for database errors. The Oracle XA
trace file(s) are located at the directory where you start the Weblogic Server, and
have names like xa_<pool_name><MMDDYYYY>.trc.
at weblogic.jdbc.oci.xa.XAConnection.<init>(XAConnection.java:58)
at weblogic.jdbc.oci.xa.XADataSource.getXAConnection(XADataSource.java:601)
at weblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnectionEnvFactory.java:200)
at weblogic.jdbc.common.internal.XAConnectionEnvFactory.createResource(XAConnectionEnvFactory.java:57)
at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:698)
at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:623)
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
The trace file looks like this:
ORACLE XA: Version 8.1.5.0.0. RM name = 'Oracle_XA'.
113105.161:160.160.-1344514975:
xaoopen: xa_info=Oracle_XA+Acc=P/schamper/schamper+SesTm=100+DB=DiplPool+Threads=true+LogDir=.+DbgFl=0x15,rmid=-1344514975,flags=0x0
113105.161:160.160.-1344514975:
ORA-12560: TNS: Fehler bei Protokolladapter
113105.161:160.160.-1344514975:
xaolgn_help: XAER_RMERR; OCIServerAttach failed. ORA-12560.
113105.161:160.160.-1344514975:
xaoopen: return -3
We suspect that we do not set the properties of the connection pool correctly. The
declaration of the pool in config.xml looks something like the following:
<JDBCConnectionPool CapacityIncrement="1" DriverName="weblogic.jdbc.oci.xa.XADataSource"
InitialCapacity="10" MaxCapacity="15" Name="DiplPool"
Properties="user=scott;password=tiger;url=jdbc:weblogic:oracle:srlaptop_aidenbach.muc.sdm-research.de;dataSourceName=DiplPool"
Targets="Marvin" TestTableName="privcust" URL="jdbc:weblogic:oracle:srlaptop_aidenbach.muc.sdm-research.de"/>
Are there any known issues with the XA driver and the versions of oracle and Weblogic
we use? Can someone tell us how exactly we have to define the connection pool or
provide an example?
Any help would be greatly appreciated.
Best regards,
MichaelHi Michael
Here is an example connection pool tag,
<JDBCConnectionPool
Name="oraXAPool"
Targets="myserver"
DriverName="weblogic.jdbc.oci.xa.XADataSource"
InitialCapacity="1"
MaxCapacity="10"
CapacityIncrement="2"
Properties="user=scott;password=tiger;server=ORCL"
/>
Ensure that the server=ORCL is replaced by server=<what ever the Alias is
defined in TNSNAMES.ORA file>
You dont have to specify the URL for this.
hth
sree
"Michael Wufka" <[email protected]> wrote in message
news:[email protected]...
>
Hi everybody,
we have serious problems configuring the weblogic jDriver for Oracle withsupport
for distributed transactions.
Everything works fine with the non-XA driver.
We tried the suggestions given here before like setting the environmentvariable
ORACLE_SID. However, this does not change the errors we get. We useWeblgic Server
6.1 SP2 with oracle 8.1.7 (client and server) under Windows NT.
When attempting to create the connection pool, we get the followingexception:
Starting Loading jDriver/Oracle .....
<14.05.2002 15:48:30 CEST> <Error> <JDBC> <Cannot startup connection pool"DiplPool"
weblogic.common.ResourceException: java.sql.SQLException: open failed forXAResource
'DiplPool' with error XAER_RMERR : A resource manager error has occured inthe transaction
branch. Check Oracle XA trace file(s) (if any) for database errors. TheOracle XA
trace file(s) are located at the directory where you start the WeblogicServer, and
have names like xa_<pool_name><MMDDYYYY>.trc.
at weblogic.jdbc.oci.xa.XAConnection.<init>(XAConnection.java:58)
atweblogic.jdbc.oci.xa.XADataSource.getXAConnection(XADataSource.java:601)
atweblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnec
tionEnvFactory.java:200)
atweblogic.jdbc.common.internal.XAConnectionEnvFactory.createResource(XAConnec
tionEnvFactory.java:57)
atweblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.j
ava:698)
atweblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282
atweblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:623
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
arget.java:329)
The trace file looks like this:
ORACLE XA: Version 8.1.5.0.0. RM name = 'Oracle_XA'.
113105.161:160.160.-1344514975:
xaoopen:xa_info=Oracle_XA+Acc=P/schamper/schamper+SesTm=100+DB=DiplPool+Threads=true
LogDir=.DbgFl=0x15,rmid=-1344514975,flags=0x0
113105.161:160.160.-1344514975:
ORA-12560: TNS: Fehler bei Protokolladapter
113105.161:160.160.-1344514975:
xaolgn_help: XAER_RMERR; OCIServerAttach failed. ORA-12560.
113105.161:160.160.-1344514975:
xaoopen: return -3
We suspect that we do not set the properties of the connection poolcorrectly. The
declaration of the pool in config.xml looks something like the following:
<JDBCConnectionPool CapacityIncrement="1"DriverName="weblogic.jdbc.oci.xa.XADataSource"
InitialCapacity="10" MaxCapacity="15" Name="DiplPool"
Properties="user=scott;password=tiger;url=jdbc:weblogic:oracle:srlaptop_aide
nbach.muc.sdm-research.de;dataSourceName=DiplPool"
Targets="Marvin" TestTableName="privcust"URL="jdbc:weblogic:oracle:srlaptop_aidenbach.muc.sdm-research.de"/>
>
Are there any known issues with the XA driver and the versions of oracleand Weblogic
we use? Can someone tell us how exactly we have to define the connectionpool or
provide an example?
Any help would be greatly appreciated.
Best regards,
Michael -
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. -
Database connection pooling with weblogic 8.1.
Hai All,
I am new to weblogic database connection pooling.
I am using Weblogic8.1 and want to use connection pooling to get a jdbc connection. my database server is Oracle 8.1.7.
Things which i have done using the weblogic admin console.
I have created a Jdbc connection pool named myconnectionpool.
I have created a datasource named mydatasource.
and named the JNDI as myjndi.
Is the above process correct to create the connection pool in the weblogic8.1.
I am not aware of the java code to get the database connection object from the connection pool which i have created.
can any one please let me know the java code to get the connection from the pool.
Any help is appreciated
Thanks in advance
pooja.Hai
I have tried using the code u have mentioned but it returned me
an error which is below.
C:\javaexamples\Javaprograms\JDBC>java jdbcexampleconnectionpool
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
I have added the following lines code, which i read in some weblogic documentation. The code i added is below and it worked fine.
ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL,"t3://localhost:7001");
Context ctx = new InitialContext(ht);I am not sure what the above code does.
Can anyone let me know what does the above code do.
Thanks a lot and i appreciate ur help,
Pooja. -
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 -
REgarding problem in Connection pooling of weblogic server
Hi ,
I have installed weblogic server 9 and trying to connection pooling in datasource , i am getting error to unable to load driver class: oracle.jdbc.DataSource
see below error log
####<Oct 29, 2008 4:55:34 PM IST> <Error> <Console> <cdhulipati> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1225279534589> <BEA-240003> <Console encountered the following error weblogic.application.ModuleException:
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:268)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.operations.RedeployOperation.createAndPrepareContainer(RedeployOperation.java:98)
at weblogic.deploy.internal.targetserver.operations.RedeployOperation.doPrepare(RedeployOperation.java:118)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:215)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.prepare(DeploymentReceiverCallbackDeliverer.java:40)
at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingContextUpdateCompletion.callDeploymentReceivers(AwaitingContextUpdateCompletion.java:156)
at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingContextUpdateCompletion.handleContextUpdateSuccess(AwaitingContextUpdateCompletion.java:66)
at weblogic.deploy.service.internal.statemachines.targetserver.AwaitingContextUpdateCompletion.contextUpdated(AwaitingContextUpdateCompletion.java:32)
at weblogic.deploy.service.internal.targetserver.TargetDeploymentService.notifyContextUpdated(TargetDeploymentService.java:225)
at weblogic.deploy.service.internal.DeploymentService$1.run(DeploymentService.java:189)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Caused by: weblogic.common.resourcepool.ResourceSystemException: Cannot load driver class: oracle.jdbc.DataSource at weblogic.jdbc.common.internal.JDBCUtil.parseException(JDBCUtil.java:292)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.loadDriver(ConnectionEnvFactory.java:77)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.<init>(ConnectionEnvFactory.java:133)
at weblogic.jdbc.common.internal.ConnectionPool.initPooledResourceFactory(ConnectionPool.java:687)
at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:192)
at weblogic.jdbc.common.internal.ConnectionPool.doStart(ConnectionPool.java:1177)
at weblogic.jdbc.common.internal.ConnectionPool.start(ConnectionPool.java:184)
at weblogic.jdbc.common.internal.ConnectionPool.start(ConnectionPool.java:177)
at weblogic.jdbc.common.internal.ConnectionPoolManager.createAndStartPool(ConnectionPoolManager.java:370)
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:243)
>
Please help me outchaitudnvr wrote:
Please help me outYou would probably get better help in a forum where your question was on-topic. This forum is about XML and Java and your question isn't about either of them. -
Multiple Connection Pools in Weblogic
Hello.
We have a requirement whereby a user logging on to an existing web application has the option to then use another application that uses a different database.
So.. I configured Weblogic with a second Connection Pool and a second Data Source, which references the new Connection Pool.
In order acces the new Connection Pool, I tried this:
Context ctx = null;
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "ourProviderUrl");
ctx = new InitialContext(ht);
ds = (javax.sql.DataSource) ctx.lookup("newDataSourceName");but it didn't work. The Data Source couldn't be resolved (I don't have the stack trace of the exception at the moment.)
How can I access the different connection pools?
Am I going about this the wrong way?
Help much appreciated!!Here's the stack trace:
java.rmi.UnexpectedException: Unexpected exception in indecs.bip.services.UserManagerEJB.getNumSesionesActivas():
java.lang.Exception: javax.transaction.TransactionRolledbackException: Error in ejbCreate:: javax.ejb.CreateException: SessionManager.create error: javax.naming.NameNotFoundException: Unable to resolv
e 'TxBIPDataSource' Resolved: '' Unresolved:'TxBIPDataSource' ; remaining name 'TxBIPDataSource'
at indecs.bip.services.SessionManagerEJB.ejbCreate(SessionManagerEJB.java:235)
at indecs.bip.services.SessionManagerEJB_qjvfpz_Impl.ejbCreate(SessionManagerEJB_qjvfpz_Impl.java:112)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.ejb20.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:148)
at weblogic.ejb20.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:98)
at weblogic.ejb20.manager.StatelessManager.preInvoke(StatelessManager.java:154)
at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:126)
at weblogic.ejb20.internal.StatelessEJBObject.preInvoke(StatelessEJBObject.java:61)
at indecs.bip.services.SessionManagerEJB_qjvfpz_EOImpl.getSesion(SessionManagerEJB_qjvfpz_EOImpl.java:29)
at indecs.bip.services.UserManagerEJB.getNumSesionesActivas(UserManagerEJB.java:79)
at indecs.bip.services.UserManagerEJB_ymjd1a_EOImpl.getNumSesionesActivas(UserManagerEJB_ymjd1a_EOImpl.java:1254)
at indecs.bip.services.UserManagerEJB_ymjd1a_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:359)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:762)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)"TxBIPDataSource" is the name of the original Data Source. -
JDBC CONNECTION POOL FOR WEBLOGIC 8.1 TO ORACLE 8.1.6
I am having problems with my connection pool. When I try to use the classes12 driver I get periodic TNS:connection closed errors and I can not set my initial pool size very high because one will fail with this error. When I try to use the ojdbc14 driver I get a character set not supported error. I am using the nls_charset12.jar file
I am running weblogic 8.1 sp2. I am connecting to an Oracle 8.1.6 database.
Any suggestions would be greatly appreciated.
Thanks
Ericeric brantingham wrote:
Hi, thanks for your assistance. Here is the log dump.You should add a 1-second login delay for the pool. (loginDelaySeconds=1).
Oracle can get swamped and ocasionally fail valid connection requests if
too many are sent in a short time, such as when a pool is being initially
populated. This setting will put a delay between successive connection
requests, and should solve the problem.
Joe
>
####<Aug 30, 2004 9:45:15 AM EDT> <Warning> <JDBC> <sun1523.daytonoh.ncr.com> <s
moaServer> <ExecuteThread: '22' for queue: 'weblogic.kernel.Default'> <<anonymou
s>> <> <BEA-001129> <Received exception while creating connection for pool "nolo
aConnectionPool": ORA-12537: TNS:connection closed
>
####<Aug 30, 2004 9:45:15 AM EDT> <Info> <JDBC> <sun1523.daytonoh.ncr.com> <smoa
Server> <ExecuteThread: '22' for queue: 'weblogic.kernel.Default'> <<anonymous>>
<> <BEA-001156> <Stack trace associated with message 001129 follows:
java.sql.SQLException: ORA-12537: TNS:connection closed
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:1503)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:309)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:198)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:251)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:175)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:111)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourceP
oolImpl.java:1103)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourceP
oolImpl.java:1040)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(Resourc
ePoolImpl.java:320)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(Resourc
ePoolImpl.java:252)
at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.j
ava:428)
at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(Connectio
nPoolManager.java:78)
at weblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiData
Source.java:288)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSour
ce.java:310)
at user.User.getDbPoolConnection(User.java:174)
at order.OrderMasterCustomer.dbRetrieveOrderCustomerHeaderData(OrderMast
erCustomer.java:1181)
at order.OrderMasterCustomer.dbRetrieveOrderCustomer(OrderMasterCustomer
java:1108)
at order.OrderMasterCustomer.dbSetPropertiesFromOrder(OrderMasterCustome
r.java:1660)
at order.Order.dbSetPropertiesFromOrder(Order.java:1031)
at servlets.submitPages.OpenOrderSubmit.actionSearch(OpenOrderSubmit.jav
a:367)
at servlets.submitPages.OpenOrderSubmit.service(OpenOrderSubmit.java:107
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170) -
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.... -
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 VillaniHi. 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
Maybe you are looking for
-
Has my M1424WR router "gone bad"? - and its replacement "bad" out of the box?
I've had Verizon FiOS service for about 3 years now, and have had very few problems with it. A few times I lost internet or TV during storms when lines came down somewhere, but that's about it. The FiOS installer gave me an Actiontec M1424WR router
-
Error-posting Grant evalauation t-code PQ_GRANT_CALC related to FM & FI-CA
Hi , While Posting the transaction in the Grant evalauation t-code PQ_GRANT_CALC in SLCM, the following error message occoured. we are using ECC 6.0 Version. Posting not permitted; business transaction not recognized Message no. FKKFMCHK018 Diagnosis
-
Open box Item not as described.
I recently ordered an Open Box Pioneer Elite SC-81 . As per description the condition was described as Excellent condition on Best buy website. Receiver has Scratches on the Volume Knob as well as dent on the top. Excellent product conditions are no
-
I m storing the attatchments in java table as binary data.Is there any restriction on the size of the attachmnents? Also while Downloading the file the name of the file is not visible. Please help me on this issue.
-
Hi All, I m facing an issue with Date format in the prompt. I have used date presentation variables in my column formula as shown below: FILTER("SKU Order Details"."Fulfilled Quantity" USING Time."Calendar Date" <= DATE '@{todate}{2900-01-01}') The r