-->
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.  [ 6 posts ] 
Author Message
 Post subject: Hibernate and WAS 5.1 problem
PostPosted: Sun Jul 30, 2006 2:55 pm 
Newbie

Joined: Sun Jul 30, 2006 2:43 pm
Posts: 3
Hello All,
We are new to Hibernate and we are getting the following issue. When we use RAD or WSED 5.1 and run this locally we do not see this issue, but when we deploy the code to our WAS 5.1 app server on AIX we get the following error.... When the sever starts up, I do see that ArcUpdateHbm is mapped as shown below. We are using Hibernate 3.0.5 with DB2 8.1 and WAS 5.1. Also we are using DB2 type 2 driver.

Thanks in advance for your help!

[7/30/06 14:27:40:295 EDT] 40d975ff Environment I org.hibernate.cfg.Environment Hibernate 3.0.5
[7/30/06 14:27:40:299 EDT] 40d975ff Environment I org.hibernate.cfg.Environment hibernate.properties not found
[7/30/06 14:27:40:385 EDT] 40d975ff Environment I org.hibernate.cfg.Environment using CGLIB reflection optimizer
[7/30/06 14:27:40:454 EDT] 40d975ff Environment I org.hibernate.cfg.Environment using JDK 1.4 java.sql.Timestamp handling
[7/30/06 14:27:42:855 EDT] 40d975ff Configuration I org.hibernate.cfg.Configuration configuring from resource: /WEB-INF/arc.h
ibernate.cfg.xml
[7/30/06 14:27:42:855 EDT] 40d975ff Configuration I org.hibernate.cfg.Configuration Configuration resource: /WEB-INF/arc.hibe
rnate.cfg.xml
[7/30/06 14:27:44:869 EDT] 40d975ff Configuration I org.hibernate.cfg.Configuration Mapping resource: com/bbt/cps/model/messa
ges/pojo/ClientMessageHbm.hbm.xml
[7/30/06 14:27:46:454 EDT] 40d975ff HbmBinder I org.hibernate.cfg.HbmBinder Mapping class: com.bbt.cps.model.messages.poj
o.ClientMessageHbm -> TBL_CLIENT_LOG
[7/30/06 14:27:47:017 EDT] 40d975ff Configuration I org.hibernate.cfg.Configuration Mapping resource: com/bbt/cps/model/messa
ges/pojo/FiMessageHbm.hbm.xml
[7/30/06 14:27:47:102 EDT] 40d975ff HbmBinder I org.hibernate.cfg.HbmBinder Mapping class: com.bbt.cps.model.messages.poj
o.FiMessageHbm -> TBL_FINANCIAL_INSTITUTION_LOG
[7/30/06 14:27:47:175 EDT] 40d975ff Configuration I org.hibernate.cfg.Configuration Mapping resource: com/bbt/cps/model/downl
oad/pojo/ArcUpdateHbm.hbm.xml
[7/30/06 14:27:47:294 EDT] 40d975ff HbmBinder I org.hibernate.cfg.HbmBinder Mapping class: com.bbt.cps.model.download.poj
o.ArcUpdateHbm -> TBL_ARC_UPDATE
....
...
....
.....
And then when I invoke the functionality I get the following ERROR..........


[7/30/06 14:30:25:768 EDT] 4a0e75ff PARSER E org.hibernate.hql.PARSER *** ERROR: ArcUpdateHbm is not mapped.
[7/30/06 14:30:26:022 EDT] 4a0e75ff PARSER E org.hibernate.hql.PARSER *** ERROR: Invalid path: 'd.serviceId'
[7/30/06 14:30:26:043 EDT] 4a0e75ff PARSER E org.hibernate.hql.PARSER *** ERROR: <AST>: unexpected end of subtree
[7/30/06 14:30:26:174 EDT] 4a0e75ff PARSER E org.hibernate.hql.PARSER *** ERROR: Invalid path: 'd.clientId'
[7/30/06 14:30:26:185 EDT] 4a0e75ff PARSER E org.hibernate.hql.PARSER *** ERROR: <AST>: unexpected end of subtree
[7/30/06 14:30:26:334 EDT] 4a0e75ff PARSER E org.hibernate.hql.PARSER *** ERROR: Invalid path: 'd.createTs'
[7/30/06 14:30:26:840 EDT] 4a0e75ff SystemOut O 2006-07-30-14.30.26.611 ERROR [Servlet.Engine.Transports : 84] BaseException.logException()[63] ->
****** EXCEPTION ID:[2006.07.30 AD at 02:30:26 PM EDT] ******
ArcUpdateHbm is not mapped. [FROM ArcUpdateHbm as d WHERE d.serviceId = ? AND d.clientId = ? ORDER BY d.createTs asc ]
com.bbt.cps.framework.dao.DAOException: ArcUpdateHbm is not mapped. [FROM ArcUpdateHbm as d WHERE d.serviceId = ? AND d.clientId = ? ORDER BY d.createTs asc ]
at com.bbt.cps.arc.model.dao.DownloadFileDAO.getDownloadFileList(DownloadFileDAO.java:133)
at com.bbt.cps.arc.facade.DownloadFileFacade.getDownloadFileList(DownloadFileFacade.java:89)
at com.bbt.cps.arc.actions.DownloadARCFileAction.getDownloadFileList(DownloadARCFileAction.java:284)
at com.bbt.cps.arc.actions.DownloadARCFileAction.performAction(DownloadARCFileAction.java:56)
at com.bbt.cps.arc.actions.BaseAction.execute(BaseAction.java:85)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Root Exception:
org.hibernate.hql.ast.QuerySyntaxError: ArcUpdateHbm is not mapped. [FROM ArcUpdateHbm as d WHERE d.serviceId = ? AND d.clientId = ? ORDER BY d.createTs asc ]
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:63)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:196)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:130)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:884)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:834)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at com.bbt.cps.arc.model.dao.DownloadFileDAO.getDownloadFileList(DownloadFileDAO.java:119)
at com.bbt.cps.arc.facade.DownloadFileFacade.getDownloadFileList(DownloadFileFacade.java:89)
at com.bbt.cps.arc.actions.DownloadARCFileAction.getDownloadFileList(DownloadARCFileAction.java:284)
at com.bbt.cps.arc.actions.DownloadARCFileAction.performAction(DownloadARCFileAction.java:56)
at com.bbt.cps.arc.actions.BaseAction.execute(BaseAction.java:85)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Caused by: ArcUpdateHbm is not mapped.
at org.hibernate.hql.ast.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:85)
at org.hibernate.hql.ast.FromElementFactory.addFromElement(FromElementFactory.java:77)
at org.hibernate.hql.ast.FromClause.addFromElement(FromClause.java:67)
at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:217)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:2830)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2719)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:513)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:371)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:201)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:151)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:189)
... 36 more




Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.0.5

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using: DB2 8.1

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 30, 2006 4:50 pm 
Newbie

Joined: Thu Jul 20, 2006 5:00 pm
Posts: 16
Its all starting with "hibernate.properties not found ". Make sure the folder containing the hibernate.properties is in the VM Path environment.
When, you are running on WSAD, it would have been in your env thats why it is working well.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 30, 2006 4:54 pm 
Newbie

Joined: Thu Jul 20, 2006 5:00 pm
Posts: 16
And, subsequent error - 4a0e75ff PARSER E org.hibernate.hql.PARSER *** ERROR: ArcUpdateHbm is not mapped, may be beacuase of the hibernate.properties which contains the mapping file name and location. And, hibernate.properties is not read by hibernate at runtime. If you set the path env correctly may be your problem will be solved

Hopefully, this will help


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 30, 2006 6:38 pm 
Newbie

Joined: Sun Jul 30, 2006 2:43 pm
Posts: 3
Hello xgr3,
Thanks for the reply!
I do not have a hibernate.properties file in my file system in WSAD or RAD. I do have a hibernate.cfg.xml file which is see below and it is under WEB-INF of my web application.

Thanks!



<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

<!-- a SessionFactory instance listed as /jndi/name -->
<session-factory>

<!-- properties -->
<property name="hibernate.session_factory_name">HibernateSessionFactory</property>
<property name="hibernate.connection.datasource">jdbc/ECPaysDataSource</property>
<property name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property>
<property name="hibernate.cache.use_second_level_cache">false</property>
<property name="hibernate.default_schema">cps_admin</property>
<property name="hibernate.connection.autocommit">false</property>
<property name="hibernate.show_sql">true</property>

<!-- mapping files -->
<mapping resource="com/bbt/cps/model/messages/pojo/ClientMessageHbm.hbm.xml"/>
<mapping resource="com/bbt/cps/model/messages/pojo/FiMessageHbm.hbm.xml"/>

<mapping resource="com/bbt/cps/model/download/pojo/ArcUpdateHbm.hbm.xml"/>

<mapping resource="com/bbt/cps/model/client/pojo/ClientUserHbm.hbm.xml"/>
<mapping resource="com/bbt/cps/model/client/pojo/ClientConfHbm.hbm.xml"/>


</session-factory>

</hibernate-configuration>


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 30, 2006 7:45 pm 
Newbie

Joined: Wed Jul 19, 2006 4:34 pm
Posts: 19
Try to put hibernate.cfg.xml under WEB-INF\classes folder and try o run.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 30, 2006 7:51 pm 
Newbie

Joined: Sun Jul 30, 2006 2:43 pm
Posts: 3
I think I found the problem. We have two web apps using hibernate in the same ear file. We were using the same session factory name in both these web apps, so when one web app loaded the second web app overwrote session factory and ofcourse the mapping for the first web app. Since HibernateSessionFactory is bound to a JNDI we have to use unique names for HibernateSessionFactory in both our web apps.

Thanks for everyone for your help!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.