Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316602

Summary: JPA:Java EE: Secondary DirectConnect deploy failure on SE Persistence unit connect masks original DriverManager failure using dual Java SE/EE PU app
Product: z_Archived Reporter: Michael OBrien <michael.f.obrien>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED DUPLICATE QA Contact:
Severity: critical    
Priority: P3 CC: eclipselink.orm-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
URL: http://fisheye2.atlassian.com/changelog/eclipselink/?cs=7272
Whiteboard:
Bug Depends on: 220937    
Bug Blocks:    
Attachments:
Description Flags
313582 rev 7272 null getProperty() on IBM J9 JVM only on Linux/AIX none

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