users@glassfish.java.net

Re: JPA Id fields???

From: Daniel Cavalcanti <dhcavalcanti_at_gmail.com>
Date: Sun, 19 Aug 2007 09:02:30 -0400

I looked and followed them...
Still doesn't work...

Here is how I setup the latest:

@Entity()
@Table(name = "resource_requests")
public class ResourceRequests
    implements Serializable {

    @Id()
    @SequenceGenerator(name="ConciergeGenerator",
sequenceName="ResourceRequests", allocationSize=1, initialValue=1)
    @GeneratedValue(strategy=GenerationType.SEQUENCE,
generator="ConciergeGenerator")
    @Column(name = "id", nullable = false)
    private int id;
    ...
}

    public void create(ResourceRequests entity) {
        em.persist(entity);
        em.refresh(entity); // this causes an exception.
    }


        //
******************************************************************
        // Data tier
        //
******************************************************************

        ResourceRequests resourceRequest = new ResourceRequests();

        resourceRequest.setStartDate(new Date(System.currentTimeMillis()));
        resourceRequest.setResourceId(valet);
        resourceRequest.setUserId(user);

        valet.getResourceRequestsCollection().add(resourceRequest);
        user.getResourceRequestsCollection().add(resourceRequest);

        resourceRequestsFacade.create(resourceRequest);
        resourcesFacade.edit(valet);
        usersFacade.edit(user);

        //
******************************************************************
        // Messaging tier
        //
******************************************************************

        System.out.println(String.valueOf(resourceRequest.getId()));
        ...


Withouth the em.refresh, I can't get the value of the generated id. The
return value is always 0.
If I put the em.refresh() there (as you suggested), I get the following
exception:

EJB5018: An exception was thrown during an ejb invocation on
[ResourceRequestsFacade]
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean;
nested exception is: javax.persistence.EntityNotFoundException: Entity no
longer exists in the database: 0.
javax.persistence.EntityNotFoundException: Entity no longer exists in the
database: 0.
        at
oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.refresh(
EntityManagerImpl.java:393)
        at com.sun.enterprise.util.EntityManagerWrapper.refresh(
EntityManagerWrapper.java:986)
        at com.playground.concierge.facade.ResourceRequestsFacade.create(
ResourceRequestsFacade.java:29)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(
EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java
:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(
BaseContainer.java:2895)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java
:3986)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(
EJBLocalObjectInvocationHandler.java:197)
        at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(
EJBLocalObjectInvocationHandlerDelegate.java:127)
        at $Proxy278.create(Unknown Source)
        at com.playground.concierge.services.ValetBean.requestValet(
ValetBean.java:181)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(
EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java
:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(
BaseContainer.java:2895)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java
:3986)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(
EJBLocalObjectInvocationHandler.java:197)
        at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(
EJBLocalObjectInvocationHandlerDelegate.java:127)
        at $Proxy272.requestValet(Unknown Source)
        at com.playground.concierge.services.ValetWS.requestValet(
ValetWS.java:32)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(
EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java
:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(
BaseContainer.java:2895)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java
:3986)
        at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(
WebServiceInvocationHandler.java:189)
        at $Proxy273.requestValet(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java
:81)
        at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(
EjbInvokerImpl.java:88)
        at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
        at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(
EndpointMethodHandler.java:257)
        at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(
SEIInvokerTube.java:93)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(
AbstractTubeImpl.java:106)
        at com.sun.enterprise.webservice.MonitoringPipe.process(
MonitoringPipe.java:147)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(
PipeAdapter.java:115)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(
AbstractTubeImpl.java:106)
        at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java
:317)
        at
com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(
CommonServerSecurityPipe.java:218)
        at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(
CommonServerSecurityPipe.java:129)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(
PipeAdapter.java:115)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.server.WSEndpointImpl$2.process(
WSEndpointImpl.java:243)
        at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(
HttpAdapter.java:444)
        at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java
:244)
        at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(
ServletAdapter.java:135)
        at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(
Ejb3MessageDispatcher.java:113)
        at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(
Ejb3MessageDispatcher.java:87)
        at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(
EjbWebServiceServlet.java:200)
        at com.sun.enterprise.webservice.EjbWebServiceServlet.service(
EjbWebServiceServlet.java:129)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.sun.enterprise.web.AdHocContextValve.invoke(
AdHocContextValve.java:114)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
        at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:206)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:1080)
        at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:150)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:1080)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(
CoyoteAdapter.java:270)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(
DefaultProcessorTask.java:637)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(
DefaultProcessorTask.java:568)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(
DefaultProcessorTask.java:813)
        at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask
(DefaultReadTask.java:339)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(
DefaultReadTask.java:261)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(
DefaultReadTask.java:212)
        at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(
PortUnificationPipeline.java:361)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(
TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(
SSLWorkerThread.java:106)
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean;
nested exception is: javax.persistence.EntityNotFoundException: Entity no
longer exists in the database: 0.
        at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(
BaseContainer.java:3728)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(
BaseContainer.java:3576)
        at com.sun.ejb.containers.BaseContainer.postInvoke(
BaseContainer.java:1354)
        at com.sun.ejb.containers.BaseContainer.postInvoke(
BaseContainer.java:1316)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(
EJBLocalObjectInvocationHandler.java:205)
        at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(
EJBLocalObjectInvocationHandlerDelegate.java:127)
        at $Proxy278.create(Unknown Source)
        at com.playground.concierge.services.ValetBean.requestValet(
ValetBean.java:181)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(
EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java
:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(
BaseContainer.java:2895)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java
:3986)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(
EJBLocalObjectInvocationHandler.java:197)
        at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(
EJBLocalObjectInvocationHandlerDelegate.java:127)
        at $Proxy272.requestValet(Unknown Source)
        at com.playground.concierge.services.ValetWS.requestValet(
ValetWS.java:32)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(
EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java
:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(
BaseContainer.java:2895)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java
:3986)
        at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(
WebServiceInvocationHandler.java:189)
        at $Proxy273.requestValet(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java
:81)
        at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(
EjbInvokerImpl.java:88)
        at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
        at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(
EndpointMethodHandler.java:257)
        at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(
SEIInvokerTube.java:93)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(
AbstractTubeImpl.java:106)
        at com.sun.enterprise.webservice.MonitoringPipe.process(
MonitoringPipe.java:147)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(
PipeAdapter.java:115)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(
AbstractTubeImpl.java:106)
        at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java
:317)
        at
com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(
CommonServerSecurityPipe.java:218)
        at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(
CommonServerSecurityPipe.java:129)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(
PipeAdapter.java:115)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.server.WSEndpointImpl$2.process(
WSEndpointImpl.java:243)
        at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(
HttpAdapter.java:444)
        at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java
:244)
        at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(
ServletAdapter.java:135)
        at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(
Ejb3MessageDispatcher.java:113)
        at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(
Ejb3MessageDispatcher.java:87)
        at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(
EjbWebServiceServlet.java:200)
        at com.sun.enterprise.webservice.EjbWebServiceServlet.service(
EjbWebServiceServlet.java:129)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.sun.enterprise.web.AdHocContextValve.invoke(
AdHocContextValve.java:114)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
        at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:206)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:1080)
        at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:150)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:1080)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(
CoyoteAdapter.java:270)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(
DefaultProcessorTask.java:637)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(
DefaultProcessorTask.java:568)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(
DefaultProcessorTask.java:813)
        at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask
(DefaultReadTask.java:339)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(
DefaultReadTask.java:261)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(
DefaultReadTask.java:212)
        at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(
PortUnificationPipeline.java:361)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(
TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(
SSLWorkerThread.java:106)
EJB5018: An exception was thrown during an ejb invocation on [ValetBean]
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean;
nested exception is: javax.ejb.EJBTransactionRolledbackException
javax.ejb.EJBTransactionRolledbackException
        at
com.sun.ejb.containers.BaseContainer.mapBusinessInterfaceException(
BaseContainer.java:1482)
        at com.sun.ejb.containers.BaseContainer.postInvoke(
BaseContainer.java:1396)
        at com.sun.ejb.containers.BaseContainer.postInvoke(
BaseContainer.java:1316)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(
EJBLocalObjectInvocationHandler.java:205)
        at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(
EJBLocalObjectInvocationHandlerDelegate.java:127)
        at $Proxy278.create(Unknown Source)
        at com.playground.concierge.services.ValetBean.requestValet(
ValetBean.java:181)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(
EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java
:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(
BaseContainer.java:2895)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java
:3986)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(
EJBLocalObjectInvocationHandler.java:197)
        at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(
EJBLocalObjectInvocationHandlerDelegate.java:127)
        at $Proxy272.requestValet(Unknown Source)
        at com.playground.concierge.services.ValetWS.requestValet(
ValetWS.java:32)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(
EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java
:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(
BaseContainer.java:2895)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java
:3986)
        at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(
WebServiceInvocationHandler.java:189)
        at $Proxy273.requestValet(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java
:81)
        at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(
EjbInvokerImpl.java:88)
        at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
        at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(
EndpointMethodHandler.java:257)
        at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(
SEIInvokerTube.java:93)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(
AbstractTubeImpl.java:106)
        at com.sun.enterprise.webservice.MonitoringPipe.process(
MonitoringPipe.java:147)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(
PipeAdapter.java:115)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(
AbstractTubeImpl.java:106)
        at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java
:317)
        at
