Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1275

JPA Processor does not support AttributeOverrides for Embeddable Id

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • V2 2.0.10
    • V2 2.0.12
    • odata2-jpa
    • None
    • Patch

    Description

      1. Deploy the attached war to an application server e.g. wildfly
      2. Go to http://localhost:8080/olingo-bug/Data.svc/$metadata

      Expected:

      • Should work

      Actually:

      17:08:31,057 ERROR [stderr] (default task-2) org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPAModelException: "OData - JPA Model Processor: Reference attribute not found in JPA entity [bl_pkk -> ParentEntity]"
      17:08:31,058 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPAModelException.throwException(ODataJPAModelException.java:89)
      17:08:31,058 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.jpa.processor.core.model.JPAEdmProperty$JPAEdmPropertyBuilder.buildForeignKey(JPAEdmProperty.java:419)
      17:08:31,058 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.jpa.processor.core.model.JPAEdmProperty$JPAEdmPropertyBuilder.addForeignKey(JPAEdmProperty.java:361)
      17:08:31,058 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.jpa.processor.core.model.JPAEdmProperty$JPAEdmPropertyBuilder.build(JPAEdmProperty.java:269)
      17:08:31,058 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.jpa.processor.core.model.JPAEdmEntityType$JPAEdmEntityTypeBuilder.build(JPAEdmEntityType.java:126)
      17:08:31,059 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.jpa.processor.core.model.JPAEdmEntitySet$JPAEdmEntitySetBuilder.build(JPAEdmEntitySet.java:89)
      17:08:31,059 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.jpa.processor.core.model.JPAEdmEntityContainer$JPAEdmEntityContainerBuilder.build(JPAEdmEntityContainer.java:117)
      17:08:31,059 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.jpa.processor.core.model.JPAEdmSchema$JPAEdmSchemaBuilder.build(JPAEdmSchema.java:120)
      17:08:31,059 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.jpa.processor.core.model.JPAEdmModel$JPAEdmModelBuilder.build(JPAEdmModel.java:61)
      17:08:31,059 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.jpa.processor.core.edm.ODataJPAEdmProvider.getSchemas(ODataJPAEdmProvider.java:284)
      17:08:31,060 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.core.edm.provider.EdmServiceMetadataImplProv.getDataServiceVersion(EdmServiceMetadataImplProv.java:102)
      17:08:31,060 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.api.processor.ODataSingleProcessor.readMetadata(ODataSingleProcessor.java:381)
      17:08:31,060 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.core.Dispatcher.dispatch(Dispatcher.java:182)
      17:08:31,060 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.core.ODataRequestHandler.handle(ODataRequestHandler.java:131)
      17:08:31,060 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.core.rest.ODataSubLocator.handle(ODataSubLocator.java:164)
      17:08:31,061 ERROR [stderr] (default task-2) 	at org.apache.olingo.odata2.core.rest.ODataSubLocator.handleGet(ODataSubLocator.java:58)
      17:08:31,061 ERROR [stderr] (default task-2) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      17:08:31,061 ERROR [stderr] (default task-2) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      17:08:31,061 ERROR [stderr] (default task-2) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      17:08:31,061 ERROR [stderr] (default task-2) 	at java.lang.reflect.Method.invoke(Method.java:498)
      17:08:31,061 ERROR [stderr] (default task-2) 	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
      17:08:31,062 ERROR [stderr] (default task-2) 	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295)
      17:08:31,064 ERROR [stderr] (default task-2) 	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249)
      17:08:31,064 ERROR [stderr] (default task-2) 	at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:138)
      17:08:31,064 ERROR [stderr] (default task-2) 	at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:101)
      17:08:31,067 ERROR [stderr] (default task-2) 	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:406)
      17:08:31,070 ERROR [stderr] (default task-2) 	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:213)
      17:08:31,071 ERROR [stderr] (default task-2) 	at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:228)
      17:08:31,071 ERROR [stderr] (default task-2) 	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
      17:08:31,072 ERROR [stderr] (default task-2) 	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
      17:08:31,072 ERROR [stderr] (default task-2) 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      17:08:31,072 ERROR [stderr] (default task-2) 	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
      17:08:31,072 ERROR [stderr] (default task-2) 	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      17:08:31,072 ERROR [stderr] (default task-2) 	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      17:08:31,073 ERROR [stderr] (default task-2) 	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      17:08:31,073 ERROR [stderr] (default task-2) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      17:08:31,076 ERROR [stderr] (default task-2) 	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
      17:08:31,076 ERROR [stderr] (default task-2) 	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      17:08:31,077 ERROR [stderr] (default task-2) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      17:08:31,077 ERROR [stderr] (default task-2) 	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      17:08:31,077 ERROR [stderr] (default task-2) 	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      17:08:31,077 ERROR [stderr] (default task-2) 	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      17:08:31,078 ERROR [stderr] (default task-2) 	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
      17:08:31,078 ERROR [stderr] (default task-2) 	at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
      17:08:31,078 ERROR [stderr] (default task-2) 	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      17:08:31,078 ERROR [stderr] (default task-2) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      17:08:31,078 ERROR [stderr] (default task-2) 	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      17:08:31,079 ERROR [stderr] (default task-2) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      17:08:31,079 ERROR [stderr] (default task-2) 	at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
      17:08:31,079 ERROR [stderr] (default task-2) 	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      17:08:31,079 ERROR [stderr] (default task-2) 	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
      17:08:31,079 ERROR [stderr] (default task-2) 	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
      17:08:31,080 ERROR [stderr] (default task-2) 	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
      17:08:31,094 ERROR [stderr] (default task-2) 	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
      17:08:31,095 ERROR [stderr] (default task-2) 	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
      17:08:31,095 ERROR [stderr] (default task-2) 	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      17:08:31,095 ERROR [stderr] (default task-2) 	at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
      17:08:31,095 ERROR [stderr] (default task-2) 	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
      17:08:31,096 ERROR [stderr] (default task-2) 	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
      17:08:31,096 ERROR [stderr] (default task-2) 	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
      17:08:31,096 ERROR [stderr] (default task-2) 	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
      17:08:31,097 ERROR [stderr] (default task-2) 	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
      17:08:31,099 ERROR [stderr] (default task-2) 	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
      17:08:31,099 ERROR [stderr] (default task-2) 	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
      17:08:31,100 ERROR [stderr] (default task-2) 	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
      17:08:31,100 ERROR [stderr] (default task-2) 	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
      17:08:31,100 ERROR [stderr] (default task-2) 	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
      17:08:31,100 ERROR [stderr] (default task-2) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      17:08:31,101 ERROR [stderr] (default task-2) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      17:08:31,101 ERROR [stderr] (default task-2) 	at java.lang.Thread.run(Thread.java:748)
      
      @EmbeddedId
      
      	@AttributeOverrides({
      			@AttributeOverride(name = "blPkk", column = @Column(name = "bl_pkk", nullable = false, length = 5)),
      			@AttributeOverride(name = "blLandPkk", column = @Column(name = "bl_land_pkk", nullable = false, length = 2)) })
      	public EmbebeddableId getId() {
      		return this.id;
      	}
      

      Attachments

        1. olingo-bug.war
          1.52 MB
          Manuel Blechschmidt
        2. olingo-bug.zip
          13 kB
          Manuel Blechschmidt
        3. OLINGO-OverrideAttributes.patch
          3 kB
          Manuel Blechschmidt

        Activity

          People

            mirbo mibo
            manuel_b Manuel Blechschmidt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10m
                10m