Closed glassfishrobot closed 14 years ago
@glassfishrobot Commented easarina said: Created an attachment (id=3898) weld-guess.war
@glassfishrobot Commented dochez said: seems to be happening in jsf implementation, reassigning to ryan for further investigation
@glassfishrobot Commented @rlubke said: We didn't change anything with respect to annotation scanning, so I'm not sure why this started failing.
That said, since a faces-config.xml exists in the embedded jar, it's going to cause JSF to scan the entire jar looking for Faces annotations when a JSF app is deployed. Not desirable. However, since the weld-integration library doesn't leverage JSF annotations, we can set metadata-complete="true" on the faces-config.xml in question to prevent the embedded jar from being scanned.
Note, this doesn't directly address the BufferUnderflowException, but in the long run, this should probably be done regardless.
Diffs to the weld-integration faces-config.xml:
— faces-config.xml (revision 34336) +++ faces-config.xml (working copy) @@ -2,7 +2,8 @@ <faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
@glassfishrobot Commented @rlubke said: CC Roger to review the diffs.
@glassfishrobot Commented @rlubke said: I've checked in changes (r34344) to the weld faces-config.xml such that glassfish-embedded will not be scanned for annotations.
If you check out and try the trunk at this point, you shouldn't see the issue.
@glassfishrobot Commented @rlubke said: Integrated JSF 2.0.2-b04 to resolve this issue.
@glassfishrobot Commented @rlubke said: Corrected milestone.
@glassfishrobot Commented File: weld-guess.war Attached By: easarina
@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-11021
@glassfishrobot Commented Reported by easarina
@glassfishrobot Commented Marked as fixed on Monday, November 16th 2009, 10:33:56 am
I've checkout the latest v3 source code and executed mvn install in v3/maven-plugin directory.
Now #10752 is fixed.
So I've tried runweb or start+deploy using weld-guess.war (from javaee6 samples) and preinstalled appserver.
I was able to execute this app using runweb (before the #10752 was fixed, the execution failed). But during runweb and deploy executions I saw exceptions at the terminal window:
=========================================================
Nov 12, 2009 5:24:33 PM com.sun.enterprise.web.WebContainer loadSystemDefaultWebModules INFO: Virtual server server loaded system default web module classLoader = WebappClassLoader (delegate=true; repositories=WEB-INF/classes/) SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@47a6ac39 Nov 12, 2009 5:24:35 PM org.jboss.weld.bootstrap.WeldBootstrap
INFO: WELD-000900 SNAPSHOT
Nov 12, 2009 5:24:35 PM
org.hibernate.validator.engine.resolver.DefaultTraversableResolver detectJPA
INFO: Instantiated an instance of
org.hibernate.validator.engine.resolver.JPATraversableResolver.
nullID: /opt/glassfishv3/glassfish/domains/domain1/applications/weld-guess/
CLASSES: [class weldguess.Game, class weldguess.Generator, interface
weldguess.MaxNumber, interface weldguess.Random]
Nov 12, 2009 5:24:36 PM com.sun.faces.config.ConfigureListener contextInitialized INFO: Initializing Mojarra 2.0.2 (FCS b03) for context '/weld-guess' Nov 12, 2009 5:24:38 PM com.sun.faces.config.AnnotationScanner processClasspath SEVERE: Unable to process annotations for url, jar:file:/root/.m2/repository/org/glassfish/extras/glassfish-embedded-all/3.0-SNAPSHOT/glassfish-embedded-all-3.0-SNAPSHOT.jar!/META-INF/services/faces-config.xml. Reason: java.nio.BufferUnderflowException Nov 12, 2009 5:24:38 PM com.sun.faces.config.AnnotationScanner processClasspath SEVERE: java.nio.BufferUnderflowException at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:127) at com.sun.faces.config.AnnotationScanner$ConstantPoolInfo.containsAnnotation(AnnotationScanner.java:811) at com.sun.faces.config.AnnotationScanner$ClassFile.containsAnnotation(AnnotationScanner.java:734) at com.sun.faces.config.AnnotationScanner.processJarEntries(AnnotationScanner.java:369) at com.sun.faces.config.AnnotationScanner.processClasspath(AnnotationScanner.java:292) at com.sun.faces.config.AnnotationScanner.getAnnotatedClasses(AnnotationScanner.java:215) at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:765) at com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:736) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:329) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:223) at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4591) at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:539) at org.apache.catalina.core.StandardContext.start(StandardContext.java:5193) at com.sun.enterprise.web.WebModule.start(WebModule.java:503) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:928) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694) at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1933) at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1604) at com.sun.enterprise.web.WebApplication.start(WebApplication.java:90) at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126) at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241) at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:337) at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214) at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:144) at org.glassfish.maven.DeployMojo.execute(DeployMojo.java:75) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:500) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:301) 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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Nov 12, 2009 5:24:38 PM com.sun.enterprise.web.WebApplication start INFO: Loading application weld-guess at /weld-guess [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13 seconds [INFO] Finished at: Thu Nov 12 17:24:38 PST 2009 [INFO] Final Memory: 47M/678M [INFO] ------------------------------------------------------------------------
========================================================
Environment
Operating System: Solaris Platform: Sun
Affected Versions
[V3]