You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by "Poindexter, Miles" <Mi...@condenast.com> on 2014/09/22 23:36:07 UTC

TomEE and Odata4J

Hi,
I've been experimenting with a new (for me) framework called Odata4j.
https://code.google.com/p/odata4j/

I initially tried the Odata Producer example on TomEE but there were exceptions.
Log excerpts:
SEVERE: Unable to deploy collapsed ear in war StandardEngine[Catalina].StandardHost[localhost].StandardContext[/TrendingTopics]
org.apache.openejb.OpenEJBException: Creating application failed: /app/tomcat/webapps/TrendingTopics: org.apache.openejb.OpenEJBRuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [NorthwindServiceEclipseLink] failed.
Internal Exception: Exception [EclipseLink-7237] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Entity name must be unique in a persistence unit. Entity name [Employees] is used for the entity classes [org.odata4j.examples.producer.jpa.addressbook.Employees] and [org.odata4j.examples.producer.jpa.northwind.Employees].: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [NorthwindServiceEclipseLink] failed.
Internal Exception: Exception [EclipseLink-7237] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Entity name must be unique in a persistence unit. Entity name [Employees] is used for the entity classes [org.odata4j.examples.producer.jpa.addressbook.Employees] and [org.odata4j.examples.producer.jpa.northwind.Employees].
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:897)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:612)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1213)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1054)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:127)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.openejb.OpenEJBException: org.apache.openejb.OpenEJBRuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.EntityManagerSetupException


Then I tried the same example Tomcat 8 and it works.

I don't have the skills to hack the Odata4J framework, so I'm just curious if anyone else is working on testing this framework with TomEE?

miles
--
Miles Poindexter
Condé Nast
Service Oriented Architecture
miles_poindexter@condenast.com<ma...@condenast.com>
347-967-8944 / 212-790-6692


Re: TomEE and Odata4J

Posted by "Poindexter, Miles" <Mi...@condenast.com>.
Sorry, I hit the ³Send² button by mistake with my earlier email . . .

Thank you Romain!
That was actually the example app I was using.
The problem was that I was still including the ODATA4J examples jar in
my .war package.
This was left over in my pom.xml from another example I had been working
with last week.

So I only had to remove this dependency from my pom.xml to fix the errors:
<dependency>
    <groupId>org.odata4j</groupId>
    <artifactId>odata4j-examples</artifactId>
    <version>${odata4j.version}</version>
</dependency>


That¹s why it would work on Tomcat8, but not TomEE.

miles 


On 9/23/14, 9:48 AM, "Poindexter, Miles" <Mi...@condenast.com>
wrote:

