geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Cardona <java_ma...@yahoo.com>
Subject Problem using the JavaMail from sandbox
Date Fri, 26 Aug 2005 22:06:09 GMT
I am trying to use the JavaMail in sandbox and I used
the ff. steps:

1. Checked out geronimo, applied the javamail portlet
patch, built geronimo
2. Compiled the files from sandbox/mail and created a
jar then I copied it to the geronimo snapshot
repository folder
3. I included the jar as a dependency in the
\console-ear\src\plan\geronimo-application.xml 
4. Built and redeployed geronimo console
5. Started Geronimo and James
6. Opened the JavaMail portlet then sent out a test
email by clicking the ‘test’ link

Here’s the code that sends the email:

…
String mailGBean =
actionRequest.getParameter("mailGBean");
String toAddress =
actionRequest.getParameter("toAddress");
String fromAddress =
actionRequest.getParameter("fromAddress");
ObjectName mailInfo = new ObjectName(mailGBean);
Session session = (Session) kernel.invoke(mailInfo,
"$getResource");
Transport trans =
session.getTransport(MAIL_TRANSPORT);
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress(fromAddress));
message.addRecipients(Message.RecipientType.TO,
toAddress);
message.setSubject(MAIL_SUBJECT);
message.setText(MAIL_BODY +
mailInfo.getKeyProperty("name"));
trans.connect();
trans.sendMessage(message, new Address[] {new
InternetAddress(toAddress)});
…

I got the ff. exception:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Booting Geronimo Kernel (in Java 1.4.2_08)...
Starting Geronimo Application Server
[********] 100%  24s Startup complete
  Listening on Ports:
    1099 0.0.0.0   RMI Naming
    1527 127.0.0.1 Derby Connector
    4201 127.0.0.1 OpenEJB Connector EJB
    8080 0.0.0.0   Jetty Connector HTTP
    8443 0.0.0.0   Jetty Connector HTTPS
   61616 0.0.0.0   ActiveMQ Message Broker Connector
Geronimo Application Server started
22:34:25,030 WARN  [Servlet]
org.apache.pluto.portalImpl.Servlet#init(): Couldn'
t read property "pluto.allowSetBufferSize" from config
file ConfigService.proper
ties
22:39:31,601 WARN  [Servlet]
org.apache.pluto.portalImpl.Servlet#init(): Couldn'
t read property "pluto.allowSetBufferSize" from config
file ConfigService.proper
ties
22:49:36,441 WARN  [Servlet]
org.apache.pluto.portalImpl.Servlet#init(): Couldn'
t read property "pluto.allowSetBufferSize" from config
file ConfigService.proper
ties
22:50:05,463 ERROR [PortletInvokerImpl]
PortletInvokerImpl.render() - Error whil
e dispatching portlet.
javax.portlet.PortletException
        at
org.apache.geronimo.console.mailmanager.MailManagerPortlet.processSen
dMail(MailManagerPortlet.java:513)
        at
org.apache.geronimo.console.mailmanager.MailManagerPortlet.processAct
ion(MailManagerPortlet.java:366)
        at
org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:229
)
        at
org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)

        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427
)
        at
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolde
r.java:92)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:832)
        at
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171
)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:823)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:473)
        at
org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:272)
        at
org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:161)
        at
org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvoke
rImpl.java:120)
        at
org.apache.pluto.invoker.impl.PortletInvokerImpl.action(PortletInvoke
rImpl.java:68)
        at
org.apache.pluto.PortletContainerImpl.processPortletAction(PortletCon
tainerImpl.java:164)
        at
org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processP
ortletAction(PortletContainerWrapperImpl.java:82)
        at
org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:188)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427
)
        at
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolde
r.java:92)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:832)
        at
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171
)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:823)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:473)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
67)
        at
org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
        at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
Context.java:635)
        at
org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
        at
org.mortbay.http.HttpServer.service(HttpServer.java:954)
        at
org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
        at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
        at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
        at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
244)
        at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
Caused by: javax.mail.MessagingException: Error in
setting the MAIL FROM
        at
org.apache.geronimo.mail.smtp.SMTPTransport.sendMessage(SMTPTransport
.java:146)
        at
org.apache.geronimo.mail.smtp.SMTPTransport.sendMessage(SMTPTransport
.java:99)
        at
org.apache.geronimo.console.mailmanager.MailManagerPortlet.processSen
dMail(MailManagerPortlet.java:509)
        ... 38 more
Nested Exception is
javax.mail.MessagingException: Error in setting the
MAIL FROM
        at
