0 Replies Latest reply on Aug 30, 2003 5:36 PM by klutus

    Mail setup problem with multiple applications

    klutus Newbie

      Jboss 3.2.1 Jetty on win XP

      Setup:

      two diifferent webapps use the the same taglibs set up to send mail from a web aplication.
      They both work

      Then I'm running Itracker, that uses javaMail to send mail..it also works

      It is just that the first aplication to send mail is the only one that works..i.e. after starting the server, The first aplicaiton that tries to send mail works... and the second fails

      #####################
      I use this method defined in my taglib-mailer

      <!-- Create a message by entering the name of the SMTP host. -->
      <!-- The default for this attribute is localhost; for a host other -->
      <!-- than localhost supply it's name with the server attribute -->
      <!-- as in the example below. The body of the e-mail is supplied in the -->
      <!-- message tag. The send tag is necessary to send the message. -->
      <mt:mail server="home.net" to="foo@home.net"
      from="bar@home.net" subject="mail taglib">
      <mt:message>[body of message]</mt:message>
      <mt:send/>
      </mt:mail>

      #########################
      trying the taglib mailer first renders me this stack trace using Itracker:

      1 | 2003/08/31 01:11:09 | 00:11:09,390 ERROR [LogInterceptor] EJBException, causedBy:
      INFO | jvm 1 | 2003/08/31 01:11:09 | javax.ejb.EJBException: null; CausedByException is:
      INFO | jvm 1 | 2003/08/31 01:11:09 | Access to default session denied
      INFO | jvm 1 | 2003/08/31 01:11:09 | at cowsultants.itracker.ejb.beans.message.NotificationMessageBean.handleIssueNotification(NotificationMessageBean.java:164)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at cowsultants.itracker.ejb.beans.message.NotificationMessageBean.onMessage(NotificationMessageBean.java:75)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at java.lang.reflect.Method.invoke(Method.java:324)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:434)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:216)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:348)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.Container.invoke(Container.java:674)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:732)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1020)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:241)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:636)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:442)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.mq.SpySession.run(SpySession.java:294)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:177)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at java.lang.Thread.run(Thread.java:536)
      INFO | jvm 1 | 2003/08/31 01:11:09 | java.lang.SecurityException: Access to default session denied
      INFO | jvm 1 | 2003/08/31 01:11:09 | at javax.mail.Session.getDefaultInstance(Session.java:289)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at cowsultants.itracker.ejb.client.util.EmailHandler.sendEmail(EmailHandler.java:101)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at cowsultants.itracker.ejb.client.util.EmailHandler.sendEmail(EmailHandler.java:85)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at cowsultants.itracker.ejb.beans.message.NotificationMessageBean.handleIssueNotification(NotificationMessageBean.java:160)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at cowsultants.itracker.ejb.beans.message.NotificationMessageBean.onMessage(NotificationMessageBean.java:75)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at java.lang.reflect.Method.invoke(Method.java:324)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:434)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:216)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:348)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.Container.invoke(Container.java:674)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:732)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1020)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:241)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:636)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:442)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.mq.SpySession.run(SpySession.java:294)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:177)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at java.lang.Thread.run(Thread.java:536)
      INFO | jvm 1 | 2003/08/31 01:11:09 | 00:11:09,609 ERROR [JMSContainerInvoker] Exception in JMSCI message listener
      INFO | jvm 1 | 2003/08/31 01:11:09 | javax.ejb.EJBException: null; CausedByException is:
      INFO | jvm 1 | 2003/08/31 01:11:09 | null; CausedByException is:
      INFO | jvm 1 | 2003/08/31 01:11:09 | Access to default session denied
      INFO | jvm 1 | 2003/08/31 01:11:09 | at cowsultants.itracker.ejb.beans.message.NotificationMessageBean.onMessage(NotificationMessageBean.java:78)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      INFO | jvm 1 | 2003/08/31 01:11:09 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      INFO | jvm

      #############################
      vise versa, if Itracker mails first... I get this error using the taglibs:

      INFO | jvm 1 | 2003/08/31 01:24:25 | 00:24:24,984 WARN [jbossweb] WARNING: Exception for /web31/form.jsp
      INFO | jvm 1 | 2003/08/31 01:24:25 | java.lang.SecurityException: Access to default session denied
      INFO | jvm 1 | 2003/08/31 01:24:25 | at javax.mail.Session.getDefaultInstance(Session.java:289)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.apache.taglibs.mailer.MailTag.getMessage(MailTag.java:403)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.apache.taglibs.mailer.SendTag.doStartTag(SendTag.java:124)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.apache.jsp.form_jsp._jspService(form_jsp.java:158)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.mortbay.http.HttpServer.service(HttpServer.java:863)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.jboss.jetty.Jetty.service(Jetty.java:460)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      INFO | jvm 1 | 2003/08/31 01:24:25 | at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
      INFO | jvm 1 | 2003/08/31 01:24:25 |


      #################################

      Any feed back would be highly appreciated