Thanks Lance, moving the jar to lib/ext worked.
Oracle version on Mac OS X is 10.2.0.4.0 and the corresponding JDBC 4
driver [1] for that is ojdbc14.jar. Are you saying ojdbc6.jar, which is
for 11g release, will work with this Oracle version as well ?
[1]
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html
-Arun
Lance J. Andersen wrote:
> Hi Arun,
>
> While this probably will not make a difference, you should be using the
> ojdbc6.jar which is the JDBC 4 driver for Java SE 6 with V3. I would
> expect the ojdbc14.jar to still work however. if that fails, put the
> jar in the <domain>/lib/ext directory and see if that helps.
> -Lance
>
> 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