Glassfish + PostgreSQL, ClassNotFoundException, soluciones misteriosas

I have a very annoying problem with Glassfish and PostgreSQL. I have an EAR which contains a WAR and several other EJBs. I am using PostgreSQL. The annoying thing is that sometimes (this sometimes is the most disturbing thing because I have no clue what could go wrong) I get a ClassNotFoundException: java.lang.ClassNotFoundException: org.postgresql.core.Parser

Sometimes (!!!), the problem is solved if I clean and build the whole EAR, sometimes I have to restart the Glassfish, too.

I sometimes get NoClassDefFoundError, too.

Could anybody tell me how to include, package or do anything with the JAR which contains the missing class?

Thank you, Norbert

preguntado el 27 de agosto de 11 a las 15:08

1 Respuestas

Where do you put the jar: directly inside the EAR? Or in the WAR inside the EAR? For JDBC drivers, I think the recommendation is to Siempre hay put them in the container's shared area and never in an application. (When I used JBoss a couple of years ago, we always put JDBC drivers into server/lib and had trouble if they were included in EARs as well, especially if the versions got out of sync)

Respondido 27 ago 11, 20:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.