Giter VIP home page Giter VIP logo

agoncal-application-petstore-ee6's People

Contributors

agoncal avatar antoinesd avatar bleporini avatar docdoc avatar hlemorvan avatar jerr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

agoncal-application-petstore-ee6's Issues

embedded-jboss + rest => A cycle is detected in the object graph

When : curl -X GET http://localhost:8080/applicationPetstore/rs/catalog/products
=>
Caused by: javax.xml.bind.MarshalException

  • with linked exception:
    [com.sun.istack.SAXException2: A cycle is detected in the object graph. This will cause infinitely deep XML: Product{id=15, name='Bulldog', description='Friendly dog from England'} -> Category{id=14, name='Dogs', description='A domesticated carnivorous mammal related to the foxes and wolves and raised in a wide variety of breeds'} -> Product{id=15, name='Bulldog', description='Friendly dog from England'}]
    at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:326)
    at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:251)
    at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:75)
    at com.sun.jersey.core.provider.jaxb.AbstractRootElementProvider.writeTo(AbstractRootElementProvider.java:179)
    at com.sun.jersey.core.provider.jaxb.AbstractRootElementProvider.writeTo(AbstractRootElementProvider.java:157)
    ... 33 more
    Caused by: com.sun.istack.SAXException2: A cycle is detected in the object graph. This will cause infinitely deep XML: Product{id=15, name='Bulldog', description='Friendly dog from England'} -> Category{id=14, name='Dogs', description='A domesticated carnivorous mammal related to the foxes and wolves and raised in a wide variety of breeds'} -> Product{id=15, name='Bulldog', description='Friendly dog from England'}
    at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:252)
    at com.sun.xml.bind.v2.runtime.XMLSerializer.pushObject(XMLSerializer.java:541)
    at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:635)
    at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:69)
    at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:172)
    at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:159)
    at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:356)
    at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:700)
    at com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:158)
    at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:356)
    at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializer.java:597)
    at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInfoImpl.java:338)
    at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:498)
    at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:323)
    ... 37 more

LoginContextProducer fails on JBoss AS 7

LoginContextProducer fails on JBoss AS 7 because LoginContextProducer#getResource(loginConfigFileName) returns a vfs:/path/to/petstore-test.login and not a file:///path/to/petstore-test.login.

System.setProperty("java.security.auth.login.config", new File(LoginContextProducer.class.getResource(loginConfigFileName).toURI()).getPath());

21:09:45,444 INFO  [stdout] (http--0.0.0.0-8025-1) loginConfigFileName=/petstore-test.login - vfs:/mnt/genapp/apps/d50458f9/deployments/app.ear/webapp.war/WEB-INF/classes/petstore-test.login
21:09:45,446 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (http--0.0.0.0-8025-1) Error Rendering View[/main.xhtml]: javax.el.ELException: /WEB-INF/layouts/template.xhtml @85,86 rendered="#{accountController.loggedIn}": java.lang.IllegalArgumentException: URI scheme is not "file"
    at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
    at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
    at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:413) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1750) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
    at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1756) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:401) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:49) [jboss-as-jpa-7.0.2.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at com.cloudbees.webapp.RequestMonitorValve.invoke(RequestMonitorValve.java:28)
    at com.cloudbees.stats.StaxApplicationQueryValve.invoke(StaxApplicationQueryValve.java:49)
    at com.cloudbees.jboss.stax.session.SessionOutdatedValve.handleRequest(SessionOutdatedValve.java:58)
    at com.cloudbees.jboss.stax.session.SessionOutdatedValve.invoke(SessionOutdatedValve.java:44)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at java.lang.Thread.run(Unknown Source) [:1.7.0_07]
Caused by: java.lang.IllegalArgumentException: URI scheme is not "file"
    at java.io.File.<init>(Unknown Source) [:1.7.0_07]
    at org.agoncal.application.petstore.security.LoginContextProducer.produceLoginContext(LoginContextProducer.java:38) [classes:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0_07]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [:1.7.0_07]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [:1.7.0_07]
    at java.lang.reflect.Method.invoke(Unknown Source) [:1.7.0_07]
    at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:169) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.ProducerMethod$1.produce(ProducerMethod.java:149) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:361) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:67) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:693) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:775) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:138) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:875) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:887) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:182) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:54) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:176) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:142) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:170) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:339) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:122) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.agoncal.application.petstore.web.AccountController$Proxy$_$$_WeldClientProxy.isLoggedIn(AccountController$Proxy$_$$_WeldClientProxy.java) [classes:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0_07]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [:1.7.0_07]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [:1.7.0_07]
    at java.lang.reflect.Method.invoke(Unknown Source) [:1.7.0_07]
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:302) [jboss-el-api_2.2_spec-1.0.0.Final.jar:1.0.0.Final]
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
    at org.apache.el.parser.AstValue.getValue(AstValue.java:134) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:187) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:55) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
    ... 37 more

REST interfaces to CRUD the objects

The website only gives Read access to the catalog. The idea is to have REST interfaces to change the content of the catalog, customers and visualize the orders

Rest services: org.hibernate.LazyInitializationException

Good morning,
Trying on jboss the url http://localhost:8080/applicationPetstore/rs/catalog/category/1, one have the following error:

10:46:28,504 Grave org.jboss.resteasy.core.SynchronousDispatcher Failed executing GET /catalog/category/1: org.jboss.resteasy.spi.WriterException: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.agoncal.application.petstore.domain.Category.products, no session or session was closed
at org.jboss.resteasy.core.ServerResponse.writeTo(ServerResponse.java:262) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.writeJaxrsResponse(SynchronousDispatcher.java:585) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:506) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.2.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05]

the persistence scope is around the class CatalogService, with lazy fetch on the relation onetoMany Category/ products, so when the serialisation is done by resteasy, it tries to get products and we got error because we got no session anymore.

Have any idea? Thanks

cf: I try a temporary solution by separating persistence domain and "xml" domain, it works well. (returning only Category information, not products)

Environnement jboss-as-7.1.1.Final / jdk1.7.0_05

Failed to enable applicationPetstore.war

I'm encountering following error while trying to enable applicationPetstore.war in jBoss. Any help is appreciated.

Thanks,

Failed to enable applicationPetstore.war.

Unexpected HTTP response: 500

Request
{
"address" => [("deployment" => "applicationPetstore.war")],
"operation" => "deploy"
}

Response

Internal Server Error
{
"outcome" => "failed",
"failure-description" => {"JBAS014671: Failed services" => {"jboss.deployment.unit."applicationPetstore.war".component.DBPopulator.START" => "org.jboss.msc.service.StartException in service jboss.deployment.unit."applicationPetstore.war".component.DBPopulator.START: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
Caused by: javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.GenericJDBCException: Could not open connection
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection
Caused by: org.hibernate.exception.GenericJDBCException: Could not open connection
Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:global/jdbc/applicationPetstoreDS
Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:global/jdbc/applicationPetstoreDS
Caused by: javax.resource.ResourceException: IJ000658: Unexpected throwable while trying to create a connection: null
Caused by: javax.resource.ResourceException: Could not create connection
Caused by: java.sql.SQLException: Database '' not found.
Caused by: java.sql.SQLException: Database '' not found."}},
"rolled-back" => true
}

Failed to deploy under Glassfish

When I try to deploy this application under Glassfish. I get the following error, but he JNDI names seem to work.
I have no idea what is wrong.
I have not altered the code!

[#|2012-12-12T18:48:48.552+0200|SEVERE|glassfish3.0.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=28;_ThreadName=Thread-1;|Exception while preparing the app
java.lang.RuntimeException: javax.naming.NamingException: Lookup failed for 'java:global/jdbc/applicationPetstoreDS' in SerialContext [Root exception is javax.naming.NameNotFoundException: jdbc]
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.(PersistenceUnitInfoImpl.java:111)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:130)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.(PersistenceUnitLoader.java:96)
at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
at org.glassfish.admingui.common.util.LocalDeploymentFacility$LocalDFCommandRunner.run(LocalDeploymentFacility.java:138)
at org.glassfish.deployment.client.AbstractDeploymentFacility.deploy(AbstractDeploymentFacility.java:350)
at org.glassfish.admingui.common.util.DeployUtil.invokeDeploymentFacility(DeployUtil.java:89)
at org.glassfish.admingui.common.util.DeployUtil.deploy(DeployUtil.java:66)
at org.glassfish.admingui.common.handlers.DeploymentHandler.deploy(DeploymentHandler.java:186)
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.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:442)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:394)
at com.sun.jsftemplating.layout.event.CommandActionListener.invokeCommandHandlers(CommandActionListener.java:150)
at com.sun.jsftemplating.layout.event.CommandActionListener.processAction(CommandActionListener.java:98)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:772)
at javax.faces.component.UICommand.broadcast(UICommand.java:300)
at com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:166)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1267)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:223)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:239)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.naming.NamingException: Lookup failed for 'java:global/jdbc/applicationPetstoreDS' in SerialContext [Root exception is javax.naming.NameNotFoundException: jdbc]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.lookup(ConnectorResourceAdminServiceImpl.java:203)
at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:429)
at org.glassfish.persistence.jpa.JPADeployer$ProviderContainerContractInfoImpl.lookupDataSource(JPADeployer.java:228)
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.(PersistenceUnitInfoImpl.java:108)
... 66 more
Caused by: javax.naming.NameNotFoundException: jdbc
at com.sun.enterprise.naming.impl.TransientContext.resolveContext(TransientContext.java:252)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:171)
at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:172)
at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58)
at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:101)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
... 72 more
|#]

Change the Bean Validation message key

As per Bean Validation spec ยง3.1.1.1. message ๐Ÿ‘

"It is recommended to default message values to resource bundle keys to enable internationalization. It is also recommended to use the following convention: the resource bundle key should be the fully qualified class name of the constraint annotation concatenated to .message"

So instead of having title in ValidationMessages.properties I should have :

org.agoncal.training.javaee6.domain.Item.title.message

Beautify the pages

