dev@glassfish.java.net

Re: NCDFE with oracle.sql.TIMESTAMP

From: Arun Gupta <Arun.Gupta_at_Sun.COM>
Date: Wed, 30 Sep 2009 21:30:33 -0700

OK, the classes in lib/ext can be loaded successfully in build 63 and is
broken 64 onwards.

Filed https://glassfish.dev.java.net/issues/show_bug.cgi?id=9885 for
tracking purpose.

Thanks,
-Arun

Arun Gupta wrote:
> It seems this class loading broke somewhere between build 54 & 65. So
> copying ojdbc6.jar in $domain/lib/ext works in 54 but throws the same
> NCDFE with 65.
>
> I'll try to trace back to an earlier build and provide more data
> tomorrow. This is a heads up.
>
> -Arun
>
> Mitesh Meswani wrote:
>> Hi Arun,
>>
>> With new class loader hierarchy in V3, a jar under lib is not visible
>> to GlassFish modules including EclipseLink. As the document explains
>> the driver jar needs to be visible to EclipseLink hence you need to
>> put it under $domain/lib/ext
>>
>> -Mitesh
>>
>> Arun Gupta wrote:
>>> That worked!
>>>
>>> But that was never the case with MySQL Connector/J jar. I always used
>>> to copy it in glassfish/lib. Any idea ?
>>>
>>> -Arun
>>>
>>> Mitesh Meswani wrote:
>>>> Hi Arun,
>>>>
>>>> You need to put the driver jar under $domain-dir/lib/ext. See
>>>> http://docs.sun.com/app/docs/doc/820-7695/giqbi?a=view for details.
>>>>
>>>> -Mitesh
>>>>
>>>> Arun Gupta wrote:
>>>>> With b65, I'm trying to develop a Web application (JPA + Servlet)
>>>>> that connects to Oracle database server. The JDBC connection pool
>>>>> is configured, ping succeeds, and the JDBC resource is created from
>>>>> it. But running the web application gives the following error:
>>>>>
>>>>> INFO:
>>>>> file:/Users/arungupta/NetBeansProjects/WebApplication14/build/web/WEB-INF/classes/-WebApplication14PU
>>>>> login successful
>>>>> WARNING: StandardWrapperValve[MainServlet]: PWC1406:
>>>>> Servlet.service() for servlet MainServlet threw exception
>>>>> java.lang.NoClassDefFoundError: oracle/sql/TIMESTAMP
>>>>> at
>>>>> org.eclipse.persistence.internal.platform.database.oracle.TIMESTAMPTypes.<clinit>(TIMESTAMPTypes.java:22)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.platform.database.oracle.Oracle9Platform.convertObject(Oracle9Platform.java:280)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.mappings.converters.TypeConversionConverter.convertDataValueToObjectValue(TypeConversionConverter.java:119)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.getAttributeValue(AbstractDirectMapping.java:637)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.valueFromRow(AbstractDirectMapping.java:1185)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1219)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:329)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:658)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneNormally(ObjectBuilder.java:580)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:549)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:489)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:441)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:635)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.queries.ReadAllQuery.registerResultInUnitOfWork(ReadAllQuery.java:838)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:464)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:997)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:670)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:958)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:432)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1021)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2864)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1208)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1190)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1164)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:420)
>>>>>
>>>>> at
>>>>> org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:636)
>>>>>
>>>>> at controller.MainServlet.processRequest(MainServlet.java:43)
>>>>> at controller.MainServlet.doGet(MainServlet.java:78)
>>>>>
>>>>> This is in spite of the fact that ojdbc14.jar is in glassfish/lib
>>>>> and oracle.sql.TIMESTAMP class exists in this jar. This application
>>>>> works fine if the JDBC connection pool is pointing to a MySQL data
>>>>> source.
>>>>>
>>>>> Any thoughts ?
>>>>>
>>>>> Thanks,
>>>>> -Arun
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>

-- 
Need Application Server ? Download from http://glassfish.org
Blog: http://blog.arungupta.me