?
Solved

xml class not found on applet l

Posted on 2003-03-05
29
Medium Priority
?
231 Views
Last Modified: 2010-04-01
I have a jsp page with an embedded java applet

one client has jdk installed at it works great

another client doesnt have it installed, I run the applet and it says no class def found for xmlparser.

My old instructor told me I need to apply a patch to download the current jre so it will run. How do I do this or this the wrong answer?

thanks,
nick
0
Comment
Question by:nick5454
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 13
  • 11
  • 5
29 Comments
 
LVL 14

Expert Comment

by:kennethxu
ID: 8073080
you need object and/or embed tags, and holp this link helps you to understand how:
http://java.sun.com/j2se/1.4/docs/guide/plugin/developer_guide/using_tags.html
0
 
LVL 14

Accepted Solution

by:
kennethxu earned 600 total points
ID: 8073110
for quick start, try out something like this:
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="200" height="200" align="baseline"
    codebase="http://java.sun.com/products/plugin/1.4/jinstall-14-win32.cab#Version=1,4,0,mn">
<PARAM NAME="code" VALUE="XYZApp.class">
<PARAM NAME="codebase" VALUE="html/">
<PARAM NAME="type" VALUE="application/x-java-applet;jpi-version=1.4">
<PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
<PARAM NAME="scriptable" VALUE="true">
<COMMENT>
    <EMBED type="application/x-java-applet;jpi-version=1.4" width="200"
       height="200" align="baseline" code="XYZApp.class"
       codebase="html/" model="models/HyaluronicAcid.xyz"
       pluginspage="http://java.sun.com/products/plugin/1.4/plugin-install.html">
    <NOEMBED>
    </COMMENT>
           No Java 2 SDK, Standard Edition v 1.4 support for APPLET!!
    </NOEMBED></EMBED>
</OBJECT>
0
 

Author Comment

by:nick5454
ID: 8074006
the error is ParserConfigurationException what does that mean?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:nick5454
ID: 8074054
what does model mean?
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8074697
>>the error is ParserConfigurationException what does that mean?
can you post the code and error stacktrace? it means a parser cannot be created which satisfies the requested configuration.


have you tried to use object/embed tag to use plug-in?
0
 

Author Comment

by:nick5454
ID: 8074852
what does model mean.

my class name is spiritGrid and the jar file is spiritGraph.jar

nick
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8075167
that's just a parameter you pass to your applet. you can ignore it, it's same as:
<APPLET code="XYZApp.class" codebase="html/" align="baseline"
    width="200" height="200">
<PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
    No Java 2 SDK, Standard Edition v 1.4 support for APPLET!!
</APPLET>
0
 

Author Comment

by:nick5454
ID: 8075565
I'm still confused.

the center of the applet says NoClassDefFound javax/xml/parser/ParserConfigurationException

what does that mean

its only on non java clients. and its not outputting stack trace to the console

0
 

Author Comment

by:nick5454
ID: 8076157
okay lets step back a second.

1) the no class def found means the xml class isnt included but the answer to that is probably the jre isnt updated i guess. and no I dont get a stack trace on the client. if you know of a way to send it back top the server that would be nice

2) The real problem.

I dont understand this code you gave me

<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
   width="200" height="200" align="baseline"
   codebase="http://java.sun.com/products/plugin/1.4/jinstall-14-win32.cab#Version=1,4,0,mn">

--> okay so what is the classid for an object or the downlodable update?

<PARAM NAME="code" VALUE="myApplet.class">
<PARAM NAME="codebase" VALUE="html/">
<PARAM NAME="type" VALUE="application/x-java-applet;jpi-version=1.4">

<PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
--> and what in the heck is this parameter?

<PARAM NAME="scriptable" VALUE="true">
--> and what does scriptable mean?

--> and what does this comment do and what reasons is it triggered?
<COMMENT>
   <EMBED type="application/x-java-applet;jpi-version=1.4" width="200"
      height="200" align="baseline" code="XYZApp.class"
      codebase="html/" model="models/HyaluronicAcid.xyz"
      pluginspage="http://java.sun.com/products/plugin/1.4/plugin-install.html">
   <NOEMBED>
   </COMMENT>
          No Java 2 SDK, Standard Edition v 1.4 support for APPLET!!
   </NOEMBED></EMBED>
</OBJECT>

-->why is it duplicated?

I dont get it. I need this help and I still can bring up my applet. I have to know how before I walk into work tomorrow to keep my client happy and finish.

thanks,
nick
0
 

Author Comment

by:nick5454
ID: 8076167
lets suppose my applet is in the same folder and its called myApplet.class and transform it being simple, later on once I understand the basics I can study and add to it but simplicity is key for understanding

0
 
LVL 92

Expert Comment

by:objects
ID: 8076349
The <applet> tag will run the MS VM unless the plugin (>1.3 I think) has been installed *and* it is set to be the default VM used by the browser (this can be set using either the plugin control panel, or Tools>Internat Options>Advanced in IE).

The MS VM only supports Java 1.1, which does not include the XML classes that you are using so it will throw a no class def error trying to run your code.

If the plugin is installed, but it isn't set as the default VM then you can still force it use the plugin instead of the MS VM by using the <object> tag in IE, or the <embed> tag in NS.

The JDK comes with a htmlconverter which can convert your html to use the <object> and/or <embed> tag instead of the <applet> tag.
In your case the html will look something like the following (though I'd suggest you use htmlconverter):

<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
  width="200" height="200" align="baseline"
  codebase="http://java.sun.com/products/plugin/1.4/jinstall-14-win32.cab#Version=1,4,0,mn">
<PARAM NAME="code" VALUE="spiritGrid.class">
<PARAM NAME="archive" VALUE="spiritGraph.jar">
<PARAM NAME="type" VALUE="application/x-java-applet;jpi-version=1.4">
<COMMENT>
  <EMBED type="application/x-java-applet;jpi-version=1.4" width="200"
     height="200" align="baseline" code="spiritGrid.class"
     archive="spiritGraph.jar"
    pluginspage="http://java.sun.com/products/plugin/1.4/plugin-install.html">
  <NOEMBED>
  </COMMENT>
         No Java 2 SDK, Standard Edition v 1.4 support for APPLET!!
  </NOEMBED></EMBED>
</OBJECT>


The reason it seems to appear twice is simply to support both IE and NS. IE uses <object> tag, while NS use <embed> tag. The <comment> tag is used to tell IE to ignore the <embed> tag.

0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8076352
did you have the chance read the tutorial?
most of you question is answered in the tutorial, and I have answered your model question in my previous post.

the scriptable is about if you want you applet talk to javascript.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8076355
let me know if you have further enquires after you read the tutorial.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8076387
basically, what object said is correct. the tutorial link I provided you in my first post includes all what object said plus more details, I would suggest you to read it through, it is rather short and helpful.
0
 
LVL 92

Expert Comment

by:objects
ID: 8076445
The XML API's were only added in 1.4 (from memory), so you'll need to ensure the vm being used is 1.4 or later.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8076474
>> The XML API's were only added in 1.4 (from memory), so you'll need to ensure the vm being used is 1.4 or later.
I think the classid+codebase for IE and type+pluginspage for NS should have ensured that, correct me if I'm wrong.
0
 
LVL 92

Expert Comment

by:objects
ID: 8076523
> I think the classid+codebase for IE and type+pluginspage
> for NS should have ensured that

No the classid specified above would load any plugin version. There is no way to specify a minimum vm version directly using the object tag, only a specific version or any version.

0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8076548
than what is this means:
PARAM NAME="type" VALUE="application/x-java-applet;jpi-version=1.4">
0
 

Author Comment

by:nick5454
ID: 8076567
so is model an object specific or my user defined class specific?
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8076568
yes, the classid is the same since 1.2. but the codebase and type does any help or not at all?
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8076577
>> so is model an object specific or my user defined class specific?
that's applet specific parameter, model is just an example, you can pass any parameter to you applet or none.
0
 

Author Comment

by:nick5454
ID: 8076584
sorry I'm just trying to make sense of it all
0
 
LVL 92

Expert Comment

by:objects
ID: 8076758
> but the codebase and type does any help or not at all?

no, they have nothing to do with what vm is run.

> so is model an object specific or my user defined class specific?

model is irrelevant to you. See the tag I posted above which just contains the relevant parts.


0
 

Author Comment

by:nick5454
ID: 8076961
Ok so heres another moronic ? I downloaded the 1.2 plugin, inorder to get the convert html program I have to install it but that will override my 1.4.1. Is this correct and I downloaded the wrong version?

thanks
nick
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8076999
nick, I would again suggest that you read the tutorial to avoid unnecessary effort. in the very beginning of the tutorial, there is a link to HTML Converter.

The fact is the converter is already come with jdk1.4:
C:\sdk1.4\lib>..\bin\java -jar htmlconverter.jar -gui

0
 
LVL 92

Expert Comment

by:objects
ID: 8077013
> I downloaded the 1.2 plugin, inorder to get the convert html program

It is not a part of 1.2.
It is however included with 1.4.

<jdk>/bin/HtmlConverter.exe
0
 

Author Comment

by:nick5454
ID: 8077027
One thing if there is a link to the exe I missed it completelyu cause I tried everyone

But I had it on my system. was looking ofr .java but it was an EXE imagine that

I'm gonna test it real fast then shovel the points out
0
 

Author Comment

by:nick5454
ID: 8077880
>> that's applet specific parameter, model is just an example, you can pass any parameter to you applet or none

this would have been so much easier for me to grasp if you said its user defined specific. Applet specific is interpreted as a method of the applet class, not a property defined by the user in side the applet class. Thats what threw me off.

But I appreciate the help a lot. After using htmlconverter it was simple and no more errors. Unemployment comes back again tomorrow since I have the entire web site finished

PS. there isnt a link inside the tutorial

Objects --> for your gracious help I put up a question for you.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8085165
sorry for misunderstanding, I meant per applet specific.

>> PS. there isnt a link inside the tutorial
there are 2 links to the converter in the tutorial :)
1. open the tutorial, you'll see a dropdown box right after the title. there two choices about HTML Converter. Chapter 4 and Appendix 3.
2. open the tutorial, right below the Introduction (1st section), there is a Note in bold font, says "There is a Java Plug-in HTML Converter", it is a link.

once you get into "More About HTML Converter", the first section is "Running the GUI version of the HTML Converter" and you'll see the command that I posted earlier.

Thanks for the points.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What's worse than having your data encrypted by ransomware? Getting attacked by a so-called "wiper," which simply destroys the data and offers you no hope of ever seeing it again.
The top devops trends for 2017 are focused on improved deployment frequency, decreased lead time for change and decreased MTTR.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question