>Thank you Romain.
>That was actually the example app I was using.
>The problem was that I was still including the ODATA4J example bundle in
>my .war package.
>This was left over from another example I had been working with last week.
>
>So I only had to remove this dependency from my pom.xml to fix the errors:
>
>-- 
>Miles Poindexter
>Condé Nast
>Service Oriented Architecture
>miles_poindexter@condenast.com
>347-967-8944 / 212-790-6692
>
>
>
>
>
>
>
>On 9/23/14, 1:23 AM, "Romain Manni-Bucau" <rm...@gmail.com> wrote:
>
>>Hi
>>
>>this webapp:
>>
>>rmannibucau@tribe:/tmp/odata4j-092862b626ec/apache-tomee-plume-1.7.2-SNAP
>>S
>>HOT$
>>cat webapps/demo/WEB-INF/web.xml
>><?xml version="1.0" encoding="utf-8"?>
>><web-app xmlns="http://java.sun.com/xml/ns/javaee"
>>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>>    http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
>>  version="3.0">
>>
>>  <!-- Servlet 1: Expose the OData service endpoint -->
>>  <servlet>
>>    <servlet-name>OData</servlet-name>
>>    
>><servlet-class>org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet</ser
>>v
>>let-class>
>>    <init-param>
>>      <param-name>javax.ws.rs.Application</param-name>
>>      
>><param-value>org.odata4j.producer.resources.DefaultODataApplication</para
>>m
>>-value>
>>    </init-param>
>>    <load-on-startup>1</load-on-startup>
>>  </servlet>
>>  <servlet-mapping>
>>    <servlet-name>OData</servlet-name>
>>    <url-pattern>/example.svc/*</url-pattern>
>>  </servlet-mapping>
>>
>>
>></web-app>
>>
>>rmannibucau@tribe:/tmp/odata4j-092862b626ec/apache-tomee-plume-1.7.2-SNAP
>>S
>>HOT$
>>ll webapps/demo/WEB-INF/lib/
>>total 1276
>>drwxrwxr-x 2 rmannibucau rmannibucau   4096 sept. 23 07:19 ./
>>drwxrwxr-x 3 rmannibucau rmannibucau   4096 sept. 23 07:20 ../
>>-rw-rw-r-- 1 rmannibucau rmannibucau 983605 sept. 23 07:17
>>odata4j-core-0.8.0-SNAPSHOT.jar
>>-rw-rw-r-- 1 rmannibucau rmannibucau 310312 sept. 23 07:19
>>odata4j-examples-0.8.0-SNAPSHOT.jar
>>
>>works fine
>>
>>
>>Romain Manni-Bucau
>>Twitter: @rmannibucau
>>Blog: http://rmannibucau.wordpress.com/
>>LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>Github: https://github.com/rmannibucau
>>
>>
>>2014-09-22 23:36 GMT+02:00 Poindexter, Miles
>><Mi...@condenast.com>:
>>> Hi,
>>> I've been experimenting with a new (for me) framework called Odata4j.
>>> https://code.google.com/p/odata4j/
>>>
>>> I initially tried the Odata Producer example on TomEE but there were
>>>exceptions.
>>> Log excerpts:
>>> SEVERE: Unable to deploy collapsed ear in war
>>>StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Trendi
>>>n
>>>gTopics]
>>> org.apache.openejb.OpenEJBException: Creating application failed:
>>>/app/tomcat/webapps/TrendingTopics:
>>>org.apache.openejb.OpenEJBRuntimeException:
>>>javax.persistence.PersistenceException: Exception [EclipseLink-28018]
>>>(Eclipse Persistence Services - 2.1.2.v20101206-r8635):
>>>org.eclipse.persistence.exceptions.EntityManagerSetupException
>>> Exception Description: Predeployment of PersistenceUnit
>>>[NorthwindServiceEclipseLink] failed.
>>> Internal Exception: Exception [EclipseLink-7237] (Eclipse Persistence
>>>Services - 2.1.2.v20101206-r8635):
>>>org.eclipse.persistence.exceptions.ValidationException
>>> Exception Description: Entity name must be unique in a persistence
>>>unit. Entity name [Employees] is used for the entity classes
>>>[org.odata4j.examples.producer.jpa.addressbook.Employees] and
>>>[org.odata4j.examples.producer.jpa.northwind.Employees].:
>>>javax.persistence.PersistenceException: Exception [EclipseLink-28018]
>>>(Eclipse Persistence Services - 2.1.2.v20101206-r8635):
>>>org.eclipse.persistence.exceptions.EntityManagerSetupException
>>> Exception Description: Predeployment of PersistenceUnit
>>>[NorthwindServiceEclipseLink] failed.
>>> Internal Exception: Exception [EclipseLink-7237] (Eclipse Persistence
>>>Services - 2.1.2.v20101206-r8635):
>>>org.eclipse.persistence.exceptions.ValidationException
>>> Exception Description: Entity name must be unique in a persistence
>>>unit. Entity name [Employees] is used for the entity classes
>>>[org.odata4j.examples.producer.jpa.addressbook.Employees] and
>>>[org.odata4j.examples.producer.jpa.northwind.Employees].
>>> at 
>>>org.apache.openejb.assembler.classic.Assembler.createApplication(Assembl
>>>e
>>>r.java:897)
>>> at 
>>>org.apache.openejb.assembler.classic.Assembler.createApplication(Assembl
>>>e
>>>r.java:612)
>>> at 
>>>org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebApp
>>>B
>>>uilder.java:1213)
>>> at 
>>>org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAp
>>>p
>>>Builder.java:1054)
>>> at 
>>>org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalLis
>>>t
>>>enerSupport.java:127)
>>> at 
>>>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
>>>p
>>>port.java:117)
>>> at 
>>>org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.
>>>j
>>>ava:90)
>>> at 
>>>org.apache.catalina.core.StandardContext.startInternal(StandardContext.j
>>>a
>>>va:5355)
>>> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>> at 
>>>org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
>>>v
>>>a:901)
>>> at 
>>>org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>>> at 
>>>org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
>>> at 
>>>org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
>>> at 
>>>org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:185
>>>7
>>>)
>>> at 
>>>java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>>> at 
>>>java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.jav
>>>a
>>>:1145)
>>> at 
>>>java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
>>>v
>>>a:615)
>>> at java.lang.Thread.run(Thread.java:745)
>>> Caused by: org.apache.openejb.OpenEJBException:
>>>org.apache.openejb.OpenEJBRuntimeException:
>>>javax.persistence.PersistenceException: Exception [EclipseLink-28018]
>>>(Eclipse Persistence Services - 2.1.2.v20101206-r8635):
>>>org.eclipse.persistence.exceptions.EntityManagerSetupException
>>>
>>>
>>> Then I tried the same example Tomcat 8 and it works.
>>>
>>> I don't have the skills to hack the Odata4J framework, so I'm just
>>>curious if anyone else is working on testing this framework with TomEE?
>>>
>>> miles
>>> --
>>> Miles Poindexter
>>> Condé Nast
>>> Service Oriented Architecture
>>> miles_poindexter@condenast.com<ma...@condenast.com>
>>> 347-967-8944 / 212-790-6692
>>>
>


Re: TomEE and Odata4J

Posted by "Poindexter, Miles" <Mi...@condenast.com>.
Thank you Romain.
That was actually the example app I was using.
The problem was that I was still including the ODATA4J example bundle in
my .war package.
This was left over from another example I had been working with last week.

So I only had to remove this dependency from my pom.xml to fix the errors:

-- 
Miles Poindexter
Condé Nast
Service Oriented Architecture
miles_poindexter@condenast.com
347-967-8944 / 212-790-6692







On 9/23/14, 1:23 AM, "Romain Manni-Bucau" <rm...@gmail.com> wrote:

>Hi
>
>this webapp:
>
>rmannibucau@tribe:/tmp/odata4j-092862b626ec/apache-tomee-plume-1.7.2-SNAPS
>HOT$
>cat webapps/demo/WEB-INF/web.xml
><?xml version="1.0" encoding="utf-8"?>
><web-app xmlns="http://java.sun.com/xml/ns/javaee"
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>    http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
>  version="3.0">
>
>  <!-- Servlet 1: Expose the OData service endpoint -->
>  <servlet>
>    <servlet-name>OData</servlet-name>
>    
><servlet-class>org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet</serv
>let-class>
>    <init-param>
>      <param-name>javax.ws.rs.Application</param-name>
>      
><param-value>org.odata4j.producer.resources.DefaultODataApplication</param
>-value>
>    </init-param>
>    <load-on-startup>1</load-on-startup>
>  </servlet>
>  <servlet-mapping>
>    <servlet-name>OData</servlet-name>
>    <url-pattern>/example.svc/*</url-pattern>
>  </servlet-mapping>
>
>
></web-app>
>
>rmannibucau@tribe:/tmp/odata4j-092862b626ec/apache-tomee-plume-1.7.2-SNAPS
>HOT$
>ll webapps/demo/WEB-INF/lib/
>total 1276
>drwxrwxr-x 2 rmannibucau rmannibucau   4096 sept. 23 07:19 ./
>drwxrwxr-x 3 rmannibucau rmannibucau   4096 sept. 23 07:20 ../
>-rw-rw-r-- 1 rmannibucau rmannibucau 983605 sept. 23 07:17
>odata4j-core-0.8.0-SNAPSHOT.jar
>-rw-rw-r-- 1 rmannibucau rmannibucau 310312 sept. 23 07:19
>odata4j-examples-0.8.0-SNAPSHOT.jar
>
>works fine
>
>
>Romain Manni-Bucau
>Twitter: @rmannibucau
>Blog: http://rmannibucau.wordpress.com/
>LinkedIn: http://fr.linkedin.com/in/rmannibucau
>Github: https://github.com/rmannibucau
>
>
>2014-09-22 23:36 GMT+02:00 Poindexter, Miles
><Mi...@condenast.com>:
>> Hi,
>> I've been experimenting with a new (for me) framework called Odata4j.
>> https://code.google.com/p/odata4j/
>>
>> I initially tried the Odata Producer example on TomEE but there were
>>exceptions.
>> Log excerpts:
>> SEVERE: Unable to deploy collapsed ear in war
>>StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Trendin
>>gTopics]
>> org.apache.openejb.OpenEJBException: Creating application failed:
>>/app/tomcat/webapps/TrendingTopics:
>>org.apache.openejb.OpenEJBRuntimeException:
>>javax.persistence.PersistenceException: Exception [EclipseLink-28018]
>>(Eclipse Persistence Services - 2.1.2.v20101206-r8635):
>>org.eclipse.persistence.exceptions.EntityManagerSetupException
>> Exception Description: Predeployment of PersistenceUnit
>>[NorthwindServiceEclipseLink] failed.
>> Internal Exception: Exception [EclipseLink-7237] (Eclipse Persistence
>>Services - 2.1.2.v20101206-r8635):
>>org.eclipse.persistence.exceptions.ValidationException
>> Exception Description: Entity name must be unique in a persistence
>>unit. Entity name [Employees] is used for the entity classes
>>[org.odata4j.examples.producer.jpa.addressbook.Employees] and
>>[org.odata4j.examples.producer.jpa.northwind.Employees].:
>>javax.persistence.PersistenceException: Exception [EclipseLink-28018]
>>(Eclipse Persistence Services - 2.1.2.v20101206-r8635):
>>org.eclipse.persistence.exceptions.EntityManagerSetupException
>> Exception Description: Predeployment of PersistenceUnit
>>[NorthwindServiceEclipseLink] failed.
>> Internal Exception: Exception [EclipseLink-7237] (Eclipse Persistence
>>Services - 2.1.2.v20101206-r8635):
>>org.eclipse.persistence.exceptions.ValidationException
>> Exception Description: Entity name must be unique in a persistence
>>unit. Entity name [Employees] is used for the entity classes
>>[org.odata4j.examples.producer.jpa.addressbook.Employees] and
>>[org.odata4j.examples.producer.jpa.northwind.Employees].
>> at 
>>org.apache.openejb.assembler.classic.Assembler.createApplication(Assemble
>>r.java:897)
>> at 
>>org.apache.openejb.assembler.classic.Assembler.createApplication(Assemble
>>r.java:612)
>> at 
>>org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppB
>>uilder.java:1213)
>> at 
>>org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebApp
>>Builder.java:1054)
>> at 
>>org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalList
>>enerSupport.java:127)
>> at 
>>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSup
>>port.java:117)
>> at 
>>org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.j
>>ava:90)
>> at 
>>org.apache.catalina.core.StandardContext.startInternal(StandardContext.ja
>>va:5355)
>> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>> at 
>>org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.jav
>>a:901)
>> at 
>>org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
>> at 
>>org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
>> at 
>>org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857
>>)
>> at 
>>java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>> at 
>>java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java
>>:1145)
>> at 
>>java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.jav
>>a:615)
>> at java.lang.Thread.run(Thread.java:745)
>> Caused by: org.apache.openejb.OpenEJBException:
>>org.apache.openejb.OpenEJBRuntimeException:
>>javax.persistence.PersistenceException: Exception [EclipseLink-28018]
>>(Eclipse Persistence Services - 2.1.2.v20101206-r8635):
>>org.eclipse.persistence.exceptions.EntityManagerSetupException
>>
>>
>> Then I tried the same example Tomcat 8 and it works.
>>
>> I don't have the skills to hack the Odata4J framework, so I'm just
>>curious if anyone else is working on testing this framework with TomEE?
>>
>> miles
>> --
>> Miles Poindexter
>> Condé Nast
>> Service Oriented Architecture
>> miles_poindexter@condenast.com<ma...@condenast.com>
>> 347-967-8944 / 212-790-6692
>>


Re: TomEE and Odata4J

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

this webapp:

rmannibucau@tribe:/tmp/odata4j-092862b626ec/apache-tomee-plume-1.7.2-SNAPSHOT$
cat webapps/demo/WEB-INF/web.xml
<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
  version="3.0">

  <!-- Servlet 1: Expose the OData service endpoint -->
  <servlet>
    <servlet-name>OData</servlet-name>
    <servlet-class>org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet</servlet-class>
    <init-param>
      <param-name>javax.ws.rs.Application</param-name>
      <param-value>org.odata4j.producer.resources.DefaultODataApplication</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>OData</servlet-name>
    <url-pattern>/example.svc/*</url-pattern>
  </servlet-mapping>


</web-app>

rmannibucau@tribe:/tmp/odata4j-092862b626ec/apache-tomee-plume-1.7.2-SNAPSHOT$
ll webapps/demo/WEB-INF/lib/
total 1276
drwxrwxr-x 2 rmannibucau rmannibucau   4096 sept. 23 07:19 ./
drwxrwxr-x 3 rmannibucau rmannibucau   4096 sept. 23 07:20 ../
-rw-rw-r-- 1 rmannibucau rmannibucau 983605 sept. 23 07:17
odata4j-core-0.8.0-SNAPSHOT.jar
-rw-rw-r-- 1 rmannibucau rmannibucau 310312 sept. 23 07:19
odata4j-examples-0.8.0-SNAPSHOT.jar

works fine


Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-09-22 23:36 GMT+02:00 Poindexter, Miles <Mi...@condenast.com>:
> Hi,
> I've been experimenting with a new (for me) framework called Odata4j.
> https://code.google.com/p/odata4j/
>
> I initially tried the Odata Producer example on TomEE but there were exceptions.
> Log excerpts:
> SEVERE: Unable to deploy collapsed ear in war StandardEngine[Catalina].StandardHost[localhost].StandardContext[/TrendingTopics]
> org.apache.openejb.OpenEJBException: Creating application failed: /app/tomcat/webapps/TrendingTopics: org.apache.openejb.OpenEJBRuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.EntityManagerSetupException
> Exception Description: Predeployment of PersistenceUnit [NorthwindServiceEclipseLink] failed.
> Internal Exception: Exception [EclipseLink-7237] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.ValidationException
> Exception Description: Entity name must be unique in a persistence unit. Entity name [Employees] is used for the entity classes [org.odata4j.examples.producer.jpa.addressbook.Employees] and [org.odata4j.examples.producer.jpa.northwind.Employees].: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.EntityManagerSetupException
> Exception Description: Predeployment of PersistenceUnit [NorthwindServiceEclipseLink] failed.
> Internal Exception: Exception [EclipseLink-7237] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.ValidationException
> Exception Description: Entity name must be unique in a persistence unit. Entity name [Employees] is used for the entity classes [org.odata4j.examples.producer.jpa.addressbook.Employees] and [org.odata4j.examples.producer.jpa.northwind.Employees].
> at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:897)
> at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:612)
> at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1213)
> at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1054)
> at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:127)
> at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
> at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
> at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
> at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.openejb.OpenEJBException: org.apache.openejb.OpenEJBRuntimeException: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.EntityManagerSetupException
>
>
> Then I tried the same example Tomcat 8 and it works.
>
> I don't have the skills to hack the Odata4J framework, so I'm just curious if anyone else is working on testing this framework with TomEE?
>
> miles
> --
> Miles Poindexter
> Condé Nast
> Service Oriented Architecture
> miles_poindexter@condenast.com<ma...@condenast.com>
> 347-967-8944 / 212-790-6692
>