dev@glassfish.java.net

Re: NCDFE with oracle.sql.TIMESTAMP

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

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
>

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