tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Burton <alex.j...@e-plus.com.au>
Subject Re: [Fwd: Tomcat5.0.25 and Java Mail not seem to work]
Date Sun, 13 Jun 2004 04:53:09 GMT
Thanks Jake. Found same post just before and did exactly that. Solved my 
problem.

Jacob Kjome wrote:

> Maybe because of this?
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=29255
>
> Grab 5.0.26beta.
>
> Jake
>
> At 01:45 PM 6/13/2004 +1000, you wrote:
>
>> Hi all,
>>
>> I am currently porting an application from Tomcat 4.1.x to Tomcat 
>> 5.0.25. Everything is going fine except for JavaMail.
>> In the application we have setup both database and JavaMail as Global 
>> Naming Resources. The database global work fine but I am getting the 
>> following with the Mail resource (see output below)
>>
>> I have downloaded the 2 mail and activation Jars and added them to 
>> the <tomcat_home>/common/lib directory (have also tried in the 
>> endorsed directory)
>>
>>    * javamail-1.3.1
>>    * jaf-1.0.2 (activation)
>>
>> I have also tried to setup the java mail in the individual contexts 
>> with the same error.... is this a bug or am I doing something wrong?!!!
>>
>> Thanks in advance,
>> Alex.
>>
>> From the catalina.out:
>> ----------------------------------------------------------------------------------------------------------------

>>
>> 13/06/2004 03:37:50 org.apache.coyote.http11.Http11Protocol init
>> INFO: Initializing Coyote HTTP/1.1 on http-80
>> 13/06/2004 03:37:50 org.apache.catalina.startup.Catalina load
>> INFO: Initialization processed in 969 ms
>> 13/06/2004 03:37:50 
>> org.apache.catalina.mbeans.GlobalResourcesLifecycleListener createMBeans
>> SEVERE: Exception processing Global JNDI Resources
>> javax.naming.NamingException: Cannot create resource instance
>>        at 
>> org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:132)

>>
>>        at 
>> javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
>>        at org.apache.naming.NamingContext.lookup(NamingContext.java:791)
>>        at org.apache.naming.NamingContext.lookup(NamingContext.java:151)
>>        at 
>> org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:155)

>>
>>        at 
>> org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:160)

>>
>>        at 
>> org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:125)

>>
>>        at 
>> org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:97)

>>
>>        at 
>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

>>
>>        at 
>> org.apache.catalina.core.StandardServer.start(StandardServer.java:2291)
>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>>
>>        at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>>
>>        at java.lang.reflect.Method.invoke(Method.java:324)
>>        at 
>> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
>> 13/06/2004 03:37:50 org.apache.catalina.core.StandardService start
>> INFO: Starting service Catalina
>> 13/06/2004 03:37:50 org.apache.catalina.core.StandardEngine start
>> INFO: Starting Servlet Engine: Apache Tomcat/5.0.25
>> 13/06/2004 03:37:50 org.apache.catalina.core.StandardHost start
>> INFO: XML validation disabled
>>
>>
>> Server.xml snippet:
>> ----------------------------------------------------------------------------------------------------------------

>>
>>  <GlobalNamingResources>
>>
>>         ... more stuff ...
>>
>>        <Resource name="mail/Session_global" auth="Container" 
>> type="javax.mail.Session"/>
>>        <ResourceParams name="mail/Session_global">
>>
>> <parameter><name>mail.smtp.host</name><value>mail.internode.on.net</value></parameter>

>>
>>        </ResourceParams>
>>
>>        <Resource name="jdbc/Database_global" auth="Container" 
>> type="javax.sql.DataSource" description="pool of JDBC"/>
>>        <ResourceParams name="jdbc/Database_global">
>>
>> <parameter><name>factory</name><value>org.apache.commons.dbcp.BasicDataSourceFactory</value></parameter>

>>
>>
>> <parameter><name>username</name><value>our_user</value></parameter>
>>
>> <parameter><name>driverClassName</name><value>oracle.jdbc.driver.OracleDriver</value></parameter>

>>
>>
>> <parameter><name>url</name><value>jdbc:oracle:thin:@192.168.0.6:1521:UTF8</value></parameter>

>>
>>
>> <parameter><name>password</name><value>password</value></parameter>
>>        </ResourceParams>
>>
>>  </GlobalNamingResources>
>>
>>
>>       ... more stuff ...
>>
>>            <Host name="www.developer.ourhost.com" debug="1" 
>> appBase="webapps" unpackWARs="true">
>>                <Context path="" docBase="our-app-base" debug="1" 
>> privileged="true" reloadable="true" override="true">
>>                    <Valve 
>> className="org.apache.catalina.valves.AccessLogValve" 
>> directory="logs" prefix="www.developer.ourhost.com_access_log." 
>> suffix=".txt" pattern="combined" />
>>                    <Logger 
>> className="org.apache.catalina.logger.FileLogger" directory="logs" 
>> prefix="www.developer.ourhost.com." suffix=".txt" timestamp="true" />
>>
>>                    <ResourceLink name="jdbc/Database" 
>> global="jdbc/Database_global" type="javax.sql.DataSource" />
>>                    <ResourceLink name="mail/Session" 
>> global="mail/Session_global" type="javax.mail.Session" />
>>                </Context>
>>            </Host>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message