The pages are ugly (well, Java developers you know). They need to be a bit prettier with nice CSS but not external component (RichFaces, PrimeFaces...). The idea is to have a raw JSF front end

Bug in IT tests in CatalogServiceIT on Glassfish

When Launching integration tests on Glassfish with mvn clean install -Pglassfish-embedded. The following error occurs :

ATTENTION: EJB5184:A system exception occurred during an invocation on EJB CatalogService, method: public void org.agoncal.application.petstore.service.CatalogService.removeCategory(org.agoncal.application.petstore.domain.Category)
6 fรฉvr. 2012 14:15:36 com.sun.ejb.containers.BaseContainer postInvoke
ATTENTION: javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean
    at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:5071)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4906)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2045)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1994)
    at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:222)
    at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
    at $Proxy158.removeCategory(Unknown Source)
    at org.agoncal.application.petstore.service.__EJB31_Generated__CatalogService__Intf____Bean__.removeCategory(Unknown Source)
...
    at org.agoncal.application.petstore.service.CatalogService$Proxy$_$$_Weld$Proxy$.removeCategory(CatalogService$Proxy$_$$_Weld$Proxy$.java)
    at org.agoncal.application.petstore.service.DBPopulator.clearDB(DBPopulator.java:64)
Caused by: java.lang.IllegalArgumentException: Cannot merge an entity that has been removed: Category{id=1, name='Fish', description='Any of numerous cold-blooded aquatic vertebrates characteristically having fins, gills, and a streamlined body'}
    at org.eclipse.persistence.internal.sessions.MergeManager.registerObjectForMergeCloneIntoWorkingCopy(MergeManager.java:912)
    at org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfCloneIntoWorkingCopy(MergeManager.java:494)
    at org.eclipse.persistence.internal.sessions.MergeManager.mergeChanges(MergeManager.java:271)
    ...
    ... 133 more

Yet the tests are ok (green bar).

Running under Java SE 6/7 seems to break Loggin/ Security configuration code

sst:agoncal-application-petstore-ee6 sst$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/
sst:agoncal-application-petstore-ee6 sst$ java -version
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)


product = WebSphere Application Server 8.5.next.alpha
wlp.install.dir = /Users/sst/Downloads/wlp.next/
java.home = /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre
java.runtime = Java(TM) SE Runtime Environment (1.7.0_05-b05)
os = Mac OS X (10.8.2; x86_64) (en_US)


This is caused by an invalid URI format when trying to load security configuration
looks like jar:file:// URI is not allowed anymore to read files from JAR files
(see full exception below)

See LoginContextProducer.java:34

Same problem when running under Java SE 6


product = WebSphere Application Server 8.5.next.alpha
wlp.install.dir = /Users/sst/Downloads/wlp.next/
java.home = /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
java.runtime = Java(TM) SE Runtime Environment (1.6.0_37-b06-434-11M3909)
os = Mac OS X (10.8.2; x86_64) (en_US)



javax.faces.FacesException: java.lang.IllegalArgumentException: URI is not hierarchical
at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241)
at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:258)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1234)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:757)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:440)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1041)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4220)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.handleRequest(DynamicVirtualHost.java:300)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:936)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:260)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:529)
at com.ibm.ws.threading.internal.Worker.executeWork(Worker.java:449)
at com.ibm.ws.threading.internal.Worker.run(Worker.java:431)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
at java.io.File.(File.java:363)
at org.agoncal.application.petstore.security.LoginContextProducer.produceLoginContext(LoginContextProducer.java:34)
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 org.apache.webbeans.inject.InjectableMethods.doInjection(InjectableMethods.java:139)
at org.apache.webbeans.component.ProducerMethodBean.createDefaultInstance(ProducerMethodBean.java:161)
at org.apache.webbeans.component.ProducerMethodBean.createInstance(ProducerMethodBean.java:123)
at org.apache.webbeans.component.AbstractOwbBean.createNewInstance(AbstractOwbBean.java:233)
at org.apache.webbeans.portable.creation.AbstractProducer.produce(AbstractProducer.java:79)
at org.apache.webbeans.component.InjectionTargetWrapper.produce(InjectionTargetWrapper.java:133)
at org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:180)
at org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:70)
at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:132)
at org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:863)
at org.apache.webbeans.container.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:744)
at org.apache.webbeans.inject.AbstractInjectable.inject(AbstractInjectable.java:136)
at org.apache.webbeans.inject.InjectableField.doInjection(InjectableField.java:59)
at org.apache.webbeans.component.AbstractInjectionTargetBean.injectField(AbstractInjectionTargetBean.java:386)
at org.apache.webbeans.component.AbstractInjectionTargetBean.injectFields(AbstractInjectionTargetBean.java:323)
at org.apache.webbeans.portable.creation.InjectionTargetProducer.inject(InjectionTargetProducer.java:94)
at org.apache.webbeans.component.InjectionTargetWrapper.inject(InjectionTargetWrapper.java:76)
at org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:181)
at org.apache.webbeans.context.creational.BeanInstanceBag.create(BeanInstanceBag.java:81)
at org.apache.webbeans.context.AbstractContext.getInstance(AbstractContext.java:167)
at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:132)
at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:160)
at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:120)
at org.agoncal.application.petstore.web.AccountController_$$javassist_2.isLoggedIn(AccountController$$_javassist_2.java)
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 javax.el.BeanELResolver.getValue(BeanELResolver.java:91)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:55)
at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:142)
at org.apache.el.parser.AstValue.getValue(AstValue.java:173)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:283)
at org.apache.webbeans.el.WrappedValueExpression.getValue(WrappedValueExpression.java:68)
at org.apache.myfaces.view.facelets.el.TagValueExpression.getValue(TagValueExpression.java:85)
at javax.faces.component._DeltaStateHelper.eval(_DeltaStateHelper.java:260)
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1007)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:604)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:614)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:614)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:614)
at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1320)
at org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:263)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59)
at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:85)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239)
... 13 more

