javadoc: warning - Cannot find class javax.mail.Session

Hi,

I am using jdk1.3.1

When I run javadoc on our files, it loads the packages and then gives some warning

messages like this:

...

Constructing Javadoc information...

javadoc: warning - Cannot find class javax.mail.Session

javadoc: warning - Cannot find class javax.mail.internet.MimeMessage

javadoc: warning - Cannot find class javax.mail.internet.InternetAddress

javadoc: warning - Cannot find class javax.mail.MessagingException

javadoc: warning - Cannot find class javax.sql.DataSource

...

This is odd because these classes are not referred to in our source code.

I reran javadoc with the "-verbose" option and got this:

...

[loaded D:\Software\Java\jdk1.3.1\jre\lib\rt.jar(javax/naming/NameParser.class) in 0 ms]

javadoc: warning - Cannot find class javax.mail.Session

javadoc: warning - Cannot find class javax.mail.internet.MimeMessage

javadoc: warning - Cannot find class javax.mail.internet.InternetAddress

javadoc: warning - Cannot find class javax.mail.MessagingException

...

I then installed J2EE and put the <j2ee>/lib/j2ee.jar in the CLASSPATH.

I reran javadoc (again with verbose) and it worked fine like this:

...

[loaded D:\Software\Java\jdk1.3.1\jre\lib\rt.jar(javax/naming/NameParser.class) in 0 ms]

[loaded d:\software\java\j2ee131\lib\j2ee.jar(javax/mail/Session.class) in 0 ms]

[loaded d:\software\java\j2ee131\lib\j2ee.jar(javax/mail/internet/MimeMessage.class) in 0 ms]

[loaded d:\software\java\j2ee131\lib\j2ee.jar(javax/mail/internet/MimeMessage$RecipientType.class) in 0 ms]

[loaded d:\software\java\j2ee131\lib\j2ee.jar(javax/mail/Message.class) in 0 ms]

[loaded d:\software\java\j2ee131\lib\j2ee.jar(javax/mail/Message$RecipientType.class) in 0 ms]

[loaded d:\software\java\j2ee131\lib\j2ee.jar(javax/mail/internet/InternetAddress.class) in 0 ms]

[loaded d:\software\java\j2ee131\lib\j2ee.jar(javax/mail/Address.class) in 0 ms]

[loaded d:\software\java\j2ee131\lib\j2ee.jar(javax/mail/MessagingException.class) in 0 ms]

...

It seems that javadoc requires these extension packages.

Should I be doing something differently? Is this a bug?

Thanks.

-- Patrick

[2320 byte] By [pam11a] at [2007-9-28 3:38:47]
# 1

I have no idea why javadoc would warn about not finding

javax classes. I have not seen this kind of error before

with 1.3.1. The javadoc tool does not require any javax

classes. What was the full javadoc command that was run,

and what was CLASSPATH set to, if anything?

-Doug Kramer

Javadoc team

dkramera at 2007-7-7 23:11:04 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2

Thanks for the reply.

Here is the CLASSPATH and the command.

I did a copy/paste of the output from our javadoc script, formatted it on multiple lines,

and changed some of the names to dummy values.

I added " D:\Software\Java\j2ee131\lib\j2ee.jar" to the CLASSPATH to get rid of the

javadoc warning mentioned above. I had tried adding a "-link <some j2ee javadoc>"

argument to the command, but that did not help

CLASSPATH =

mySrc;

mySrc\build;

mySrc\vendor\JClass.jar;

mySrc\vendor\myInternalJar1.jar;

mySrc\vendor\myInternalJar2.jar;

mySrc\vendor\collections.jar;

mySrc\vendor\myInternalJar3.jar;

mySrc\vendor\gnujsp10.jar;

mySrc\vendor\jaws.jar;

mySrc\vendor\myInternalJar4.jar;

mySrc\vendor\myInternalJar5.jar;

mySrc\vendor\servlet.jar;

mySrc\vendor\sfc.jar;

mySrc\vendor\myInternalJar6.jar;

mySrc\vendor\xslxml\bsf.jar;

mySrc\vendor\xslxml\saxon.jar;

mySrc\vendor\xslxml\xalan.jar;

mySrc\vendor\xslxml\xerces.jar;

mySrc\myDir1\codebase;

mySrc\myDir2\codebase;

myInstall\lib\myInternalJar7.jar;

myInstall\lib\myInternalJar8.jar;

myInstall\lib\JGL.jar;

myInstall\..\myInternalJar9.jar;

D:\Software\Java\j2ee131\lib\j2ee.jar;

myInstall\lib\magelang.jar

javadoc

-J-Xmx160m

-windowtitle myProduct

-link http://myHost.xyz.com/javadoc/jdk1.3.1

-link http://myHost.xyz.com/javadoc/myInternalProduct

-private

-d mySrc\docs

com.xyz.package1

com.xyz.package2

com.xyz.package3

...

com.xyz.packageN

pam11a at 2007-7-7 23:11:04 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3

Sorry for the delay in replying.

Are there any Java source files on the classpath, such as in mySrc

that might reference javax.mail classes?

What comes right before the messages that say that javax.mail

classes are loading? Does it say "Loading source files for package..."

Perhaps that would give a clue which source files contain references.

There was a bug with 1.4.0 where it would load and document .class

files on the classpath. Are you sure you're not using 1.4.0?

(I'm certain you know what version you're using -- I'm just grasping

at straws)

You could reduce the packages you pass in until you no longer

get the javax.mail messages. That would help to narrow the source.

I'm real curious what's happening.

-Doug Kramer

Javadoc team

dkramera at 2007-7-7 23:11:04 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...