org.apache.geronimo.mail.smtp.SMTPTransport.sendMessage(SMTPTransport
.java:146)
        at
org.apache.geronimo.mail.smtp.SMTPTransport.sendMessage(SMTPTransport
.java:99)
        at
org.apache.geronimo.console.mailmanager.MailManagerPortlet.processSen
dMail(MailManagerPortlet.java:509)
        at
org.apache.geronimo.console.mailmanager.MailManagerPortlet.processAct
ion(MailManagerPortlet.java:366)
        at
org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:229
)
        at
org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)

        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427
)
        at
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolde
r.java:92)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:832)
        at
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171
)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:823)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:473)
        at
org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:272)
        at
org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:161)
        at
org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvoke
rImpl.java:120)
        at
org.apache.pluto.invoker.impl.PortletInvokerImpl.action(PortletInvoke
rImpl.java:68)
        at
org.apache.pluto.PortletContainerImpl.processPortletAction(PortletCon
tainerImpl.java:164)
        at
org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processP
ortletAction(PortletContainerWrapperImpl.java:82)
        at
org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:188)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427
)
        at
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolde
r.java:92)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:832)
        at
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171
)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:823)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:473)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
67)
        at
org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
        at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
Context.java:635)
        at
org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
        at
org.mortbay.http.HttpServer.service(HttpServer.java:954)
        at
org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
        at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
        at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
        at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
244)
        at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
javax.portlet.PortletException
        at
org.apache.geronimo.console.mailmanager.MailManagerPortlet.processSen
dMail(MailManagerPortlet.java:513)
        at
org.apache.geronimo.console.mailmanager.MailManagerPortlet.processAct
ion(MailManagerPortlet.java:366)
        at
org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:229
)
        at
org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)

        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427
)
        at
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolde
r.java:92)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:832)
        at
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171
)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:823)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:473)
        at
org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:272)
        at
org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:161)
        at
org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvoke
rImpl.java:120)
        at
org.apache.pluto.invoker.impl.PortletInvokerImpl.action(PortletInvoke
rImpl.java:68)
        at
org.apache.pluto.PortletContainerImpl.processPortletAction(PortletCon
tainerImpl.java:164)
        at
org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processP
ortletAction(PortletContainerWrapperImpl.java:82)
        at
org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:188)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427
)
        at
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolde
r.java:92)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:832)
        at
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171
)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:823)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:473)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
67)
        at
org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
        at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
Context.java:635)
        at
org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
        at
org.mortbay.http.HttpServer.service(HttpServer.java:954)
        at
org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
        at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
        at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
        at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
244)
        at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
Caused by: javax.mail.MessagingException: Error in
setting the MAIL FROM
        at
org.apache.geronimo.mail.smtp.SMTPTransport.sendMessage(SMTPTransport
.java:146)
        at
org.apache.geronimo.mail.smtp.SMTPTransport.sendMessage(SMTPTransport
.java:99)
        at
org.apache.geronimo.console.mailmanager.MailManagerPortlet.processSen
dMail(MailManagerPortlet.java:509)
        ... 38 more

Nested Exception is javax.mail.MessagingException:
Error in setting the MAIL FRO
M
        at
org.apache.geronimo.mail.smtp.SMTPTransport.sendMessage(SMTPTransport
.java:146)
        at
org.apache.geronimo.mail.smtp.SMTPTransport.sendMessage(SMTPTransport
.java:99)
        at
org.apache.geronimo.console.mailmanager.MailManagerPortlet.processSen
dMail(MailManagerPortlet.java:509)
        at
org.apache.geronimo.console.mailmanager.MailManagerPortlet.processAct
ion(MailManagerPortlet.java:366)
        at
org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:229
)
        at
org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)

        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427
)
        at
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolde
r.java:92)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:832)
        at
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171
)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:823)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:473)
        at
org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:272)
        at
org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:161)
        at
org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvoke
rImpl.java:120)
        at
org.apache.pluto.invoker.impl.PortletInvokerImpl.action(PortletInvoke
rImpl.java:68)
        at
org.apache.pluto.PortletContainerImpl.processPortletAction(PortletCon
tainerImpl.java:164)
        at
org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processP
ortletAction(PortletContainerWrapperImpl.java:82)
        at
org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:188)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427
)
        at
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolde
r.java:92)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:832)
        at
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171
)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:823)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:473)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
67)
        at
org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
        at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
Context.java:635)
        at
org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
        at
org.mortbay.http.HttpServer.service(HttpServer.java:954)
        at
org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
        at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
        at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
        at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
244)
        at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Any ideas what is causing the problem?

Thanks,
Chris


		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

Mime
View raw message