unable to resolve glassfish dependencies

my command line : mvn eclipse:eclipse install -Dmaven.test.skip=true

[ERROR] Failed to execute goal on project petstoreee6: Could not resolve dependencies for project org.agoncal.
application:petstoreee6:war:1.0: Failure to find org.glassfish.main.extras:glassfish-embedded-all:jar:3.1.2-b2
0 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted unti
l the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
F:\w\agoncal-agoncal-application-petstore-ee6-69e4c2e>

in the pom.xml we have

    <version.glassfish>3.1.2-b20</version.glassfish>
    <version.maven.embedded.glassfish.plugin>3.1.1</version.maven.embedded.glassfish.plugin>

Test shouldCRUDaProduct in Catalog Service IT fails on Managed JBoss AS 7.0.2

While the Arquillian test works in glassfish embedded. It fails on JBoss AS 7.0.2 managed. With the following stack trace

17:23:02,628 WARN  [com.arjuna.ats.arjuna] (RMI TCP Connection(3)-127.0.0.1) ARJUNA12125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffffac140a03:-1eb9a43a:4f2ffe5b:39, org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization@10a5c37 >: javax.persistence.EntityNotFoundException: deleted entity passed to persist: [org.agoncal.application.petstore.domain.Product#<null>]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1329) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1280) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1286) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1457) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:54) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:97)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:274)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:94)
    at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:159)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1159)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:119)
    at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:85) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:215) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:284) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:182) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor.processInvocation(SessionInvocationContextInterceptor.java:71) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:146)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:76)
    at org.agoncal.application.petstore.service.CatalogService$$$view1.removeProduct(Unknown Source) [69fcc440-97eb-4a65-97f0-c8b27d296a0a.jar:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:125) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:62) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.agoncal.application.petstore.service.CatalogService$Proxy$_$$_Weld$Proxy$.removeProduct(CatalogService$Proxy$_$$_Weld$Proxy$.java) [69fcc440-97eb-4a65-97f0-c8b27d296a0a.jar:]
    at org.agoncal.application.petstore.service.CatalogServiceIT.shouldCRUDaProduct(CatalogServiceIT.java:106) [69fcc440-97eb-4a65-97f0-c8b27d296a0a.jar:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) [arquillian-service:]
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) [arquillian-service:]
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:270) [arquillian-service:]
    at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) [arquillian-service:]
    at org.jboss.arquillian.container.test.impl.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:38) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134) [arquillian-service:]
    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:263) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:226) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240) [arquillian-service:]
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) [arquillian-service:]
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) [arquillian-service:]
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) [arquillian-service:]
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) [arquillian-service:]
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) [arquillian-service:]
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) [arquillian-service:]
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) [arquillian-service:]
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199) [arquillian-service:]
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147) [arquillian-service:]
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157) [arquillian-service:]
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136) [arquillian-service:]
    at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65) [arquillian-service:]
    at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethodInternal(JMXTestRunner.java:128) [arquillian-service:]
    at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethod(JMXTestRunner.java:107) [arquillian-service:]
    at org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethod(ArquillianService.java:203) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262) [:1.6.0_29]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) [:1.6.0_29]
    at org.jboss.as.jmx.tcl.TcclMBeanServer.invoke(TcclMBeanServer.java:214)
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1360) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303) [:1.6.0_29]
    at sun.rmi.transport.Transport$1.run(Transport.java:159) [:1.6.0_29]
    at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_29]
    at sun.rmi.transport.Transport.serviceCall(Transport.java:155) [:1.6.0_29]
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) [:1.6.0_29]
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) [:1.6.0_29]
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) [:1.6.0_29]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_29]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_29]
    at java.lang.Thread.run(Thread.java:680) [:1.6.0_29]

