Wednesday, 9 June 2010

"java.io.IOException: Unable to deserialize the Subjects in this Context" using Web Services in WebSphere Portlet Factory Designer

Interesting, one of my colleagues has been using WebSphere Portlet Factory Designer 6.1.5 and WebSphere Portal Server 6.1.5 to continue the development of some portlets on which I'd previously worked back in April.

However, he found that he was getting exceptions such as: -

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)

Caused by: com.bowstreet.webapp.engine.actions.MethodExecutionException: Error in method getPatientDetails.executeOperation. Error in method GetDemographicsExecute. Error in method GetDemographics.invoke. Error in method GetDemographics.invokeInternal. java.io.IOException: Unable to deserialize the Subjects in this Context [Root exception is javax.xml.ws.WebServiceException: java.io.IOException: Unable to deserialize the Subjects in this Context]
at com.bowstreet.webapp.engine.actions.MethodAction.callAction(MethodAction.java:122)
at com.bowstreet.webapp.engine.WebAppAccessImpl.callMethod(WebAppAccessImpl.java:405)
at com.bowstreet.webapp.engine.WebAppAccessImpl.callMethod(WebAppAccessImpl.java:302)
at genjava._requestPatientDetails.getPatientDetailsGetDemographics(_requestPatientDetails.java:80
)

etc. when he attempted to execute one of the portlets ( one consumes a portlet that consumes a web service from a different, third, WPF model ).

I'd tried, and failed, to reproduce the problem using a clean installation of WPFD and WP 6.1.5 on my Ubuntu box.

After some trial and error, I asked the right question - did he use any WebSphere Feature Packs such as: -



I was prompted to do so by a previous encounter with the Web Services Feature Pack: -


Lo and, if you will, behold, he was using BOTH of the above.

Given that the exception related to javax.xml.ws.WebServiceException, I'm guessing that the WS Feature Pack *MIGHT* be responsible.

He's going to test on a clean installation of WAS/WP, and will report back.


4 comments:

Jason said...

Hi I a having the same issue.

Were you able to confirm if it was the feature packs causing the issue ?

Dave Hay said...

Jason, yes, it was precisely that cause. Once my colleague removed the Feature Pack, he was good to go, regards, Dave

Jason said...

Hi Dave

Thanks for the quick response.

I just unchecked the option

'Use JAX-WS if Available' in the WebService Call Builder and this resolved the problem for me.

Regards

Dave Hay said...

Jason, that's a great tip, thanks for sharing it. Dave

Reminder - installing podman and skopeo on Ubuntu 22.04

This follows on from: - Lest I forget - how to install pip on Ubuntu I had reason to install podman  and skopeo  on an Ubuntu box: - lsb_rel...