This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 150051 - [65cat] Error in allocating a connection. Cause: No PasswordCredential found
Summary: [65cat] Error in allocating a connection. Cause: No PasswordCredential found
Status: RESOLVED WORKSFORME
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P2 blocker (vote)
Assignee: Nitya Doraisamy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-14 10:40 UTC by ieising
Modified: 2009-02-19 23:03 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The EAR files (16.17 KB, application/x-compressed)
2008-10-14 10:41 UTC, ieising
Details
The EJB files (10.87 KB, application/x-compressed)
2008-10-14 10:42 UTC, ieising
Details
The WAR files (18.78 KB, application/x-compressed)
2008-10-14 10:43 UTC, ieising
Details
This is taken from the server.log of yesterday. It shows a relevant part of the log. (61.84 KB, text/plain)
2008-10-14 14:49 UTC, ieising
Details
Requested sun-resources.xml from the EJB project (1.81 KB, text/xml)
2008-10-14 21:11 UTC, ieising
Details
Requested sun-resources.xml from the WAR project (1.63 KB, text/xml)
2008-10-14 21:12 UTC, ieising
Details
Requested domain.xml from the server (31.59 KB, text/xml)
2008-10-14 21:14 UTC, ieising
Details
modified sun-resources.xml for EJB project (1.83 KB, text/xml)
2008-11-03 19:17 UTC, Nitya Doraisamy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ieising 2008-10-14 10:40:36 UTC
[ BUILD # : 200810111401 ]
[ JDK VERSION : 1.6.0_06 ]

Hi,

On a regular basis, and since I'm using build from late September, I
get this stacktrace (partially shown)

Caused by: java.sql.SQLException: Error in allocating a connection.
Cause: No PasswordCredential found
        at
com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:115)
        at
oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.jav

a:145)
 
when restarting my EAR project. I can solve occasionally this by
undeploying and deploying the application and stopping GF2v2ur2 in
between (Undeploy the app, stop the AS, run/debug the project).

I never had this problem in NB61, but yesterday I opened my project
in NB61 again and faced the same problem. As if the problem is in the
build scripts instead of something else.

Iwan
Comment 1 ieising 2008-10-14 10:41:29 UTC
Created attachment 71736 [details]
The EAR files
Comment 2 ieising 2008-10-14 10:42:41 UTC
Created attachment 71737 [details]
The EJB files
Comment 3 ieising 2008-10-14 10:43:45 UTC
Created attachment 71738 [details]
The WAR files
Comment 4 martin_adamek 2008-10-14 13:44:02 UTC
Attached projects are incomplete (only NB metadata). Also, please add full stacktrace.
Comment 5 ieising 2008-10-14 14:49:09 UTC
Created attachment 71770 [details]
This is taken from the server.log of yesterday. It shows a relevant part of the log.
Comment 6 martin_adamek 2008-10-14 19:05:26 UTC
I found request for filing similar bug agains serverplugins on http://www.nabble.com/Re:-Database-connectivity-error-using-visual-webpack-
td14793850.html under some conditions, so I'm reassigning.
Comment 7 Vince Kraemer 2008-10-14 20:32:11 UTC
please attach any files named sun-resources.xml that are in the projects used by this ear.

the domain.xml file for server that is having this problem would be useful, too.
Comment 8 ieising 2008-10-14 21:04:32 UTC
I can consistently reproduce this by making sure that the deployment gets a timeout and then hit CTRL-F5 again. In this
case I get this problem.

Iwan
Comment 9 ieising 2008-10-14 21:11:22 UTC
Created attachment 71808 [details]
Requested sun-resources.xml from the EJB project
Comment 10 ieising 2008-10-14 21:12:24 UTC
Created attachment 71809 [details]
Requested sun-resources.xml from the WAR project
Comment 11 ieising 2008-10-14 21:14:47 UTC
Created attachment 71810 [details]
Requested domain.xml from the server
Comment 12 Jiri Kovalsky 2008-10-15 08:41:38 UTC
Reporter provided us with requested files.
Comment 13 Nitya Doraisamy 2008-10-15 19:51:04 UTC
Looking at the sun-resources.xml's, I don't see any issues. But could you try to ping the connection pool"derby_netPool"
from the admin console. Is the ping successful?
Comment 14 ieising 2008-10-15 21:51:03 UTC
Can you tell me how to ping the pool?

Just to let you know, this problem occurs consistently when the deployment timed out and I try to deploy again while the
server is running.

The problem every now and then happens even when the deployment didn't time out the first time around.

Iwan
Comment 15 Nitya Doraisamy 2008-10-16 01:35:53 UTC
To Ping the connection pool,
- Launch using the 'View Admin Console' action (from the server node in Services tab)
- Navigate to the Connection Pool - 'derby_netPool' (Resources > JDBC > Connection Pools > derby_netPool)
- There will be a 'Ping' button on the right side 
Comment 16 ieising 2008-10-16 21:44:32 UTC
As per your instructions, the ping succeeds.
Comment 17 ieising 2008-10-16 21:47:09 UTC
Just an update to the matter:

I followed Vince's instructions for setting up NB65 (dev 200810150201) and hit CTRL-F5 and the debug session started
successfully. I hit CTRL-F5 again (without changing anything in the sources or whatsoever) and I get this issue
(150051). I hit CTRL-F5 again, and the same problem occurs.
When I now click the double arrows in the GF2 output window and according to the popup-hint restart the server, all goes
well again.

Iwan
Comment 18 Nitya Doraisamy 2008-10-20 19:46:23 UTC
I followed the steps in IZ 149993 to reproduce this issue and so far I have not been able to.
Running in debug (CTRL-F5) started the server in debug mode and the browser opened.
Successive CTRL-F5 (I tried at least 5 times) went through and the main page was launched several times correctly.

Since the Ping succeeds, that means the connection pool is available and able to connect to the database 

The attached server.log shows this error,
RAR7099: The mcf being used to allocate the connection and the MCF in the pool are not equal.|#]

before the error message regarding allocating a connection. I am pinging the server team to identify what could cause
this message.


Comment 19 Nitya Doraisamy 2008-11-03 19:14:45 UTC
Both the EJB & WAR projects have a JDBC resource each which refer to the same connection pool 'derby_netPool'.
The properties of the this pool are slightly different between the two projects. Since connection pools of the same name
are present in the two projects, each deploy results in re-register of the connection pool if no changes have been made. 

The server team indicated that when JDBC driver vendor specific properties are changed (or added) application server
restart or application redeployment is required. Since each deploy of the application is causing the Pool to be updated
causing the issue.

Rename the connection pool in one of these projects to a unique name should resolve this error.

I have attached a modified sun-resources.xml for the ejb project. The connection pool and the associated reference to it
in the JDBC Resource definition have been changed to make it unique. 
Comment 20 Nitya Doraisamy 2008-11-03 19:17:36 UTC
Created attachment 73155 [details]
modified sun-resources.xml for EJB project
Comment 21 Nitya Doraisamy 2008-11-11 15:56:33 UTC
User was not able to reproduce this in RC1 and RC2. Closing issue.