aspose file tools*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Context injection failed on service access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Context injection failed on service access" Watch "Context injection failed on service access" New topic
Author

Context injection failed on service access

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 516
    
    2

Hello All,

I have my SEI designed as below



My service is deployed in GlassFish v3.0 and on service access, I'm receiving the below error message indicating that dependency injection failed.



Any advice on why I'm seeing this and what should be done to avoid this.


Regards
KumarRaja

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 516
    
    2

Hmm, after referring to Ivan's notes I realized that I need to inject WebServiceContext instead of MessageContext, which I retried again but still receiving the injection failure exception as mentioned before. The surprise part is, when I tried the example given by Ivan in his material, it worked great. But in my version, I started accessing the WebServiceContext instead of mere declaration using @Resource.



My SOAP Request and response are as below

Request


Response
Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 516
    
    2

Can somebody advice me ,why I'm getting injection failure.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Start from the example in my study notes that work and modify it step-by-step until your problem appears.
Test after each step. This way you can determine what caused injection of the context to fail.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 516
    
    2

Well I got this exception fixed. I don't know how it got fixed, but after couple of reattempts, it ran fine.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Context injection failed on service access
 
Similar Threads
NullPointerException Trying to Get RemoteIP (why?)
how to create statefull session bean in netbeans 6.9.1
Web service handler could not registered/called in client web service
Hello world ejb3 problem
exception in first ejb 3.1 program on NetBean 6.1