Configuration : Hibernate 2.0, tomcat 5.x, Mysql 4.0.20
Hi I have strange problem.
everything looks OK -> hibernate understand the table mapping although it don't get the JNDI name(i don't understand how to configure hibernate so i can bind to JNDI).
FATAL main com.sahassa.magga.component.HibernateUtil - cannot get session factory by lookup from jndi name java:comp/env/hibernate/sessionFactory
INFO main net.sf.hibernate.cfg.Binder - Mapping subclass: com.sahassa.magga.domain.quiz.invariant.PassivePolling -> quiz_table
INFO main net.sf.hibernate.cfg.Binder - Mapping subclass: com.sahassa.magga.domain.quiz.invariant.Q2QQuiz -> quiz_table
INFO main net.sf.hibernate.cfg.Configuration - Mapping resource: com/sahassa/magga/domain/quiz/common/QuizPeriode.hbm.xml
INFO main net.sf.hibernate.cfg.Binder - Mapping class: com.sahassa.magga.domain.quiz.common.QuizPeriode -> quiz_periode
INFO main net.sf.hibernate.cfg.Configuration - Mapping resource: com/sahassa/magga/domain/quiz/common/QuizPlayer.hbm.xml
INFO main net.sf.hibernate.cfg.Binder - Mapping class: com.sahassa.magga.domain.quiz.common.QuizPlayer -> quiz_player
INFO main net.sf.hibernate.cfg.Configuration - Mapping resource: com/sahassa/magga/domain/quiz/common/QuizQuestion.hbm.xml
but after that something strange happen :
I call HIbernateUtil.currentSesssion() (Hibernate Util is the same class that is on Hibernate step-by-step, the class that is used to :
try{
naming.lookup(HibernateJNDI);
}catch(NamingException e){
}
// build the session factory manualy by adding class
session factory =new configuration(). -> this is where it throws exception
addClass(Quiz.class).
buildSessionFactory();
WARN main net.sf.hibernate.xml.XMLDatabinder - Problem opening output stylesheet - databinding disabled
javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.lang.IllegalStateException: can't declare any more prefixes in this context
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:984)
at net.sf.hibernate.xml.XMLDatabinder.getOutputStyleSheetTemplates(XMLDatabinder.java:254)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:161)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:750)
at com.sahassa.magga.component.HibernateUtil.<clinit>(HibernateUtil.java:48)
at com.sahassa.magga.domain.quiz.scheduler.QuizScheduler.schedule(QuizScheduler.java:85)
at com.sahassa.magga.domain.quiz.common.QuizEngine.<init>(QuizEngine.java:69)
at com.sahassa.magga.domain.quiz.bootstrap.QuizBootstrapManager.start(QuizBootstrapManager.java:21)
at com.sahassa.magga.web.quiz.QuizWebInitializator.contextInitialized(QuizWebInitializator.java:30)
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.addChild(StandardHostDeployer.java:839)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
what i understand is that : catalina is reading the web.xml, invoking the listener. and then when i call buildSessionfactory ... then ???
Thanks for your help :)
|