[
https://jira.jboss.org/jira/browse/JBSEAM-3323?page=com.atlassian.jira.pl...
]
Yannick Lazzari commented on JBSEAM-3323:
-----------------------------------------
I did a diff between the sources of BETA1 and the nightly build of September 11th and if
what I found is the fix for this problem, I think there still might be some issues. First
of all, I see that it's now hardcoded to exclude the folders
"WEB-INF/classes/*" and "/WEB-INF/classes/*" when scanning the war
root. Doesn't that effectively prevent to have any Seam components deployed in those
folders because they're going to be skipped in the whole scanning process? I guess
the workaround would be to always have your components in an archive in the WEB-INF/lib
folder but I don't understand the limitation. Plus, I wanted to try the Wicket
integration and I had the same problem with the classes that are deployed in the
"WEB-INF/wicket" folder. Should that folder be added to the list of excluded
folders as well? Maybe the solution would be to refactor the way the
AbstractDeploymentHandler turns filenames into class names (static method
filenameToClassname). Instead of ignoring the folders, we could simply remove the
"WEB-INF/classes", "/WEB-INF/classes" or "WEB-INF/wicket"
prefix from the file name before turning it into a class name. I'm using Glassfish
too by the way. Is this an application server specific problem? I guess I could write my
own deployment handler and find a way to override Seam's default
ComponentDeploymentHandler but I'm sure other people could benefit from this.
Thanks.
JPA example on Tomcat 6.X and glassfish throws a
IllegalStateException: Cannot load WEB-INF/classes/org/jboss/seam/example/jpa/Hotel.class
------------------------------------------------------------------------------------------------------------------------------------------
Key: JBSEAM-3323
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3323
Project: Seam
Issue Type: Bug
Components: Examples, Platform interoperability
Affects Versions: 2.1.0.BETA1
Reporter: Jay Balunas
Assignee: Pete Muir
Priority: Critical
Fix For: 2.1.0.CR1
When deploying the JPA example without embedded I see the exception below.
I have added the hsql.jar file to tomcat, and deployed the war from the
"dist-tomcat6" directory. I do not believe it is related, but the instructions
in the readme say to deploy the war in "dist-jboss" which does not exist. This
is probably a typo. Just to be sure I did attempt to deploy the war in the
"dist-jboss" but it failed with other errors because it does not package all the
right jars.
SEVERE: Exception sending context initialized event to listener instance of class
org.jboss.seam.servlet.SeamListener
java.lang.IllegalStateException: Cannot load
WEB-INF/classes/org/jboss/seam/example/jpa/Hotel.class from WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@12a54f9
(using getResourceAsStream() returned null)
at
org.jboss.seam.deployment.AbstractDeploymentHandler.getClassFile(AbstractDeploymentHandler.java:41)
at
org.jboss.seam.deployment.ComponentDeploymentHandler.handle(ComponentDeploymentHandler.java:57)
at
org.jboss.seam.deployment.DeploymentStrategy.handle(DeploymentStrategy.java:177)
at org.jboss.seam.deployment.AbstractScanner.handleItem(AbstractScanner.java:30)
at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:141)
at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137)
at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137)
at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137)
at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137)
at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137)
at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137)
at org.jboss.seam.deployment.URLScanner.handleDirectory(URLScanner.java:137)
at org.jboss.seam.deployment.URLScanner.scanDirectories(URLScanner.java:40)
at
org.jboss.seam.deployment.StandardDeploymentStrategy.scan(StandardDeploymentStrategy.java:107)
at org.jboss.seam.init.Initialization.create(Initialization.java:113)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:829)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:718)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1215)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:595)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira