tapvanvn / odata4j

Automatically exported from code.google.com/p/odata4j
0 stars 0 forks source link

PUT for OneToOne relation using JPAProducer #160

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a OneToOne relation using JPAProducer
2. PUT for saving changes

What is the expected output? What do you see instead?

2012 04 19 
09:19:31#+0300#ERROR#com.sun.jersey.spi.container.ContainerResponse#BC-LJS-DEF#a
nonymous#http-bio-8090-exec-7#na#N/A#N/A#N/A#The RuntimeException could not be 
mapped to a response, re-throwing to the HTTP container
java.lang.IllegalArgumentException: bad valueString [(51L)/accessPoint] as part 
of keyString [(51L)/accessPoint]
    at org.odata4j.core.OEntityKey.parse(OEntityKey.java:157)
    at org.odata4j.producer.jpa.JPAProducer.applyOLinks(JPAProducer.java:632)
    at org.odata4j.producer.jpa.JPAProducer.createNewJPAEntity(JPAProducer.java:680)
    at org.odata4j.producer.jpa.OEntityToJPAEntityCommand.execute(OEntityToJPAEntityCommand.java:21)
    at org.odata4j.producer.jpa.Chain.execute(Chain.java:25)
    at org.odata4j.producer.jpa.JPAProducer.updateEntity(JPAProducer.java:334)
    at com.sap.ti.sol.lib.producers.SolutionODataProducer.updateEntity(SolutionODataProducer.java:64)
    at org.odata4j.producer.resources.EntityRequestResource.updateEntity(EntityRequestResource.java:46)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1483)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1414)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353)
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:274)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:271)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:166)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:299)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:57)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at com.sap.security.auth.service.webcontainer.internal.Authenticator.invoke(Authenticator.java:135)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at com.sap.security.auth.basic.LoginScreensValve.invoke(LoginScreensValve.java:55)
    at com.sap.core.js.dsi.tomcat.valve.DistributedSecurityIndexValve.invoke(DistributedSecurityIndexValve.java:137)
    at com.sap.security.neo.local.form.auth.LoginScreensValve.invoke(LoginScreensValve.java:64)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at com.sap.core.tenant.valve.TenantValidationValve.invokeNextValve(TenantValidationValve.java:159)
    at com.sap.core.tenant.valve.TenantValidationValve.invoke(TenantValidationValve.java:73)
    at com.sap.core.js.monitoring.tomcat.valve.RequestTracingValve.invoke(RequestTracingValve.java:27)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Unable to tokenize: (51L)/accessPoint 
current: 5 rem: /accessPoint
    at org.odata4j.expression.ExpressionParser.tokenize(ExpressionParser.java:801)
    at org.odata4j.expression.ExpressionParser.parse(ExpressionParser.java:64)
    at org.odata4j.core.OEntityKey.parse(OEntityKey.java:152)
    ... 61 more|

Original issue reported on code.google.com by stephan....@googlemail.com on 19 Apr 2012 at 8:03

GoogleCodeExporter commented 9 years ago

Original comment by stephan....@googlemail.com on 4 Jul 2012 at 8:43