Hibernate Connection using C3P0 and Postgresql?

Two things seem odd here: 1) the stacktrace for ClassNotFoundException does not mention the name of the class that was not found: Caused by: java.lang. ClassNotFoundException: This would seem to imply that it is trying to load a class with no name, otherwise you would expect to see the name of the class that could not be found. 2) Not sure if it's just a copy and paste mistake, but in the snippet of your configuration above, you are missing the end-quote on this line: which would make for malformed XML.3) When you say Made a new jar file and deployed it to my glassfish v3.01 server.Do you mean to say you made a new "war" file, not "jar"?

You need to make sure that the postgres jdbc jar is on glassfish's classpath ultimately.

1 That are three odd things, not two :) – BalusC Apr 28 at 17:16 Ok, Thanks for catching that Matt, Fixed the copy paste error and I did mean to say a new war. I looked through a few more logs and found this right abovce a java.lang. ClassNotFoundException:---- _ThreadID=11;_ThreadName=Thread-1;|2011-04-28 11:34:58,493 ERROR FelixStartLevel (JCLLoggerAdapter.

Java:535) - JDBC Driver class not found: So I believe the JDBC driver is on the classpath myself seeing as it is in the Glassfish lib directory(has been used by that particular glassfish install in the past) and in the WEB-INF/lib directory of the app. – grantk Apr 28 at 17:30.

You know, JARs cannot access WARs files. If your postgresql jdbc 4 driver is on WAR/WEB-INF/lib your JARs (which need it) cannot access. Try put your lib in a EAR lib (look for glassfish doc for that, but is something like EAR/WEB-INF/lib too) or put it on server libraries (something like GLASSFISH_DIR/lib/classes).

2 "JPA means EJB" not really, no. – matt be Apr 28 at 17:11 humm.. Explain pls. How an JPA entity is not an EJB?

– Plínio Pantaleão Apr 28 at 17:49 You did not specify JPA entity, JPA by itself would refer to Java Persistence API. I am not sure myself though if all JPA enitys also meet the specs for an EJB 100%. – grantk Apr 28 at 19:50 And as far as the app is concerned it is packaged as a single war file.

I looked through it a bit and did not find any EAR or JAR entitys. But I did not go through it completely. I will take another look and see what I find.

– grantk Apr 28 at 19:51 No other Jada JAR or EAR files are in the WAR. – grantk Apr 28 at 21:17.

Why do you have hibernate.connection. Driver_class=org.postgresql. Drivers in the properties file?

Shouldn't it be org.postgresql. Driver instead? Edit: Ah!

Looks like Jadasite uses the properties file to load the driver class. From com/jada/jpa/connection/JpaConnection. Java class: 67 68 public void init(String driver, String url, String user, String password) throws Exception { 69 this.

Driver = driver; 70 this. Url = url; 71 this. User = user; 72 this.

Password = password; 73 74 HashMap map = new HashMap(); 75 map. Put(Environment. DRIVER, driver); 76 map.

Put(Environment. URL, url); 77 map. Put(Environment.

USER, user); 78 map. Put(Environment. PASS, password); 79 factory = Persistence.

CreateEntityManagerFactory("jadaSite", map); 80 } Which is read as (in com/jada/system/Initializer. Java): 111 if (requireInstall) { 112 if (!installCompleted) { 113 log("Installation has not been done. Skipping custom initialization."); 114 log("Please proceed to installation and remmember to restart before continue.

"); 115 log("Awaiting installation...."); 116 return; 117 } 118 try { 119 Properties installProperties = installer. GetConfigProperties(); Which comes from (in com/jada/install/process/Installer. Java): 345 public Properties getConfigProperties() throws IOException { 346 String filename = servletLocation + Constants.

CONFIG_PROPERTIES_FILENAME; 347 File file = new File(filename); 348 FileInputStream input = new FileInputStream(file); 349 Properties properties = new Properties(); 350 properties. Load(input); 351 return properties; 352 } Which is read from the file (in com/jada/util/Constants. Java): 275 public static final String CONFIG_PROPERTIES_FILENAME = "WEB-INF/jada.properties.

I think I am possibly a horrible stack overflower on this one. I had forgotten my original post is so out of date! I did get that initial hibernate.connection.

Driver_class changed. I also had updated the properties file used by jada, as well as the web.xml. I still get the same issue, and it is that hibernate never quite passes the proper config info from any location to C3P0.

Seeing as you did all the work there and I could have gone back and updated all I am going to give you the bounty – grantk May 4 at 12:34.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions