Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1077629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:36:11+00:00 2026-05-16T21:36:11+00:00

I am developing an Android application at the moment, and I’m facing a problem

  • 0

I am developing an Android application at the moment, and I’m facing a problem that i have no idea how to solve.

My application communicates with a Tomcat Server, and i’m using ObjectOutputStream to send a Document object to my application from my servlet.

Therefore, I’m importing org.w3c.dom in my project. The problem I’m facing is that I can’t read the Document object with ObjectInputStream on my android device.

I’m getting the following exception.

com.sun.org.apache.xerces.internal.dom: ClassNotFoundException 

on the lines:

ObjectInputStream ois = new ObjectInputStream(conn.getInputStream());
Document doc = (Document) ois.readObject();     
ois.close();

I can send and receive any object I want without any problem, but when I try to send an object referred to the com.w3c.dom package I get this exception.

Can anybody help?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T21:36:12+00:00Added an answer on May 16, 2026 at 9:36 pm

    The Sun JVM implementation of org.w3c.Document uses a class situated in a package that is included only in the Sun JVM (as the “com.sun.something” package name hints.)

    When the Android Dalvik VM tries to deserialize the Object in readObject, it finds a reference to that internal, Sun JVM specific, class – because the Dalvik VM does not have a reference to that class (Dalvik’s org.w3c.Document implementation is different), an exception is thrown. (More generally, Java Object serialization/deserialization is supposed to work only if both serializer and deserializer share the same class implementation. I suspect that most of your deserialization routines would fail if your instance of Tomcat was not running on a Sun JVM.)

    Seeing that you are sending org.w3c.Document objects, and that this class natively represents an XML document, you could solve the problem by sending an XML stream rather than an Object stream.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing android application with phonegap . Currently I'm facing one problem with inputbox
Good evening. I'm developing an android application that uses Facebook SDK. I've no problem
i have developing an android application that requests an httpget and then it converts
i am developing android application using Geocoder services, I have an application where I
I'm developing an Android application and I have a problem running a new thread
Hi i am developing android application. I that i have creating the dynamic table
I'm developing android application for CAR usage and I need that in phone or
I am developing android application in which i have to open option menu from
I have been developing Android application for Android 3.x and now I want to
I started developing an Android application that record a video and I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.