Move this thread to dev list since JCDI TCK is in public.

---------- Forwarded message ----------
From: Ivan <xhhsld@gmail.com>
Date: 2011/10/13
Subject: Re: 3.0 Web Profile Standalone - 3.0 Web Profile JCDI Runtest Results
To: Geronimo Certification Effort <geronimo-tck@geronimo.apache.org>


I just went though some parts of PersistenceUnit scope, and think that the codes there should be refract a bit. 
a. the PURefBuilder first use the current configuration to search the matched GBean, then it will use another method in the Configuration to search the parents. That looks fine, while the query condition seems not re-created in the next query.
b. For the EJB in WAR, it now shared the same configuration with the wrapped war package, so while creating the query condition, the values from EJBModule names are included, and Rex pointed it out that is why the reference is not found.
I am thinking we could use the logic below to search the PU, thoughts ?
do
{
  create query condition based on the current module
  search PU in the configuration linked to current module
  module = module.getParent();
} while (module !=null)





2011/10/12 Rex Wang <rwonly@gmail.com>
sorry typo

not EjbDeploymentBuilder's line 209,
it is PersistenceRefBuilder's line 209...


-Rex

2011/10/12 Rex Wang <rwonly@gmail.com>
The latest progress:
1. For the testInjectionIntoWebServiceEndpoint  test, Ivan reminder me that might be caused by the java home is pointed to a jre. After change to jdk, the test passed in my local machine.

2. So, all the rest failures are the persistence ones.
The test deploy a war which contains persistence.xml and ejbs.

So, the persistent unit builder add the following gbean data to the earcontext:
default/org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext.PersistenceContextInjectionTest/1318412097703/war?J2EEApplication=null,PersistenceUnitModule=WEB-INF/classes/,WebModule=default/org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext.PersistenceContextInjectionTest/1318412097703/war,j2eeType=PersistenceUnit,name=test=org.apache.geronimo.gbean.GBeanData@d1a87

but in the EjbDeploymentBuilder's line 209,
It uses a pattern as following to query the persistent unit gbean data:
[?EJBModule=.,J2EEApplication=null,WebModule=default/org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext.PersistenceContextInjectionTest/1318411456796/war,j2eeType=PersistenceUnit#org.apache.geronimo.persistence.PersistenceUnitGBean]

We can see it contains a constraint "EJBModule=.", which cause the query return empty. That lead the DeploymentException("No default PersistenceUnit specified, and none located");

The root cause is located, any insights how to correct it?

-Rex


2011/10/12 Rex Wang <rwonly@gmail.com>
Some initial investigations:

There are 8 failures in AHP.
6 of them are deployment failures, and 2 of them are assertion errors.

In my local machine, only the 6 deployment failures can be reproduced. They are:
- testInjectionIntoWebServiceEndpoint          
- testBeanTypesAndBindingTypesOfPersistenceContext    
- testInjectionOfPersistenceContext            
- testInjectionOfPersistenceUnit               
- testPassivationOfPersistenceContext            
- testPassivationOfPersistenceUnit        

And the last five tests deploy org.jboss.jsr299.tck.tests.implementation.simple.resource.persistenceContext.PersistenceContextInjectionTest.war , which can be reproduce when I deploy the war in console. I am still digging into the root cause.

But the first test, testInjectionIntoWebServiceEndpoint, deploys org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.InjectionIntoWebServiceEndPointTest.war, which I can deploy successfully in console. The exception stack is:
[org.apache.geronimo.testharness.GeronimoConnector] : Deploying org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.InjectionIntoWebServiceEndPointTest.war
Deployer operation failed: Unable to generate the wsdl file using wsgen.
org.apache.geronimo.common.DeploymentException: Unable to generate the wsdl file using wsgen.
    at org.apache.geronimo.jaxws.sun.tools.WsdlGenerator.generateWsdl(WsdlGenerator.java:182)
    at org.apache.geronimo.jaxws.sun.tools.SunWsdlGenerator.generateWsdl(SunWsdlGenerator.java:34)
    at org.apache.geronimo.axis2.builder.Axis2Builder.initialize(Axis2Builder.java:153)
    at org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.configurePOJO(JAXWSServiceBuilder.java:321)
    at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:637)
    at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:174)
    at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:763)
    at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
    at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:140)
    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.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
    at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
    at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
    at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:344)
    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.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
    at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
    at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
    at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)
    at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
    at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1367)
    at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
    at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
    at sun.rmi.transport.Transport$1.run(Transport.java:159)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.reflect.InvocationTargetException
    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.geronimo.jaxws.sun.tools.JAXWSTools.invoke(JAXWSTools.java:254)
    at org.apache.geronimo.jaxws.sun.tools.JAXWSTools.invoke(JAXWSTools.java:235)
    at org.apache.geronimo.jaxws.sun.tools.JAXWSTools.invokeWsgen(JAXWSTools.java:219)
    at org.apache.geronimo.jaxws.sun.tools.WsdlGenerator.invokeWsgen(WsdlGenerator.java:188)
    at org.apache.geronimo.jaxws.sun.tools.WsdlGenerator.generateWsdl(WsdlGenerator.java:158)
    ... 47 more
