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
[email protected]
347-967-8944 / 212-790-6692







On 9/23/14, 1:23 AM, "Romain Manni-Bucau" <[email protected]> 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
><[email protected]>:
>> 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
>> [email protected]<mailto:[email protected]>
>> 347-967-8944 / 212-790-6692
>>

Reply via email to