[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Error when using Double in Entity on GlassFish v3
|
You can also use the OraclePlatform, which has no Oracle JDBC class
dependencies.
For the Oracle9Platform ensure that the Oracle JDBC driver and
eclipselink.jar are in the same place and on the same classpath.
Christopher Delahunt wrote:
>
> Hello,
>
> When you use the Double, it is going through the Oracle9Platform class
> to convert it, which has a dependency on the
> oracle.sql.TIMESTAMP class. The oracle driver and the EclipseLink jar
> need to be
> accessable by the same classloaders.
>
> Best Regards,
> Chris
>
> Tim Hollosy wrote:
>> When you map them as Doubles you get
>> "java.lang.ClassNotFoundException: oracle.sql.TIMESTAMP" that's odd.
>>
>> Did you try double primitive or float?
>>
>> ./tch
>>
>>
>>
>> On Tue, Sep 30, 2008 at 9:54 AM, Wouter van Reeven <wouter@xxxxxxxxxxxxx>
>> wrote:
>>
>>> Hi all,
>>>
>>>
>>> As an active member of the GlassFish community I am involved in beta
>>> testing
>>> GlassFish v3. Last night I ran into a problem with EclipseLink on GFv3
>>> build 26.
>>> When I reported the error on the quality GF mailinglist I was asked to
>>> post the
>>> error to this list.
>>>
>>> I have an Oracle XE database with a table with several NUMBER(3,1)
>>> columns. I am
>>> using ojbdc14.jar which I copied into the GlassFish lib dir.
>>>
>>> Whenever I map those columns to Integer members in my Entity the data is
>>> fetched
>>> ok but as integer values which makes sense but is not what I want.
>>>
>>> If I map them as Double like this
>>>
>>> @Column(name = "MAG")
>>> private Double mag;
>>>
>>> and redeploy my app, I get the stacktrace I copied and pasted below. Any
>>> ideas?
>>>
>>>
>>> Thanks, Wouter van Reeven
>>>
>>> javax.ejb.EJBException
>>> at
>>> com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:4152)
>>> at
>>> com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:4050)
>>> at
>>> com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3852)
>>> at
>>> com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1512)
>>> at
>>> com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1474)
>>> at
>>> com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:195)
>>> at
>>> com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:82)
>>> at $Proxy122.getAllPlanning(Unknown Source)
>>> at
>>> nl.reeven.van.astro.jsf.PlanningBackingBean.getAllPlanning(PlanningBackingBean.java:27)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>> at javax.el.BeanELResolver.getValue(BeanELResolver.java:261)
>>> at
>>> javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
>>> at
>>> com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
>>> at com.sun.el.parser.AstValue.getValue(AstValue.java:138)
>>> at
>>> com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
>>> at javax.faces.component.UIData.getValue(UIData.java:609)
>>> at
>>> org.ajax4jsf.component.UIDataAdaptor.getValue(UIDataAdaptor.java:1640)
>>> at
>>> org.ajax4jsf.component.SequenceDataAdaptor.getDataModel(SequenceDataAdaptor.java:48)
>>> at
>>> org.ajax4jsf.component.SequenceDataAdaptor.createDataModel(SequenceDataAdaptor.java:42)
>>> at
>>> org.richfaces.component.UIDataTable.createDataModel(UIDataTable.java:122)
>>> at
>>> org.ajax4jsf.component.UIDataAdaptor.getExtendedDataModel(UIDataAdaptor.java:621)
>>> at
>>> org.ajax4jsf.component.UIDataAdaptor.getRowCount(UIDataAdaptor.java:248)
>>> at
>>> org.richfaces.component.UIDatascroller.getRowCount(UIDatascroller.java:347)
>>> at
>>> org.richfaces.component.UIDatascroller.getPageCount(UIDatascroller.java:322)
>>> at
>>> org.richfaces.component.UIDatascroller.getPageCount(UIDatascroller.java:343)
>>> at
>>> org.richfaces.renderkit.html.DatascrollerTemplate.doEncodeEnd(DatascrollerTemplate.java:203)
>>> at
>>> org.richfaces.renderkit.html.DatascrollerTemplate.doEncodeEnd(DatascrollerTemplate.java:680)
>>> at
>>> org.ajax4jsf.renderkit.RendererBase.encodeEnd(RendererBase.java:135)
>>> at
>>> javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
>>> at
>>> org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:286)
>>> at
>>> org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
>>> at
>>> org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
>>> at
>>> org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
>>> at
>>> org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
>>> at
>>> javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
>>> at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
>>> at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
>>> at
>>> javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
>>> at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
>>> at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
>>> at
>>> com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
>>> at
>>> com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:202)
>>> at
>>> org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
>>> at
>>> org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:196)
>>> at
>>> com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
>>> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
>>> at
>>> com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
>>> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
>>> at
>>> org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
>>> at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:337)
>>> at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
>>> at
>>> org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
>>> at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
>>> at
>>> org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
>>> at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
>>> at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
>>> at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
>>> at
>>> org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:460)
>>> at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
>>> at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
>>> at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
>>> at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
>>> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
>>> at
>>> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
>>> at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
>>> at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
>>> at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
>>> at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
>>> at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
>>> at
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
>>> at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
>>> at
>>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
>>> at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
>>> at
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
>>> at
>>> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:307)
>>> at
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
>>> at
>>> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
>>> at
>>> com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:625)
>>> at
>>> com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:562)
>>> at
>>> com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:819)
>>> at
>>> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
>>> at
>>> com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
>>> at
>>> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
>>> at
>>> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
>>> at
>>> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
>>> at
>>> com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
>>> at
>>> com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)
>>> Caused by: 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:245)
>>> at
>>> org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.getFieldValue(AbstractDirectMapping.java:539)
>>> at
>>> org.eclipse.persistence.internal.expressions.QueryKeyExpression.getFieldValue(QueryKeyExpression.java:304)
>>> at
>>> org.eclipse.persistence.internal.expressions.ConstantExpression.printSQL(ConstantExpression.java:117)
>>> at
>>> org.eclipse.persistence.expressions.ExpressionOperator.printDuo(ExpressionOperator.java:1816)
>>> at
>>> org.eclipse.persistence.internal.expressions.CompoundExpression.printSQL(CompoundExpression.java:277)
>>> at
>>> org.eclipse.persistence.internal.expressions.RelationExpression.printSQL(RelationExpression.java:563)
>>> at
>>> org.eclipse.persistence.expressions.ExpressionOperator.printDuo(ExpressionOperator.java:1811)
>>> at
>>> org.eclipse.persistence.internal.expressions.CompoundExpression.printSQL(CompoundExpression.java:277)
>>> at
>>> org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter.translateExpression(ExpressionSQLPrinter.java:288)
>>> at
>>> org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter.printExpression(ExpressionSQLPrinter.java:118)
>>> at
>>> org.eclipse.persistence.internal.expressions.SQLSelectStatement.printSQL(SQLSelectStatement.java:1425)
>>> at
>>> org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.printSQLSelectStatement(DatabasePlatform.java:2508)
>>> at
>>> org.eclipse.persistence.platform.database.OraclePlatform.printSQLSelectStatement(OraclePlatform.java:696)
>>> at
>>> org.eclipse.persistence.internal.expressions.SQLSelectStatement.buildCall(SQLSelectStatement.java:742)
>>> at
>>> org.eclipse.persistence.descriptors.ClassDescriptor.buildCallFromStatement(ClassDescriptor.java:610)
>>> at
>>> org.eclipse.persistence.internal.queries.StatementQueryMechanism.setCallFromStatement(StatementQueryMechanism.java:387)
>>> at
>>> org.eclipse.persistence.internal.queries.StatementQueryMechanism.prepareSelectAllRows(StatementQueryMechanism.java:313)
>>> at
>>> org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.prepareSelectAllRows(ExpressionQueryMechanism.java:1552)
>>> at
>>> org.eclipse.persistence.queries.ReadAllQuery.prepareSelectAllRows(ReadAllQuery.java:849)
>>> at
>>> org.eclipse.persistence.queries.ReadAllQuery.prepare(ReadAllQuery.java:787)
>>> at
>>> org.eclipse.persistence.queries.DatabaseQuery.checkPrepare(DatabaseQuery.java:463)
>>> at
>>> org.eclipse.persistence.queries.ObjectLevelReadQuery.checkPrepare(ObjectLevelReadQuery.java:616)
>>> at
>>> org.eclipse.persistence.queries.DatabaseQuery.prepareCall(DatabaseQuery.java:1533)
>>> at
>>> org.eclipse.persistence.internal.jpa.EJBQueryImpl.getDatabaseQuery(EJBQueryImpl.java:449)
>>> at
>>> org.eclipse.persistence.internal.jpa.EJBQueryImpl.setAsSQLReadQuery(EJBQueryImpl.java:117)
>>> at
>>> org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:503)
>>> at
>>> nl.reeven.van.astro.db.session.PlanningBean.getAllPlanning(PlanningBean.java:24)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>> at
>>> com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:3161)
>>> at
>>> com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4269)
>>> at
>>> com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:187)
>>> ... 86 more
>>> Caused by: java.lang.ClassNotFoundException: oracle.sql.TIMESTAMP
>>> at
>>> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:198)
>>> at
>>> org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
>>> at
>>> org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:109)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>> ... 122 more
>>> Caused by: java.lang.ClassNotFoundException: oracle.sql.TIMESTAMP
>>> at
>>> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassOrResource(R4SearchPolicyCore.java:486)
>>> at
>>> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:185)
>>> ... 126 more
>>> |#]
>
>
-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
http://www.eclipse.org/eclipselink/
EclipseLink , http://www.oracle.com/technology/products/ias/toplink/
TopLink
Wiki: http://wiki.eclipse.org/EclipseLink EclipseLink ,
http://wiki.oracle.com/page/TopLink TopLink
Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
http://www.nabble.com/EclipseLink-f26430.html EclipseLink
Book: http://en.wikibooks.org/wiki/Java_Persistence Java Persistence
--
View this message in context: http://www.nabble.com/Error-when-using-Double-in-Entity-on-GlassFish-v3-tp19742596p19748491.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.