17:23:03,045 ERROR [org.jboss.arquillian.protocol.jmx.JMXTestRunner] (RMI TCP Connection(3)-127.0.0.1) Failed: org.agoncal.application.petstore.service.CatalogServiceIT.shouldCRUDaProduct: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleEndTransactionException(CMTTxInterceptor.java:107) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:88) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:215) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:284) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:182) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor.processInvocation(SessionInvocationContextInterceptor.java:71) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:146)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:76)
    at org.agoncal.application.petstore.service.CatalogService$$$view1.removeProduct(Unknown Source) [69fcc440-97eb-4a65-97f0-c8b27d296a0a.jar:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:125) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:62) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.agoncal.application.petstore.service.CatalogService$Proxy$_$$_Weld$Proxy$.removeProduct(CatalogService$Proxy$_$$_Weld$Proxy$.java) [69fcc440-97eb-4a65-97f0-c8b27d296a0a.jar:]
    at org.agoncal.application.petstore.service.CatalogServiceIT.shouldCRUDaProduct(CatalogServiceIT.java:106) [69fcc440-97eb-4a65-97f0-c8b27d296a0a.jar:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) [arquillian-service:]
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) [arquillian-service:]
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:270) [arquillian-service:]
    at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) [arquillian-service:]
    at org.jboss.arquillian.container.test.impl.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:38) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134) [arquillian-service:]
    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:263) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:226) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240) [arquillian-service:]
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) [arquillian-service:]
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) [arquillian-service:]
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) [arquillian-service:]
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) [arquillian-service:]
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) [arquillian-service:]
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) [arquillian-service:]
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) [arquillian-service:]
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199) [arquillian-service:]
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147) [arquillian-service:]
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157) [arquillian-service:]
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136) [arquillian-service:]
    at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65) [arquillian-service:]
    at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethodInternal(JMXTestRunner.java:128) [arquillian-service:]
    at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethod(JMXTestRunner.java:107) [arquillian-service:]
    at org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethod(ArquillianService.java:203) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262) [:1.6.0_29]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) [:1.6.0_29]
    at org.jboss.as.jmx.tcl.TcclMBeanServer.invoke(TcclMBeanServer.java:214)
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1360) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303) [:1.6.0_29]
    at sun.rmi.transport.Transport$1.run(Transport.java:159) [:1.6.0_29]
    at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_29]
    at sun.rmi.transport.Transport.serviceCall(Transport.java:155) [:1.6.0_29]
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) [:1.6.0_29]
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) [:1.6.0_29]
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) [:1.6.0_29]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_29]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_29]
    at java.lang.Thread.run(Thread.java:680) [:1.6.0_29]
Caused by: javax.transaction.RollbackException: Could not commit transaction.
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1171)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:119)
    at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:85) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    ... 131 more
Caused by: javax.persistence.EntityNotFoundException: deleted entity passed to persist: [org.agoncal.application.petstore.domain.Product#<null>]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1329) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1280) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1286) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1457) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:54) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:97)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:274)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:94)
    at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:159)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1159)
    ... 134 more

Test shouldCRUDanItem in Catalog Service IT fails on Managed JBoss AS 7.0.2

While the Arquillian test works in glassfish embedded. It fails on JBoss AS 7.0.2 managed. With the following stack trace

17:16:43,420 WARN  [com.arjuna.ats.arjuna] (RMI TCP Connection(3)-127.0.0.1) ARJUNA12125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffffac140a03:-f4fe94f:4f2ffcdf:16, org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization@10094da >: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: NULL not allowed for column "CATEGORY_FK"; SQL statement:
insert into Product (category_fk, description, name, id) values (?, ?, ?, ?) [90006-145]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1347) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1280) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1286) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1457) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:54) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:97)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:274)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:94)
    at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:159)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1159)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:119)
    at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:85) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:215) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:284) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:182) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor.processInvocation(SessionInvocationContextInterceptor.java:71) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:146)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:76)
    at org.agoncal.application.petstore.service.CatalogService$$$view1.createItem(Unknown Source) [5b5834bf-392e-49c2-bbc9-6186767e27e7.jar:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:125) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:62) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.agoncal.application.petstore.service.CatalogService$Proxy$_$$_Weld$Proxy$.createItem(CatalogService$Proxy$_$$_Weld$Proxy$.java) [5b5834bf-392e-49c2-bbc9-6186767e27e7.jar:]
    at org.agoncal.application.petstore.service.CatalogServiceIT.shouldCRUDanItem(CatalogServiceIT.java:127) [5b5834bf-392e-49c2-bbc9-6186767e27e7.jar:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) [arquillian-service:]
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) [arquillian-service:]
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:270) [arquillian-service:]
    at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) [arquillian-service:]
    at org.jboss.arquillian.container.test.impl.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:38) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134) [arquillian-service:]
    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:263) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:226) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240) [arquillian-service:]
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) [arquillian-service:]
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) [arquillian-service:]
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) [arquillian-service:]
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) [arquillian-service:]
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) [arquillian-service:]
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) [arquillian-service:]
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) [arquillian-service:]
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199) [arquillian-service:]
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147) [arquillian-service:]
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157) [arquillian-service:]
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136) [arquillian-service:]
    at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65) [arquillian-service:]
    at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethodInternal(JMXTestRunner.java:128) [arquillian-service:]
    at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethod(JMXTestRunner.java:107) [arquillian-service:]
    at org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethod(ArquillianService.java:203) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262) [:1.6.0_29]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) [:1.6.0_29]
    at org.jboss.as.jmx.tcl.TcclMBeanServer.invoke(TcclMBeanServer.java:214)
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1360) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303) [:1.6.0_29]
    at sun.rmi.transport.Transport$1.run(Transport.java:159) [:1.6.0_29]
    at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_29]
    at sun.rmi.transport.Transport.serviceCall(Transport.java:155) [:1.6.0_29]
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) [:1.6.0_29]
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) [:1.6.0_29]
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) [:1.6.0_29]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_29]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_29]
    at java.lang.Thread.run(Thread.java:680) [:1.6.0_29]
