[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3757) TypeNotPresentException: Type javax.ejb.Stateful not present in POJO mode (ie non ejb3..)

Dan Allen (JIRA) jira-events at lists.jboss.org
Thu Dec 4 09:35:46 EST 2008


    [ https://jira.jboss.org/jira/browse/JBSEAM-3757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12441162#action_12441162 ] 

Dan Allen commented on JBSEAM-3757:
-----------------------------------

Yes, it's true that Seam scans all classes with annotations, which the EjbSynchronizations has. But the question is, how does this class make it to the point where the @Install annotation is checked if the EJB 3 API is not on the classpath? In other words, how does loadClass("org.jboss.seam.transaction.EjbSynchronizations") work if it implements an EJB API?

The answer is that the interface it implements is not specific to the EJB 3 API. The interface is in the EJB 2 API (which is on the classpath of *any* Java EE application server). Therefore, the classloader has no problem loading EjbSynchronizations. Seam later checks to see if it should be installed as a Seam component. You don't need EJB 3 on the classpath to get that far. Unfortunately, using the IBM JVM, you can't inspect annotations if the class has an annotation type that is unavailable. EjbSynchornizations has @Stateful, which is unavailable in your case. That is why I now call getAnnotations() immediately after loading the class because if we can't scan annotations, the class is useless.

> 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

        



More information about the seam-issues mailing list