• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jaikiran,
I saw that you fixed it.

Will that fix be available in the next nightly build ?
Thanks.
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey Jaikiran,
I am back. I finally could test it. It works fine now
Thanks
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good to know Thanks for testing it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic