CLONE -Hibernate 3.1 throws a Null pointer exception when using a regular HQL query to retrieve a persistent instance using a select statement with the classes being packaged in a JAR.

Description

I have a web application wherein I make a simple query - select conviction from Conviction conviction with a custom where clause. When there is no matching data, the exception as mentioned below is not thrown but when there is a matching row found, the exception is thrown back. I believe this bug relates to the bug in Hibernate when the classes are packaged in a signed JAR. The only reason I am getting this error is because all my classes are packaged in a JAR file and the same query works when the class is locally used on a command line.

Hibernate: select conviction0_.CONVICTION_ID as CONVICTION1_8_, conviction0_.OFFENSE_COUNTRY as OFFE
NSE2_8_, conviction0_.OFFENSE_STATE as OFFENSE3_8_, conviction0_.OFFENSE_CODE as OFFENSE4_8_, convic
tion0_.OFFENSE_DATE as OFFENSE5_8_, conviction0_.OFFENSE_CITY as OFFENSE6_8_, conviction0_.OFFENSE_C
OUNTY as OFFENSE7_8_, conviction0_.CONVICTION_DATE as CONVICTION8_8_, conviction0_.OFFENSE_CMV as OF
FENSE9_8_, conviction0_.OFFENSE_HAZMAT as OFFENSE10_8_, conviction0_.OFFENSE_CDL as OFFENSE11_8_, co
nviction0_.OFFENSE_ACCIDENT as OFFENSE12_8_, conviction0_.ACCIDENT_SEVERITY as ACCIDENT13_8_, convic
tion0_.ACCIDENT_LOC as ACCIDENT14_8_, conviction0_.ACCIDENT_DATE as ACCIDENT15_8_, conviction0_.CASE
NO as CASE16_8, conviction0_.COURT_NAME as COURT17_8_, conviction0_.JOP_PRECINCTNO as JOP18_8_, co
nviction0_.JOP_PLACENO as JOP19_8_, conviction0_.COURT_CITY as COURT20_8_, conviction0_.COURT_COUNTY
as COURT21_8_, conviction0_.DWI_EDINFO as DWI22_8_, conviction0_.DWIED_EXTDATE as DWIED23_8_, convi
ction0_.DRUGED_REQ as DRUGED24_8_, conviction0_.IGNT_INTLCK as IGNT25_8_, conviction0_.COURT_ORDER_N
OENF as COURT26_8_, conviction0_.ACD_DETAIL as ACD27_8_, conviction0_.OUTSTATE_COURT_CITY as OUTSTAT
E28_8_, conviction0_.OUTSTATE_COURT_COUNTY as OUTSTATE29_8_, conviction0_.REP_AGENCY as REP30_8_, co
nviction0_.ENFACTION_BEGDATE as ENFACTION31_8_, conviction0_.ENFACTION_ENDDATE as ENFACTION32_8_, co
nviction0_.STATUS as STATUS8_, conviction0_.NOTICE_DATE as NOTICE34_8_, conviction0_.LIC_SURRENDER a
s LIC35_8_, conviction0_.APPLICANT_ID as APPLICANT36_8_ from CONVICTION conviction0_ where convictio
n0_.APPLICANT_ID=? and conviction0_.OFFENSE_DATE=? and conviction0_.OFFENSE_CODE=? and conviction0_.
OFFENSE_COUNTY=?
java.lang.NullPointerException
at org.hibernate.tuple.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:372)
at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersiste
r.java:3121)
at org.hibernate.event.def.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventL
istener.java:232)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.jav
a:173)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)

at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:869)
at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:838)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
at org.hibernate.type.EntityType.resolve(EntityType.java:303)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:113)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
at org.hibernate.loader.Loader.doQuery(Loader.java:717)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2150)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:146)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1093)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at txdps.dl.bpr.di.data.dao.ConvictionDAO.search(ConvictionDAO.java:87)
at txdps.dl.bpr.di.business.ActionBusiness.search(ActionBusiness.java:18)
at txdps.dl.bpr.di.controller.ConvictionController.getTargetPage(ConvictionController.java:1
59)
at org.springframework.web.servlet.mvc.AbstractWizardFormController.processFormSubmission(Ab
stractWizardFormController.java:503)
at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(Abstract
FormController.java:256)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.j
ava:139)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControlle
rHandlerAdapter.java:44)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392
)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:357)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.jav
a:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletC
ontext.java:6718)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:37
64)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

Environment

Hibernate 3.1, Pointbase

Assignee

Unassigned

Reporter

udd

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Affects versions

Priority

Major
Configure