just retried,

to be able to test i just added

<property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(ForeignKeys=true)"/>

to your persistence.xml

but it works as ROOT webapps

here my steps
1) co your repo
2) mvn package
3) rm ROOT from tomee
4) mv catalog.war to ROOT.war in webapps folder of tomee

- Romain


2012/6/7 Romain Manni-Bucau <[email protected]>

> is metadata-complete="true" in the ROOT/WEB-INF/web.xml?
>
> - Romain
>
>
>
> 2012/6/7 Jeremyau <[email protected]>
>
>> Ok so I git co the tomee trunk and build it with maven. Everything is ok,
>> I've got my zip file with tomee plus.
>>
>> I repeat the same step:
>> 1. Delete the ROOT folder in webapp
>> 2. Deploy my application (I've deployed 2 wars: ROOT.war and catalog.war
>> which both contain pet-catalog application)
>> 3. I run the tomee server
>>
>> localhost:8080/catalog => OK
>> localhost:8080 => Error
>>
>> javax.servlet.ServletException: javax.el.ELException: Error reading
>> 'items'
>> on type controller.Catalog
>>        javax.faces.webapp.FacesServlet.service(FacesServlet.java:229)
>>
>> root cause
>>
>> org.apache.myfaces.view.facelets.el.ContextAwareELException:
>> javax.el.ELException: Error reading 'items' on type controller.Catalog
>>
>>
>> org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.getValue(ContextAwareTagValueExpression.java:104)
>>
>>  javax.faces.component._DeltaStateHelper.eval(_DeltaStateHelper.java:246)
>>
>> ...
>>
>> javax.ejb.EJBException: The bean encountered a non-application exception;
>> nested exception is:
>>        <openjpa-2.2.0-r422266:1244990 fatal general error>
>> org.apache.openjpa.persistence.PersistenceException: user lacks privilege
>> or
>> object not found: ITEM {SELECT t0.id, t0.address_id, t0.description,
>> t0.imagethumburl, t0.imageurl, t0.name, t0.price, t0.product_id FROM
>> item t0
>> ORDER BY 1 LIMIT ?} [code=-5501, state=42501]
>> FailedObject: select object(o) from Item as o [java.lang.String]
>>
>>
>> org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:368)
>>
>>
>> org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:288)
>>
>>  controller.ItemFacade$LocalBeanProxy.findRange(controller/ItemFacade.java)
>>
>>
>> So it's so weird. Why does it work only if the application name is
>> different
>> than ROOT? It seems the tomee behaviour is different for the ROOT folder.
>>
>> Any idea? I have also tried with the tomee plugin  (maven tomee:run) and
>> it
>> works well. So, according to me, the problem does not come from the
>> application. Do you think so?
>>
>> --
>> View this message in context:
>> http://openejb.979440.n4.nabble.com/Deploying-Pet-catalog-tp4655421p4655460.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
>
>

Reply via email to