Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316602 - JPA:Java EE: Secondary DirectConnect deploy failure on SE Persistence unit connect masks original DriverManager failure using dual Java SE/EE PU app
Summary: JPA:Java EE: Secondary DirectConnect deploy failure on SE Persistence unit co...
Status: RESOLVED DUPLICATE of bug 313583
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL: http://fisheye2.atlassian.com/changel...
Whiteboard:
Keywords:
Depends on: 220937
Blocks:
  Show dependency tree
 
Reported: 2010-06-11 09:06 EDT by Michael OBrien CLA
Modified: 2022-06-09 10:24 EDT (History)
1 user (show)

See Also:


Attachments
313582 rev 7272 null getProperty() on IBM J9 JVM only on Linux/AIX (746 bytes, patch)
2010-06-14 09:19 EDT, Michael OBrien CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael OBrien CLA 2010-06-11 09:06:31 EDT
JPA: deploy failure on SE Persistence unit connect using dual SE/EE PU app on WebSphere

>Issue is that the 2nd PU fails to deploy because the secondary direct connect fails on password property
>However this failure is not really the cause of the problem - it was the previous DriverManager connect

>In 
    public Connection connect(Properties properties, Session session) throws DatabaseException {
>if the following try/catch block fails using a DriverManager
        if (this.shouldUseDriverManager(properties, session)) {
            try {
                return DriverManager.getConnection(this.getConnectionString(), properties);

>We try a direct connection
		try {
			// A return of null indicates wrong type of driver, an SQLException means connection problems
			Connection directConnection = this.directConnect(properties);

>The issue may be specifying a server platform via "target-server" in an SE PU when the persistence.xml is on the ejb tier but used from the war.

>reproduction logs and simplified source pending
Comment 1 Michael OBrien CLA 2010-06-11 10:23:42 EDT
>fails only on IBM J9 JVM under non-windows Linux OS
>Verifying that the following fix in bug# 313583 erradicates the cause

http://fisheye2.atlassian.com/changelog/eclipselink/?cs=7272
Comment 2 Michael OBrien CLA 2010-06-14 09:18:20 EDT
>The fix in bug# 313583 fixes this issue

   The change in rev# 7272 from
       return super.getProperty(key, defaultValue);
   to
       String val = getProperty(key);
       return (val == null) ? defaultValue : val;

*** This bug has been marked as a duplicate of bug 313583 ***
Comment 3 Michael OBrien CLA 2010-06-14 09:19:31 EDT
Created attachment 171823 [details]
313582 rev 7272 null getProperty() on IBM J9 JVM only on Linux/AIX
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:15:40 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:24:10 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink