Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JEE example with EJB, JSF is not working

john wutka
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am trying following example from link
on netbeans 6.7.1 and glassfish server.

Netbeans is complaining about following annotations.


I imported ejb3-persistence jar as well. Not sure what other jar is missing. I am pasting source code for your reference. I tried to run

example as given in the tutorial on

Eclipse Galileo (SR2)
JBoss Tools 3.1.1 (
JBoss AS 6 M3 (

But i could not get the JBOSS server software download. When i searched I was only able to download the update software not entire server software.(Please advise if you can point me to direct link where i can down load above vesion JBOSS AS). Reason I selected netbeans with Glasfish is i can have every thing in place without spending lot of time on configuration, setting up environments etc.

UserFacade interface file

UserFacadeBean File

UserService File

Then view files are

index.html file

layout.xhtml file

register.xhtml file

register_confirm file is

I do not see any source code with required libraries on that link as well.
Please advise on how to run this example effectively.
[Thumbnail for JEEExampleError.JPG]
Local Statell Annotations not recognized
Victor M. Pereira
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, your lacking the imports.

javax.ejb package
javax.faces package
javax.persistance package
javax.enterprise.context package

Next, I'm not seeing your pom.xml neither the jta or the glassfish datasource.

Have you used jpa 2.0, jsf 2.0 or ejb 3.1 before?

You can try: How to Create a Java EE 6 Application with JSF 2, EJB 3.1, JPA, and NetBeans IDE 6.8
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic