Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Odd Exception when retrieving a datarow
Odd Exception when retrieving a datarow [message #997147] Thu, 03 January 2013 19:00 Go to next message
Wan Li is currently offline Wan Li
Messages: 4
Registered: December 2012
Junior Member
Hi All,

I had posted an earlier topic about retrieving TimeZone information using Oracle's TIMESTAMPTZ datatype when associated to a Calendar type within an entity class.

I have that working, where I can persist and retrieve timezone information. However, whenever I run a NamedQuery to retrieve datarows from a table that contains the TIMESTAMPTZ type, i get the follow WARNING exception in my glassfish log:

WARNING: java.lang.ClassNotFoundException: com.sun.gjc.spi.base.ConnectionHolder
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	at org.eclipse.persistence.platform.server.sunas.SunAS9ServerPlatform.unwrapGlassFishConnectionHelper(SunAS9ServerPlatform.java:124)
	at org.eclipse.persistence.platform.server.sunas.SunAS9ServerPlatform.unwrapConnection(SunAS9ServerPlatform.java:105)
	at org.eclipse.persistence.platform.database.oracle.Oracle8Platform.getConnection(Oracle8Platform.java:104)
	at org.eclipse.persistence.platform.database.oracle.Oracle9Platform.getTIMESTAMPTZFromResultSet(Oracle9Platform.java:199)
	at org.eclipse.persistence.platform.database.oracle.Oracle9Platform.getObjectFromResultSet(Oracle9Platform.java:166)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.getObject(DatabaseAccessor.java:1206)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.fetchRow(DatabaseAccessor.java:999)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processResultSet(DatabaseAccessor.java:723)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:621)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:535)
	at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1717)
	at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:566)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:264)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:648)
	at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2617)
	at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllReportQueryRows(ExpressionQueryMechanism.java:2554)
	at org.eclipse.persistence.queries.ReportQuery.executeDatabaseQuery(ReportQuery.java:846)
	at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:844)
	at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1043)
	at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:392)
	at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1131)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2871)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1516)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1498)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1463)
	at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:485)
	at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:742)


This is the query that generated the issue:
FINE: SELECT t0.ID, t0.COMMENTS_OVERRIDE, t0.DESCRIPTION_OVERRIDE, t0.END_DATE_TIME, t0.LOCATION_ADDR_OVERRIDE, t0.RECORD_STATUS, t0.START_DATE_TIME, t0.APPT_EVENT_ID, t0.LOCATION_TYPE_OVERRIDE, t0.TENANT_ID FROM APPT_ELEMENT t0, APPT_EVENT_CONTACTS t2, APPT_EVENT t1 WHERE (((((t0.TENANT_ID = ?) AND (t0.START_DATE_TIME > ?)) AND (t0.START_DATE_TIME < ?)) AND (t2.USER_ID = ?)) AND ((t1.ID = t2.APPT_EVENT_ID) AND (t0.APPT_EVENT_ID = t1.ID)))
	bind => [98, 2012-12-30 00:00:00.0, 2013-02-10 00:00:00.0, 3]



The odd thing is, the program doesn't crash, and I actually get all the rows returned to me from the query with the correct timezone information in my Calendar object.

Is this perhaps an issue with GlassFish?
Has anyone ever seen this before or have any thoughts?

I am using Oracle 11 Platform, and GlassFish 3.1.2.2.
I saw this on EclipseLink 2.3.2 and 2.3.3

Thanks!

[Updated on: Thu, 03 January 2013 19:01]

Report message to a moderator

Re: Odd Exception when retrieving a datarow [message #997214 is a reply to message #997147] Fri, 04 January 2013 08:44 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1017
Registered: July 2009
Senior Member
The unwrapGlassFishConnectionHelper method attempts to get a method from com.sun.gjc.spi.base.ConnectionHolder to call on the connection to get the unwrapped connection held within. I'm not sure what version of glassfish this unwrapGlassFishConnectionHelper method was created for, but if you are getting the correct Calendar object returned, the warning can be ignored. I believe this warning should show up on every query that would return a TIMESTAMPTZ in the result, but will only show up in the logs at the warning level - you can ignore them, or change the log level so that warnings are not logged.

Please also file a bug in EclipseLink so that this is either changed to be logged at a higher log level or the method refactored so that the error is only logged and thrown if the connection cannot be unwrapped at all.

Best Regards,
Chris

Re: Odd Exception when retrieving a datarow [message #997235 is a reply to message #997214] Fri, 04 January 2013 09:53 Go to previous message
Wan Li is currently offline Wan Li
Messages: 4
Registered: December 2012
Junior Member
Hi Chris,

Thanks for the info. I filed Bug 397453 for this.
Previous Topic:Bad EclipseLink JPA dependency
Next Topic:Can I get set<MyEntity> instead of Indirect Set in one to many relationship
Goto Forum:
  


Current Time: Sat Aug 23 09:33:19 EDT 2014

Powered by FUDForum. Page generated in 0.01774 seconds