com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(
CommonServerSecurityPipe.java:218)
        at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(
CommonServerSecurityPipe.java:129)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(
PipeAdapter.java:115)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.server.WSEndpointImpl$2.process(
WSEndpointImpl.java:243)
        at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(
HttpAdapter.java:444)
        at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java
:244)
        at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(
ServletAdapter.java:135)
        at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(
Ejb3MessageDispatcher.java:113)
        at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(
Ejb3MessageDispatcher.java:87)
        at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(
EjbWebServiceServlet.java:200)
        at com.sun.enterprise.webservice.EjbWebServiceServlet.service(
EjbWebServiceServlet.java:129)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.sun.enterprise.web.AdHocContextValve.invoke(
AdHocContextValve.java:114)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
        at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:206)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:1080)
        at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:150)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:1080)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(
CoyoteAdapter.java:270)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(
DefaultProcessorTask.java:637)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(
DefaultProcessorTask.java:568)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(
DefaultProcessorTask.java:813)
        at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask
(DefaultReadTask.java:339)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(
DefaultReadTask.java:261)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(
DefaultReadTask.java:212)
        at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(
PortUnificationPipeline.java:361)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(
TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(
SSLWorkerThread.java:106)
Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown
from bean; nested exception is: javax.persistence.EntityNotFoundException:
Entity no longer exists in the database: 0.
        at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(
BaseContainer.java:3728)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(
BaseContainer.java:3576)
        at com.sun.ejb.containers.BaseContainer.postInvoke(
BaseContainer.java:1354)
        ... 90 more
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean;
nested exception is: javax.ejb.EJBTransactionRolledbackException
        at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(
BaseContainer.java:3728)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(
BaseContainer.java:3576)
        at com.sun.ejb.containers.StatefulSessionContainer.postInvokeTx(
StatefulSessionContainer.java:2714)
        at com.sun.ejb.containers.BaseContainer.postInvoke(
BaseContainer.java:1354)
        at com.sun.ejb.containers.BaseContainer.postInvoke(
BaseContainer.java:1316)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(
EJBLocalObjectInvocationHandler.java:205)
        at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(
EJBLocalObjectInvocationHandlerDelegate.java:127)
        at $Proxy272.requestValet(Unknown Source)
        at com.playground.concierge.services.ValetWS.requestValet(
ValetWS.java:32)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(
EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java
:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(
BaseContainer.java:2895)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java
:3986)
        at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(
WebServiceInvocationHandler.java:189)
        at $Proxy273.requestValet(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java
:81)
        at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(
EjbInvokerImpl.java:88)
        at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
        at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(
EndpointMethodHandler.java:257)
        at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(
SEIInvokerTube.java:93)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(
AbstractTubeImpl.java:106)
        at com.sun.enterprise.webservice.MonitoringPipe.process(
MonitoringPipe.java:147)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(
PipeAdapter.java:115)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(
AbstractTubeImpl.java:106)
        at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java
:317)
        at
com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(
CommonServerSecurityPipe.java:218)
        at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(
CommonServerSecurityPipe.java:129)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(
PipeAdapter.java:115)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.server.WSEndpointImpl$2.process(
WSEndpointImpl.java:243)
        at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(
HttpAdapter.java:444)
        at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java
:244)
        at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(
ServletAdapter.java:135)
        at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(
Ejb3MessageDispatcher.java:113)
        at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(
Ejb3MessageDispatcher.java:87)
        at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(
EjbWebServiceServlet.java:200)
        at com.sun.enterprise.webservice.EjbWebServiceServlet.service(
EjbWebServiceServlet.java:129)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.sun.enterprise.web.AdHocContextValve.invoke(
AdHocContextValve.java:114)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
        at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:206)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:1080)
        at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:150)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:1080)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(
CoyoteAdapter.java:270)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(
DefaultProcessorTask.java:637)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(
DefaultProcessorTask.java:568)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(
DefaultProcessorTask.java:813)
        at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask
(DefaultReadTask.java:339)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(
DefaultReadTask.java:261)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(
DefaultReadTask.java:212)
        at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(
PortUnificationPipeline.java:361)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(
TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(
SSLWorkerThread.java:106)
The log message is null.
javax.ejb.EJBTransactionRolledbackException
        at
com.sun.ejb.containers.BaseContainer.mapBusinessInterfaceException(
BaseContainer.java:1482)
        at com.sun.ejb.containers.BaseContainer.postInvoke(
BaseContainer.java:1396)
        at com.sun.ejb.containers.BaseContainer.postInvoke(
BaseContainer.java:1316)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(
EJBLocalObjectInvocationHandler.java:205)
        at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(
EJBLocalObjectInvocationHandlerDelegate.java:127)
        at $Proxy272.requestValet(Unknown Source)
        at com.playground.concierge.services.ValetWS.requestValet(
ValetWS.java:32)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(
EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java
:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(
BaseContainer.java:2895)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java
:3986)
        at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(
WebServiceInvocationHandler.java:189)
        at $Proxy273.requestValet(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java
:81)
        at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(
EjbInvokerImpl.java:88)
        at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
        at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(
EndpointMethodHandler.java:257)
        at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(
SEIInvokerTube.java:93)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(
AbstractTubeImpl.java:106)
        at com.sun.enterprise.webservice.MonitoringPipe.process(
MonitoringPipe.java:147)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(
PipeAdapter.java:115)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(
AbstractTubeImpl.java:106)
        at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java
:317)
        at
com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(
CommonServerSecurityPipe.java:218)
        at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(
CommonServerSecurityPipe.java:129)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(
PipeAdapter.java:115)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.server.WSEndpointImpl$2.process(
WSEndpointImpl.java:243)
        at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(
HttpAdapter.java:444)
        at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java
:244)
        at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(
ServletAdapter.java:135)
        at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(
Ejb3MessageDispatcher.java:113)
        at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(
Ejb3MessageDispatcher.java:87)
        at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(
EjbWebServiceServlet.java:200)
        at com.sun.enterprise.webservice.EjbWebServiceServlet.service(
EjbWebServiceServlet.java:129)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.sun.enterprise.web.AdHocContextValve.invoke(
AdHocContextValve.java:114)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
        at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:206)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:1080)
        at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:150)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:1080)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(
CoyoteAdapter.java:270)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(
DefaultProcessorTask.java:637)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(
DefaultProcessorTask.java:568)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(
DefaultProcessorTask.java:813)
        at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask
(DefaultReadTask.java:339)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(
DefaultReadTask.java:261)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(
DefaultReadTask.java:212)
        at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(
PortUnificationPipeline.java:361)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(
TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(
SSLWorkerThread.java:106)
Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown
from bean; nested exception is: javax.ejb.EJBTransactionRolledbackException
        at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(
BaseContainer.java:3728)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(
BaseContainer.java:3576)
        at com.sun.ejb.containers.StatefulSessionContainer.postInvokeTx(
StatefulSessionContainer.java:2714)
        at com.sun.ejb.containers.BaseContainer.postInvoke(
BaseContainer.java:1354)
        ... 78 more
EJB5018: An exception was thrown during an ejb invocation on [ValetWS]
javax.ejb.EJBTransactionRolledbackException
        at
com.sun.ejb.containers.BaseContainer.mapBusinessInterfaceException(
BaseContainer.java:1482)
        at com.sun.ejb.containers.BaseContainer.postInvoke(
BaseContainer.java:1396)
        at com.sun.ejb.containers.BaseContainer.postInvoke(
BaseContainer.java:1316)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(
EJBLocalObjectInvocationHandler.java:205)
        at
com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(
EJBLocalObjectInvocationHandlerDelegate.java:127)
        at $Proxy272.requestValet(Unknown Source)
        at com.playground.concierge.services.ValetWS.requestValet(
ValetWS.java:32)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(
EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java
:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(
BaseContainer.java:2895)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java
:3986)
        at com.sun.ejb.containers.WebServiceInvocationHandler.invoke(
WebServiceInvocationHandler.java:189)
        at $Proxy273.requestValet(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.webservice.InvokerImpl.invoke(InvokerImpl.java
:81)
        at com.sun.enterprise.webservice.EjbInvokerImpl.invoke(
EjbInvokerImpl.java:88)
        at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
        at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(
EndpointMethodHandler.java:257)
        at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(
SEIInvokerTube.java:93)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(
AbstractTubeImpl.java:106)
        at com.sun.enterprise.webservice.MonitoringPipe.process(
MonitoringPipe.java:147)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(
PipeAdapter.java:115)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(
AbstractTubeImpl.java:106)
        at com.sun.xml.ws.tx.service.TxServerPipe.process(TxServerPipe.java
:317)
        at
com.sun.enterprise.webservice.CommonServerSecurityPipe.processRequest(
CommonServerSecurityPipe.java:218)
        at com.sun.enterprise.webservice.CommonServerSecurityPipe.process(
CommonServerSecurityPipe.java:129)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(
PipeAdapter.java:115)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.server.WSEndpointImpl$2.process(
WSEndpointImpl.java:243)
        at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(
HttpAdapter.java:444)
        at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java
:244)
        at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(
ServletAdapter.java:135)
        at com.sun.enterprise.webservice.Ejb3MessageDispatcher.handlePost(
Ejb3MessageDispatcher.java:113)
        at com.sun.enterprise.webservice.Ejb3MessageDispatcher.invoke(
Ejb3MessageDispatcher.java:87)
        at
com.sun.enterprise.webservice.EjbWebServiceServlet.dispatchToEjbEndpoint(
EjbWebServiceServlet.java:200)
        at com.sun.enterprise.webservice.EjbWebServiceServlet.service(
EjbWebServiceServlet.java:129)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.sun.enterprise.web.AdHocContextValve.invoke(
AdHocContextValve.java:114)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:87)
        at org.apache.catalina.core.StandardHostValve.invoke(
StandardHostValve.java:206)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:1080)
        at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:150)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(
StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(
StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
:1080)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(
CoyoteAdapter.java:270)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(
DefaultProcessorTask.java:637)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(
DefaultProcessorTask.java:568)
        at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(
DefaultProcessorTask.java:813)
        at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask
(DefaultReadTask.java:339)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(
DefaultReadTask.java:261)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(
DefaultReadTask.java:212)
        at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(
PortUnificationPipeline.java:361)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(
TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(
SSLWorkerThread.java:106)
Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown
from bean; nested exception is: javax.ejb.EJBTransactionRolledbackException
        at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(
BaseContainer.java:3728)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(
BaseContainer.java:3576)
        at com.sun.ejb.containers.StatefulSessionContainer.postInvokeTx(
StatefulSessionContainer.java:2714)
        at com.sun.ejb.containers.BaseContainer.postInvoke(
BaseContainer.java:1354)
        ... 78 more





On 8/17/07, Marina Vatkina <Marina.Vatkina_at_sun.com> wrote:
>
> Look at the examples in the spec and the Java EE 5 Tutorial.
> Table and Auto are always available (depending on the provider, Auto might
> require some setup if you use an existing database). Sequence and Identity
> depend on your database and the way the provider supports them.
>
> HTH,
> -marina
>
> Daniel Cavalcanti wrote:
> > When you say, strategies, what do you mean? Which ones are available and
> > how do I set them up?
> > thanks
> >
> > On 8/17/07, *Marina Vatkina* < Marina.Vatkina_at_sun.com
> > <mailto:Marina.Vatkina_at_sun.com>> wrote:
> >
> > Without the annotation the id will be null, because it's not set.
> > With the
> > annotation (depending on the strategy), you might need to call
> > em.flush() after
> > persist() before asking for the generated id.
> >
> > Regards,
> > -marina
> >
> > Daniel Cavalcanti wrote:
> > > I tried with and without that annotation...
> > > The result was the same... the Id field had null!
> > >
> > > On 8/17/07, *Marina Vatkina* < Marina.Vatkina_at_sun.com
> > <mailto:Marina.Vatkina_at_sun.com>
> > > <mailto: Marina.Vatkina_at_sun.com <mailto:Marina.Vatkina_at_sun.com>>>
> > wrote:
> > >
> > > Daniel,
> > >
> > > You do not have @GeneratedValue set on the @Id field. Who is
> > > expected to
> > > populate the value?
> > >
> > > thanks,
> > > -marina
> > >
> > > Daniel Cavalcanti wrote:
> > > >
> > > > I have an EJB that persists, updates, removes, etc an
> > entity...
> > > (create
> > > > using NetBeans).
> > > > From another EJB, BeanB, I create an entity and use the
> > BeanA to
> > > persist.
> > > >
> > > > @Entity
> > > > @Table(name = "resource_requests")
> > > > public class ResourceRequests implements Serializable {
> > > >
> > > > @Id()
> > > > @Column(name = "id", nullable = false)
> > > > private BigInteger id;
> > > >
> > > > @Column(name = "start_date", nullable = false)
> > > > @Temporal(TemporalType.DATE)
> > > > private Date startDate;
> > > >
> > > > ...
> > > >
> > > > }
> > > >
> > > > @Stateless()
> > > > public class ResourceRequestsBean
> > > > implements ... {
> > > >
> > > > @PersistenceContext()
> > > > private EntityManager em;
> > > >
> > > > public ResourceRequestsFacade() {
> > > > }
> > > >
> > > > public void create(ResourceRequests entity) {
> > > > em.persist(entity);
> > > > }
> > > >
> > > > public ResourceRequests edit(ResourceRequests entity)
> {
> > > > return em.merge(entity);
> > > > }
> > > >
> > > > public void destroy(ResourceRequests entity) {
> > > > entity = em.merge(entity);
> > > > em.remove(entity);
> > > > }
> > > >
> > > > ...
> > > >
> > > > }
> > > >
> > > >
> > > > @Stateful()
> > > > public class SomeBean
> > > > implements ... {
> > > >
> > > > @EJB()
> > > > private ResourceRequestsFacadeLocal
> > resourceRequestsFacade;
> > > >
> > > > @EJB()
> > > > private ResourcesFacadeLocal resourcesFacade;
> > > >
> > > > @EJB()
> > > > private UsersFacadeLocal usersFacade;
> > > >
> > > > public void requestValet(Users user, String ticket) {
> > > >
> > > > //
> > > >
> > ******************************************************************
> > > > // Data tier
> > > > //
> > > >
> > ******************************************************************
> > > >
> > > > ResourceRequests request = new ResourceRequests();
> > > >
> > > > request.setStartDate (new
> > Date(System.currentTimeMillis()));
> > > > request.setResourceId(valet);
> > > > request.setUserId (user);
> > > >
> > > > valet.getResourceRequestsCollection
> ().add(request);
> > > > user.getResourceRequestsCollection().add(request);
> > > >
> > > > resourceRequestsFacade.create (request);
> > > > resourcesFacade.edit(valet);
> > > > usersFacade.edit(user);
> > > >
> > > > request = resourceRequestsFacade.edit(request);
> > > >
> > > > //
> > > >
> > ******************************************************************
> > > > // Messaging tier
> > > > //
> > > >
> > ******************************************************************
> > > >
> > > > ...
> > > >
> > > > }
> > > >
> > > > }
> > > >
> > > > Now, in the code after the Messaging tier comments, I need
> > the
> > > request
> > > > entity id... Which is still NULL.
> > > > I've tried many different things, but I can't figure out
> > how to
> > > get the
> > > > value persisted in the DB. Furthermore, I can't look that
> > entity up
> > > > because I don't have the PK?!?
> > > >
> > > > How can I do that?
> > > >
> > > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > users-unsubscribe_at_glassfish.dev.java.net
> > <mailto:users-unsubscribe_at_glassfish.dev.java.net>
> > > <mailto: users-unsubscribe_at_glassfish.dev.java.net
> > <mailto:users-unsubscribe_at_glassfish.dev.java.net>>
> > > For additional commands, e-mail:
> > users-help_at_glassfish.dev.java.net
> > <mailto:users-help_at_glassfish.dev.java.net>
> > > <mailto: users-help_at_glassfish.dev.java.net
> > <mailto:users-help_at_glassfish.dev.java.net>>
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> > <mailto:users-unsubscribe_at_glassfish.dev.java.net>
> > For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> > <mailto:users-help_at_glassfish.dev.java.net>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>