[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-4022) ComponentScanner fails with classes in WEB-INF/classes on websphere
Denis Forveille (JIRA)
jira-events at lists.jboss.org
Fri Mar 20 06:18:36 EDT 2009
[ https://jira.jboss.org/jira/browse/JBSEAM-4022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12458350#action_12458350 ]
Denis Forveille commented on JBSEAM-4022:
I'm not sure this is the place to discuss this, we should use the forum for this I think, however, yes, we have various scope seam components in the web side, many factories (to build list for s:convertEnum, tags for exemple), converters, filters and "presentation related" components
Do you have a seam.properties file at the top root of your classes directory with the seam-jndi.properties file (ie at the root of your src directory in RAD/RSA)? did you remove all other seam.properties files in your web modules? did you put components.xml, pages.xml ... in WEB-INF? did you remove all the components.xml files you could have elsewhere in your
> ComponentScanner fails with classes in WEB-INF/classes on websphere
> Key: JBSEAM-4022
> URL: https://jira.jboss.org/jira/browse/JBSEAM-4022
> Project: Seam
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.1.1.GA
> Environment: Websphere 7.0 (also reported on Websphere 6.1)
> Reporter: John Eckhart
> Attachments: classdescriptor.patch
> This bug is a follow-on to 2347 which was rejected. Since it doesn't appear possible to request a bug be "reopened", I've created a new bug to track the problem.
> The problem: When a Seam annotated class is included in a WAR file, the filename of the class will be "WEB-INF/classes/com/mycompany/MyClass.class". Theoretically, this IS the filename as the classes are packaged under WEB-INF/classes, however, the classloader does not recognize/ignore "WEB-INF/classes/" as part of the name (which is logical, since the classpath includes everything under this directory). This causes ComponentScanner to throw the following exception: java.lang.NoClassDefFoundError: WEB-INF.classes.com.mycompany.Myclass
> The previous issue was rejected with the following rationale: "This turned out to be a user error, not a websphere issues. The classpath was correct, but the user put a META-INF/components.xml in the WAR which causes the scanning error."
> Where would the components.xml go if a project is broken into WAR, JAR (for JPA), JAR (for EJB), and finally EAR (containing the mentioned components)?
> Based on the examples I've read for WebSphere , the recommended place for components.xml is in the WAR file. Moreover, it would stand to reason that including seam components in the WAR would be beneficial (ie POJO components as backing beans for jsf pages).
> I ran into this issue recently in Websphere 7.0 where I had a Seam managed POJO as a backing bean to a JSF page. The bean wouldn't load because of the NoClassDefFoundError. I patched seam to work-around this issue as I didn't see any other solution (JSF backing beans don't belong in my JPA or EJB layers).
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
More information about the seam-issues