Issue Details (XML | Word | Printable)

Key: GLASSFISH-18442
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: sfelts
Reporter: steve_taylor
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
glassfish

ClassNotFoundException in GlassFish 3.1.2

Created: 02/Mar/12 06:10 PM   Updated: 10/Feb/13 09:19 PM
Component/s: jdbc
Affects Version/s: 3.1.2, 3.1.2.2
Fix Version/s: None

Time Tracking:
Not Specified

Environment:

Windows 7 x64, Java 7u1, Maven 2


Tags:
Participants: Mischa81, sfelts, shreedhar_ganapathy and steve_taylor


 Description  « Hide

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.)



shreedhar_ganapathy added a comment - 13/Dec/12 07:00 PM

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


Mischa81 added a comment - 05/Dec/12 09:53 PM

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...).