|
Re: [texo] Not possible to determine id eattribute for eClass ... [message #898577 is a reply to message #898559] |
Thu, 26 July 2012 15:59 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Erdal,
Strange that it tries to get the id of the QueryType which is not a jpa enabled thing.
Can you post the complete stacktrace?
gr. Martin
On 07/26/2012 05:27 PM, Erdal Karaca wrote:
> I am trying to execute a named query using HTTP PUT as described at [1], but getting this error message:
>
>
> Not possible to determine id eattribute for eClass org.eclipse.emf.ecore.impl.EClassImpl@2799bfd1 (name: QueryType)
> (instanceClassName: null) (abstract: false, interface: false)
>
>
> The data sent is:
>
>
> {
> "_eclass": "request|QueryType",
> "query": "select t from MyType t where t.id = 1",
> "parameters": []
> }
>
>
> What do I miss?
>
> Links:
> [1] http://wiki.eclipse.org/Texo/JSON_REST_Web_Services#.28Named.29_Query_in_posted_json_with_parameters
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
|
Re: [texo] Not possible to determine id eattribute for eClass ... [message #898602 is a reply to message #898578] |
Thu, 26 July 2012 20:35 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Erdal,
This seems to be a bug, I solved it and published a new build which you can try.
gr. Martin
On 07/26/2012 06:04 PM, Erdal Karaca wrote:
> Here is the stack trace:
>
>
> java.lang.IllegalStateException: Not possible to determine id eattribute for eClass
> org.eclipse.emf.ecore.impl.EClassImpl@6cd835cd (name: QueryType) (instanceClassName: null) (abstract: false, interface:
> false)
> at org.eclipse.emf.texo.provider.IdProvider.getCreateIdEAttribute(IdProvider.java:205)
> at org.eclipse.emf.texo.provider.IdProvider.getId(IdProvider.java:81)
> at org.eclipse.emf.texo.store.ObjectStore.isNew(ObjectStore.java:191)
> at org.eclipse.emf.texo.server.service.UpdateInsertModelOperation.internalExecute(UpdateInsertModelOperation.java:90)
> at org.eclipse.emf.texo.server.service.ModelOperation.execute(ModelOperation.java:48)
> at org.eclipse.emf.texo.server.web.WebServiceHandler.doPost(WebServiceHandler.java:107)
> at org.eclipse.emf.texo.server.web.WebServiceServlet.doPost(WebServiceServlet.java:65)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
> org.eclipse.emf.texo.server.store.CurrentEntityManagerRequestFilter.doFilter(CurrentEntityManagerRequestFilter.java:65)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
>
>
> Just had a look at QueryType: it is a jpa entity, but it is missing an id attribute... Though, it should not try to
> persist/insert the request as you say.
>
>
> Martin taal wrote on Thu, 26 July 2012 11:59
>> Hi Erdal,
>> Strange that it tries to get the id of the QueryType which is not a jpa enabled thing.
>> Can you post the complete stacktrace?
>>
>> gr. Martin
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
|
Powered by
FUDForum. Page generated in 0.03272 seconds