Skip to Main Content

Application Development Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Urgent: MimeMessage null pointer error

6431Oct 13 2001
Please help!

I cant upgrade to 1.2 yeat. Anyone know how to fix this in 1.1.9
on W2K?

The error I'm getting is a null pointer from the MimeMessage
object:


Session javaMailSession = Session.getInstance(new Properties
(),null);
InputStream is = theMessage.renderAsStream
("EmailRenderer","EmailMessageRenderer",null);
MimeMessage message = new MimeMessage(javaMailSession,is);

NullPointer is thrown when accessing the available method.

I know the stream contains data but dont know if strange Session
thing is working.

If i use the line

MimeMessage message = new MimeMessage(javaMailSession);

there's no error.

Any help would be appreciated.

-Mitch


Stacktrace is:

java.lang.NullPointerException
int
oracle.ifs.protocols.email.renderer.StringStreamFilterInputStream

.available() (StringStreamFilterInputStream.java:142)log3:
int java.io.BufferedInputStream.read(byte[], int, int)
(BufferedInputStream.java:287)log3:
byte[] com.sun.mail.util.AS CIIUtility.getBytes
(java.io.InputStream) (ASCIIUtility.java:229)log3:
void javax.mail.internet.MimeMessage.parse(java.io.InputStream)
(MimeMessage.java:267)log3:
void javax.mail.internet.MimeMessage.<init>(javax.mail.Session,
java.io.InputStream) (MimeMessage.java:154)log3:
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2001
Added on Oct 13 2001
4 comments
405 views