I connect a mysql database through a Axis2 web service with J2me app. Every time i insert a data to the database the following exception occurs.

java.rmi.MarshalException: SAXParseException in response from server

But the operations get completed successfully. Also this occurs only when i try to write a record to the database. When I read from it this does not happen. What is this Exception and how can I handle it?

You should know better then just post error message without any code....

From what you provided we can only observe
java.rmi.MarshalException

"A MarshalException is thrown if a java.io.IOException occurs while marshalling the remote call header, arguments or return value for a remote method call. A MarshalException is also thrown if the receiver does not support the protocol version of the sender.

If a MarshalException occurs during a remote method call, the call may or may not have reached the server. If the call did reach the server, parameters may have been deserialized. A call may not be retransmitted after a MarshalException and reliably preserve "at most once" call semantics. "

org.xml.sax.SAXParseException

"This exception may include information for locating the error in the original XML document, as if it came from a Locator object. Note that although the application will receive a SAXParseException as the argument to the handlers in the ErrorHandler interface, the application is not actually required to throw the exception; instead, it can simply read the information in it and take a different action."

So I would say SAXParseException is thrown while working with XML. Check out your server side processing

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.