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