Help me with a Connection pool
I have a connection that works in the server and this formed and him ping. can be made but not as to use this connection . somebody please say to me like using it in jsp or a java file. thanks.
I believe you are asking how to use the Connection Pool resource you successfully created in the admin console inside of a JSP or Java Class.
Hopefully you are already familiar with JDBC. Below is some very simple sample code. The datasource stringname will be the jndi name you provided in the admin console (ie. jdbc/mysql, jdbc/oracle, jdbc/whatever) appened to java:comp/env. Once you have the DataSource context, you create a connection. Then its just typical JDBC.
InitialContext ctx = null;
String dsName1 = "java:comp/env/jdbc/YOURDB";
DataSource ds1 = null;
Connection conn1 = null;
try {
ctx = new InitialContext();
ds1 = (DataSource)ctx.lookup(dsName1);
Connection conn1 = ds1.getConnection();
// use conn1 to do some database work --
// Create a statement, execute query ...
conn1.close();
conn1 = null;
} catch(Exception e) {
e.printStackTrace(System.out);
finally {
if (conn1 != null) {
try {
conn1.close();
} catch (Exception e) {
// ignore
}
Similar Messages
-
Problem with JCo Connection Pool
Hi,
I have a problem with using an RFC Model in my WebApplication. So sometimes the access to the function block works, and sometimes it doesn't work. Now I know, that there is a problem with the connection pool. Look at this message:
com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Connection pool WD_X24_MODELDATA_DEST_CPIC_REKTO_DE_useDefinedUser is exhausted. The current pool size limit (max connections) is 10 connections.
So it looks like a problem with closing the JCo Connections after using. Do know where the problem is? Because I'm using many other function blocks with no problems.Hello,
You need to increase the pool size via Visual Administrator.
Server 0 -> Services -> JCO RFC Connections.
Change the pool size from there. I believe a restart is in order.
Regards,
Jan -
Problem with creating Connection pool and JNDI, driver is not detected
Hi,
I have an issue with creating Connection Pool and JNDI.
I'm using:
- JDK 1.6
- OS: Linux(ubuntu 8.10)
- Netbeans IDE 6.5.1
- Java EE 5.0
- Apache Tomcat 6.0.18 Its lib directory contains all necessary jar files for Oracle database driver
- Oracle 11g Enterprise
My problem is that the Oracle database driver is not detected when I want to create a pool (it works pretty well and is detected without any problem when I create ordinary connection by DriverManager)
Therefore after running:
InitialContext ic = new InitialContext();
Context context = (Context)ic.lookup("java:comp/env");
DataSource dataSource = (DataSource)context.lookup("jdbc/oracle11g");
Connection connection = dataSource.getConnection();and right after dataSource.getConnection() I have the following exception:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at servlets.Servlet1.doPost(Servlet1.java:47)
at servlets.Servlet1.doGet(Servlet1.java:29)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1130)
... 17 more
My application context file (context.xml) is:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/WebApplication3">
<Resource auth="Container"
driverClassName="oracle.jdbc.OracleDriver"
maxActive="8"
maxIdle="4"
name="jdbc/oracle11g"
username="scott"
password="tiger"
type="javax.sql.DataSource"
url="jdbc:oracle:thin:@localhost:1521:database01" />
</Context>and my web.xml is:
<resource-ref>
<description>Oracle Datasource example</description>
<res-ref-name>jdbc/oracle11g</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
...I found similar threads in different forums including sun, such as
http://forums.sun.com/thread.jspa?threadID=567630&start=0&tstart=0
http://forums.sun.com/thread.jspa?threadID=639243&tstart=0
http://forums.sun.com/thread.jspa?threadID=5312178&tstart=0
, but no solution.
As many suggest, I also tried to put context directly in the server.xml (instead of my application context) and referencing it by <ResourceLink /> inside my application context but it didn't work and instead it gave me the following message:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class ' ' for connect URL 'null'
Has anyone succeeded in creating a connection pool with JNDI by using Tomcat 6 or higher ? If yes, could kindly explain about the applied method.
Regards,Hello again,
Finally I managed to run my application also with Tomcat 6.0.18. There was only two lines that had to be modified
in the context.xml file (the context of my application project and not server's)
Instead of writing
<Context antiJARLocking="true" path="/WebApplication2">
type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
</Context>we had to write:
<Context antiJARLocking="true" path="/WebApplication2">
type="oracle.jdbc.pool.OracleDataSource"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
</Context>- No modification was needed to be done at server level (niether server.xml nor server context.xml)
- I just added the ojdbc6.jar in $CATALINA_HOME/lib (I didn't even need to add it in WEB-INF/lib of my project)
- The servlet used to do the test was the same that I presented in my precedent post.
For those who have encountered my problem and are interested in the format of the web.xml and context.xml
with Tomcat 6.0, you can find them below:
Oracle server: Oracle 11g Enterprise
Tomcat server version: 6.0.18
Oracle driver: ojdbc.jar
IDE: Netbeans 6.5.1
The context.xml file of the web application
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/WebApplication2">
<Resource name="jdbc/oracle11g"
type="oracle.jdbc.pool.OracleDataSource"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
url="jdbc:oracle:thin:@localhost:1521:database01"
driverClassName="oracle.jdbc.OracleDriver"
userName="scott"
password="tiger"
auth="Container"
maxActive="100"
maxIdle="30"
maxWait="10000"
logAbandoned="true"
removeAbandoned="true"
removeAbandonedTimeout="60" />
</Context>The web.xml of my web application
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<resource-ref>
<description>Oracle Database 11g DataSource</description>
<res-type>oracle.jdbc.pool.OracleDataSource</res-type>
<res-auth>Container</res-auth>
<res-ref-name>jdbc/oracle11g</res-ref-name>
</resource-ref>
<servlet>
<servlet-name>Servlet1</servlet-name>
<servlet-class>servlets.Servlet1</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Servlet1</servlet-name>
<url-pattern>/Servlet1</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>Ok, now I'm happy as the original problem is completely solved
Regards -
Is possible to work with both Connection Pool?
Hello,
I would like to know if is it possible to work with both Connection Pools: Active Directory and DWH User? If it's yes, how can I specify to work with both simultaneously?
Thank you and regards,
Mónica.Hello Gayathri,
The version is OBISE1 10.1.3.2.1
The scenario is the following:
I have two connection pools
- One is mapping the DWH and it is using the System's variables :USER and :PASSWORD. Then I have an Initialization Block that get these values and I have created the logins as users in the database.
- The other is mapping the DWH tables.
I want to create directly users into the repository. The problem is the users of the repository cann't do the login because the first connection pool is trying to validate then against the database.
Would be possible to validate the users against the connection pool and the repository simultaneously?
Thank you and regards,
Mónica. -
I need help with socket connection pooling please
I need a basic connection pooling system for the code below users sets number connections 5 etc.
<main class>
s = new ListService(ssock.accept(),serverDir); //give list to client
Thread t = new Thread(s);
t.start();
<main class>
class ListService implements Runnable
Socket client;
String serverDir;
public ListService(Socket client,String serverDir)
this.client = client;
this.serverDir = serverDir;
public void run()
try
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(client.getOutputStream()));
// send something to client
catch(Exception e)
System.out.println(e);
System.out.println("client disconnected\n");
catch(Exception e){}
Thank you so muchMy code already accepts multi clients I need pooling only 5 clients can be using the server at a time when one client disconnects that means another incoming client can enter the pool to use the server.
I tried to do a counter so when a connection is made it increments and then if counter>=numOfClients
set a variable to true or false and this is sent with the server setup so it determines if the server code is run or it just closes the connection but there is no way I can access the counter variable from within a runnable class thread when a client closes connection it should -1 from the variable
thanks -
Help with Oracle Connection Pooling
Hi,
I want to create a connection pool that can be accessible in any jsp and in any class of my web application. Is it a good idea to create a class with a static member of type OracleDataSource or any class that handles connections?Rafa,
In order to use JSP, you usually need an application server.
Oracle's application server already has connection pooling built in.
No need to re-invent the wheel.
(In fact most application servers provide database connection pooling.)
Good Luck,
Avi. -
Issues with JDBC Connection Pooling
Hi all,
I'm experiencing some unexpected behaviour when trying to use JDBC Connection Pooling with my BC4J applications.
The configuraiton is -
Web Application using BC4J in local mode
Using Default Connection Stagegy
Stateless Release Mode
Retrieving Application Modules using Configuration.createRootApplicationModule( am , cf );
Returning Application Modules using Configuration.releaseRootApplicationModule( am, false );
Three application modules
AppModuleA - connects to DatabaseConnection1
AppModuleB - connects to DatabaseConnection2
AppModuleC - connects to DatabaseConnection2
My requirement is to -
Use App Module Pooling and have individual pool for each Application Module
Use JDBC Pooling and have individual pool for each Database connection
Note: All configuration was achieved in design mode (i.e. right clicking AppModule->Configurations...)
1. Initial approach -
In the configuration for each Application Module I specified the connection type as 'JDBC Datasource' and specified to approriate datasource.
Tried setting doConnecitonPooling to 'true' as well as 'false'
In the data-sources.xml I specified all the appropriate info including min-connections and max-connections.
I would expect, with the above config that BC4J would use OC4J's built in JDBC connection pooling.
2. Second approach -
In the configuration for each Application Module I specified the connection type as JDBC URL.
In the configuration I specified doConnectionPooling = 'true' as well as the max connection, max available and min available
What I experienced in both cases was that the max connections seem to be ignored as the number of connection as reported by the database (v$session) was exceeded by more than 10.
In addition to this once the load was removed the number of JDBC connecitons did not drop (I would have expected it to drop to max available connections)
My questions are -
1. When specifying to use a 'JDBC Datasource' style of connection, is it in fact OC4J that is then responsible for pooling JDBC connections? And in this case should BC4J's doConnectionPooling parameter be set to true or false?
2. Are there any known issues with the use of the JDBC Conneciton Pool as stated by the above to approaches?Thanks for the additional info. Please see my comments. below.
Sorry should have been more specififc -
1. Is each application pool using a different JDBC user? You mentioned DatabaseConnection1 and DatabaseConnection2
above; are these connections to different schemas / users? If so, BC4J will create a separate connection pool for each
JDBC user. Each connection pool will have its own maximum pool size.
Each 'DatabaseConnection' refers to a different database, actually hosted on a seperate physical server, different
schema and different user.BC4J will maintain a separate connection pool for each permutation of JDBC URL / schema. If each user is connecting
to a different DB instance then I would expect no greater than 10 DB sessions. However, if a DB instance is hosting
more than user then I would expect greater than 10 DB sessions (though still no more than 10 DB sessions per user).
2. Are all the v$session sessions related to the JDBC clients? There should be at least one additional database
session which will be related to the session that is querying v$session.
When querying the v$session table I specifically look for connections from the user in quesiton and from the machine
name in question and in doing so eliminate the database system's connections, as well as the query tools'
connection. One area I'm not sure about is the connection BC4J uses to write to its temporary tables. I am using
Stateless release mode and have not explicetly stated to save to the database but I'm wondering if it still does if so
and how does it come into the equation with max connections?BC4J's internal connections are also pooled and the limits apply as mentioned above. So, if you have specified
internal connection info for a schema which is different than the users above I would expect the additional conns.
One helpful diagnostic tool, albeit programmatic, might be to print the information about the connection pools after
your test client(s) have finished. This may be accomplished as follows:
// get a reference to the BC4J connection pool manager
import oracle.jbo.server.ConnectionPoolManagerFactory;
import oracle.jbo.server.ConnectionPoolManagerImpl;
import oracle.jbo.pool.ResourcePool;
import java.io.PrintWriter;
import java.util.Enumeration;
// get the ConnectionPoolManager. assume that it is an instance of the supplied manager
ConnectionPoolManagerImpl mgr = (ConnectionPoolManagerImpl)ConnectionPoolManagerFactory.getConnectionPoolManager();
Enumeration keys = mgr.getResourcePoolKeys();
PrintWriter pw = new PrintWriter(System.out, true);
while (keys.hasMoreElements())
Object key = keys.nextElement();
ResourcePool pool = (ResourcePool)mgr.getResourcePool(key);
System.out.println("Dumping pool statistics for pool: " + key);
pool.dumpPoolStatistics(pw);
} -
XA error when starting WLS6.1(SP2) with XA connection pools
I am running WLS6.1 on HPUX11 with an Oracle Database 8.1.7. I am using the XA jDriver/Oracle
for my connection pools but when I start the server I get the following error:-
<Apr 25, 2002 6:10:21 PM BST> <Error> <JDBC> <neptune.xenicom.net> <myserver> <main>
<system> <> <001060> <Cannot startup connection pool "test" weblogic.common.ResourceException:
java.s
ql.SQLException: open failed for XAResource 'test' 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)
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:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
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:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy29.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2761)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:370)
at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
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:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy38.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:480)
at weblogic.management.Admin.startApplicationManager(Admin.java:1180)
at weblogic.management.Admin.finish(Admin.java:590)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:518)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
at weblogic.Server.main(Server.java:35)
at weblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnectionEnvFactory.java:209)
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)
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)
I can create a normal (non-X/A) connection pools without any problems however the
X/A one will just not work at all. I spotted on a goggle newsgroup that someone else
had this exact same problem but running on WINNT but there was no resolution. The
following is the trace from the XA trace file:-
ORACLE XA: Version 8.1.7.0.0. RM name = 'Oracle_XA'.
181020.21758.1.-662733300:
xaoopen: xa_info=Oracle_XA+Acc=P/imsi/imsi+SesTm=100+DB=test+Threads=true+LogDir
=.+DbgFl=0x15,rmid=-662733300,flags=0x0
181020.21758.1.-662733300:
ORA-12547: TNS:lost contact
181020.21758.1.-662733300:
xaolgn_help: XAER_RMERR; OCIServerAttach failed. ORA-12547.
181020.21758.1.-662733300:
xaoopen: return -3
I have the whole application up and running fine on a WIN2000 platform with its own
database on the local machine. Also I can point my WIN2000 application to use the
database on the HPUX11 machine no problem.
This leads me to think this is a TNS related problem as I cant think of anything
else !.
Any help greatly appreciated...!
MartinHi Martin,
Using oracles Advanced Security Options can cause this, comment security
related lines out of your "sqlnet.ora" they generally have the words,
ENCRYPTION or CRYPTO in them.
Also try to set ORACLE_SID environment variable, like in the server startup
script.
ORACLE_SID=<SID_NAME>
export ORACLE_SID
Try it and see if it works. This is purely an Oracle issue not WebLogic
related. Try to contact Oracle support if you cannot resolve the issue with
above steps. You may have to reinstall the Client.
hth
sree
"Martin Porter" <[email protected]> wrote in message
news:[email protected]...
>
I am running WLS6.1 on HPUX11 with an Oracle Database 8.1.7. I am usingthe XA jDriver/Oracle
for my connection pools but when I start the server I get the followingerror:-
>
<Apr 25, 2002 6:10:21 PM BST> <Error> <JDBC> <neptune.xenicom.net><myserver> <main>
<system> <> <001060> <Cannot startup connection pool "test"weblogic.common.ResourceException:
java.s
ql.SQLException: open failed for XAResource 'test' with error XAER_RMERR :A resource
manager error has occured in the transaction branch. Check Oracle XA tracefile(s)
(if any) for database
errors. The Oracle XA trace file(s) are located at the directory whereyou start
the Weblogic Server, 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
atweblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
arget.java:329)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Deployment
Target.java:279)
atweblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(D
eploymentTarget.java:233)
atweblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(Deploym
entTarget.java:193)
at java.lang.reflect.Method.invoke(Native Method)
atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
.java:636)
atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
21)
atweblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
nImpl.java:359)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy29.updateDeployments(Unknown Source)
atweblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(
ServerMBean_CachingStub.java:2761)
atweblogic.management.mbeans.custom.ApplicationManager.startConfigManager(Appl
icationManager.java:370)
atweblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManage
r.java:160)
at java.lang.reflect.Method.invoke(Native Method)
atweblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
.java:636)
atweblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
21)
atweblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
nImpl.java:359)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
atcom.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
atweblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy38.start(Unknown Source)
atweblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(
ApplicationManagerMBean_CachingStub.java:480)
atweblogic.management.Admin.startApplicationManager(Admin.java:1180)
at weblogic.management.Admin.finish(Admin.java:590)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:518)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
at weblogic.Server.main(Server.java:35)
atweblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnec
tionEnvFactory.java:209)
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
atweblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
arget.java:329)
atweblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Deployment
Target.java:279)
atweblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(D
eploymentTarget.java:233)
atweblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(Deploym
entTarget.java:193)
>
I can create a normal (non-X/A) connection pools without any problemshowever the
X/A one will just not work at all. I spotted on a goggle newsgroup thatsomeone else
had this exact same problem but running on WINNT but there was noresolution. The
following is the trace from the XA trace file:-
ORACLE XA: Version 8.1.7.0.0. RM name = 'Oracle_XA'.
181020.21758.1.-662733300:
xaoopen:xa_info=Oracle_XA+Acc=P/imsi/imsi+SesTm=100+DB=test+Threads=true+LogDir
=.+DbgFl=0x15,rmid=-662733300,flags=0x0
181020.21758.1.-662733300:
ORA-12547: TNS:lost contact
181020.21758.1.-662733300:
xaolgn_help: XAER_RMERR; OCIServerAttach failed. ORA-12547.
181020.21758.1.-662733300:
xaoopen: return -3
I have the whole application up and running fine on a WIN2000 platformwith its own
database on the local machine. Also I can point my WIN2000 application touse the
database on the HPUX11 machine no problem.
This leads me to think this is a TNS related problem as I cant think ofanything
else !.
Any help greatly appreciated...!
Martin -
Urgent...Help Needed.1. Helper Class 2. Connection Pool
Hello,
1. There are few helper classes which has to be
shared b/w session and entity beans. But it
seems,state of the object is not transfered to entity
bean though the class has implemented Serializable
interface. I have archived all the helper class and
copied to j2ee\home\lib directory. The same jar file
is made accessible to server via updating <library-
path> in j2ee/home/config/application.xml file.
2. How can i utilise connection pooling in oc4j. In data-sources.xml, i am using
"OracleConnectionPoolDataSource" class. But i feel that connection pool is not utilised coz server hangs in the middle of the retrieval.
The value of max-connections is 50.
We are actually migrating from Weblogic 5.1.0 to Oracle 9i AS. In weblogic, we had given 10 max connections in weblogic.properties,it is working fine. But i dont understand why it is not working in 9i AS though the max-connections is 50.
Kindly let me know the solution at the earliest as it is very urgent to get the program running...
Thanx and Regards,
AchyuthHi,
hopefully I can help you.
1. There are few helper classes which has to be ...We have just the same constellation. We have put the HelperClasses in the
J2EE/home/lib dir, NOT specifying it in the application.xml. So everything works fine.
The only thing: never, again: never put these files within WEB-INF and the lib-dir.
With the HelperClasses in both we have only faced massive problems, mostly ClasCastExceptions.
We had once all the helperClasses within J2EE/home/applications/lib, but this requires to
specify this dir within the orion-application.xml within the appl dir in applications-deployment.
It also worked fine.
2. How can i utilise connection pooling in oc4j. In data-sources.xml, i am using ...I'm not sure of this, but I think, the container handles Connection Pooling, no matter what Factory you
specify. But I think, the Class hasn't to be OracleConnectionPool ... but I have to check this (right now
I have no access to our datasource.xml ..)
cu
ed -
Help!!! Connection Pool for DB2 problem !!
I created a DB2 connection pool in the weblogic.properties, but when
weblogic server starting, I got the following error message:
Thursday August 24 14:26:47 CST 2000:<E> <WebLogicServer> Failed to invoke
startup class
weblogic.jdbc.common.internal.JdbcStartup=weblogic.jdbc.common.internal.Jdbc
Startup
java.security.AccessControlException: access denied (java.sql.SQLPermission
setLog)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java
:272)
at
java.security.AccessController.checkPermission(AccessController.java:399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.sql.DriverManager.setLogStream(DriverManager.java:397)
at weblogic.jdbc.common.internal.JdbcInfo.initLog(JdbcInfo.java:66)
at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:187)
at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java:109)
at
weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java:62)
I don't know how to solve it, and if I use Console to create a Connection
pool, I can successful create it...........please help me !!! I have checked
the weblogic.policy file, but I can not find any problem........
the configuration in the weblogic.properties as below:
weblogic.jdbc.connectionPool.ForumPool=\
url=jdbc:db2:forum,\
driver=COM.ibm.db2.jdbc.app.DB2Driver,\
loginDelaySecs=1,\
initialCapacity=2,\
maxCapacity=10,\
capacityIncrement=1,\
allowShrinking=true,\
shrinkPeriodMins=15,\
refreshMinutes=10,\
testTable=administrator.user,\
props=user=db2admin;password=db2admin
weblogic.allow.reserve.weblogic.jdbc.connectionPool.ForumPool=everyone
weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.JtsForumDS=ForumPool
weblogic.jdbc.DataSource.NonJtsForumDS=ForumPoolYou may want to try the JDBC newsgroup.
Michael Girdley
BEA Systems Inc
"DataL" <[email protected]> wrote in message news:[email protected]...
I created a DB2 connection pool in the weblogic.properties, but when
weblogic server starting, I got the following error message:
Thursday August 24 14:26:47 CST 2000:<E> <WebLogicServer> Failed to invoke
startup class
weblogic.jdbc.common.internal.JdbcStartup=weblogic.jdbc.common.internal.Jdbc
Startup
java.security.AccessControlException: access denied(java.sql.SQLPermission
setLog)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java
:272)
at
java.security.AccessController.checkPermission(AccessController.java:399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.sql.DriverManager.setLogStream(DriverManager.java:397)
at weblogic.jdbc.common.internal.JdbcInfo.initLog(JdbcInfo.java:66)
at weblogic.jdbc.common.internal.JdbcInfo.startup(JdbcInfo.java:187)
at weblogic.jdbc.common.internal.JdbcStartup.main(JdbcStartup.java:11)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.t3.srvr.StartupThread.runMain(StartupThread.java:219)
at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java:109)
at
weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java:62)
I don't know how to solve it, and if I use Console to create a Connection
pool, I can successful create it...........please help me !!! I havechecked
the weblogic.policy file, but I can not find any problem........
the configuration in the weblogic.properties as below:
weblogic.jdbc.connectionPool.ForumPool=\
url=jdbc:db2:forum,\
driver=COM.ibm.db2.jdbc.app.DB2Driver,\
loginDelaySecs=1,\
initialCapacity=2,\
maxCapacity=10,\
capacityIncrement=1,\
allowShrinking=true,\
shrinkPeriodMins=15,\
refreshMinutes=10,\
testTable=administrator.user,\
props=user=db2admin;password=db2admin
weblogic.allow.reserve.weblogic.jdbc.connectionPool.ForumPool=everyone
weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.JtsForumDS=ForumPool
weblogic.jdbc.DataSource.NonJtsForumDS=ForumPool -
Help required with (soundcard) connection / settings, thanks in advan
Help required with connection / settings between a Creative Sound Blaster Audigy Platinum EX (soundcard) and a Creative DTT3500 Digital (5. speakers).
The problem
No sound from any of the speakers. (Exception can plug in headphones at front)
Background
My computer has been recently upgraded at my local computer shop and all programs re-installed (including driver update from Creative's website). However after reconnecting speakers and restoring the original settings I?m getting no sound from any of the speakers. I?ve followed all the available advice/instructions I can find on this website and manuals to no avail.
Set-up
Physical
(Digital DIN) Speakers/decoder amplifier (DTT3500) connected to the (digital out) soundcard (Audigy Platinum EX) using minijack to DIN cable. (As per instruction manual)
Software
Creative Audio Consul ? setting as per instructions, however have tried variations in vain. (Note: above tabs there is a select device box with SB Audigy [A0000] in it ? only option. Just wondering what [A0000] means?)
Your advice please. A simple step by step guide would be appreciated, many thanks in advance, Jon"My computer has been recently upgraded at my local computer shop and all programs re-installed (including driver update from Creative's website). "
Do you have the original installation disk?
If so, try installing THOSE drivers, ESPECIALLY if it worked before. Be sure to uninstall what is there now, first.
Its natural for most people to want the 'latest' drivers for their hardware. However:
After experiencing some difficulties with some CL 'updates' for certain products, I now avoid them UNLESS I am having a PROBLEM with the existing drivers. -
Help in creating the connection pool for Oracle 8i using Jdriver
Hi
Iam pretty new to Weblogic and would be greatfull if some one can help me
out in finding the parameters to be specified in Weblogic console for creating
a Connection pool for Oracle 8i database running on solaris. I have installed
necessary client libraries in weblogic machine.
The details for my database are as follows
database name : mydb
database server : 173.24.24.1
database port : 1521
username : myuser
I would appreciate if you can provide me the following details to be entered in
weblogic console for creating the connection pool
URL
DRIVER CLASS NAME
PROPERTIES
ACL NAME
PASSWORD
Thanks,
S HariHari
Jdbc Connection Pool Configuration
URL= jdbc:weblogic:oracle
DRIVER CLASS NAME=weblogic.jdbc.oci.Driver
PROPERTIES
user=myuser
password=<password in mydb>
server=mydb
After configuring Connection Pool Select Targets tab. Select Server from Available
to Chosen.
Deepak
Hari wrote:
Hi
Iam pretty new to Weblogic and would be greatfull if some one can help me
out in finding the parameters to be specified in Weblogic console for creating
a Connection pool for Oracle 8i database running on solaris. I have installed
necessary client libraries in weblogic machine.
The details for my database are as follows
database name : mydb
database server : 173.24.24.1
database port : 1521
username : myuser
I would appreciate if you can provide me the following details to be entered in
weblogic console for creating the connection pool
URL
DRIVER CLASS NAME
PROPERTIES
ACL NAME
PASSWORD
Thanks,
S Hari -
Failover and Load Balancing with JNDI Connection Pools
Hi,
I am trying to figure out how would JNDI Connection Pooling work along with failover or DNS Load Balancing.
Would connections be distributed equally among the list?
Would the pool work with multiple heterogeneous connections (i.e. connections to different but equivalent servers ), or do all the connections in the pool have to be homogeneous (i.e. to the same server)?
Thanks,
SergioHi,
I am trying to figure out how would JNDI Connection Pooling work along with failover or DNS Load Balancing.
Would connections be distributed equally among the list?
Would the pool work with multiple heterogeneous connections (i.e. connections to different but equivalent servers ), or do all the connections in the pool have to be homogeneous (i.e. to the same server)?
Thanks,
Sergio -
Startup problems with XA connection pools on Oracle and WLS 6.1
I am having starup problems trying to set up a WLS 6.1 connection pool using
XA. When I try to start the server, I get the following exception:
<Nov 19, 2001 3:06:28 PM EST> <Error> <JDBC> <Cannot startup connection pool
"dbdev1XAPool" weblogic.common.ResourceException: java.sql.SQLException:
open failed for XAResource 'dbdev1' 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 yo
u 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:600)
at
weblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnec
tionEnvFactory.java:194)
at
weblogic.jdbc.common.internal.XAConnectionEnvFactory.createResource(XAConnec
tionEnvFactory.java:54)
at
weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.j
ava: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(DeploymentT
arget.java:329)
The contents of the Oracle trace file:
ORACLE XA: Version 8.1.7.0.0. RM name = 'Oracle_XA'.
150627.1312:344.344.330727191:
xaoopen:
xa_info=Oracle_XA+Acc=P/cmauser/admin+SesTm=100+DB=dbdev1+Threads=true+LogDi
r=.+DbgFl=0x15,rmid=330727191,flags=0x0
150627.1312:344.344.330727191:
ORA-12560: TNS:protocol adapter error
150627.1312:344.344.330727191:
xaolgn_help: XAER_RMERR; OCIServerAttach failed. ORA-12560.
150627.1312:344.344.330727191:
xaoopen: return -3
I am running WLS 6.1 and Oracle 8.1.7 on windows (separate machines). The
connection pool settings are:
<JDBCConnectionPool CapacityIncrement="0"
DriverName="weblogic.jdbc.oci.xa.XADataSource" InitialCapacity="40"
MaxCapacity="40" Name="dbdev1XAPool"
Properties="user=cmauser;password=admin;dataSourceName=dbdev1"
RefreshMinutes="15" ShrinkingEnabled="false" SupportsLocalTransaction="true"
Targets="cmatest" TestTableName="hppcontentsource" />
I have not had any problems connecting to the same database through regular
JDBC connection pools or through the utils.dbping utility.
What am I doing wrong?This is a dup message. Add "DebugConfigInfo OFF" in httpd.conf.
Jong
[email protected] (Olaf Foellinger) wrote:
>
Hi,
we're trying to setup apache on linux so that it's forwarding all jsp
requests to Bea WLS 6.0 on Solaris. We've installed the mod_wl.so
modules according to the documentation. When apache starts it shows the
following warning:
[Tue Jan 9 13:22:55 2001] [warn] Loaded DSO
/usr/lib/apache/1.3/mod_wl.so uses plain Apache 1.3 +API, this module
might crash under EAPI! (please recompile it with -DEAPI)
and in fact, when we try to load a jsp page we get
[Tue Jan 9 13:29:14 2001] [notice] child pid 5780 exit signal
Segmentation fault (11)
Does anyone have a working solution ? Can bea provide us with a plugin
compiled with EAPI ?
Greetings Olaf -
I get the error message "PLS-00201: identifier 'JAVA_XA.XA_START_NEW' must
be declared" when I try to deploy a J2EE application which uses XA pools and
TX datasources.
I am not sure how to setup my system for running with XA. I have tried to
see what other people have done in this new group and copied from them.
My connection pools looks like this:
<JDBCConnectionPool
DriverName="oracle.jdbc.xa.client.OracleXADataSource"
MaxCapacity="5" Name="alba"
Properties="user=<user>;url=jdbc:oracle:thin:@haux01:1526:UTV8;password=<pas
sword>;dataSourceName=alba"
RefreshMinutes="60" Targets="myserver"
URL="jdbc:oracle:thin:@haux01:1526:UTV8"/>
My data sources look like this:
<JDBCTxDataSource JNDIName="alba_ora817_localsl"
Name="alba_ora817_localsl" PoolName="alba" Targets="myserver"/>
The database is oracle 8.1.7.2.0
The reason I started trying to use XA in the first place was when I tried to
connect to two databases in the same transaction. I then got an error
message saying: java.sql.SQLException: Connection has already been created
in this tx context for pool named <first pool name>. Illegal attempt to
create connection from another pool: <second pool name>. As I have
understood, XA pools should fix this problem.
/Eirik
Hi Eirik
Is your Oracle database Server setup for XA? Check Oracle Docs on how to do
that.
you need to make sure this script is run on the server, initjvm.sql (It
should be in your oracle installation rdbms scripts) and then grant select
permission on dba_pending_transactions.
hth
sree
"newsgroups.bea.com" <[email protected]> wrote in message
news:[email protected]...
> I get the error message "PLS-00201: identifier 'JAVA_XA.XA_START_NEW' must
> be declared" when I try to deploy a J2EE application which uses XA pools
and
> TX datasources.
> I am not sure how to setup my system for running with XA. I have tried to
> see what other people have done in this new group and copied from them.
> My connection pools looks like this:
> <JDBCConnectionPool
> DriverName="oracle.jdbc.xa.client.OracleXADataSource"
> MaxCapacity="5" Name="alba"
>
>
Properties="user=<user>;url=jdbc:oracle:thin:@haux01:1526:UTV8;password=<pas
> sword>;dataSourceName=alba"
> RefreshMinutes="60" Targets="myserver"
> URL="jdbc:oracle:thin:@haux01:1526:UTV8"/>
>
> My data sources look like this:
> <JDBCTxDataSource JNDIName="alba_ora817_localsl"
> Name="alba_ora817_localsl" PoolName="alba" Targets="myserver"/>
>
> The database is oracle 8.1.7.2.0
>
> The reason I started trying to use XA in the first place was when I tried
to
> connect to two databases in the same transaction. I then got an error
> message saying: java.sql.SQLException: Connection has already been created
> in this tx context for pool named <first pool name>. Illegal attempt to
> create connection from another pool: <second pool name>. As I have
> understood, XA pools should fix this problem.
>
>
> /Eirik
>
>
Maybe you are looking for
-
Mixing memory modules of different sizes in a Mac Mini
I have a MM Intel Core Duo with a 1.66GHz processor and 512 MB 667 MHz SDRAM. Model Macmini1,1, 32 Bits, SMC Version (system): 1.3f4. Anybody know if you can mix memory modules in it? I have the standard 256 modules (2) and would take one out and rep
-
100% Width Slideshow Not Displaying Images Correctly In Phone Version...
Hi all... Again. 2nd issue encountered tonight since working on the mobile version of my current project. Having copied, pasted and resized the 100% width slideshow from the homepage of my Desktop version to my Phone version and after having applied
-
Hi, i need include de jdbc driver for postgres en my jar application file... i use netbeans 4 but i dont know make this... Help meeeeeeeeeeeeeee
-
I am a new iPad Air user. How do I get back to the home page with all the icons.
I Am a new user. How do I get back to the home page with all the icons.
-
BDP-S6200 - issues with Amazon Prime Instant Video
I recently purchased the BDP-S6200. For the most part, it works great. I was able to log into my Amazon Prime account to watch the Instant videos. The problem I have is after I finish watching something, I can't do anything else. Can't go back to