Caused by: org.hibernate.exception.GenericJDBCException: NULL not allowed for column "CATEGORY_FK"; SQL statement:
insert into Product (category_fk, description, name, id) values (?, ?, ?, ?) [90006-145]
    at org.hibernate.exception.internal.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:148) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.exception.internal.SQLStateConverter.convert(SQLStateConverter.java:136) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:131) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:80) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at $Proxy89.executeUpdate(Unknown Source)   at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:56) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2839) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3276) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:80) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:273) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:265) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:186) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:336) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1084) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:319) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:104) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    ... 140 more
Caused by: org.h2.jdbc.JdbcSQLException: NULL not allowed for column "CATEGORY_FK"; SQL statement:
insert into Product (category_fk, description, name, id) values (?, ?, ?, ?) [90006-145]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) [h2-1.2.145.jar:1.2.145]
    at org.h2.message.DbException.get(DbException.java:167) [h2-1.2.145.jar:1.2.145]
    at org.h2.message.DbException.get(DbException.java:144) [h2-1.2.145.jar:1.2.145]
    at org.h2.table.Column.validateConvertUpdateSequence(Column.java:294) [h2-1.2.145.jar:1.2.145]
    at org.h2.table.Table.validateConvertUpdateSequence(Table.java:621) [h2-1.2.145.jar:1.2.145]
    at org.h2.command.dml.Insert.insertRows(Insert.java:122) [h2-1.2.145.jar:1.2.145]
    at org.h2.command.dml.Insert.update(Insert.java:86) [h2-1.2.145.jar:1.2.145]
    at org.h2.command.CommandContainer.update(CommandContainer.java:69) [h2-1.2.145.jar:1.2.145]
    at org.h2.command.Command.executeUpdate(Command.java:201) [h2-1.2.145.jar:1.2.145]
    at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:143) [h2-1.2.145.jar:1.2.145]
    at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:129) [h2-1.2.145.jar:1.2.145]
    at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:124) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    ... 154 more

17:16:43,466 INFO  [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (RMI TCP Connection(3)-127.0.0.1) HHH00106:Forcing container resource cleanup on transaction completion
17:16:43,467 INFO  [org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl] (RMI TCP Connection(3)-127.0.0.1) HHH00010:On release of batch it still contained JDBC statements
17:16:43,472 ERROR [org.jboss.arquillian.protocol.jmx.JMXTestRunner] (RMI TCP Connection(3)-127.0.0.1) Failed: org.agoncal.application.petstore.service.CatalogServiceIT.shouldCRUDanItem: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleEndTransactionException(CMTTxInterceptor.java:107) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:88) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:215) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:284) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:182) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.as.ejb3.component.session.SessionInvocationContextInterceptor.processInvocation(SessionInvocationContextInterceptor.java:71) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:146)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.0.Final.jar:1.1.0.Final]
    at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:76)
    at org.agoncal.application.petstore.service.CatalogService$$$view1.createItem(Unknown Source) [5b5834bf-392e-49c2-bbc9-6186767e27e7.jar:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:125) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:62) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
    at org.agoncal.application.petstore.service.CatalogService$Proxy$_$$_Weld$Proxy$.createItem(CatalogService$Proxy$_$$_Weld$Proxy$.java) [5b5834bf-392e-49c2-bbc9-6186767e27e7.jar:]
    at org.agoncal.application.petstore.service.CatalogServiceIT.shouldCRUDanItem(CatalogServiceIT.java:127) [5b5834bf-392e-49c2-bbc9-6186767e27e7.jar:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) [arquillian-service:]
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) [arquillian-service:]
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:270) [arquillian-service:]
    at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) [arquillian-service:]
    at org.jboss.arquillian.container.test.impl.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:38) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134) [arquillian-service:]
    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:263) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:226) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240) [arquillian-service:]
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) [arquillian-service:]
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) [arquillian-service:]
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) [arquillian-service:]
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) [arquillian-service:]
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) [arquillian-service:]
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) [arquillian-service:]
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) [arquillian-service:]
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199) [arquillian-service:]
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300) [arquillian-service:]
    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147) [arquillian-service:]
    at org.junit.runner.JUnitCore.run(JUnitCore.java:157) [arquillian-service:]
    at org.junit.runner.JUnitCore.run(JUnitCore.java:136) [arquillian-service:]
    at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65) [arquillian-service:]
    at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethodInternal(JMXTestRunner.java:128) [arquillian-service:]
    at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethod(JMXTestRunner.java:107) [arquillian-service:]
    at org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethod(ArquillianService.java:203) [arquillian-service:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262) [:1.6.0_29]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) [:1.6.0_29]
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) [:1.6.0_29]
    at org.jboss.as.jmx.tcl.TcclMBeanServer.invoke(TcclMBeanServer.java:214)
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1360) [:1.6.0_29]
    at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303) [:1.6.0_29]
    at sun.rmi.transport.Transport$1.run(Transport.java:159) [:1.6.0_29]
    at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_29]
    at sun.rmi.transport.Transport.serviceCall(Transport.java:155) [:1.6.0_29]
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) [:1.6.0_29]
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) [:1.6.0_29]
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) [:1.6.0_29]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_29]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_29]
    at java.lang.Thread.run(Thread.java:680) [:1.6.0_29]
