You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Marcel <em...@gmail.com> on 2006/07/22 10:06:39 UTC
ROP server side exception
Hi folks,
I am getting a nasty exception on the server side when working with ROP.
It occurs in very specific circumstances: I create a new object, save it
back to the server. When I try and look at that object again, I get the
exception below.
My insert process is basically context.newObject, and then set the
relationship from the existing object to point to the new one.
The odd thing is that the SQL logs show that the DB query works
perfectly: the correct number of records are returned without a problem.
And even more strangely, if I restart the servlet it works perfectly.
Also, I think it is new since moving to 1.2 (90% sure).
Any ideas? I don't know where to start on this one.
Regards,
Marcel
22/07/2006 17:28:00 com.caucho.hessian.server.HessianSkeleton invoke
WARNING: java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
at sun.reflect.UnsafeObjectFieldAccessorImpl.set(Unknown Source)
at java.lang.reflect.Field.set(Unknown Source)
at
org.objectstyle.cayenne.property.FieldAccessor.writePropertyDirectly(FieldAccessor.java:115)
at
org.objectstyle.cayenne.property.SimpleProperty.writePropertyDirectly(SimpleProperty.java:119)
at
org.objectstyle.cayenne.property.SimpleProperty.writeProperty(SimpleProperty.java:90)
at
org.objectstyle.cayenne.map.EntityDescriptor$SimplePersistentProperty.writeProperty(EntityDescriptor.java:341)
at
org.objectstyle.cayenne.util.ObjectDetachOperation$1.visitProperty(ObjectDetachOperation.java:195)
at
org.objectstyle.cayenne.property.SimpleProperty.visit(SimpleProperty.java:98)
at
org.objectstyle.cayenne.property.BaseClassDescriptor.visitProperties(BaseClassDescriptor.java:250)
at
org.objectstyle.cayenne.util.ObjectDetachOperation.detach(ObjectDetachOperation.java:134)
at
org.objectstyle.cayenne.access.ClientServerChannelQueryAction.toClientObjects(ClientServerChannelQueryAction.java:221)
at
org.objectstyle.cayenne.access.ClientServerChannelQueryAction.interceptObjectConversion(ClientServerChannelQueryAction.java:181)
at
org.objectstyle.cayenne.access.ClientServerChannelQueryAction.execute(ClientServerChannelQueryAction.java:106)
at
org.objectstyle.cayenne.access.ClientServerChannel.onQuery(ClientServerChannel.java:99)
at
org.objectstyle.cayenne.remote.service.DispatchHelper.dispatch(DispatchHelper.java:76)
at
org.objectstyle.cayenne.remote.service.BaseRemoteService.processMessage(BaseRemoteService.java:182)
at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:157)
at
org.objectstyle.cayenne.remote.hessian.service._HessianServlet.service(_HessianServlet.java:388)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Re: ROP server side exception
Posted by Andrus Adamchik <an...@objectstyle.org>.
I'll try it out with your new patch from CAY-604.
Andrus
On Jul 22, 2006, at 4:06 AM, Marcel wrote:
>
> Hi folks,
>
> I am getting a nasty exception on the server side when working with
> ROP. It occurs in very specific circumstances: I create a new
> object, save it back to the server. When I try and look at that
> object again, I get the exception below.
>
> My insert process is basically context.newObject, and then set the
> relationship from the existing object to point to the new one.
>
> The odd thing is that the SQL logs show that the DB query works
> perfectly: the correct number of records are returned without a
> problem. And even more strangely, if I restart the servlet it works
> perfectly. Also, I think it is new since moving to 1.2 (90% sure).
>
> Any ideas? I don't know where to start on this one.
>
> Regards,
>
> Marcel
>
> 22/07/2006 17:28:00 com.caucho.hessian.server.HessianSkeleton invoke
> WARNING: java.lang.IllegalArgumentException
> java.lang.IllegalArgumentException
> at sun.reflect.UnsafeObjectFieldAccessorImpl.set(Unknown Source)
> at java.lang.reflect.Field.set(Unknown Source)
> at
> org.objectstyle.cayenne.property.FieldAccessor.writePropertyDirectly
> (FieldAccessor.java:115)
> at
> org.objectstyle.cayenne.property.SimpleProperty.writePropertyDirectly(
> SimpleProperty.java:119)
> at org.objectstyle.cayenne.property.SimpleProperty.writeProperty
> (SimpleProperty.java:90)
> at org.objectstyle.cayenne.map.EntityDescriptor
> $SimplePersistentProperty.writeProperty(EntityDescriptor.java:341)
> at org.objectstyle.cayenne.util.ObjectDetachOperation
> $1.visitProperty(ObjectDetachOperation.java:195)
> at org.objectstyle.cayenne.property.SimpleProperty.visit
> (SimpleProperty.java:98)
> at
> org.objectstyle.cayenne.property.BaseClassDescriptor.visitProperties
> (BaseClassDescriptor.java:250)
> at org.objectstyle.cayenne.util.ObjectDetachOperation.detach
> (ObjectDetachOperation.java:134)
> at
> org.objectstyle.cayenne.access.ClientServerChannelQueryAction.toClient
> Objects(ClientServerChannelQueryAction.java:221)
> at
> org.objectstyle.cayenne.access.ClientServerChannelQueryAction.intercep
> tObjectConversion(ClientServerChannelQueryAction.java:181)
> at
> org.objectstyle.cayenne.access.ClientServerChannelQueryAction.execute(
> ClientServerChannelQueryAction.java:106)
> at org.objectstyle.cayenne.access.ClientServerChannel.onQuery
> (ClientServerChannel.java:99)
> at org.objectstyle.cayenne.remote.service.DispatchHelper.dispatch
> (DispatchHelper.java:76)
> at
> org.objectstyle.cayenne.remote.service.BaseRemoteService.processMessag
> e(BaseRemoteService.java:182)
> at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at com.caucho.hessian.server.HessianSkeleton.invoke
> (HessianSkeleton.java:157)
> at
> org.objectstyle.cayenne.remote.hessian.service._HessianServlet.service
> (_HessianServlet.java:388)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:252)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:173)
> at org.apache.catalina.core.StandardWrapperValve.invoke
> (StandardWrapperValve.java:213)
> at org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValve.java:178)
> at org.apache.catalina.core.StandardHostValve.invoke
> (StandardHostValve.java:126)
> at org.apache.catalina.valves.ErrorReportValve.invoke
> (ErrorReportValve.java:105)
> at org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.java:107)
> at org.apache.catalina.connector.CoyoteAdapter.service
> (CoyoteAdapter.java:148)
> at org.apache.coyote.http11.Http11Processor.process
> (Http11Processor.java:869)
> at org.apache.coyote.http11.Http11BaseProtocol
> $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:
> 664)
> at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
> (PoolTcpEndpoint.java:527)
> at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
> (LeaderFollowerWorkerThread.java:80)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
> (ThreadPool.java:684)
> at java.lang.Thread.run(Unknown Source)
>
Re: ROP project restructuring suggestion [Was: ROP server side exception]
Posted by Andrus Adamchik <an...@objectstyle.org>.
On Jul 22, 2006, at 11:29 PM, Andrus Adamchik wrote:
> * create a separate Eclipse project called "rop-browser-server"
> that depends on "rop-browser"
> * move server classes to the server project and remove "excludes"
> from the client src folder
> * move the server jars to the server project
> * in the server project create a folder that mimics the structure
> of a deployed web application, e.g. "webapp/WEB-INF"
> * move "web.xml" to WEB-INF.
Missed a few items:
* move all Cayenne mappings to a server *source* folder (same or
separate from "src").
* to still be able to build things with Ant, you can either create a
parent folder of both projects and put the scripts there, or just use
separate build files for the client and server.
Andrus
Re: ROP project restructuring suggestion [Was: ROP server side exception]
Posted by Marcel <em...@gmail.com>.
Ok I'll get on to that. Nice work tracking that bug down.
Marcel
Andrus Adamchik wrote:
> Marcel,
>
> May I suggest a few ideas regarding the project structure. This will
> make the entire thing cleaner, separating client and server code, and
> will also make it possible to run (and debug!) the server straight
> from Eclipse using JettyLauncher plugin without having to deploy to
> Tomcat.
>
> * create a separate Eclipse project called "rop-browser-server" that
> depends on "rop-browser"
> * move server classes to the server project and remove "excludes" from
> the client src folder
> * move the server jars to the server project
> * in the server project create a folder that mimics the structure of a
> deployed web application, e.g. "webapp/WEB-INF"
> * move "web.xml" to WEB-INF.
>
> You may have noticed that I am suggesting the structure used in
> 3t-example project :-) I had to do something like that locally to
> trace that Hessian bug.
>
> Andrus
>
>
> On Jul 22, 2006, at 11:19 PM, Andrus Adamchik wrote:
>
>> This is a Hessian bug. It converts Floats into Doubles. I am not sure
>> why you haven't seen it before though. For now I suggest remapping
>> the price as Double, and in the meantime I'll work on a generic
>> solution.
>>
>> Andrus
>>
>>
>>
>> On Jul 22, 2006, at 10:21 PM, Andrus Adamchik wrote:
>>
>>> Now I can reproduce it. Let me investigate.
>>>
>>>
>>> On Jul 22, 2006, at 10:18 PM, Marcel wrote:
>>>
>>>> My instructions weren't quite right. I don't get the exception when
>>>> I run the same query again in the same instance, but if I relaunch
>>>> the viewer and run the query I get the exception. Could you try the
>>>> steps below again, except instead of just closing the diagram close
>>>> the instance of Eclipse?
>>>>
>>>
>>>
>>
>>
>
>
ROP project restructuring suggestion [Was: ROP server side exception]
Posted by Andrus Adamchik <an...@objectstyle.org>.
Marcel,
May I suggest a few ideas regarding the project structure. This will
make the entire thing cleaner, separating client and server code, and
will also make it possible to run (and debug!) the server straight
from Eclipse using JettyLauncher plugin without having to deploy to
Tomcat.
* create a separate Eclipse project called "rop-browser-server" that
depends on "rop-browser"
* move server classes to the server project and remove "excludes"
from the client src folder
* move the server jars to the server project
* in the server project create a folder that mimics the structure of
a deployed web application, e.g. "webapp/WEB-INF"
* move "web.xml" to WEB-INF.
You may have noticed that I am suggesting the structure used in 3t-
example project :-) I had to do something like that locally to trace
that Hessian bug.
Andrus
On Jul 22, 2006, at 11:19 PM, Andrus Adamchik wrote:
> This is a Hessian bug. It converts Floats into Doubles. I am not
> sure why you haven't seen it before though. For now I suggest
> remapping the price as Double, and in the meantime I'll work on a
> generic solution.
>
> Andrus
>
>
>
> On Jul 22, 2006, at 10:21 PM, Andrus Adamchik wrote:
>
>> Now I can reproduce it. Let me investigate.
>>
>>
>> On Jul 22, 2006, at 10:18 PM, Marcel wrote:
>>
>>> My instructions weren't quite right. I don't get the exception
>>> when I run the same query again in the same instance, but if I
>>> relaunch the viewer and run the query I get the exception. Could
>>> you try the steps below again, except instead of just closing the
>>> diagram close the instance of Eclipse?
>>>
>>
>>
>
>
Re: ROP server side exception
Posted by Andrus Adamchik <an...@objectstyle.org>.
This is a Hessian bug. It converts Floats into Doubles. I am not sure
why you haven't seen it before though. For now I suggest remapping
the price as Double, and in the meantime I'll work on a generic
solution.
Andrus
On Jul 22, 2006, at 10:21 PM, Andrus Adamchik wrote:
> Now I can reproduce it. Let me investigate.
>
>
> On Jul 22, 2006, at 10:18 PM, Marcel wrote:
>
>> My instructions weren't quite right. I don't get the exception
>> when I run the same query again in the same instance, but if I
>> relaunch the viewer and run the query I get the exception. Could
>> you try the steps below again, except instead of just closing the
>> diagram close the instance of Eclipse?
>>
>
>
Re: ROP server side exception
Posted by Andrus Adamchik <an...@objectstyle.org>.
Now I can reproduce it. Let me investigate.
On Jul 22, 2006, at 10:18 PM, Marcel wrote:
> My instructions weren't quite right. I don't get the exception when
> I run the same query again in the same instance, but if I relaunch
> the viewer and run the query I get the exception. Could you try the
> steps below again, except instead of just closing the diagram close
> the instance of Eclipse?
>
Re: ROP server side exception
Posted by Marcel <em...@gmail.com>.
Actually I thought the problem might be with the new one, because I've
been redeploying to get XMPP going. Nevertheless I've just redeployed
fresh again.
My instructions weren't quite right. I don't get the exception when I
run the same query again in the same instance, but if I relaunch the
viewer and run the query I get the exception. Could you try the steps
below again, except instead of just closing the diagram close the
instance of Eclipse?
Marcel
Andrus Adamchik wrote:
> You are right - I can reproduce your scenario if I just follow the
> steps. The only difference - it works for me without exceptions. Just
> a random suggestion - could you try to rebuild rop-browser.war and
> redeploy it on tomcat? Maybe you have an old version out there?
>
> Andrus
>
>
> On Jul 22, 2006, at 9:55 PM, Marcel wrote:
>
>>>>
>>>> - showing the paintings for an artist
>>>> - inserting a new one and entering the details
>>>> - showing the new painting's gallery, inserting a new record and
>>>> entering the details
>>>> - saving back to the server and closing the diagram
>>>> - running the same query again; the exception hits when you try to
>>>> view the paintings for that artist.
>
>
Re: ROP server side exception
Posted by Andrus Adamchik <an...@objectstyle.org>.
You are right - I can reproduce your scenario if I just follow the
steps. The only difference - it works for me without exceptions. Just
a random suggestion - could you try to rebuild rop-browser.war and
redeploy it on tomcat? Maybe you have an old version out there?
Andrus
On Jul 22, 2006, at 9:55 PM, Marcel wrote:
>>>
>>> - showing the paintings for an artist
>>> - inserting a new one and entering the details
>>> - showing the new painting's gallery, inserting a new record and
>>> entering the details
>>> - saving back to the server and closing the diagram
>>> - running the same query again; the exception hits when you try
>>> to view the paintings for that artist.
Re: ROP server side exception
Posted by Marcel <em...@gmail.com>.
I'm just patching that at present. Overlook it for the moment, it's not
related.
It is something to do with setting relationships, because (after fixing
that bug) inserting into the root element doesn't cause any problems.
Marcel
Andrus Adamchik wrote:
> Ok, new exception on the client when I am trying to edit new artist
> properties:
>
> java.lang.IllegalArgumentException: Cannot format given Object as a Date
> at java.text.DateFormat.format(DateFormat.java:279)
> at java.text.Format.format(Format.java:133)
> at
> org.apache.cayenne.ropbrowser.model.AbstractObject.getPropertyValue(AbstractObject.java:121)
>
> at
> org.apache.cayenne.ropbrowser.model.CollectionModelElement.getPropertyValue(CollectionModelElement.java:158)
>
> at
> org.eclipse.ui.views.properties.PropertySheetEntry.refreshValues(PropertySheetEntry.java:618)
>
> at
> org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries(PropertySheetEntry.java:575)
>
> at
> org.eclipse.ui.views.properties.PropertySheetEntry.setValues(PropertySheetEntry.java:767)
>
> at
> org.eclipse.ui.views.properties.PropertySheetViewer.setInput(PropertySheetViewer.java:943)
>
> at
> org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged(PropertySheetPage.java:473)
>
> at
> org.eclipse.ui.views.properties.PropertySheet.partActivated(PropertySheet.java:199)
>
> at
> org.eclipse.ui.part.PageBookView.showBootstrapPart(PageBookView.java:909)
> at
> org.eclipse.ui.part.PageBookView.createPartControl(PageBookView.java:482)
> at
> org.eclipse.ui.views.properties.PropertySheet.createPartControl(PropertySheet.java:96)
>
> at
> org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:332)
>
> at
> org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:197)
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
>
> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:290)
> at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:525)
> at
> org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:140)
>
> at
> org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)
>
> at
> org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
>
> at
> org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:394)
>
> at
> org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1144)
>
> at
> org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1097)
> at
> org.eclipse.ui.internal.PartStack.presentationSelectionChanged(PartStack.java:795)
>
> at org.eclipse.ui.internal.PartStack.access$1(PartStack.java:781)
> at org.eclipse.ui.internal.PartStack$1.selectPart(PartStack.java:123)
> at
> org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$1.handleEvent(TabbedStackPresentation.java:126)
>
> at
> org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:267)
>
> at
> org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:276)
>
> at
> org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.access$1(DefaultTabFolder.java:1)
>
> at
> org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$2.handleEvent(DefaultTabFolder.java:84)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1496)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1505)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
> at
> org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3171)
> at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1953)
> at
> org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:288)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1496)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1505)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3312)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2941)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
>
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
> at
> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
>
> 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:585)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
> at org.eclipse.core.launcher.Main.run(Main.java:977)
> at org.eclipse.core.launcher.Main.main(Main.java:952)
>
>
>
>
> On Jul 22, 2006, at 9:17 PM, Marcel wrote:
>
>>
>> To insert, right click on a collection or an empty single element and
>> select insert.
>>
>> Using the GUI you can generate the exception by:
>>
>> - showing the paintings for an artist
>> - inserting a new one and entering the details
>> - showing the new painting's gallery, inserting a new record and
>> entering the details
>> - saving back to the server and closing the diagram
>> - running the same query again; the exception hits when you try to
>> view the paintings for that artist.
>>
>> Marcel
>
>
Re: ROP server side exception
Posted by Andrus Adamchik <an...@objectstyle.org>.
Ok, new exception on the client when I am trying to edit new artist
properties:
java.lang.IllegalArgumentException: Cannot format given Object as a Date
at java.text.DateFormat.format(DateFormat.java:279)
at java.text.Format.format(Format.java:133)
at
org.apache.cayenne.ropbrowser.model.AbstractObject.getPropertyValue
(AbstractObject.java:121)
at
org.apache.cayenne.ropbrowser.model.CollectionModelElement.getPropertyVa
lue(CollectionModelElement.java:158)
at org.eclipse.ui.views.properties.PropertySheetEntry.refreshValues
(PropertySheetEntry.java:618)
at
org.eclipse.ui.views.properties.PropertySheetEntry.refreshChildEntries
(PropertySheetEntry.java:575)
at org.eclipse.ui.views.properties.PropertySheetEntry.setValues
(PropertySheetEntry.java:767)
at org.eclipse.ui.views.properties.PropertySheetViewer.setInput
(PropertySheetViewer.java:943)
at org.eclipse.ui.views.properties.PropertySheetPage.selectionChanged
(PropertySheetPage.java:473)
at org.eclipse.ui.views.properties.PropertySheet.partActivated
(PropertySheet.java:199)
at org.eclipse.ui.part.PageBookView.showBootstrapPart
(PageBookView.java:909)
at org.eclipse.ui.part.PageBookView.createPartControl
(PageBookView.java:482)
at org.eclipse.ui.views.properties.PropertySheet.createPartControl
(PropertySheet.java:96)
at org.eclipse.ui.internal.ViewReference.createPartHelper
(ViewReference.java:332)
at org.eclipse.ui.internal.ViewReference.createPart
(ViewReference.java:197)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart
(WorkbenchPartReference.java:566)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:290)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:525)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible
(PresentablePart.java:140)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(
PresentablePartFolder.java:268)
at
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select
(LeftToRightTabOrder.java:65)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selec
tPart(TabbedStackPresentation.java:394)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection
(PartStack.java:1144)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1097)
at org.eclipse.ui.internal.PartStack.presentationSelectionChanged
(PartStack.java:795)
at org.eclipse.ui.internal.PartStack.access$1(PartStack.java:781)
at org.eclipse.ui.internal.PartStack$1.selectPart(PartStack.java:123)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation
$1.handleEvent(TabbedStackPresentation.java:126)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent
(AbstractTabFolder.java:267)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent
(AbstractTabFolder.java:276)
at
org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFold
er.access$1(DefaultTabFolder.java:1)
at
org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFold
er$2.handleEvent(DefaultTabFolder.java:84)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1496)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1505)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3171)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1953)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:288)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1496)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1505)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1279)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3312)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2941)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run
(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplicat
ion(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start
(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:177)
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:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
On Jul 22, 2006, at 9:17 PM, Marcel wrote:
>
> To insert, right click on a collection or an empty single element
> and select insert.
>
> Using the GUI you can generate the exception by:
>
> - showing the paintings for an artist
> - inserting a new one and entering the details
> - showing the new painting's gallery, inserting a new record and
> entering the details
> - saving back to the server and closing the diagram
> - running the same query again; the exception hits when you try to
> view the paintings for that artist.
>
> Marcel
Re: ROP server side exception
Posted by Marcel <em...@gmail.com>.
To insert, right click on a collection or an empty single element and
select insert.
Using the GUI you can generate the exception by:
- showing the paintings for an artist
- inserting a new one and entering the details
- showing the new painting's gallery, inserting a new record and
entering the details
- saving back to the server and closing the diagram
- running the same query again; the exception hits when you try to view
the paintings for that artist.
Marcel
Andrus Adamchik wrote:
> Hi Marcel,
>
> I am confused about the UI - how do I create a new Object? Was in
> CAY-604 patch?
>
> Andrus
>
>
>
> On Jul 22, 2006, at 4:06 AM, Marcel wrote:
>> Hi folks,
>>
>> I am getting a nasty exception on the server side when working with
>> ROP. It occurs in very specific circumstances: I create a new object,
>> save it back to the server. When I try and look at that object again,
>> I get the exception below.
>>
>> My insert process is basically context.newObject, and then set the
>> relationship from the existing object to point to the new one.
>>
>> The odd thing is that the SQL logs show that the DB query works
>> perfectly: the correct number of records are returned without a
>> problem. And even more strangely, if I restart the servlet it works
>> perfectly. Also, I think it is new since moving to 1.2 (90% sure).
>>
>> Any ideas? I don't know where to start on this one.
>>
>> Regards,
>>
>> Marcel
>>
>> 22/07/2006 17:28:00 com.caucho.hessian.server.HessianSkeleton invoke
>> WARNING: java.lang.IllegalArgumentException
>> java.lang.IllegalArgumentException
>> at sun.reflect.UnsafeObjectFieldAccessorImpl.set(Unknown Source)
>> at java.lang.reflect.Field.set(Unknown Source)
>> at
>> org.objectstyle.cayenne.property.FieldAccessor.writePropertyDirectly(FieldAccessor.java:115)
>>
>> at
>> org.objectstyle.cayenne.property.SimpleProperty.writePropertyDirectly(SimpleProperty.java:119)
>>
>> at
>> org.objectstyle.cayenne.property.SimpleProperty.writeProperty(SimpleProperty.java:90)
>>
>> at
>> org.objectstyle.cayenne.map.EntityDescriptor$SimplePersistentProperty.writeProperty(EntityDescriptor.java:341)
>>
>> at
>> org.objectstyle.cayenne.util.ObjectDetachOperation$1.visitProperty(ObjectDetachOperation.java:195)
>>
>> at
>> org.objectstyle.cayenne.property.SimpleProperty.visit(SimpleProperty.java:98)
>>
>> at
>> org.objectstyle.cayenne.property.BaseClassDescriptor.visitProperties(BaseClassDescriptor.java:250)
>>
>> at
>> org.objectstyle.cayenne.util.ObjectDetachOperation.detach(ObjectDetachOperation.java:134)
>>
>> at
>> org.objectstyle.cayenne.access.ClientServerChannelQueryAction.toClientObjects(ClientServerChannelQueryAction.java:221)
>>
>> at
>> org.objectstyle.cayenne.access.ClientServerChannelQueryAction.interceptObjectConversion(ClientServerChannelQueryAction.java:181)
>>
>> at
>> org.objectstyle.cayenne.access.ClientServerChannelQueryAction.execute(ClientServerChannelQueryAction.java:106)
>>
>> at
>> org.objectstyle.cayenne.access.ClientServerChannel.onQuery(ClientServerChannel.java:99)
>>
>> at
>> org.objectstyle.cayenne.remote.service.DispatchHelper.dispatch(DispatchHelper.java:76)
>>
>> at
>> org.objectstyle.cayenne.remote.service.BaseRemoteService.processMessage(BaseRemoteService.java:182)
>>
>> at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at
>> com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:157)
>>
>> at
>> org.objectstyle.cayenne.remote.hessian.service._HessianServlet.service(_HessianServlet.java:388)
>>
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>>
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>>
>> at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>>
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>>
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>>
>> at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>>
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>>
>> at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>>
>> at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>>
>> at
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
>>
>> at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>>
>> at
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>>
>> at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>>
>> at java.lang.Thread.run(Unknown Source)
>>
>
>
Re: ROP server side exception
Posted by Andrus Adamchik <an...@objectstyle.org>.
Hi Marcel,
I am confused about the UI - how do I create a new Object? Was in
CAY-604 patch?
Andrus
On Jul 22, 2006, at 4:06 AM, Marcel wrote:
> Hi folks,
>
> I am getting a nasty exception on the server side when working with
> ROP. It occurs in very specific circumstances: I create a new
> object, save it back to the server. When I try and look at that
> object again, I get the exception below.
>
> My insert process is basically context.newObject, and then set the
> relationship from the existing object to point to the new one.
>
> The odd thing is that the SQL logs show that the DB query works
> perfectly: the correct number of records are returned without a
> problem. And even more strangely, if I restart the servlet it works
> perfectly. Also, I think it is new since moving to 1.2 (90% sure).
>
> Any ideas? I don't know where to start on this one.
>
> Regards,
>
> Marcel
>
> 22/07/2006 17:28:00 com.caucho.hessian.server.HessianSkeleton invoke
> WARNING: java.lang.IllegalArgumentException
> java.lang.IllegalArgumentException
> at sun.reflect.UnsafeObjectFieldAccessorImpl.set(Unknown Source)
> at java.lang.reflect.Field.set(Unknown Source)
> at
> org.objectstyle.cayenne.property.FieldAccessor.writePropertyDirectly
> (FieldAccessor.java:115)
> at
> org.objectstyle.cayenne.property.SimpleProperty.writePropertyDirectly(
> SimpleProperty.java:119)
> at org.objectstyle.cayenne.property.SimpleProperty.writeProperty
> (SimpleProperty.java:90)
> at org.objectstyle.cayenne.map.EntityDescriptor
> $SimplePersistentProperty.writeProperty(EntityDescriptor.java:341)
> at org.objectstyle.cayenne.util.ObjectDetachOperation
> $1.visitProperty(ObjectDetachOperation.java:195)
> at org.objectstyle.cayenne.property.SimpleProperty.visit
> (SimpleProperty.java:98)
> at
> org.objectstyle.cayenne.property.BaseClassDescriptor.visitProperties
> (BaseClassDescriptor.java:250)
> at org.objectstyle.cayenne.util.ObjectDetachOperation.detach
> (ObjectDetachOperation.java:134)
> at
> org.objectstyle.cayenne.access.ClientServerChannelQueryAction.toClient
> Objects(ClientServerChannelQueryAction.java:221)
> at
> org.objectstyle.cayenne.access.ClientServerChannelQueryAction.intercep
> tObjectConversion(ClientServerChannelQueryAction.java:181)
> at
> org.objectstyle.cayenne.access.ClientServerChannelQueryAction.execute(
> ClientServerChannelQueryAction.java:106)
> at org.objectstyle.cayenne.access.ClientServerChannel.onQuery
> (ClientServerChannel.java:99)
> at org.objectstyle.cayenne.remote.service.DispatchHelper.dispatch
> (DispatchHelper.java:76)
> at
> org.objectstyle.cayenne.remote.service.BaseRemoteService.processMessag
> e(BaseRemoteService.java:182)
> at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at com.caucho.hessian.server.HessianSkeleton.invoke
> (HessianSkeleton.java:157)
> at
> org.objectstyle.cayenne.remote.hessian.service._HessianServlet.service
> (_HessianServlet.java:388)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:252)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:173)
> at org.apache.catalina.core.StandardWrapperValve.invoke
> (StandardWrapperValve.java:213)
> at org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValve.java:178)
> at org.apache.catalina.core.StandardHostValve.invoke
> (StandardHostValve.java:126)
> at org.apache.catalina.valves.ErrorReportValve.invoke
> (ErrorReportValve.java:105)
> at org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.java:107)
> at org.apache.catalina.connector.CoyoteAdapter.service
> (CoyoteAdapter.java:148)
> at org.apache.coyote.http11.Http11Processor.process
> (Http11Processor.java:869)
> at org.apache.coyote.http11.Http11BaseProtocol
> $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:
> 664)
> at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
> (PoolTcpEndpoint.java:527)
> at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
> (LeaderFollowerWorkerThread.java:80)
> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
> (ThreadPool.java:684)
> at java.lang.Thread.run(Unknown Source)
>