• Post Reply Bookmark Topic Watch Topic
  • New Topic

A session bean must not extend another session bean?

 
pin guan wang
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have tried this example (http://rpestano.wordpress.com/2013/07/15/cdi-generic-dao/) with CarDao extending the BaseDao, it works like a charm.
However, from the CarDao class, my NetBeans underlined the class name “CarDao” with the error message “A session bean must not extend another session bean.” But I can compile, deploy and run the application without any problem.
I have also heard that a session bean cannot extend another session bean, but why it works here?

I am using Java EE 6, NetBeans 8.0.1 and WebLogic 12c for this code testing.
Any idea?


Thanks
 
Claude Moore
Ranch Hand
Posts: 832
7
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check which version of ejb you're using. Ejb 2.0 didn't allow inheritance - even it was supported by vendor specific extension. With Ejb 3.x it's fully supported.
 
pin guan wang
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Claude Moore wrote:Please check which version of ejb you're using. Ejb 2.0 didn't allow inheritance - even it was supported by vendor specific extension. With Ejb 3.x it's fully supported.

Hi Calude,

Thanks for your reply.

I am using EJB 3.1, so it is supported, and the error shown by NetBeans could be due to my configuration or NetBeans bug.
Let me know if I am wrong.

Thanks
 
Claude Moore
Ranch Hand
Posts: 832
7
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If all is working even after a clean-build cycle on Netbeans, actually the issue may be related to Netbeans itself. I suppose that the error you're reporting is at editor level (I mean: a red cross on your source code), not a compile time.
Did you try to clean Netbeans' cache ? Sometimes I got fake errors which are resolved by closing Netbeans, cleaning its cache, and reopening the IDE.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!