Caused by: javax.transaction.RollbackException: Could not commit transaction.
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1171)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:119)
    at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:85) [jboss-as-ejb3-7.0.2.Final.jar:7.0.2.Final]
    ... 131 more
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: NULL not allowed for column "CATEGORY_FK"; SQL statement:
insert into Product (category_fk, description, name, id) values (?, ?, ?, ?) [90006-145]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1347) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1280) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1286) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1457) [hibernate-entitymanager-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:109) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:54) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:97)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:274)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:94)
    at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:159)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1159)
    ... 134 more
Caused by: org.hibernate.exception.GenericJDBCException: NULL not allowed for column "CATEGORY_FK"; SQL statement:
insert into Product (category_fk, description, name, id) values (?, ?, ?, ?) [90006-145]
    at org.hibernate.exception.internal.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:148) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.exception.internal.SQLStateConverter.convert(SQLStateConverter.java:136) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:131) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:80) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at $Proxy89.executeUpdate(Unknown Source)   at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:56) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2839) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3276) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:80) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:273) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:265) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:186) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:336) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1084) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:319) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:104) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    ... 140 more
Caused by: org.h2.jdbc.JdbcSQLException: NULL not allowed for column "CATEGORY_FK"; SQL statement:
insert into Product (category_fk, description, name, id) values (?, ?, ?, ?) [90006-145]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) [h2-1.2.145.jar:1.2.145]
    at org.h2.message.DbException.get(DbException.java:167) [h2-1.2.145.jar:1.2.145]
    at org.h2.message.DbException.get(DbException.java:144) [h2-1.2.145.jar:1.2.145]
    at org.h2.table.Column.validateConvertUpdateSequence(Column.java:294) [h2-1.2.145.jar:1.2.145]
    at org.h2.table.Table.validateConvertUpdateSequence(Table.java:621) [h2-1.2.145.jar:1.2.145]
    at org.h2.command.dml.Insert.insertRows(Insert.java:122) [h2-1.2.145.jar:1.2.145]
    at org.h2.command.dml.Insert.update(Insert.java:86) [h2-1.2.145.jar:1.2.145]
    at org.h2.command.CommandContainer.update(CommandContainer.java:69) [h2-1.2.145.jar:1.2.145]
    at org.h2.command.Command.executeUpdate(Command.java:201) [h2-1.2.145.jar:1.2.145]
    at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:143) [h2-1.2.145.jar:1.2.145]
    at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:129) [h2-1.2.145.jar:1.2.145]
    at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) [:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
    at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:124) [hibernate-core-4.0.0.CR2.jar:4.0.0.CR2]
    ... 154 more

error when app starts in glassfish

SEVERE: Error Rendering View[/main.xhtml]
javax.el.ELException: /WEB-INF/layouts/template.xhtml @85,86 rendered="#{accountController.loggedIn}": javax.enterprise.inject.CreationException
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:413)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1751)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.enterprise.inject.CreationException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.jboss.weld.util.reflection.SecureReflections$16.work(SecureReflections.java:343)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInstantiation(SecureReflectionAccess.java:173)
at org.jboss.weld.util.reflection.SecureReflections.newInstance(SecureReflections.java:340)
at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:33)
at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:45)
at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:85)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:143)
at org.jboss.weld.bean.ProducerMethod$1.produce(ProducerMethod.java:133)
at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:299)
at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:61)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:616)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:681)
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:118)
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:703)
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:712)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:161)
at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:134)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:46)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:157)
at org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:131)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:153)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:290)
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:107)
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)
at org.agoncal.application.petstore.web.AccountController$Proxy$_$$WeldClientProxy.isLoggedIn(AccountController$Proxy$$$_WeldClientProxy.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:363)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstValue.getValue(AstValue.java:138)
at com.sun.el.parser.AstValue.getValue(AstValue.java:183)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:224)
at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
... 39 more
Caused by: javax.security.auth.login.LoginException: No LoginModules configured for SimpleLoginModule
at javax.security.auth.login.LoginContext.init(Unknown Source)
at javax.security.auth.login.LoginContext.(Unknown Source)
at org.agoncal.application.petstore.security.LoginContextProducer.produceLoginContext(LoginContextProducer.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260)
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:137)
... 70 more

Encrypt password

The user's password is stored in clear, we should encrypt it.

We whould look at PKCS#12, it might be the one used in Jaav EE 7

i18n

Internationalization :

  • should add some i18n and move our messages and text content to a resource bundle
  • use JSF 2.0 resource localisation (e.g change banner depending on local)

Integration tests don't work under JBoss

Right now when launching Arquillian test for JBoss, the server is launched but deployment fail with the following exception

java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver

Because DB included in JBoss is H2 and not Derby. We need to provide a specific persistence.xml file for JBoss to handle specificity of the platform.

Add default locale to the faces-config

  • If user prefer another language than EN or FR he/she run into this bug:

java.util.MissingResourceException: Can't find bundle for base name messages, locale cs_CZ

I recommended add to the faces-config.xml this code:

<locale-config> <default-locale>en</default-locale> </locale-config>

WELD-000321 No conversation found to restore for id 4

After a while (session T/O?), PetStore raises the following error (GF 3.1):

[#|2012-02-18T08:40:24.068+0100|WARNING|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=18;_ThreadName=Thread-3;|StandardWrapperValve[FacesServlet]: PWC1406: Servlet.service() for servlet FacesServlet threw exception
org.jboss.weld.context.NonexistentConversationException: WELD-000321 No conversation found to restore for id 4
    at org.jboss.weld.jsf.WeldPhaseListener.activateConversations(WeldPhaseListener.java:108)
    at org.jboss.weld.jsf.WeldPhaseListener.beforePhase(WeldPhaseListener.java:84)
    at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)
    at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
    at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:680)
|#]

Allow simple signin

Once the user is signed in he/she can access his/her account details, shop and checkout the shopping cart. This should use SessionScoped bean

Refactoring exception handle ?

currently exceptions are thrown like this
if (categoryId == null)
throw new ValidationException("Invalid category id");
if (categoryName == null)
throw new ValidationException("Invalid category name");
...

. How about having one common class and static method to do it ?
public class Asserter {
public static void check(String cause,boolean condition) {
if(condition) {
throw new ValidationException(cause);
}
}
}

Asserter.check("Invalid category id",categoryId==null)

Asserter.check("Invalid category name",categoryName == null);

java.io.IOException: /petstore-test.login (No such file or directory)

Hi, I'm new to Java EE development and have the following issue.
I did not change anything in config.properties:

loginConfigFile=/petstore-test.login

I deployed on glassfish, and got the following exception:

java.io.IOException: /E:/Program%20Files%20(x64)/glassfish/glassfish/domains/glassfish_on_localhost/applications/applicationPetstore/WEB-INF/classes/petstore-test.login (No such file or directory)

This is the real absolute path to the deployed application and file is there. What may be the problem?

Stack trace from LoginContextProducer.produceLoginContext(LoginContextProducer.java:34) is:

StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception java.io.IOException:
/E:/Program%20Files%20(x64)/glassfish/glassfish/domains/glassfish_on_localhost/applications/applicationPetstore/WEB-INF/classes/petstore-test.login (No such file or directory) at
com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:212) at com.sun.security.auth.login.ConfigFile.(ConfigFile.java:108) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at
java.lang.reflect.Constructor.newInstance(Constructor.java:525) at java.lang.Class.newInstance0(Class.java:372) at
java.lang.Class.newInstance(Class.java:325) at javax.security.auth.login.Configuration$3.run(Configuration.java:264) at javax.security.auth.login.Configuration$3.run(Configuration.java:260) at
java.security.AccessController.doPrivileged(Native Method) at
javax.security.auth.login.Configuration.getConfiguration(Configuration.java:259) at
javax.security.auth.login.LoginContext$1.run(LoginContext.java:254) at
javax.security.auth.login.LoginContext$1.run(LoginContext.java:252) at
java.security.AccessController.doPrivileged(Native Method) at
javax.security.auth.login.LoginContext.init(LoginContext.java:251) at javax.security.auth.login.LoginContext.
(LoginContext.java:418) at
org.agoncal.application.petstore.security.LoginContextProducer.produceLoginContext(LoginContextProducer.java:34) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at ...

Thank you!

JDeveloper Import Error

I'm encountering following error while trying to import Maven project. Any help/pointers would be appreciated. I'm using JDeveloper 11.1.2.4.0 env.

POM 'org.jboss.arquillian:arquillian-bom' not found in repository: Unable to download artifact from any repository org.jboss.arquillian:arquillian-bom:pom:1.0.2.Finalformthe specified remote repositories: java.net-snapshots-repository-group (https://maven.java.net/content/repositories/snapshots), central (http://repo1.maven.org/maven2), sonar(http://repository.sonarsource.org/content/repositores/sonar), java.net-staging-repository-group (https://maven.java.net/content/groups/staging), java.net-releases-repository-group (https://maven.java.net/content/repositoreis/releases), apache-snapshots (https://repository.apache.org/content/repositories/snapshots/), java.net-public-repository-group (https://maven.java.net/content/groups/public), jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public-jboss/) for project org.jboss.arquillian:arquillian-bom

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.