[JBoss JIRA] Created: (WELD-872) Glassfish 3.1 maven-embedded-glassfish-plugin failure when cdi enabled (beans.xml present): java.lang.ClassNotFoundException: org.apache.tools.ant.Task
by Craig Ringer (JIRA)
Glassfish 3.1 maven-embedded-glassfish-plugin failure when cdi enabled (beans.xml present): java.lang.ClassNotFoundException: org.apache.tools.ant.Task
-------------------------------------------------------------------------------------------------------------------------------------------------------
Key: WELD-872
URL: https://issues.jboss.org/browse/WELD-872
Project: Weld
Issue Type: Bug
Environment: Glassfish 3.1 via maven-embedded-glassfish-plugin
Tested on:
Apache Maven 3.0.2 (r1056850; 2011-01-09 08:58:10+0800)
Java version: 1.6.0_24, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_24\jre
Default locale: en_AU, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
and:
Apache Maven 3.0.1 (r1038046; 2010-11-23 18:58:32+0800)
Java version: 1.6.0_20
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: en_AU, platform encoding: UTF-8
OS name: "linux" version: "2.6.35-25-generic-pae" arch: "i386" Family: "unix"
Reporter: Craig Ringer
>From http://java.net/jira/browse/JERSEY-689 ; I'm not sure if this is a Jersey or a Weld issue.
I'm having problems getting my app to run under Glassfish 3.1 embedded, and have boiled the issue down to a minimal test case involving maven-embedded-glassfish-plugin for glassfish 3.1, jersey 1.5, and cdi (weld). There isn't even any Java code of my own in it, only web.xml, beans.xml and a pom.xml that declares a dependency on jersey-server 1.5. I'm using Jersey 1.5 because I need its improved file upload handling and JSON support.
When I use it to run an embedded glassfish server, deployment to to the embedded server fails with:
3/03/2011 6:40:28 PM org.glassfish.deployment.admin.DeployCommand execute
SEVERE: Exception while loading the app : org/apache/tools/ant/Task
java.lang.ClassNotFoundException: org.apache.tools.ant.Task
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
... (elided, see full exception linked below) ...
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1465)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1368)
at org.glassfish.weld.BeanDeploymentArchiveImpl.handleEntry(BeanDeploymentArchiveImpl.java:485)
at org.glassfish.weld.BeanDeploymentArchiveImpl.collectJarInfo(BeanDeploymentArchiveImpl.java:473)
at org.glassfish.weld.BeanDeploymentArchiveImpl.populate(BeanDeploymentArchiveImpl.java:420)
at org.glassfish.weld.BeanDeploymentArchiveImpl.<init>(BeanDeploymentArchiveImpl.java:148)
at org.glassfish.weld.BeanDeploymentArchiveImpl.populate(BeanDeploymentArchiveImpl.java:391)
at org.glassfish.weld.BeanDeploymentArchiveImpl.<init>(BeanDeploymentArchiveImpl.java:148)
at org.glassfish.weld.BeanDeploymentArchiveImpl.<init>(BeanDeploymentArchiveImpl.java:128)
at org.glassfish.weld.DeploymentImpl.<init>(DeploymentImpl.java:120)
at org.glassfish.weld.WeldDeployer.load(WeldDeployer.java:334)
at org.glassfish.weld.WeldDeployer.load(WeldDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:249)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:460)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
...
(full exception and log of test run here: https://github.com/ringerc/scrapcode/blob/master/testcases/javaee/embedde... )
If I delete beans.xml to disable CDI, the failure goes away. The stack trace passes through weld, providing further evidence that it's somewhere in CDI-land that things are breaking.
I suspected that the problem might be related to WADL generation, so I set com.sun.jersey.config.feature.DisableWADL to true in the jersey servlet init params. That had no effect.
Excluding all the dependencies of jersey-server, so only the jersey-server jar its self was present, still triggers the issue. It doesn't seem to be an issue with one of jersey-server's dependencies.
The ready-to-run testcase is here: https://github.com/ringerc/scrapcode/tree/master/testcases/javaee/embedde... . Just:
just:
git clone git://github.com/ringerc/scrapcode.git
cd scrapcode/testcases/javaee/embeddedglassfish-jersey15-testcase
mvn clean install
I'm filing this here because Jersey 1.5 seems to be the immediate cause, but there's always a chance it's a GF 3.1 or Weld bug.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] Commented: (WELD-80) Passivation of stateful session beans results in a loss of reference to injected object
by John Ament (JIRA)
[ https://issues.jboss.org/browse/WELD-80?page=com.atlassian.jira.plugin.sy... ]
John Ament commented on WELD-80:
--------------------------------
I'll need to review the test a bit more, but I am able to reproduce this in AS 6.
In the ejb3 aop xml file, set the timeout low (the default is 5 minutes, that's enough).
Set the session timeout in web.xml high (60 minutes).
In a session scoped bean, create a reference to a local SFSB. make an initial request, then wait 5-10 minutes. The EJB will passivate, then on next invocation of the session scoped bean attempt to access the SFSB. This may be more of a spec issue though, the more I think about it. CDI scope and EJB passivation need to be linked.
> Passivation of stateful session beans results in a loss of reference to injected object
> ---------------------------------------------------------------------------------------
>
> Key: WELD-80
> URL: https://issues.jboss.org/browse/WELD-80
> Project: Weld
> Issue Type: Bug
> Components: Scopes & Contexts
> Environment: JBoss AS 5.1
> Reporter: John Ament
> Fix For: TBC
>
> Attachments: statefulpassivate.zip
>
>
> See forum post
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months