aspose file tools*
The moose likes JBoss/WildFly and the fly likes [JBoss 6.0.0 M2 (soon)] EJB 3.1 and JSF : NoInterfaceProxy error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "[JBoss 6.0.0 M2 (soon)] EJB 3.1 and JSF : NoInterfaceProxy error" Watch "[JBoss 6.0.0 M2 (soon)] EJB 3.1 and JSF : NoInterfaceProxy error" New topic
Author

[JBoss 6.0.0 M2 (soon)] EJB 3.1 and JSF : NoInterfaceProxy error

Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

Hi,
I have a strange error.
I have downloaded the latest zip version of JBoss, which is supposed to support a few new features
in EJB 3.1 such as the no interface view for session beans. It is the future JBoss 6.0.0 M2 version.

So I have created a stateless session bean with no interface :



And I have also created a Contact entity bean.
I have this JSF managed bean where i call the supprimer() method from my XHTML facelet in my webapp :




I get the following error :



Does anyone have a clue ? I can list the contacts but i cannot modify / delete them.
Thanks for helping.


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCBCD 5
Visit my blog
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

Is that the entire exception stacktrace?

I can list the contacts but i cannot modify / delete them.


You mean, you can invoke some operations on the nointerface view of the beans, but not some other operations?

[My Blog] [JavaRanch Journal]
Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

Thanks for helping.

Well, the first time i display the page, i display the contacts in a datagrid (JSF component), which is filled through a method that is defined in the stateless session bean with no interface.
I do not think the error is JSF related.

This is the entire stack trace :

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

Looking at the javassist code, there's some weird exception reporting.

Caused by: java.lang.RuntimeException: com.eni.dvtejb31.ejb.entitybeans.Contact


Looks like it's a ClassNotFoundException which is being thrown as this RuntimeException. Where exactly is the com.eni.dvtejb31.ejb.entitybeans.Contact class? And how is your application packaged?

Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

The project is packaged as a WAR (EJB inside a WAR, another new feature of EJB 3.1 as you already know) :

src/com.eni.dvtejb31.ejb.entitybeans
src/com.eni.dvtejb31.ejb.entitybeans.Contact.java (entity bean)
src/com.eni.dvtejb31.ejb.sessionbeans
src/com.eni.dvtejb31.ejb.sessionbeans.ContactServiceBean.java (staless SB)
src/com.eni.dvtejb31.managedbeans
src/com.eni.dvtejb31.managedbeans.ContactBean (Managed bean)

WebContent
WebContent/contacts
WebContent/contacts/listeContacts.xhtml
WebContent/META-INF
WebContent/WEB-INF/
WebContent/WEB-INF/classes/META-INF/persistence.xml
WebContent/WEB-INF/web.xml
WebContent/WEB-INF/faces-config.xml

I can package the project and send it to you if you would like.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

I am now able to reproduce this locally. It's a bug, in the way the Class for the param types of the method, is being loaded. For example:



it runs into issues while loading the class for Contact. I'll create a JIRA for this. Thanks for reporting.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

https://jira.jboss.org/jira/browse/EJBTHREE-2014
Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

Thanks Jaikiran for the update
I see that it is a bug and that you were able to reproduce it and created a JIRA issue.

Well, hope you guys can fix that asap so I can continue testing EJB 3.1.

Please do let me know when it's fixed. Hopefully soon.
Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

Jaikiran,
I saw that you fixed it.

Will that fix be available in the next nightly build ?
Thanks.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

Hi Celinio,

The bug has been fixed but will not be available in 6.0.0.M2 (since the deadline for commits to that version has passed). It isn't (yet) available in the AS nightly build. However, you can download this jar from the Maven snapshot repo and follow these steps to get the fix:

1) Download that jar file to some temp location
2) Rename the jar file to jboss-ejb3-nointerface-impl.jar
3) Backup the existing JBOSS_HOME/common/lib/jboss-ejb3-nointerface-impl.jar to some location
4) Overwrite the JBOSS_HOME/common/lib/jboss-ejb3-nointerface-impl.jar with the jar file from step#2

That should get you the fix and help you in continuing with the rest of your nointerface example testing. Let us know if you run into any issues.
Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

hey Jaikiran,
thanks for the update.
I am going to add that fix soon and i will let you know how it went.

Thanks again, nice work
Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

hey Jaikiran,
I am back. I finally could test it. It works fine now
Thanks
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

Good to know Thanks for testing it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [JBoss 6.0.0 M2 (soon)] EJB 3.1 and JSF : NoInterfaceProxy error