FAQs about jboss5 Web Service Development

Source: Internet
Author: User

I recently studied ejb3 and encountered a lot of difficult problems when using ejb3 web service. Now I want to summarize the frequently asked questions and share them with you, we hope that you will spend less time searching for solutions in the sky. For details, see:

1.
Server error message:
Jboss5 java. Lang. noclassdeffounderror: ORG/Apache/xerces/XS/xsmodel

Symptoms:
(This occurs in jboss5.1) it can be deployed normally when started on the console, and an error is reported in eclipse.

Solution:
It is likely that the JBoss plug-in of eclipse is selected when the server is added. The location is JBoss-> JBoss V5.0, and changed to the jbossas tool plug-in the JBoss tool plug-in. The location is: JBoss community-> JBoss as v5.1

2.
(This problem exists in jboss5.1)
Client call error,
When jbossws is used to call WebService, the following two exceptions are reported alternately:
Javax. xml. ws. webserviceexception: No Content-Type in the header
And
Javax. xml. ws. webserviceexception: Java. Lang. unsupportedoperationexception: setproperty must be overridden by all subclasses of soapmessage

When axis is used, the following error is reported:
Org. xml. Sax. saxparseexception: premature end of file.

Cause and solution:
Copy the file under the jboss_home/client directory in jboss4.2 to the jboss_home/lib/endorsed directory in jboss5.1, and restart the service.
Jboss-jaxrpc.jar
Jboss-jaxws.jar
Jboss-jaxws-ext.jar
Jboss-saaj.jar

Another method is to download jboss5.1 jdk1.6.

Refer to the following:
I read the release notes for JBoss as 4.2.3.ga and it describes what to do if running webservies using jdk1.6. here is what helped me: (taken from the release notes and followed exactly as printed)

* Jbossas 4.2.3.ga can be compiled with both java5 & java6. the java5 compiled binary is our primary/recommended
Binary distribution. It has undergone rigorous testing and can run under both a Java 5 and a Java 6 runtime. When
Running under Java 6 you need to manually copy the following libraries from the jboss_home/client directory
The jboss_home/lib/endorsed directory, so that the JAX-WS 2.0 APIs supported by jbossws are used:
Jboss-jaxrpc.jar
Jboss-jaxws.jar
Jboss-jaxws-ext.jar
Jboss-saaj.jar

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.