Caused by: java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at org.apache.xbean.classloader.JarFileClassLoader.access$200(JarFileClassLoader.java:48)
    at org.apache.xbean.classloader.JarFileClassLoader$6.run(JarFileClassLoader.java:272)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.xbean.classloader.JarFileClassLoader.findClass(JarFileClassLoader.java:224)
    at org.apache.xbean.classloader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:200)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsgen(WSToolsObjectFactoryImpl.java:65)
    at com.sun.tools.ws.spi.WSToolsObjectFactory.wsgen(WSToolsObjectFactory.java:112)
    ... 56 more
Caused by: java.lang.ClassNotFoundException: com.sun.mirror.apt.AnnotationProcessorFactory in classloader null
    at org.apache.xbean.classloader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:206)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 68 more


Any insights?

-Rex



2011/10/11 David Blevins <david.blevins@gmail.com>
Digging into some TCP Multipoint/failover issues at the moment.  Will check this out immediately after unless someone beats me to it.

-David

On Oct 9, 2011, at 10:05 PM, Shawn Jiang wrote:

> *Test method* *Time (seconds)* *Exception*
> testBeanTypesAndBindingTypesOfPersistenceContext 0
>
> org.jboss.jsr299.tck.DeploymentFailure
>       at org.jboss.jsr299.tck.AbstractJSR299Test.handleDeploymentFailure(AbstractJSR299Test.java:188)
>       at org.jboss.testharness.AbstractTest.deployArtifact(AbstractTest.java:89)
>       at org.jboss.testharness.AbstractTest.beforeClass(AbstractTest.java:206)
>       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
>       at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
>       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> ... Removed 23 stack frames
>
> Click to show all stack
> frames<https://phoebe.apache.org:9443/jobs/artifacts/172/2137011/tomcat_web_profile_jcdi___jcdi_tck_runner_Test_Results/surefire-reports/CDI%20TCK/CDI%20TCK.html#>
> testInjectionIntoWebServiceEndpoint 0
>
> org.jboss.jsr299.tck.DeploymentFailure
>       at org.jboss.jsr299.tck.AbstractJSR299Test.handleDeploymentFailure(AbstractJSR299Test.java:188)
>       at org.jboss.testharness.AbstractTest.deployArtifact(AbstractTest.java:89)
>       at org.jboss.testharness.AbstractTest.beforeClass(AbstractTest.java:206)
>       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
>       at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
>       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> ... Removed 23 stack frames
>
> Click to show all stack
> frames<https://phoebe.apache.org:9443/jobs/artifacts/172/2137011/tomcat_web_profile_jcdi___jcdi_tck_runner_Test_Results/surefire-reports/CDI%20TCK/CDI%20TCK.html#>
> testInjectionOfPersistenceContext 0
>
> org.jboss.jsr299.tck.DeploymentFailure
>       at org.jboss.jsr299.tck.AbstractJSR299Test.handleDeploymentFailure(AbstractJSR299Test.java:188)
>       at org.jboss.testharness.AbstractTest.deployArtifact(AbstractTest.java:89)
>       at org.jboss.testharness.AbstractTest.beforeClass(AbstractTest.java:206)
>       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
>       at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
>       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> ... Removed 23 stack frames
>
> Click to show all stack
> frames<https://phoebe.apache.org:9443/jobs/artifacts/172/2137011/tomcat_web_profile_jcdi___jcdi_tck_runner_Test_Results/surefire-reports/CDI%20TCK/CDI%20TCK.html#>
> testInjectionOfPersistenceUnit 0
>
> org.jboss.jsr299.tck.DeploymentFailure
>       at org.jboss.jsr299.tck.AbstractJSR299Test.handleDeploymentFailure(AbstractJSR299Test.java:188)
>       at org.jboss.testharness.AbstractTest.deployArtifact(AbstractTest.java:89)
>       at org.jboss.testharness.AbstractTest.beforeClass(AbstractTest.java:206)
>       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
>       at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
>       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> ... Removed 23 stack frames
>
> Click to show all stack
> frames<https://phoebe.apache.org:9443/jobs/artifacts/172/2137011/tomcat_web_profile_jcdi___jcdi_tck_runner_Test_Results/surefire-reports/CDI%20TCK/CDI%20TCK.html#>
> testPassivationOfPersistenceContext 0
>
> org.jboss.jsr299.tck.DeploymentFailure
>       at org.jboss.jsr299.tck.AbstractJSR299Test.handleDeploymentFailure(AbstractJSR299Test.java:188)
>       at org.jboss.testharness.AbstractTest.deployArtifact(AbstractTest.java:89)
>       at org.jboss.testharness.AbstractTest.beforeClass(AbstractTest.java:206)
>       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
>       at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
>       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> ... Removed 23 stack frames
>
> Click to show all stack
> frames<https://phoebe.apache.org:9443/jobs/artifacts/172/2137011/tomcat_web_profile_jcdi___jcdi_tck_runner_Test_Results/surefire-reports/CDI%20TCK/CDI%20TCK.html#>
> testPassivationOfPersistenceUnit 0
>
> org.jboss.jsr299.tck.DeploymentFailure
>       at org.jboss.jsr299.tck.AbstractJSR299Test.handleDeploymentFailure(AbstractJSR299Test.java:188)
>       at org.jboss.testharness.AbstractTest.deployArtifact(AbstractTest.java:89)
>       at org.jboss.testharness.AbstractTest.beforeClass(AbstractTest.java:206)
>       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
>       at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
>       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> ... Removed 23 stack frames
>
> Click to show all stack
> frames<https://phoebe.apache.org:9443/jobs/artifacts/172/2137011/tomcat_web_profile_jcdi___jcdi_tck_runner_Test_Results/surefire-reports/CDI%20TCK/CDI%20TCK.html#>
> testSessionContextDestroyedWhenHttpSessionInvalidated 0
>
> java.lang.AssertionError
>       at org.jboss.jsr299.tck.tests.context.session.SessionContextTest.testSessionContextDestroyedWhenHttpSessionInvalidated(SessionContextTest.java:87)
>       at org.jboss.testharness.AbstractTest.run(AbstractTest.java:244)
>       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
>       at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
>       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> ... Removed 29 stack frames
>
> Click to show all stack
> frames<https://phoebe.apache.org:9443/jobs/artifacts/172/2137011/tomcat_web_profile_jcdi___jcdi_tck_runner_Test_Results/surefire-reports/CDI%20TCK/CDI%20TCK.html#>
> testSessionContextSharedBetweenServletRequestsInSameHttpSession 0
>
> java.lang.AssertionError
>       at org.jboss.jsr299.tck.tests.context.session.SessionContextTest.testSessionContextSharedBetweenServletRequestsInSameHttpSession(SessionContextTest.java:71)
>       at org.jboss.testharness.AbstractTest.run(AbstractTest.java:244)
>       at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
>       at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
>       at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>       at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
>       at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> ... Removed 29 stack frames
>
> Click to show all stack
> frames<https://phoebe.apache.org:9443/jobs/artifacts/172/2137011/tomcat_web_profile_jcdi___jcdi_tck_runner_Test_Results/surefire-reports/CDI%20TCK/CDI%20TCK.html#>
>
> On Mon, Oct 10, 2011 at 1:49 AM, Kevan Miller <kevan.miller@gmail.com>wrote:
>
>>
>> On Oct 9, 2011, at 4:52 AM, Shawn Jiang wrote:
>>
>>> Forward this to openejb community,   there are 8  JCDI tck failures in
>>> Geronimo after switching to the openejb 4 beta.
>>>
>>> ---------- Forwarded message ----------
>>> From: Rex Wang <rwonly@gmail.com>
>>> Date: Sun, Oct 9, 2011 at 11:32 AM
>>> Subject: Re: 3.0 Web Profile Standalone - 3.0 Web Profile JCDI Runtest
>>> Results
>>> To: Geronimo Certification Effort <geronimo-tck@geronimo.apache.org>
>>>
>>>
>>> still 8 failures in JCDI tck, any insights?
>>
>> Some specific information on the failures would be helpful...
>>
>> --kevan
>>
>
>
>
> --
> Shawn




--
Lei Wang (Rex)
rwonly AT apache.org



--
Lei Wang (Rex)
rwonly AT apache.org



--
Lei Wang (Rex)
rwonly AT apache.org



--
Ivan



--
Ivan