-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate in JBoss-Tomcat: hibernate.cfg.xml not found
PostPosted: Thu Jun 23, 2005 6:35 am 
Newbie

Joined: Thu Jun 23, 2005 5:55 am
Posts: 1
Hallo


Hibernate version: 2.1.5

App Server: JBoss 4.0.0

Ich arbeite an einer J2EE Applikation, die in JBoss läuft. Während der Entwicklung benutze ich einen externen Tomcat 5.0, aus welchem die Webapp auf die ganze Bean-Umgebung in JBoss zugreifft.

Solange Hibernate im externen Tomcat läuft, klappt alles bestens. Sobald ich aber die Webapp im JBoss-internen Tomcat deploye, erhalte ich bei der Ausführung untenstehenden Fehler.

Code:
[Environment] Hibernate 2.1.5
[Environment] hibernate.properties not found
[Environment] using CGLIB reflection optimizer
[Configuration] configuring from resource: /<PACKAGES>/web/hibernate/hibernate.cfg.xml
1[Configuration] Configuration resource: /<PACKAGES>/web/hibernate/hibernate.cfg.xml
[Configuration] /<PACKAGES>web/hibernate/hibernate.cfg.xml not found
[STDOUT] %%%% Error Creating HibernateSessionFactory %%%%
[STDOUT] net.sf.hibernate.HibernateException: /<PACKAGES>/web/hibernate/hibernate.cfg.xml not found
        at net.sf.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:849)
        at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:873)
        at org.bfh.hti.ben.web.hibernate.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:53)
        at org.bfh.hti.ben.web.action.operator.svps.OperatorSVPSParseHorses.OperatorExecute(OperatorSVPSParseHorses.java:74)
        at org.bfh.hti.ben.web.action.OperatorAction.BENexecute(OperatorAction.java:60)
        at org.bfh.hti.ben.web.action.BenAction.execute(BenAction.java:103)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
        at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
        at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:140)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
        at sun.reflect.GeneratedMethodAccessor125.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:213)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:183)
        at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
        at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:140)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:44)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:169)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:534)




hibernate.cfg.xml ist unter WEB-INF/classes/<PFAD ZUM HIBERNATE PACKET>/hibernate.cfg.xml verfügbar.

Bin mit meinem Latein am Ende und für jeden Vorschlag dankbar!


Top
 Profile  
 
 Post subject: hernate-service
PostPosted: Sun Jul 10, 2005 5:03 pm 
Newbie

Joined: Tue Jul 05, 2005 3:06 am
Posts: 2
Hallo!

Ich habe in JBoss bisher nur mit dem im JBoss zur Vergung gestellten Service als MBean gearbeitet. Bis auf die Ungereimtheiten mit Session.close() funktioniert das auch so weit.
http://docs.jboss.org/jbossas/jboss4guide/r3/html/ch13.html
Gruss!
Franz
[/url]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.