Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problem running code from EJB in action book (chapter1)

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm new to EJB and I'm in trouble running that code from EJB in action book (chapter1).

I used ant to deploy the application but when I run the single client application i get this error:

here is the code:



here is the error:

HelloUserClient.java:3: package javax.ejb does not exist
import javax.ejb.EJB;
^
HelloUserClient.java:7: cannot find symbol
symbol : class HelloUser
location: class ejb3inaction.example.HelloUserClient
private static HelloUser helloUser;
^
HelloUserClient.java:6: cannot find symbol
symbol : class EJB
location: class ejb3inaction.example.HelloUserClient
@EJB
^
3 errors

>>I'm running this code from command line, without any IDE, can someone help?
 
author & internet detective
Posts: 40200
816
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like you are missing a jar from the classpath. Do you see a jar that looks like j2ee.jar or jpa.jar?
 
fabianoSouza Souza
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I did everything as in the book, I'm using GlassFich,, etc..

I tried to run the code with the .jar from command line but it failed with same error..

the .jar i tried was clientxx.jar and if the problem is with .jar file then i don't know what's the right .jar
 
machines help you to do more, but experience less. Experience this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic