Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6219854
Votes 0
Synopsis Javadoc throws IllegalArgumentException during during normal useage
Category doclet:tbd
Reported Against b05
Release Fixed
State 5-Cause Known, bug
Priority: 5-Very Low
Related Bugs 6319902
Submit Date 21-JAN-2005
Description
FULL PRODUCT VERSION :
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
 customer  Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
I'm trying to run simple javadoc from the command line on a test heirarchy that contains only a single Main class.  I've tried several configurations, but it always fails.  It also fails when I try it as an ant task.

One command line I've tried is:

javadoc com.kitfox.violet


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a package structure and create a Main file at com.kitfox.violet.Main.  It does not need to contain much more than the main(String[] argv) method

Type the following line at the command prompt:

javadoc com.kitfox.violet

Source Code:

package com.kitfox.violet;

public class Main {

public static void main(String args[]) {

}
}

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Javadoc should be produced
ACTUAL -
Received an error message

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Loading source files for package com.kitfox.violet...
Constructing Javadoc information...
Standard Doclet version 1.5.0_01
Building tree for all the packages and classes...
Generating com/kitfox/violet/\Main.html...
java.lang.IllegalArgumentException
        at sun.net.www.ParseUtil.decode(ParseUtil.java:183)
        at sun.misc.URLClassPath$FileLoader.<init>(URLClassPath.java:863)
        at sun.misc.URLClassPath$3.run(URLClassPath.java:319)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.misc.URLClassPath.getLoader(URLClassPath.java:313)
        at sun.misc.URLClassPath.getLoader(URLClassPath.java:290)
        at sun.misc.URLClassPath.findResource(URLClassPath.java:141)
        at java.net.URLClassLoader$2.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findResource(URLClassLoader.java:359)
        at java.lang.ClassLoader.getResource(ClassLoader.java:977)
        at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1159)
        at javax.xml.parsers.SecuritySupport$4.run(SecuritySupport.java:72)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.xml.parsers.SecuritySupport.getResourceAsStream(SecuritySupport
.java:65)
        at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.
java:213)
        at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:185)
        at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:
107)
        at com.sun.tools.doclets.internal.toolkit.builders.LayoutParser.parseXML
(LayoutParser.java:72)
        at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.build(Cl
assBuilder.java:108)
        at com.sun.tools.doclets.formats.html.HtmlDoclet.generateClassFiles(Html
Doclet.java:155)
        at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.generateClassFi
les(AbstractDoclet.java:164)
        at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration
(AbstractDoclet.java:106)
        at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractD
oclet.java:64)
        at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:4
2)
        at com.sun.tools.doclets.standard.Standard.start(Standard.java:23)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
        at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
        at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
        at com.sun.tools.javadoc.Start.begin(Start.java:128)
        at com.sun.tools.javadoc.Main.execute(Main.java:41)
        at com.sun.tools.javadoc.Main.main(Main.java:31)
com.sun.tools.doclets.internal.toolkit.util.DocletAbortException
        at com.sun.tools.doclets.internal.toolkit.builders.LayoutParser.parseXML
(LayoutParser.java:79)
        at com.sun.tools.doclets.internal.toolkit.builders.ClassBuilder.build(Cl
assBuilder.java:108)
        at com.sun.tools.doclets.formats.html.HtmlDoclet.generateClassFiles(Html
Doclet.java:155)
        at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.generateClassFi
les(AbstractDoclet.java:164)
        at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration
(AbstractDoclet.java:106)
        at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractD
oclet.java:64)
        at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:4
2)
        at com.sun.tools.doclets.standard.Standard.start(Standard.java:23)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
        at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
        at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
        at com.sun.tools.javadoc.Start.begin(Start.java:128)
        at com.sun.tools.javadoc.Main.execute(Main.java:41)
        at com.sun.tools.javadoc.Main.main(Main.java:31)
com.sun.tools.doclets.internal.toolkit.util.DocletAbortException
        at com.sun.tools.doclets.formats.html.HtmlDoclet.generateClassFiles(Html
Doclet.java:159)
        at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.generateClassFi
les(AbstractDoclet.java:164)
        at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration
(AbstractDoclet.java:106)
        at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractD
oclet.java:64)
        at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:4
2)
        at com.sun.tools.doclets.standard.Standard.start(Standard.java:23)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)
        at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)
        at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)
        at com.sun.tools.javadoc.Start.begin(Start.java:128)
        at com.sun.tools.javadoc.Main.execute(Main.java:41)
        at com.sun.tools.javadoc.Main.main(Main.java:31)

REPRODUCIBILITY :
This bug can be reproduced always.

Release Regression From : 1.4.2_06
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.
  xxxxx@xxxxx   2005-1-21 00:13:53 GMT
As noted by Doug, this isn't a bug. If the classpath is unset, everything works fine.
An RFE could be filed to have javadoc give a more helpful warning regarding this
Posted Date : 2006-02-23 19:33:03.0
Work Around
N/A
Evaluation
I just tested the source file on the same version of Windows and Java:
Win XP 5.1.2600 SP2 Build 2600 with javadoc build 1.5.0-b64 
and it runs fine, generating all the docs with no errors,

C:>"c:\program files\java\jdk1.5.0\bin\javadoc" -d html com.kitfox.violet 
Loading source files for package com.kitfox.violet...
Constructing Javadoc information...
Standard Doclet version 1.5.0
Building tree for all the packages and classes...
Generating html\com/kitfox/violet/\Main.html...
Generating html\com/kitfox/violet/\package-frame.html...
Generating html\com/kitfox/violet/\package-summary.html...
Generating html\com/kitfox/violet/\package-tree.html...
Generating html\constant-values.html...
Building index for all the packages and classes...
Generating html\overview-tree.html...
Generating html\index-all.html...
Generating html\deprecated-list.html...
Building index for all classes...
Generating html\allclasses-frame.html...
Generating html\allclasses-noframe.html...
Generating html\index.html...
Generating html\help-doc.html...
Generating html\stylesheet.css...

Recommendation:
If classpath is set as an environment variable, try unsetting it.

  xxxxx@xxxxx   2005-2-01 04:52:39 GMT

Submitter Mark_McKay stated:
I unset my classpath, and it started working again.  Thanks.

  xxxxx@xxxxx   2005-2-03

I removed the regression keyword, since this is not really a bug.

Asked submitter.
It seems we could implement a better trap for this classpath error and
output a meaningful error message.

For example, could we at least display the value of classpath in
either the standard or error output stream?  This would make it
easier for us to debug, as we wouldn't have to ask them what it's
set to.

Can you please tell me what the classpath had been set to?
Was it pointing to a pre-5.0 version of tools.jar ?

  xxxxx@xxxxx   2005-2-03 20:38:49 GMT

  xxxxx@xxxxx   2005-07-18 20:26:15 GMT
Posted Date : 2005-07-18 20:26:15.0
Comments
  
  Include a link with my name & email   

Submitted On 29-JAN-2005
YATArchivist
What OS? I can't reproduce with java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing) running on Debian Woody.


Submitted On 29-JAN-2005
Mark_McKay
I


Submitted On 29-JAN-2005
Mark_McKay
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]


Submitted On 31-JAN-2005
dhkramer
I  just tested your file on Win XP 5.1..2600 SP2 Build 2600
with javadoc build 1.5.0-b64 and it runs fine, generating all the docs with no errors,

If classpath is set as an environment variable, try unsetting it.


C:>"c:\program files\java\jdk1.5.0\bin\javadoc" -d html com.kitfox.violet 
Loading source files for package com.kitfox.violet...
Constructing Javadoc information...
Standard Doclet version 1.5.0
Building tree for all the packages and classes...
Generating html\com/kitfox/violet/\Main.html...
Generating html\com/kitfox/violet/\package-frame.html...
Generating html\com/kitfox/violet/\package-summary.html...
Generating html\com/kitfox/violet/\package-tree.html...
Generating html\constant-values.html...
Building index for all the packages and classes...
Generating html\overview-tree.html...
Generating html\index-all.html...
Generating html\deprecated-list.html...
Building index for all classes...
Generating html\allclasses-frame.html...
Generating html\allclasses-noframe.html...
Generating html\index.html...
Generating html\help-doc.html...
Generating html\stylesheet.css...


Submitted On 02-FEB-2005
Mark_McKay
I unset my classpath, and it started working again.  Thanks.


Submitted On 03-FEB-2005
dhkramer
It seems we could implement a better trap for this classpath error and
output a meaningful error message.

Can you please tell me what the classpath had been set to?
Was it pointing to a pre-5.0 version of tools.jar ?


Submitted On 18-MAR-2005
calab
I had the same exact problem with the same config Win XP 5.1.2600 SP2 Build 2600 with javadoc build 1.5.0-b64 everytime I ran javadoc.  I unset my classpath and it worked fine.  Also my classpath points to the one in J2SE 5.0  Dated 10/20/2004 12:12 AM


Submitted On 10-SEP-2005
PeterLynch
Running windows 2000 server, I had the same problem against javadoc 1.5.0_04.

My classpath was corrupt and removing it fix the problem. it seems someone was looking for an example classpath that would recreate the problem.

Her is what I had:

.;.;.;C:\PROGRA~1\JMF21~1.1E\lib\sound.jar;C:\PROGRA~1\JMF21~1.1E\lib\jmf.jar;C:\PROGRA~1\JMF21~1.1E\lib;%systemroot%\java\classes;.


Submitted On 30-APR-2008
I think this happens when the CLASSPATH variable contains variable references along the lines of %systemroot% - the parse util treats the % as an escape sequence indicator and therefore hits a brick wall trying to parse potentially bogus escape sequences.



PLEASE NOTE: JDK6 is formerly known as Project Mustang