» »

[java] hibernate session

[java] hibernate session

xsenon ::

ojla,

mislim da sem zelo blizu rešitvi moje težave, vendar me na tej poti zelo oviran pomankljivo znanje Hibernate knjižnice.
In sicer na delu kjer se kreira nov session. V konzoli se mi izpisuje sledeče:

11.11.2008 10:48:32 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Portable Runtime which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\Java\jdk1.6.0_10\bin;.;D:\WINDOWS\Sun\Java\bin;D:\WINDOWS\system32;D:\WINDOWS;D:/Program Files/Java/jre6/bin/client;D:/Program Files/Java/jre6/bin;D:\WINDOWS\system32;D:\WINDOWS;D:\WINDOWS\System32\Wbem;D:\Program Files\Java\jre1.6.0_07;C:\AppServ\Apache2.2\bin;C:\AppServ\php5;C:\AppServ\MySQL\bin;D:\Program Files\Java\jdk1.6.0_10\bin;D:\Program Files\Java\jdk1.6.0_10\jre\bin
11.11.2008 10:48:32 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
11.11.2008 10:48:32 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 765 ms
11.11.2008 10:48:32 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
11.11.2008 10:48:32 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.12
11.11.2008 10:48:32 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
!!!!!!!!!!!!!!!!!!!!!a smo prsli? zacetek!!!!!!!!!!!!!!!!!!!!!!!
Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/dom4j/DocumentException
11.11.2008 10:48:33 org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet Init as unavailable
11.11.2008 10:48:33 org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /Portability_web threw load() exception
java.lang.ExceptionInInitializerError
at util.HibernateUtil. (HibernateUtil.java:29)
at servlet.Init. (Init.java:43)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3880)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4141)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:680)
at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.NoClassDefFoundError: org/dom4j/DocumentException
at util.HibernateUtil.(HibernateUtil.java:24)
... 24 more
Caused by: java.lang.ClassNotFoundException: org.dom4j.DocumentException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 25 more
11.11.2008 10:48:33 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-80
11.11.2008 10:48:33 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
11.11.2008 10:48:33 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/62 config=null
11.11.2008 10:48:33 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
11.11.2008 10:48:33 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1156 ms
11.11.2008 10:49:22 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Auth threw exception
java.lang.NoClassDefFoundError: Could not initialize class util.HibernateUtil
at servlet.Auth.doPost(Auth.java:47)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)


Po debugiranju sem lociral, da bi problem lahko bila 2 .xml fajla. (hibernate.cfg.xml in hibernate.reveng.xml)
A mi lahko prosim poveste kako je s tami xml fajli. A se zgenerirajo (in kako) ali jih je potrebno pač napisat?

Hvala za odgovore.

LP

infiniteLoop ::

2 stvari za zacetek:

1. - Caused by: java.lang.ClassNotFoundException: org.dom4j.DocumentException
2. - java.lang.NoClassDefFoundError: Could not initialize class util.HibernateUtil

Manjka(ta) ti knjiznica(i), po domace jar, ki vsebuje org.dom4j.DocumentException in po moznosti se util.HibernateUtil. Ozrioma aplikacija nima dostopa do teh knjiznic.
None of us is as dumb as all of us.

infiniteLoop ::

Problem ni nepoznavanje Hibernatea ampak splosno pomanjkanje razumevanja okolja v katerem delas. Priorocam izobrazevanje v tej smeri. Zacnes lahko z Java EE tutorialom.
None of us is as dumb as all of us.

Tr0n ::

+ ni treba za vsako vprasanje nove teme odpirat, ce si jih ze prej odpiral.


Vredno ogleda ...

TemaSporočilaOglediZadnje sporočilo
TemaSporočilaOglediZadnje sporočilo
»

Eclipse in windows 8

Oddelek: Pomoč in nasveti
121237 (990) mihibo5
»

Ne zazna R.class -android

Oddelek: Programiranje
171303 (1141) Marat
»

[Android]Vprasanje glede GUI ter pripadajoce XML datoteke

Oddelek: Programiranje
103507 (3393) KernelPanic
»

tomcat in datasource

Oddelek: Programiranje
132027 (1784) infiniteLoop
»

Java- hibernate.properties not found

Oddelek: Programiranje
111795 (1295) xsenon

Več podobnih tem