You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Emmerich, Martin" <Ma...@oew.de> on 2004/08/25 17:13:17 UTC

Path Problem when Porting Hibernate/Struts App from Tomcat 4 to 5

Hello,

I'm trying to bring an struts and hibernate based application that runs sucessfully with tomcat 4 to tomcat 5.

Shortly after start (with an fresh deployment) it throws the exception

Time: 11:36:25  Priority: ERROR  Thread: main  NDC: null
Category: net.sf.hibernate.cfg.Configuration 
Location: net.sf.hibernate.cfg.Configuration.addJar(Configuration.java:381) 
Message: Could not configure datastore from jar: ocp-dbmappings.jar
Throwable:
java.util.zip.ZipException: No such file or directory
   at java.util.zip.ZipFile.open(Native Method)
   at java.util.zip.ZipFile.<init>(ZipFile.java:204)
   at java.util.jar.JarFile.<init>(JarFile.java:132)
   at java.util.jar.JarFile.<init>(JarFile.java:97)
   at net.sf.hibernate.cfg.Configuration.addJar(Configuration.java:378)
   at de.oew.ocp.hibernate.HibernateAdapter.<clinit>(HibernateAdapter.java:46)
   at de.oew.ocp.hibernate.DomainStore.findActiveUsersByHost(DomainStore.java:353)
   at de.oew.ocp.user.UserManager.getActiveUsers(UserManager.java:76)
   at de.oew.ocp.user.UserManager.deleteActiveUsers(UserManager.java:107)
   at de.oew.ocp.OCPAppAttrContainer.initialize(OCPAppAttrContainer.java:111)
   at de.oew.web.servlet.OEWAppAttrContainerBase.contextInitialized(OEWAppAttrContainerBase.java:76)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3773)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4270)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
   at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:320)
   at org.apache.catalina.core.StandardHost.install(StandardHost.java:875)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:657)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:476)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1134)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:521)
   at org.apache.catalina.core.StandardService.start(StandardService.java:519)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:594)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:582)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398) 

Tomcat unpacks the application anyway.

If I go to "${CATALINA_HOME}/work/Catalina/localhost/<appname>" and set a symbolic link called "loader" to "${CATALINA_HOME}/webapps/<appname>/WEB-INF/classes" I can sucessfully start the application via the tomcat5 manager application.
The jar file in question contains the hibernate mappings (*.hbm.xml) of the application.

I'd prefer to avoid the "link hack".

I'm only the admin who tries to get it running, the developer is on vacation. Thus my hibernate know-how is very poor.
Versions are Hibernate 2.1.4 and Tomcat 5.0.19 under Linux.

Best Regards,
..............................
Martin Emmerich
Leitung IT

Oestreicher + Wagner
Medientechnik GmbH
Frankenthaler Straße 20
D-81539 München

Fon   +49 (0)89-68961 0 
Fax   +49 (0)89-68961 200
Web   http://www.oew.de/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Path Problem when Porting Hibernate/Struts App from Tomcat 4 to 5

Posted by QM <qm...@brandxdev.net>.
On Wed, Aug 25, 2004 at 05:13:17PM +0200, Emmerich, Martin wrote:
: I'm trying to bring an struts and hibernate based application that runs sucessfully with tomcat 4 to tomcat 5.
:[snip]
: Time: 11:36:25  Priority: ERROR  Thread: main  NDC: null
: Category: net.sf.hibernate.cfg.Configuration 
: Location: net.sf.hibernate.cfg.Configuration.addJar(Configuration.java:381) 
: Message: Could not configure datastore from jar: ocp-dbmappings.jar
: Throwable:
: java.util.zip.ZipException: No such file or directory

This recently came up on the list, related to a classloader issue.

What about renaming the .jar file with the Hibernate mappings .zip?


:I'm only the admin who tries to get it running, the developer is on vacation.   Thus my hibernate know-how is very poor.

You may want to hold off, then, till the developer gets back.  

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org