Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NoSuchFieldError: contentStream

0 views
Skip to first unread message

Axel Wathne

unread,
Jul 11, 2001, 4:56:27 AM7/11/01
to

I'm running sun's pop3-provider with JavaMail on WLS6.1beta. My methods work perfectly
when run as an application, but when running on wls i get this:

java.lang.NoSuchFieldError: contentStream
at com.sun.mail.pop3.POP3Message.getContentStream
(POP3Message.java:115)
at javax.mail.internet.MimePartDataSource.getInputStream(MimePartDataSource.java:61)
at com.sun.mail.handlers.text_plain.getContent(text_plain.java:65)
at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:755)
at javax.activation.DataHandler.getContent(DataHandler.java:511)
at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1072)

Now, the contentStream field is a protected field of the class javax.mail.internet.MimeMessage,
which com.sun.mail.pop3.POP3Message extends. The method getContentStream is a
protected method within POP3Message, the result being a protected method trying
to reach a protected field in its superclass. It works fine during testing as
an application, but not as an EJB in WLS6.1beta.

What am I missing here?

Axel Wathne

unread,
Jul 11, 2001, 5:31:23 AM7/11/01
to

The problem was probably related to WLS having an older version of JavaMail. I
put the Mail.jar absolutely first in the classpath in the startWeblogic.cmd-file.

Benjamin Day

unread,
Aug 7, 2001, 2:04:23 PM8/7/01
to
I had this problem...just solved it.
I'd guess that you have "j2ee.jar" from Java2SDK Enterprise Edition
in your classpath before you have the javamail JARs.

It looks like there's a version issue between the javamail classes
downloaded from sun and the javamail classes included in JSDKEE.

-Ben


"Axel Wathne" <awa...@hotmail.com> wrote in message news:<3b4c06ab$1...@newsgroups.bea.com>...

0 new messages