IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Weblogic Java Discussion :

Probleme Weblogic10 / hibernate => org.hibernate.hql.ast.HqlToken


Sujet :

Weblogic Java

  1. #1
    Candidat au Club
    Inscrit en
    Septembre 2008
    Messages
    4
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 4
    Points : 2
    Points
    2
    Par défaut Probleme Weblogic10 / hibernate => org.hibernate.hql.ast.HqlToken
    Bjr,

    J'essaie de déployer une appli (Hibernate 3.0/spring 2.5/Trinidad) sous Weblogic 10.
    A la première requete écrite en HQL le serveur leve une exception : ClassNotFoundException: org.hibernate.hql.ast.HqlToken

    Avez vous deja rencontré un tel problème ?

    Meric

  2. #2
    Membre confirmé
    Avatar de bmoussaud
    Profil pro
    Inscrit en
    Décembre 2003
    Messages
    218
    Détails du profil
    Informations personnelles :
    Âge : 50
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Décembre 2003
    Messages : 218
    Points : 555
    Points
    555
    Par défaut
    Pas de stackTrace ?
    Benoit Moussaud - XebiaLabs - Automatisation des déploiements. Screencast & Demo

  3. #3
    Candidat au Club
    Inscrit en
    Septembre 2008
    Messages
    4
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 4
    Points : 2
    Points
    2
    Par défaut stacktrace
    voici la stackTrace:

    javax.faces.FacesException: #{lotBean.filterAcqLot}: org.springframework.orm.hibernate3.HibernateQueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from lu.cetrel.cardmgt.front.lot.domain.vo.AcquisitionLot al,lu.cetrel.cardmgt.front.lot.domain.vo.Terminal trm where (al.ideTrm = :idTrm or :idTrm is null) and ( al.cdeEtatLot = :cdeEtatLot or :cdeEtatLot is null) and ( al.ideTrm = trm.idTerminal) and (trm.retailer.id.cdeCmr = :cdeCmr or :cdeCmr is null)]; nested exception is org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from lu.cetrel.cardmgt.front.lot.domain.vo.AcquisitionLot al,lu.cetrel.cardmgt.front.lot.domain.vo.Terminal trm where (al.ideTrm = :idTrm or :idTrm is null) and ( al.cdeEtatLot = :cdeEtatLot or :cdeEtatLot is null) and ( al.ideTrm = trm.idTerminal) and (trm.retailer.id.cdeCmr = :cdeCmr or :cdeCmr is null)]
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:458)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:763)
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:238)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:195)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    Caused by: javax.faces.el.EvaluationException: org.springframework.orm.hibernate3.HibernateQueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from lu.cetrel.cardmgt.front.lot.domain.vo.AcquisitionLot al,lu.cetrel.cardmgt.front.lot.domain.vo.Terminal trm where (al.ideTrm = :idTrm or :idTrm is null) and ( al.cdeEtatLot = :cdeEtatLot or :cdeEtatLot is null) and ( al.ideTrm = trm.idTerminal) and (trm.retailer.id.cdeCmr = :cdeCmr or :cdeCmr is null)]; nested exception is org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from lu.cetrel.cardmgt.front.lot.domain.vo.AcquisitionLot al,lu.cetrel.cardmgt.front.lot.domain.vo.Terminal trm where (al.ideTrm = :idTrm or :idTrm is null) and ( al.cdeEtatLot = :cdeEtatLot or :cdeEtatLot is null) and ( al.ideTrm = trm.idTerminal) and (trm.retailer.id.cdeCmr = :cdeCmr or :cdeCmr is null)]
    at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    ... 27 more
    Caused by: org.springframework.orm.hibernate3.HibernateQueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from lu.cetrel.cardmgt.front.lot.domain.vo.AcquisitionLot al,lu.cetrel.cardmgt.front.lot.domain.vo.Terminal trm where (al.ideTrm = :idTrm or :idTrm is null) and ( al.cdeEtatLot = :cdeEtatLot or :cdeEtatLot is null) and ( al.ideTrm = trm.idTerminal) and (trm.retailer.id.cdeCmr = :cdeCmr or :cdeCmr is null)]; nested exception is org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from lu.cetrel.cardmgt.front.lot.domain.vo.AcquisitionLot al,lu.cetrel.cardmgt.front.lot.domain.vo.Terminal trm where (al.ideTrm = :idTrm or :idTrm is null) and ( al.cdeEtatLot = :cdeEtatLot or :cdeEtatLot is null) and ( al.ideTrm = trm.idTerminal) and (trm.retailer.id.cdeCmr = :cdeCmr or :cdeCmr is null)]
    at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:642)
    at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
    at org.springframework.orm.hibernate3.HibernateTemplate.executeFind(HibernateTemplate.java:343)
    at lu.cetrel.cardmgt.front.lot.domain.dao.impl.AcquisitionLotHibernateDAOImpl.findAllPaginatedAcquisitionLotExtendedByFilter(AcquisitionLotHibernateDAOImpl.java:144)
    at lu.cetrel.cardmgt.front.lot.service.impl.AcquisitionLotManagerImpl.findAllAcquisitionLotExtendedByFilter(AcquisitionLotManagerImpl.java:83)
    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:585)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy72.findAllAcquisitionLotExtendedByFilter(Unknown Source)
    at lu.cetrel.cardmgt.front.lot.web.AcquisitionLotBean.filterAcqLot(AcquisitionLotBean.java:339)
    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:585)
    at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
    at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
    at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
    ... 28 more
    Caused by: org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from lu.cetrel.cardmgt.front.lot.domain.vo.AcquisitionLot al,lu.cetrel.cardmgt.front.lot.domain.vo.Terminal trm where (al.ideTrm = :idTrm or :idTrm is null) and ( al.cdeEtatLot = :cdeEtatLot or :cdeEtatLot is null) and ( al.ideTrm = trm.idTerminal) and (trm.retailer.id.cdeCmr = :cdeCmr or :cdeCmr is null)]
    at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57)
    at antlr.CharScanner.setTokenObjectClass(CharScanner.java:340)
    at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31)
    at antlr.CharScanner.(CharScanner.java:51)
    at antlr.CharScanner.(CharScanner.java:60)
    at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:56)
    at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:53)
    at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:50)
    at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:26)
    at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44)
    at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:242)
    at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:157)
    at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
    at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:77)
    at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:56)
    at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
    at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
    at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
    at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
    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:585)
    at org.springframework.orm.hibernate3.HibernateTemplate$CloseSuppressingInvocationHandler.invoke(HibernateTemplate.java:1289)
    at $Proxy79.createQuery(Unknown Source)
    at lu.cetrel.cardmgt.front.lot.domain.dao.impl.AcquisitionLotHibernateDAOImpl$3.doInHibernate(AcquisitionLotHibernateDAOImpl.java:148)
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)
    ... 50 more

  4. #4
    Membre confirmé
    Avatar de bmoussaud
    Profil pro
    Inscrit en
    Décembre 2003
    Messages
    218
    Détails du profil
    Informations personnelles :
    Âge : 50
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Décembre 2003
    Messages : 218
    Points : 555
    Points
    555
    Par défaut
    D'apres mes cherches sur Google et mon experience avec WLS ca peut venir d'un conflit avec antlr.jar

    Tu peux essayer d'ajouter
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
    <!-- this is required for weblogic-->
    <property name="hibernate.query.factory_class">
    org.hibernate.hql.classic.ClassicQueryTranslatorFactory
    </property>
    ou upgrader la version d'antlr (CLASSPATH du server WLS 10), antlr-2.7.6+
    Benoit Moussaud - XebiaLabs - Automatisation des déploiements. Screencast & Demo

  5. #5
    Candidat au Club
    Inscrit en
    Septembre 2008
    Messages
    4
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 4
    Points : 2
    Points
    2
    Par défaut
    Merci pour ta réponse mais j'ai déjà essayer d'ajouter cette ligne dans le fichier de config Hibernate. Mais ca ne résout rien

    Par contre, j'ai aussi chercher le jar antlr sur WLS mais je ne le trouve pas.

    Je ne sais plus trop ou chercher

  6. #6
    Membre confirmé
    Avatar de bmoussaud
    Profil pro
    Inscrit en
    Décembre 2003
    Messages
    218
    Détails du profil
    Informations personnelles :
    Âge : 50
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Décembre 2003
    Messages : 218
    Points : 555
    Points
    555
    Par défaut
    As tu essayé cette solution

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
      <weblogic-web-app>
                   ....
              <container-descriptor>
                  <prefer-web-inf-classes>true</prefer-web-inf-classes>
             </container-descriptor>
                   ....
           </weblogic-web-app>
    Cependant il faut attention à l'utilisation de cette directive, car dans ce cas la hiérarchie des classloader va être inversée: les classes vont d'abord etre recherchées dans le WEB-INF/lib avant de l'être dans le classloader parent.
    Donc faire tres attention aux jars qui sont embarqués dans l'archive, d'autres NotClassDefFoundError peuvent apparaitre
    Benoit Moussaud - XebiaLabs - Automatisation des déploiements. Screencast & Demo

  7. #7
    Candidat au Club
    Inscrit en
    Septembre 2008
    Messages
    4
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 4
    Points : 2
    Points
    2
    Par défaut
    Merci pour ces réponses.

    Il faut en effet ajouter ces lignes dans le fichier weblogic.xml MAIS surtout ne pas avoir dans le war la librairie "xml-apis.jar"

    Utilisant Maven, il suffit de mettre
    <dependency>
    <groupId>xml-apis</groupId>
    <artifactId>xml-apis</artifactId>
    <version>1.0.b2</version>
    <scope>provided</scope>
    </dependency>

    dans le fichier pom.xml

  8. #8
    Membre confirmé
    Avatar de bmoussaud
    Profil pro
    Inscrit en
    Décembre 2003
    Messages
    218
    Détails du profil
    Informations personnelles :
    Âge : 50
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Décembre 2003
    Messages : 218
    Points : 555
    Points
    555
    Par défaut
    Pour mon information, pourquoi xml-api.jar est dans ton pom ?
    Benoit Moussaud - XebiaLabs - Automatisation des déploiements. Screencast & Demo

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 2
    Dernier message: 17/02/2012, 14h11
  2. Réponses: 4
    Dernier message: 21/04/2011, 17h24
  3. Réponses: 5
    Dernier message: 29/09/2009, 18h56
  4. Réponses: 2
    Dernier message: 21/07/2008, 14h53
  5. org.hibernate.hql.ast.QuerySyntaxError: unexpected token
    Par oughlad dans le forum Hibernate
    Réponses: 9
    Dernier message: 26/05/2006, 14h20

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo