Question

I am trying to set-up the classpath for a Java application I wrote, and I'm a little stumped as to what I am doing wrong. I've taken a look at the Oracle Java 6 classpath documentation here: http://docs.oracle.com/javase/6/docs/technotes/tools/windows/classpath.html

Here is my command that I am using in a shell script:

/usr/java6/jre/bin/java -classpath .:/usr/home/wasadmin/scripts/AutoEmail.jar:/usr/IBM/WebSphere/AppServer/runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar:/usr/IBM/WebSphere/AppServer/optionalLibraries/oracle/ojdbc6.jar:/usr/IBM/WebSphere/wp_profile/installedApps/ProdCell/PA_Project.ear/Project.war/WEB-INF/lib/*:/usr/IBM/WebSphere/wp_profile/installedApps/ProdCell/PA_Project.ear/Project.war/WEB-INF/classes:/usr/IBM/WebSphere/wp_profile/installedApps/ProdCell/PA_Project.ear/Project.war/WEB-INF/classes/* com.test.project.Main

My issue is that my project is using Hibernate, but it can't find my Hibernate config file. The config file is located at

/usr/IBM/WebSphere/wp_profile/installedApps/ProdCell/PA_Project.ear/Project.war/WEB-INF/classes/hibernate.cfg.xml, which I believe is covered by the classpath as shown above.

Is there something wrong with my classpath that it can't see it?

Also, just a side-note -- the .ear and .war directories listed in the classpath above are actually directories and not .ear or .war files.

Thanks!

Était-ce utile?

La solution

Turns out it was a stupid mistake -- I forgot to update my portlet (which was installed in /usr/IBM/WebSphere/wp_profile/installedApps/ProdCell/PA_Project.ear/) with the new version that contained the actual hibernate.cfg.xml. Oops.

Should I delete this question?

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top