[
https://jira.jboss.org/jira/browse/JBSEAM-3757?page=com.atlassian.jira.pl...
]
Dan Allen commented on JBSEAM-3757:
-----------------------------------
Very interesting findings that have resulted from this issue. So here's the story. If
you use any of the annotation inspection methods on a Class (i.e, getAnnotations(),
getAnnotation(), isAnnotationPresent()) with the IBM JVM and any of the annotations
present is not available on the classpath, the JVM craps out. So the search for the
@Install on the component class after the scan is where it failed.
That begs the question, why was EjbSynchronizations class even able to load at all. Well,
as it turns out, the javax.ejb.SessionSynchronization interface is available in the EJB 2
API, which must be on your classpath. Thus, the class is loading, but the first time you
inspect its annotations things fail. What I have done is added a call to getAnnotations()
immediately after loading a class. If we cannot inspect the annotations, then it is the
equivalent of the class not loading successfully.
This isn't the only place this error will crop up, but it is the only place within
Seam. For instance, if you define a component in components.xml that points to a class
containing an annotation that is not available on the classpath, then Seam will fail to
start. But then again, you shouldn't be defining the component anyway, so it because a
debate of who's responsibility it is for the defensive programming. If it is a
problem, it is a separate issue.
TypeNotPresentException: Type javax.ejb.Stateful not present in POJO
mode (ie non ejb3..)
-----------------------------------------------------------------------------------------
Key: JBSEAM-3757
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3757
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.1.CR1
Environment: WebSphere v6.1.0.17 in POJO mode (ie non EJB3)
Reporter: Denis Forveille
Assignee: Dan Allen
Priority: Blocker
Fix For: 2.1.1.CR2
Attachments: components.xml, traceback.txt,
traces_ComponentDeploymentHandler.txt
The application does not start with seam v2.1.1.CR1 due to a
"java.lang.TypeNotPresentException: Type javax.ejb.Stateful not present"
exception
It seems that seams tries to locate (again...) some ejb3 classes not present when seam is
used in pojo mode in a non-ejb3 environnement
See the attached traceback
--
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