[GLASSFISH-18442] ClassNotFoundException in GlassFish 3.1.2 Created: 02/Mar/12  Updated: 10/Feb/13

Status: Open
Project: glassfish
Component/s: jdbc
Affects Version/s: 3.1.2, 3.1.2.2
Fix Version/s: None

Type: Bug Priority: Major
Reporter: steve_taylor Assignee: sfelts
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 x64, Java 7u1, Maven 2



 Description   

I have a Java EE 6 (JSF/EJB/JPA/JAX-RS) app that runs in 3.1.1 but fails in 3.1.2. Specifically, it cannot load the JDBC drivers for PostgreSQL. The app is built using Maven 2.

Stack trace:

java.lang.ClassNotFoundException: org.postgresql.jdbc4.Jdbc4PreparedStatement
    at com.sun.enterprise.loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:782)
    at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:696)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

It has been suggested to me that I add the PostgreSQL drivers to the GlassFish installation directory. However, I have definitely not had to do that with 3.1.1. If that is now the case for 3.1.2, then it is a major backward step. (I blow away the GlassFish installation on a regular basis, replacing it with a clean one each time, so I know for sure I'm not adding the PostgreSQL JDBC drivers manually.)



 Comments   
Comment by Mischa81 [ 05/Dec/12 ]

I'm facing exactly the same issue on version 3.1.2.2. (build 5). In my opinion bundling the PostgreSQL-driver with the EAR is common practice. Otherwise updating the driver implies multiple manual update on all the servers used in the project (dev, test, prod...).

Comment by shreedhar_ganapathy [ 13/Dec/12 ]

Reassigning to JDBC component, and to Michael so as to reassign to the right engineer.

Generated at Mon May 04 03:32:33 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.