File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes @inject annotation throwing null pointer exception in Restful web service project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "@inject annotation throwing null pointer exception in Restful web service project" Watch "@inject annotation throwing null pointer exception in Restful web service project" New topic
Author

@inject annotation throwing null pointer exception in Restful web service project

Sachin Pachari
Ranch Hand

Joined: Jan 16, 2012
Posts: 56

i am using the following tutorial to build a web service project,

http://edwin.baculsoft.com/2012/04/beginning-rest-using-jboss-resteasy/

the above project works fine with the hard coded values that i am passing to the list in the service level,

but when i try to inject my class which will fetch values from the database then it throws null pointer exception, i have already added beans.xml, but still the injected class object is null.

i am not sure where i have gone wrong, any help will be appreciated.

thanks & Regards.
Sachin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: @inject annotation throwing null pointer exception in Restful web service project
 
Similar Threads
Does any one know how to make use of the web service control in a plain java class?
getting null pointer exeception
Question on using getSelectedItem() method in JCombobox to retrieve values
Struts 2 EJB injection
injecting @PersitenceContext