I am using WebSphere 5.1 as my application server, on linux, and all coding and testing is done through a development environment on WinXP, RAD (Rational Application Developer) 6.0.
I have no errors when I deploy and test in my development environment , but when I try and deploy the same .ear to the WebSphere server, I get the following problems. We recently upgraded to RAD 6.0 from WebSphere Enterprise Developer 5.1, and it worked fine there, deployed fine from there, so my suspicion is that RAD is the culprit.
I am stumped... tried changing the query to contain the fully qualified com.myclasses.model.download.pojo.MyUpdateHbm, tried the query as "FROM MyUpdateHbm as d WHERE d.serviceId = :sid AND d.clientId = :cid" and its associated changes (setLong by name, etc.). My suspicion is that it is a configuration error since it works one place and not another.
Can anyone help?
Hibernate version:
3.0.5
Name and version of the database you are using:
DB2 version 8
Full stack trace of any exception that occurs:
Code:
[7/28/06 18:39:04:023 EDT] 151a35f0 PARSER E org.hibernate.hql.PARSER *** ERROR: MyUpdateHbm is not mapped.
[7/28/06 18:39:04:346 EDT] 151a35f0 PARSER E org.hibernate.hql.PARSER *** ERROR: Invalid path: 'd.serviceId'
[7/28/06 18:39:04:418 EDT] 151a35f0 PARSER E org.hibernate.hql.PARSER *** ERROR: <AST>: unexpected end of subtree
[7/28/06 18:39:04:574 EDT] 151a35f0 PARSER E org.hibernate.hql.PARSER *** ERROR: Invalid path: 'd.clientId'
[7/28/06 18:39:04:585 EDT] 151a35f0 PARSER E org.hibernate.hql.PARSER *** ERROR: <AST>: unexpected end of subtree
[7/28/06 18:39:04:739 EDT] 151a35f0 PARSER E org.hibernate.hql.PARSER *** ERROR: Invalid path: 'd.createTs'
[7/28/06 18:39:05:262 EDT] 151a35f0 SystemOut O 2006-07-28-18.39.05.062 ERROR [Servlet.Engine.Transports : 100] BaseException.logException()[63] ->
****** EXCEPTION ID:[2006.07.28 AD at 06:39:04 PM EDT] ******
MyUpdateHbm is not mapped. [FROM MyUpdateHbm as d WHERE d.serviceId = ? AND d.clientId = ? ORDER BY d.createTs asc ]
com.myclasses.framework.dao.DAOException: MyUpdateHbm is not mapped. [FROM MyUpdateHbm as d WHERE d.serviceId = ? AND d.clientId = ? ORDER BY d.createTs asc ]
at com.myclasses.model.dao.DownloadFileDAO.getDownloadFileList(DownloadFileDAO.java:133)
at com.myclasses.facade.DownloadFileFacade.getDownloadFileList(DownloadFileFacade.java:89)
at com.myclasses.actions.DownloadFileAction.getDownloadFileList(DownloadFileAction.java:284)
at com.myclasses.actions.DownloadFileAction.performAction(DownloadFileAction.java:56)
at com.myclasses.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))
Mapping documents:Code:
<hibernate-mapping schema="MY_SCHEMA">
<class
name="com.myclasses.model.download.pojo.MyUpdateHbm"
table="TBL_MYCLASSES_UPDATE">
<id
name="seqNum"
column="SEQ_NUM"
type="java.lang.Long"
length="15">
<generator class="sequence" >
<param name="sequence">MY_SCHEMA.SEQ_MY_UPDATE</param>
</generator>
</id>
<property
name="clientId"
column="CLIENT_ID"
type="java.lang.Long"
length="15">
<meta attribute="field-description">
@hibernate.property
column="CLIENT_ID"
</meta>
</property>
<property
name="serviceId"
column="SERVICE_ID"
type="java.lang.Long"
length="15">
<meta attribute="field-description">
@hibernate.property
column="SERVICE_ID"
</meta>
</property>
<property
name="fileDirectory"
column="FILE_DIRECTORY"
type="java.lang.String"
length="100">
<meta attribute="field-description">
@hibernate.property
column="FILE_DIRECTORY"
</meta>
</property>
<property
name="fileName"
column="FILENAME"
type="java.lang.String"
length="30">
<meta attribute="field-description">
@hibernate.property
column="FILENAME"
</meta>
</property>
<property
name="downloadTs"
column="DOWNLOAD_TS"
type="java.sql.Timestamp">
<meta attribute="field-description">
@hibernate.property
column="DOWNLOAD_TS"
</meta>
</property>
<property
name="createTs"
column="CREATE_TS"
type="java.sql.Timestamp">
<meta attribute="field-description">
@hibernate.property
column="CREATE_TS"
</meta>
</property>
<property
name="versionNum"
column="VERSION_NUM"
type="java.lang.String"
length="50">
<meta attribute="field-description">
@hibernate.property
column="VERSION_NUM"
</meta>
</property>
<property
name="fileBlob"
column="FILEBLOB"
type="java.sql.Blob">
<meta attribute="field-description">
@hibernate.property
column="FILEBLOB"
</meta>
</property>
<property
name="fileDescription"
column="FILE_DESC"
type="java.lang.String"
length="50">
<meta attribute="field-description">
@hibernate.property
column="FILE_DESC"
</meta>
</property>
<property
name="typeIndication"
column="TYPE_IND"
type="java.lang.String"
length="1">
<meta attribute="field-description">
@hibernate.property
column="TYPE_IND"
</meta>
</property>
<property
name="notes"
column="INSTALL_NOTES"
type="java.lang.String"
length="500">
<meta attribute="field-description">
@hibernate.property
column="INSTALL_NOTES"
</meta>
</property>
<property
name="fileSize"
column="FILE_SIZE"
type="java.lang.Long"
length="15">
<meta attribute="field-description">
@hibernate.property
column="FILE_SIZE"
</meta>
</property>
<many-to-one name="clientUser"
column="CLIENT_USER_ID" />
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():Code:
public static final String GET_DOWNLOAD_FILE =
"FROM MyUpdateHbm as d "
+ "WHERE d.serviceId = ? "
+ "AND d.clientId = ? "
+ "ORDER BY d.createTs asc ";
List d =
session
.createQuery(GET_DOWNLOAD_FILE)
.setLong(0, serviceId.longValue())
.setLong(1, clientId.longValue())
.list();