Failed to obtain/create connection from connection pool after redeploy
I have a web application (.war) that uses a jdbc connection pool. The application works fine, however after I redeploy it using the administration console I get "Failed to obtain/create connection from connection pool [ Datavision_Pool ]. Reason : null" followed by "Error allocating connection : [Error in allocating a connection. Cause: null]" from javax.enterprise.resource.resourceadapter and I am forced to restart the instance. I am running Sun Java System Application Server 9.1 (build b58g-fcs)
using a connection pool to a Microsoft SQL 2000 database using inet software's JDBC drivers. I need to be able to redeploy applications without having to restart the instance. Any help is appreciated.
I have turned on some additional diagnostics and found out some answers and a work-around, but I think that there may be a bug in the way JDBC connection pool classes are loaded. The actual error was a null pointer in the JDBC driver class in the perpareStatement method. The only line in this method is "return factory.createPreparedStatement( this , sql );" and the only possible NPE would be if the factory was null, which should be impossible because it is a static variable and it is initialized when the class is loaded. The problem occurs because we deploy the JDBC driver .jar file within our .war file, for use when a client doesn't have or want to use connection pooling. Apparently, the connection pool must have picked up some of these classes and when the .war was redeployed, the reference to the factory was lost for existing connections (not sure how). If I remove the JDBC .jar file from the .war, it works, but that wasn't an ideal solution, the other way to get it to work was to change the sun-web.xml file to have <class-loader delegate="true">. We previously had it set to false in version 8.1 because of interference with a different version of the apache Tiles classes, which has now been addressed in version 9.1.
I still think there is an issue, because the connection pool should never use the application specific classloaders. Am I wrong to believe this?
Similar Messages
-
Problem with EJB and JMS - Failed to obtain/create connection
hello ejb and jms programmers,
My problem is my topic MDB keep on retrieving the same message when there is a database connection failure. Maybe somebody could help me how to prevent to retrieve the same data?
Given:
- I purposedly turn off the pointbase database because im testing my error handling.
- Im using SJSAS 8 as my application server.
- My message Driven Bean of topic type.
- Im using CMP for my entity bean
Here is the scenario of whats happening - step by step:
1. A separate application publishes a message to JMS queue server
2. My MDB retrieves this message and do some processing then inserts a record (transaction history) in my database
3. But my db is turned off or down
4. My MDB sends a successful processing reply to the JMS queue server
5. Then i noticed that my server.log keeps on growing so when i opened it, the record was not inserted and printed the stacktrace below "RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException" (complete stacktrace below)
6. I understand the cause of the stacktrace is because the DB is turned off. But what i dont understand is that my MDB keeps on reading the same message. Since my MDB is of topic type, isnt a topic MDB supposedly reads a message only once???
So my questions are:
1. how do i handle insert database error?
2. how can i stop my MDB from processing the same message?
3. any better suggestions?
Thank you in advance :)
leigh
*** more complete stack trace ***
[#|2005-01-09T15:35:57.097+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.transaction|_ThreadID=17;|JTS5041: The resource manager is doing work outside a global transaction
javax.transaction.xa.XAException
at com.pointbase.xa.xaException.getXAException(Unknown Source)
at com.pointbase.xa.xaConnectionResource.start(Unknown Source)
at com.sun.gjc.spi.XAResourceImpl.start(XAResourceImpl.java:162)
[#|2005-01-09T15:35:57.167+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5027:Unexpected exception in resource pooling
javax.transaction.SystemException
at com.sun.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:185)
at com.sun.enterprise.distributedtx.J2EETransaction.enlistResource(J2EETransaction.java:360)
at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.enlistResource(J2EETransactionManagerImpl.java:303)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:115)
[#|2005-01-09T15:35:57.177+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException|#]
[#|2005-01-09T15:35:57.227+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: javax.transaction.SystemException]|#]
[#|2005-01-09T15:35:57.237+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.ejb|_ThreadID=17;|EJB5071: Some remote or transactional roll back exception occurred
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO77006: SQL exception: state = null, error code = 0.
NestedException: java.sql.SQLException: Error in allocating a connection. Cause: javax.transaction.SystemException
FailedObjectArray: [[email protected]5ac]
at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnectionInternal(TransactionImpl.java:1444)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnection(TransactionImpl.java:1339)Hi annie,
Wherever you are handling database transactions,
you'd not be able to create a Connection if database
is closed (I think you mentioned turning off the
database) then at this condition, you should
certainly throw a System level exception and stop all
processing with some meaningful flow to indicate a
failure (like display message on UI). Even
network problems are handled by exceptions... so I
don't see a reason why you didn't wrap it in the
first place.
Anyway, try handling specific exceptions rather than
the general Exception... this will give you a better
idea of what to do in case of an exception.Yes i know this. I am practicing this in my non-j2ee server applications. But the j2ee app im making, i just pass the db url in the descriptor and the app server automatically creates the connection for my app. So where would i put exception handling?
2. how can i stop my MDB from processing the same
message?Guaranteed delivery is not supposed to stop
processing. It will continue to process the message
after certain intervals till the message is
delivered. You shouldn't deliver it at all, if you
are able to detect that the database is off
The problem here is that my MDB automatically retrieves the message from the JMS queue server. Im not the one retrieving the messages manually.
My assumed behavior of topic MDB is once the a certain MDB retrieves a message it will not retrieve the same message anymore.
thank you in advance.
leigh -
Hi,
I am Shanmugavel, SharePoint developer,
I am facing the below SharePoint 2013 deployment issue while deploying using VS2012.
If i will deploy the same wsp or existing wsp
(last build) using direct powershell deployment, the solution adding properly, but the same timeout exception coming while activation the features. Please find the below error.
I tried the below activists:
1. Restarted my dev server, DB server.
2. tried the same solution id different server
3. tried existing wsp file (last build version)
4. Deactivated all the features, including project Active deployment configuration.... but still i am facing the same issue.
I hope this is not coding level issue, because still my code is not start running, before that some problem coming.
Please help me any one..... Last two days i am struck because of this...What you need to understand is the installation of a WSP does not do much. It just makes sure that you relevant solution files are deployed to the SharePoint farm.
Next comes the point when you activate the features. It is when the code which you have written to "Activate" certain features for your custom solution.
Regarding the error you are getting, it typically means that you have more connections (default is I guess 100) open for a SQL database then you are allowed to.
If you have a custom database and you are opening a connection, make sure you close it as well.
Look at the similar discussion here:
The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool
size was reached[^]
I would suggest further to look at the
ULS logs[^] to get better insight.
Manas Bhardwaj's Stream : www.manasbhardwaj.net -
I am using WLS7 with SP1.
I just recently migrated from WLS6.0. When my code tries to grab a
connection from the pool, it throws an exception
java.sql.SQLException: Pool connect failed:
weblogic.common.ResourceException: Access not allowed
at weblogic.jdbc.pool.Driver.connect(Driver.java:202)
Does anyone know if anything changed from 6.0 to 7?
Here is a piece of the code that throws exception.
Driver driver =
(Driver)Class.forName("weblogic.jdbc.pool.Driver")
.newInstance();
conn = driver.connect("jdbc:weblogic:pool:" +
dbName, null);
Thanks in advance.Hi Jung,
"Jung Yang" <[email protected]> wrote in message
news:[email protected]...
Do you know how to change security setting on the connection pool?
Thanks.WebConsole:
1.Compatibility Security => ACLs
Create a new ACL,
name : weblogic.jdbc.connectionPool.yourPoolname
permission : reserve, reset
group : everynone
2.Services => JDBC => Connection Pool
Create a new Connection Pool
ACL Name : weblogic.jdbc.connectionPool.yourPoolname
In 'Target' tab, choose server and click the Apply button
Slava
>
"Slava Imeshev" <[email protected]> wrote in message
news:[email protected]...
Hi Jung,
Could you try providing weblogic user name and password
in the properties?
Could you also check security setting of the connection pool?
Regards,
Slava Imeshev
"Jung Yang" <[email protected]> wrote in message
news:[email protected]...
Well that is exactly what I am doing. The variable dbName is database
connection pool name that I created in weblogic console. Again, it
worked
in WLS6 but after migration, it stopped working.
Thanks.
"Mitesh Patel" <[email protected]> wrote in message
news:[email protected]...
In my code I am supplying name of the connection pool already
created
in
weblogic server. I am asking you to get connection from the pool
using
pool
driver.
In your case you are trying to create connection straight to
database
using pool
driver.
What I am asking is pass name of the connection pool instead of
database
name.
Thanks,
Mitesh
Jung Yang wrote:
What would be the difference between your code and mine? Mine
simple
appends dbName string value for connection pool name at the end of
"jdbc:weblogic:pool:"? And why same exact code would work in WLS6and
not
work in WLS7?
Thanks.
"Mitesh Patel" <[email protected]> wrote in message
news:[email protected]...
conn = driver.connect("jdbc:weblogic:pool:" +
dbName, null);Instead of doing this what if you use
Connection conn =
myDriver.connect("jdbc:weblogic:pool:myConnectionPool", null);
Will you please try this and see if that helps?
Mitesh
Jung Yang wrote:
Isn't that exactly what I posted for my code piece?
Thanks.
"Mitesh Patel" <[email protected]> wrote in message
news:[email protected]...
Try As described below:
The following example demonstrates how to use a database
connection
pool
from a servlet.
Load the pool driver and cast it to java.sql.Driver. The
full
pathname
of
the driver is weblogic.jdbc.pool.Driver. For example:
Driver myDriver = (Driver)
Class.forName("weblogic.jdbc.pool.Driver").newInstance();
Create a connection using the URL for the driver, plus
(optionally)
the
name of the registered connection pool. The URL of the pool
driver
is
jdbc:weblogic:pool.
You can identify the pool in either of two ways:
Specify the name of the connection pool in a
java.util.Properties
object
using the key connectionPoolID. For example:
Properties props = new
Properties();props.put("connectionPoolID",
"myConnectionPool");Connection conn =
myDriver.connect("jdbc:weblogic:pool", props);
Add the name of the pool to the end of the URL. In this case
you
do
not
need a Properties object unless you are setting a username
and
password
for using a connection from the pool. For example:
Connection conn =
myDriver.connect("jdbc:weblogic:pool:myConnectionPool",
null);
Note that the Driver.connect() method is used in theseexamples
instead of
the DriverManger.getConnection() method. Although you may
use
DriverManger.getConnection() to obtain a databaseconnection,
we
recommend
that you use Driver.connect() because this method is not
synchronized
and
provides better performance.
Note that the Connection returned by connect() is an
instance
of
weblogic.jdbc.pool.Connection.
Call the close() method on the Connection object when youfinish
with
your
JDBC calls, so that the connection is properly returned to
the
pool. A
good coding practice is to create the connection in a try
block
and
then
close the connection in a finally block, to make sure the
connection
is
closed in all cases.
conn.close();
Mitesh
Jung Yang wrote:
I am using WLS7 with SP1.
I just recently migrated from WLS6.0. When my code tries
to
grab a
connection from the pool, it throws an exception
java.sql.SQLException: Pool connect failed:
weblogic.common.ResourceException: Access not allowed
at
weblogic.jdbc.pool.Driver.connect(Driver.java:202)
Does anyone know if anything changed from 6.0 to 7?
Here is a piece of the code that throws exception.
Driver driver =
(Driver)Class.forName("weblogic.jdbc.pool.Driver")
.newInstance();
conn =
driver.connect("jdbc:weblogic:pool:"
+
dbName,
null);
>>>>>>>>>
Thanks in advance. -
How can I get the virtual connection from connection pool?
Hi, All, I create the connection pool to Database, then call connPool->createConnetion("scoot","tiger") , it creates a new physical connection to database, not from connection pool. I check the busy number of connection in connection pool, it always 0.
here is my code, please give me advice.Thanks!
int minConn,maxConn,incrConn;
minConn = 4;
maxConn = 5; //nMax;
incrConn = 1;
if(env == 0x0)
env = Environment::createEnvironment(Environment::DEFAULT);
if (connPool == 0x0)
connPool = env->createConnectionPool("scott", "tiger","test.oracle.com", minConn, maxConn, incrConn);
// here already has 4 physical connections to database;
Connection con,con2,*con3;
Statement *stmt;
int nBusy = connPool->getBusyConnections();
//nBusy = 0
try
con = connPool->createConnection (szUser, szPassword);
// create a new physical connection to database
nBusy = connPool->getBusyConnections();
//nBusy = 0
con2 = connPool->createConnection ("scott", "tiger");
nBusy = connPool->getBusyConnections();
}catch(SQLExecption ex)
cout<<ex.what();What you are creating are virtual connections. They do logons using the already existing connections in the pool. The real connections from the pool are picked only before doing a round-trip and released immediately after completing the round-trip. You can see the busyConnetions higher than 1, only when you are using the connections concurrently.
-
Airport cancels networkinga direct ethernet connection from connecting to I
With Airport turned on in the top menu bar, not only does it fail to connect to the Internet, but also it keeps
oops... typing on someone else's keyboard and it is flaky. Try again...
but also it keeps a direct ethernet connection from connecting. As soon as I turn off Airport, it connects fine. What's this all about? -
How to Destory connections from the Pool?
Hi,
I would like to know if it is possible to destroy/refresh a connection id from the DBPool using just a javacode that either refresh the whole pool or just one specific connection.
We are using a DB cluster environment and once one of the Database Servers goes down, the connection continues to point to the old DB Server. We are testing if the connection is still pointing to a valid DBServer (using a simple <i>select getdate()</i> statement (the DBMS is SQLServer 2000). The problem is that even if we close the connection object in the JavaCode, the physical connection still points to the old DB IP address, and we want to kill that connection from the DBPool.
We know that once the connection id is destoyed(using the DESTROY_CONN command of the J2EE engine), a new connection is created for the right DB Server.
We are using the following versio of EP:
6.0.2.37.0.Enterprise_Portal_Support_Package_2
Thanks.Hi,
There is no difference in calling a transaction from module pool and report . The statement
Call transaction tranaction name works similarly in both the cases . The only thing you need to take care is your program flow in Module pool.
For calling transaction set the parameters of the transaction and on using the call transaction statement it will call the transaction withe the set values. use skip initial screen option to execute it from your program. This entire code needs to be written in PAI event where you will be handling your OK codes.
Hope this helps. -
Get Connection from connection pooling
Hi,
I am aware of the fact that to get connection from a connection pool we need to add JNDI name in context.xml of apache tomcat and use it in our application to get connection. I have tested this and it works fine.
Now, we have 12 servers having free database each having almost 20 small Java applications for different purposes (get data from server database do some business logic and maipulation with data from central database and store on central database) each connecting to central database.
We were enjoying life till we had almost 8-9 servers but now many times we have connection issues as there are too many connections to central database and servers are going to increase.
I know my company design is not good but we need some solution.
I want my Java applications to take database connectivity using connection pooling on servers. My Java applications are standalone applications that do not run in web server. Is this approach fine?
I searched google for some solution but was unable to find.
Any pointers would be really helpful.
I think that since my application is outside web container I am unable to get Context (java:/comp/env). Please give me some pointers on how can i get web server context outside web server.
Thanks and Regards,
Vikash Anand.Google ( [jndi standalone application|http://www.google.com/search?q=jndi+standalone+application] ).
-
BB 8320 Failed to obtain IP address when connecting to wireless router
I do not have a data plan but am trying to connect thru my wireless router. When i try to connect after typing the WEP Key in it searches and comes back with "Failed to obtain IP address". How do I fix this?
Hey LoveKizzy,
Welcome to the BlackBerry Support Community Forums.
Use the Wi-Fi Diagnostics tool on your BlackBerry smartphone to find out where the problem is: http://www.blackberry.com/btsc/KB13299
I hope this helps!
-HB
Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)! -
Crashed connection blocks connections from other pools
Setup:
WLS 8.1.0.0 with 2-node cluster
Sybase: 12.0 and 12.5
jConnect 5.5 (EBF11248)
Java HotSpot(TM) Client VM Version 1.4.2-b28
I have two databases (DB1 & DB2) and two connection pools (P1 & P2), each pointing
to a corresponding DB. The pools are created at WLS startup.
Later on, say, DB1 is disconnected (crashed or lost network connectivity). We
found that all connections, whether to DB1 or DB2, becomes extremely slow (on
the order of 10+ mins) to obtain. The stack dumps (see following example) indicate
the crashed one (Thread-36) was stuck at a socket connection and all the others
(for DB2/P2) were waiting for the lock (0xf26b1958) during DriverManager.getConnection
(eg. Thread-153).
While searching at BEA, I noticed a fix CR125320 for 8.1 sp2 that seems to be
relevant but I'm not sure that's the exact fix. That fix specifically mentions
JTSConnection.doClose() but our dump doesn't show that.
Please help.
Thanks,
Bill
"Thread-36" daemon prio=5 tid=0x00da23a8 nid=0x8a runnable [5e97f000..5e9819a0]
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
- locked <0x82db64c0> (a java.net.PlainSocketImpl)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at com.sybase.jdbc2.timedio.RawDbio.doConnect(RawDbio.java:88)
at com.sybase.jdbc2.timedio.InStreamMgr.<init>(InStreamMgr.java:94)
at com.sybase.jdbc2.tds.Tds.login(Tds.java:375)
at com.sybase.jdbc2.jdbc.SybConnection.tryLogin(SybConnection.java:221)
at com.sybase.jdbc2.jdbc.SybConnection.regularConnect(SybConnection.java:198)
at com.sybase.jdbc2.jdbc.SybConnection.<init>(SybConnection.java:177)
at com.sybase.jdbc2.jdbc.SybConnection.<init>(SybConnection.java:129)
at com.sybase.jdbc2.jdbc.SybDriver.connect(SybDriver.java:179)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:175)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:111)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1092)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1029)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:320)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:253)
at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:339)
at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:78)
at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:85)
at weblogic.jdbc.pool.Driver.connect(Driver.java:144)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
- locked <0xf26b1958> (a java.lang.Class)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
- locked <0xf26b1958> (a java.lang.Class)
"Thread-153" daemon prio=5 tid=0x00c46280 nid=0xff waiting for monitor entry [57480000..574819a0]
at java.sql.DriverManager.getConnection(DriverManager.java:187)
- waiting to lock <0xf26b1958> (a java.lang.Class)For the crashed DB, when one tries to get a connection, it gets stuck on a socket
connection. This means all subsequent requsts will all take a long time to just
come out and say it didn't work.
"Slava Imeshev" <[email protected]> wrote:
"Bill" <[email protected]> wrote in message news:[email protected]...
Thanks, Slava. You are right - getConnection is "public static synchronizedConnection
getConnection(String url)". However, how would one reduce the timeouton the socket
read on the crashed DB?I'd fix this problem first. In case of failure you serialize recreation
of the
connections. Depending on number of concurrent requests the process
of recovery can be noticeably lengthy. Fix it and re-do the test.
Regards,
Slava Imeshev
"Slava Imeshev" <[email protected]> wrote:
Don't use DriverManager to obtain connections. DriverManager contains
a lot class-level synchronization and is not recommended for use in
J2EE
environment. The best option is using DataSource obtained via a JNDI
lookup.
Or, use
Driver driver = ((Driver)Class.forName("my.driver")).newInstance();
Properties props = new Properties();
Connection conn = driver.connect(url, props);
Regards,
Slava Imeshev
"Bill" <[email protected]> wrote in message news:[email protected]...
Setup:
WLS 8.1.0.0 with 2-node cluster
Sybase: 12.0 and 12.5
jConnect 5.5 (EBF11248)
Java HotSpot(TM) Client VM Version 1.4.2-b28
I have two databases (DB1 & DB2) and two connection pools (P1 &
P2),
each pointing
to a corresponding DB. The pools are created at WLS startup.
Later on, say, DB1 is disconnected (crashed or lost network connectivity).We
found that all connections, whether to DB1 or DB2, becomes extremelyslow (on
the order of 10+ mins) to obtain. The stack dumps (see following
example)
indicate
the crashed one (Thread-36) was stuck at a socket connection and
all
the others
(for DB2/P2) were waiting for the lock (0xf26b1958) during DriverManager.getConnection
(eg. Thread-153).
While searching at BEA, I noticed a fix CR125320 for 8.1 sp2 that
seems
to be
relevant but I'm not sure that's the exact fix. That fix specificallymentions
JTSConnection.doClose() but our dump doesn't show that.
Please help.
Thanks,
Bill
"Thread-36" daemon prio=5 tid=0x00da23a8 nid=0x8a runnable [5e97f000..5e9819a0]
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
- locked <0x82db64c0> (a java.net.PlainSocketImpl)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at com.sybase.jdbc2.timedio.RawDbio.doConnect(RawDbio.java:88)
at com.sybase.jdbc2.timedio.InStreamMgr.<init>(InStreamMgr.java:94)
at com.sybase.jdbc2.tds.Tds.login(Tds.java:375)
at com.sybase.jdbc2.jdbc.SybConnection.tryLogin(SybConnection.java:221)
at com.sybase.jdbc2.jdbc.SybConnection.regularConnect(SybConnection.java:198)
at com.sybase.jdbc2.jdbc.SybConnection.<init>(SybConnection.java:177)
at com.sybase.jdbc2.jdbc.SybConnection.<init>(SybConnection.java:129)
at com.sybase.jdbc2.jdbc.SybDriver.connect(SybDriver.java:179)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:175)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:111)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1092)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1029)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:320)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:253)
at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:339)
at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:78)
at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:85)
at weblogic.jdbc.pool.Driver.connect(Driver.java:144)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
- locked <0xf26b1958> (a java.lang.Class)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
- locked <0xf26b1958> (a java.lang.Class)
"Thread-153" daemon prio=5 tid=0x00c46280 nid=0xff waiting for monitorentry [57480000..574819a0]
at java.sql.DriverManager.getConnection(DriverManager.java:187)
- waiting to lock <0xf26b1958> (a java.lang.Class) -
Weblogic realm authentication failure getting connection from pool
We are getting this error when we try to get a connection from the
pool for a Tx Data Source. We are successfully getting connections
from a (non-Tx) Data Source.
java.lang.SecurityException: Authentication for user Fitness_demo
denied in realm weblogic
at weblogic.security.acl.Realm.authenticate(Realm.java:212)
at weblogic.security.acl.Realm.getAuthenticatedName(Realm.java:233)
at weblogic.security.acl.internal.Security.authenticate(Security.java:125)
at weblogic.security.acl.Security.doAsPrivileged(Security.java:481)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:127)
We have added the DB user as a user in the realm, which usually does
the trick; but in this case it does not. We are using Merant's
JSQLConnect type 2 driver for SQL Server, and we are running on
Solaris. The scenario works fine using Oracle Thin driver on Windows.
Do we need ACL entries or something? We do not have any ACL entries
now.
Thanks,
-wesWe are getting this error when we try to get a connection from the
pool for a Tx Data Source. We are successfully getting connections
from a (non-Tx) Data Source.
java.lang.SecurityException: Authentication for user Fitness_demo
denied in realm weblogic
at weblogic.security.acl.Realm.authenticate(Realm.java:212)
at weblogic.security.acl.Realm.getAuthenticatedName(Realm.java:233)
at weblogic.security.acl.internal.Security.authenticate(Security.java:125)
at weblogic.security.acl.Security.doAsPrivileged(Security.java:481)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:127)
We have added the DB user as a user in the realm, which usually does
the trick; but in this case it does not. We are using Merant's
JSQLConnect type 2 driver for SQL Server, and we are running on
Solaris. The scenario works fine using Oracle Thin driver on Windows.
Do we need ACL entries or something? We do not have any ACL entries
now.
Thanks,
-wes -
Cannot create more JMS connection
Hi,
I got the following error:
WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ jms/batchExecutorMDBConnectionFactoryPool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections.I have cleared all messages in the queue, redeployed my application. But somehow the connections still existed in the connection pool and therefore i always see this error appearing whenever i re-launch my application.
I created JMS connection locally and close it immediately after sending message as suggested out there to avoid connection leaking.
Could you help me how to clear all connections in order to re-run my application. Then slowly i can find out where the connection leaking is?
I am using glassfish 3.1.2 with the setting 500 maximum connection in the jms connection factory
thanks,
-CMCardM wrote:
Could you help me how to clear all connections in order to re-run my application. Then slowly i can find out where the connection leaking is?
I am using glassfish 3.1.2 with the setting 500 maximum connection in the jms connection factoryErrr, reboot the server?
Glassfish questions should go in the glassfish forum: http://www.java.net/forums/glassfish/glassfish -
CTS1.4.1 Samples JDBC test failing with Error in allocating a connection
Tests under CTS1.4.1 samples>>JDBC>>ee>>testConn>> are failing with the following error :
Sep 14, 2005 4:27:55 PM com.sun.gjc.spi.DSManagedConnectionFactory createManagedConnection
WARNING: RAR5113 : Error creating connection from supplied information: Reason - Error while parsing address
Sep 14, 2005 4:27:55 PM com.sun.enterprise.resource.LocalTxConnectorAllocator createResource
WARNING: RAR5038:Unexpected exception while creating resource
Sep 14, 2005 4:27:55 PM com.sun.enterprise.connectors.ConnectionManagerImpl internalGetConnection
WARNING: RAR5117 : Failed to obtain/create connection. Reason : Connection could not be allocated because: Error while parsing address
Sep 14, 2005 4:27:55 PM com.sun.gjc.spi.DataSource getConnection
WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Connection could not be allocated because: Error while parsing address ]
ERROR: SQL Exception : Error in allocating a connection. Cause: Connection could not be allocated because: Error while parsing address
ERROR: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Error while parsing address
at com.sun.gjc.spi.DataSource.getConnection(DataSource.java:72)
at com.sun.ts.tests.samples.jdbc.ee.testConn.testConnClient.getConnection(testConnClient.java:252)
at com.sun.ts.tests.samples.jdbc.ee.testConn.testConnClient.setup(testConnClient.java:91)
But the mystery is that the main set of JDBC tests (outside of samples) in CTS1.4.1 are running fine.
One difference I notice is that the tests that are failing use "createManagedConnection".
The main configurations file "ts.jte" present under %TS_HOME%\bin has all the settings correct. Thats why the main JDBC tests go through fine.
I wonder where these failing tests pick up the bad "address" from.
Any help on this would be greatly appreciated.
Thanks !CTS is a paid product and any question regarding that should be answered by a Licencee Engineer. Pls contact the LE regard the setup of CTS or any TCK.
-
Error in establishing connection from Sun Java Sys APp Server to databse
HI there !!
i m using Sun Java System Application Serever P.E 9.1 for my java ee application and the databse base is SQL Server 2000 desktop edition.
Now i m getting the following error when i try to get a connection .
RAR7099: The mcf being used to allocate the connection and the MCF in the pool are not equal.
RAR5038:Unexpected exception while creating resource
RAR5117 : Failed to obtain/create connection. Reason : No PasswordCredential found
RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: No PasswordCredential found]
Error in allocating a connection. Cause: No PasswordCredential found
StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
i found something related to this thing at :
http://docs.sun.com/app/docs/doc/819-3678/6n5sopvvi?q=TBD&a=view
but was unable to handle that ...
any help regarding this will be highly appreciated !!!
i m using the code provided at NetBeans Tutorial for web aplications at
http://www.netbeans.org/kb/55/mysql-webapp.htmlWhy are you resurrecting an over 1 year old thread with such a nonsensicial reply? Please don't do that. Just respond to active topics in the listing.
-
Delay in the release of connections to pool after closing.
Hi,
I'm using typical jdbc code to close the Connections got through ConnectionPool created on Weblogic 8.1. When the data access / update code is completed execution, I could observe couple of connections still open in the weblogic console connections monitor screen.
These open connections are getting released after 15 minutes approximately, provided if I'm not accessing any DB access/update code till then.
I'm using the following code for closing all the jdbc resources.
public static void closeAllResources(){
try{
if (rSet != null){
rSet.close();
rSet = null;
if (rSet2 != null){
rSet2.close();
rSet2 = null;
if (preStatement != null){
preStatement.close();
preStatement = null;
if (callStatement != null){
callStatement.close();
callStatement = null;
if (conn != null){
conn.close();
conn = null;
catch (SQLException e){
}I'm closing the jdbc resources as follows in finally block...
public static boolean saveXXX(String userid, ArrayList list) throws SQLException{
BaseDAO baseDAO = null;
String scode= null;
try {
baseDAO = new BaseDAO();
conn = baseDAO.getConnection(); callStatement = baseDAO.prepareCallableStatement("call pkg_1.pr_add_XXX(?,?)");
callStatement.setObject(1, userid);
callStatement.setObject(2, scode);
int saveResult = callStatement.executeUpdate();
finally {
closeAllResources();
return true;
}Both the above methods are present in the same java class.
Can sombody help me in resolving the issue immediately?
Regards
SudarsanDo you understand what a connection pool is and how it works at all?
It is a pool of open connections. It therefore perfectly fine and appropriate for their to be open connections from your pool to your database once you have returned them to the pool. These connections will be kept alive for a period of time (in your case apparently 15 minutes) to serve the next request for a connection from the pool.
This is really the whole point of using a connection pool. Reuse.
Maybe you are looking for
-
Help needed to connect Archos G90 to BT HHv2
Aa a newbie here I hope this is the right place to post. I've recently got an Archos G90 tablet. It tells me it's connected to my home hub but fails to connect with the internet. Same with BTFON. In fact I'm still stuck with limited/access proble
-
Can you insert a photo as a green screen background without it going in ..
...front of the video clip?
-
Hi friends, In my layout i have two repeating frames. RF1 and RF2 RF1 has group by frame. with in RF1 i have RF2. In RF1 i have only one field i.e)Table name : [ source field ](Group by field). In RF2 i have 3 fields Column Name : [column source ] va
-
User update needed after updating to Yosemite
Hi, A few days ago I updated my MacBook Pro to Yosemite, the update was fine and everything seemed working. First there were 2 users, my account and a guest user and my user profile had no picture and says "update needed" rather than my name. The upd
-
Where is this "Authorize" button?
Ok, so this is probably a really stupid question, but I really have been looking! I just got a new Sony Vaio laptop with Windows 2000, and installed iTunes. I have iTunes on another computer (which is where I downloaded all my music), and the "you ne