Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340336 - JPA On Java SE 1.6 (AIX 5.3) sending null password to Oracle.
Summary: JPA On Java SE 1.6 (AIX 5.3) sending null password to Oracle.
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 236185
Blocks:
  Show dependency tree
 
Reported: 2011-03-17 11:49 EDT by calcaneus CLA
Modified: 2022-06-09 10:28 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description calcaneus CLA 2011-03-17 11:49:39 EDT
Password contained in persistence.xml  under property  javax.persistence.jdbc.password  is not being picked up.

WORKAROUND:  Use Java 1.5  OR  pass the password in the jdbc URL. 

Details of environment:

EclipseLink, version: Eclipse Persistence Services - 2.0.2.v20100323-r6872

OS:  IBM AIX 5.3

java -version output:
java version "1.6.0"
Java(TM) SE Runtime Environment (build pap6460sr9-20101125_01(SR9))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 AIX ppc64-64 jvmap6460sr9-20101124_69295 (JIT enabled, AOT enabled)
J9VM - 20101124_069295
JIT  - r9_20101028_17488ifx2
GC   - 20101027_AA)
JCL  - 20101119_01

Database:  Oracle 11g 11.2.0.1.0

JDBC thin driver:  ojdbc6.jar 

Stacktrace:

javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-01005: null password given; logon denied
 
Error Code: 1005
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:397)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-01005: null password given; logon denied
 
Error Code: 1005
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319)
        at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        ... 4 more
Caused by: java.sql.SQLException: ORA-01005: null password given; logon denied
 
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:388)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:381)
        at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:564)
        at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:431)
        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
        at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:366)
        at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:752)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:359)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
        at java.sql.DriverManager.getConnection(DriverManager.java:322)
        at java.sql.DriverManager.getConnection(DriverManager.java:297)
        at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
Comment 1 calcaneus CLA 2011-03-18 14:44:05 EDT
I just grabbed the current EclipseLink build (2.2.0.v20110202-r8913) and retested in my environment, and the problem is gone.  

So the EclipseLink that comes with NetBeans 6.9.1 has this issue, but the latest version doesn't.
Comment 2 Tom Ware CLA 2011-03-18 15:04:03 EDT
Closing based on comment above
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:28:32 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink