The Source for Java Technology Collaboration

Home » java.net Forums » GlassFish » GlassFish

Thread: SEAM and EJB interceptors

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 5 - Last Post: Jul 26, 2006 5:36 PM by: rlubke
wstrange

Posts: 6
SEAM and EJB interceptors
Posted: Jun 29, 2006 7:25 AM
  Click to reply to this thread Reply

I am attempting to deploy the latest SEAM (1.0.1)Booking application demo on Appserver 9.0. Note - I have read Roger's blog (http://weblogs.java.net/blog/rogerk/archive/2006/04/java_ee_sdk_run_1.html)

If I include the following ejb-jar.xml descriptor:

<ejb-jar>
<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>
<interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
</interceptor-binding>
</assembly-descriptor>
</ejb-jar>


I get the following deployment error


Deploying application in domain failed; Error loading deployment descriptors for module [reservit] -- Interceptor binding contains an interceptor class name = org.jboss.seam.ejb.SeamInterceptor that is not defined as an interceptor

What does this mean, and what is the suggested fix?


Thanks

ss141213

Posts: 499
Re: SEAM and EJB interceptors
Posted: Jun 29, 2006 7:42 AM   in response to: wstrange
  Click to reply to this thread Reply

That error message indicates that there was no interceptor defined in the ejb-jar.xml. The snippet from ejb-jar.xml that you supplied *only* shows a binding between the interceptor class org.jboss.seam.ejb.SeamInterceptor and the EJBs. It does not define the interceptor itself. There should also be an interceptor defined for that class using the following XML elements:
<interceptors>
     <interceptor>
        <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
           <!-- use other elements as per your requirement-->
     </interceptor>
     <!-- define other interceptors here-->
</interceptors>

This is mentioned in section #18.2 of the EJB 3 Core spec:
Interceptors. The Bean Provider must declare any interceptor classes and methods that have not been declared by means of metadata annotations.

Pl try after making this change. Also, you may have to use latest releases of Seam or JBoss in order to avoid issues like the one reported at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=84602&start=0&postdays=postDays&postorder=postOrder&highlight=highlight
I remember Brian mentioning about that issue in an email. You may also like to check his blog about use of Seam in GlassFish:
http://weblogs.java.net/blog/bleonard/archive/2006/06/running_jboss_s.html

Thanks,
Sahoo

wstrange

Posts: 6
Re: SEAM and EJB interceptors
Posted: Jun 29, 2006 8:21 AM   in response to: wstrange
  Click to reply to this thread Reply

Sahoo

Thanks for the quick reply. Your suggested fix worked (at least is got me by the interceptor problem).

I have read Brian's blog. Unfortunately the booking example seems a little more complicated than the registration example he posted- and I have not yet got it to run.

The app now deploys and the welcome page comes up - but I get a el expression error when I try to register:

javax.el.PropertyNotFoundException: /home.xhtml @21,81 value="#{user.username}": Target Unreachable, identifier 'user' resolved to null

I suspect this is config error on my part. I will continue to investigate...


Message was edited by: wstrange


trouby

Posts: 164
Re: SEAM and EJB interceptors
Posted: Jun 30, 2006 7:07 AM   in response to: wstrange
  Click to reply to this thread Reply

Hey,

make sure you have references in web.xml for all ejbs you access by your jsp/facelets code,

I've successfully used most of the code of the booking example with glassfish..

you better use GF v1 and not 2, I always got 'PropertyNotFoundException' in V2, same code with V1 worked fine.

cheers.

rlubke

Posts: 93
Re: SEAM and EJB interceptors
Posted: Jul 10, 2006 9:28 AM   in response to: trouby
  Click to reply to this thread Reply

We'll be integrating a new version of JSF into GFv2 this week which will resolve the PropertyNotFoundException you've described.

I'll follow up on this thread once the integration is complete.

rlubke

Posts: 93
Re: SEAM and EJB interceptors
Posted: Jul 26, 2006 5:36 PM   in response to: trouby
  Click to reply to this thread Reply

Ok, this issue should be resolved in the following builds:

GF V1 B04
GF V2 B10

These builds include JSF 1.2_01.




 XML java.net RSS