• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Oracle 10g - JAXB unmarshalling is not working as expected

 
Greenhorn
Posts: 11
Android Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We're using Oracle 10g application server and deployed the Web service and trying to deploy the web service client. Server is working fine i.e.; marshalling is working fine. We're getting the output from the service properly but the search client is not unmarshalling (parsing) the response received. We're using all the tags under same name space so there is no name space problem. Different collections would exists in the XSD. Has anyone faced similar kind of issue? Is there any solution for this?


Thanks

Santhosh
 
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Santosh.

- Are you able to see the response data in a debugger and does it look right? If you can find the type of the response object in the debugger then you can cast it.
- Also, how are you unmarshalling?
- If you use something like JAXB it should take care of the type conversion for you. Are you using JAXB (or something similar) or your own custom types?
 
Santhosh Reddy Mandadi
Greenhorn
Posts: 11
Android Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi - I'm using JAXB and I'm getting the response from the web service. I've tested with SOAP UI and XML spy. Response looks good as per the XSD.

In fact client program is working fine in local server on tomcat 6.0. I'm facing this issue only with Oracle app server. i.e.; this is specific issue on Oracle environment.
 
R Srini
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Santosh -The last time I came across this problem, it was in OC4J 10.1.3.4, and by default Oracle uses its own XML parser. You may need to configure it to use the XML jars that are used by your application. You could try turning on parent class loading. When deploying the application to OC4J, in Configure Web Module Class Loaders area:

1. uncheck Oracle's XML file,
2. Add Apache's xml-apis.jar and xerxesImpl.jar (or whatever implementation you are using)
3. Check the checkbox for Search Local Classes First

See if that helps.

Thanks.

Srini
 
Santhosh Reddy Mandadi
Greenhorn
Posts: 11
Android Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Srini,

Thanks for the reply. We realized today that the client is not running properly on any stand alone server like Tomcat or OC4J.

When we start running the application with tomcat on Netbeans, it is working. But when I take the WAR and deploy it on tomcat, it is not working. Looks like some JARs are not loading properly when we run it on the stand alone servers.

Any idea?


Thanks

Santhosh
 
R Srini
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Santosh, Yes, that is precisely the issue that my above post should help you resolve in OC4J. I had the same problem myself some time ago. Please see this for more details on exactly why: http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-swapxmlparser/doc/readme.html

Just asking it to search your jars first should probably take care of the problem in OC4J. For tomcat, you will have to search for something similar and I am sure you will find it! Identify the jars in netbeans classpath that do not exist in the tomcat lib directory, and put them where they can be found

Or maybe I am not understanding the issue. I don't understand your statement "client not running on any standalone server". Why would the client run on a server? Oh. I guess the client is a web application. Ok. Got it.

Srini
 
Santhosh Reddy Mandadi
Greenhorn
Posts: 11
Android Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Srini - I didn't get a chance to look at the option that you've suggested. Since Netbeans IDE 6.8 is using the JRE 1.6, so we've downgraded to netbeans to 5.5 and built the WAR for search client web application. It is now running properly on all the servers.

The problem was - net beans was using JAX-WS 2.2 with JRE 1.6. Though the WAR built was done with JDK 5 (since I had JDK 5 only), it was doing some thing extra....

reply
    Bookmark Topic Watch Topic
  • New Topic