RE: Apache/tomcat serving weird pages
I have had similar problems. What version of Tomcat are you using? It could be that your mod_jk2.so is not of the correct version. If you are using TC 5.0.19 you should be using jk2.04 Carl -Original Message- From: Mike DiChiappari [mailto:[EMAIL PROTECTED] Sent: 12 June 2004 01:02 AM To: [EMAIL PROTECTED] Subject: Apache/tomcat serving weird pages I am seeing some weird behavior with Apache and Tomcat. When I quickly refresh the page from the browser, sometimes the wrong page appears. We have two web sites on our server with virtual hosts. If I am reloading a page on web site A, sometimes a page from web site B appears. This seems to only occur with JSPs. I am using Apache 2.0, Tomcat 4.1.24, and I believe jk2. I didn't originally configure the server. But this is how it seems to be configured. The workers2.properties file contains two workers - one for each of the virtual web sites. The lines look like: worker=ajp13:localhost:8019. The line for the other site uses 8009 for the port. The jk2.properties file is very simple. It has the following two lines: handler.list = channerlSocket,request channelSocket.port = 8009 I am still looking into how to interpret these configuration files. Any ideas or pointers would be appreciated. Thanks, Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems building mod_jk2 with ant
I am having some problems building mod_jk2 with ant. I use jakarta-tomcat-connectors-jk2-2.0.4-src. I have modified ../jakarta-tomcat-connectors-jk2-2.0.4-src/jk/build.properties.sample this way: tomcat5.home=/opt/jakarta-tomcat-5.0.25 and saved it as ../jakarta-tomcat-connectors-jk2-2.0.4-src/jk/build.properties Now I am running ant this way: [EMAIL PROTECTED] root]# cd.. ../jakarta-tomcat-connectors-jk2-2.0.4-src/jk [EMAIL PROTECTED] root]# ant and the result is: BUILD FAILED file:/root/linux-downloadz/www.apache.org/jakarta/jakarta-tomcat-connectors-jk2-2.0.4-src/jk/build.xml:142: Warning: Could not find file /root/linux-downloadz/www.apache.org/jakarta/jakarta-tomcat-connectors-jk2-2.0.4-src/coyote/build/lib/tomcat-coyote.jar to copy. The coyote library is not there. I have also tried to do it another way: [EMAIL PROTECTED] root]# ./buildconf.sh [EMAIL PROTECTED] root]# ./configure --with-apxs2=/opt/apache-2.0.49/bin/apxs --with-tomcat5=/opt/jakarta-tomcat-5.0.25 --with-java-home=/opt/j2sdk1.4.2_04 --with-jni [EMAIL PROTECTED] root]# make but that won't work too. If I use: [EMAIL PROTECTED] root]# ./configure --help I can see that it is only possible to use --with-tomcat33, 40, 41 My OS is Fedora Core 2. Any one that can help me with this problem? /Lars Nielsen Lind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems building mod_jk2 with ant
I've never had any joy compiling jk or jk2 with ant, its more straight forward just to use the native scripts ./configure --with-apxs2=/usr/local/apache2/sbin/apxs make then copy the built module to the correct location. Mark On 12 Jun 2004, at 12:26, Lars Nielsen Lind wrote: I am having some problems building mod_jk2 with ant. I use jakarta-tomcat-connectors-jk2-2.0.4-src. I have modified ../jakarta-tomcat-connectors-jk2-2.0.4-src/jk/build.properties.sample this way: tomcat5.home=/opt/jakarta-tomcat-5.0.25 and saved it as ../jakarta-tomcat-connectors-jk2-2.0.4-src/jk/build.properties Now I am running ant this way: [EMAIL PROTECTED] root]# cd.. ../jakarta-tomcat-connectors-jk2-2.0.4-src/jk [EMAIL PROTECTED] root]# ant and the result is: BUILD FAILED file:/root/linux-downloadz/www.apache.org/jakarta/jakarta-tomcat- connectors-jk2-2.0.4-src/jk/build.xml:142: Warning: Could not find file /root/linux-downloadz/www.apache.org/jakarta/jakarta-tomcat- connectors-jk2-2.0.4-src/coyote/build/lib/tomcat-coyote.jar to copy. The coyote library is not there. I have also tried to do it another way: [EMAIL PROTECTED] root]# ./buildconf.sh [EMAIL PROTECTED] root]# ./configure --with-apxs2=/opt/apache-2.0.49/bin/apxs --with-tomcat5=/opt/jakarta-tomcat-5.0.25 --with-java-home=/opt/j2sdk1.4.2_04 --with-jni [EMAIL PROTECTED] root]# make but that won't work too. If I use: [EMAIL PROTECTED] root]# ./configure --help I can see that it is only possible to use --with-tomcat33, 40, 41 My OS is Fedora Core 2. Any one that can help me with this problem? /Lars Nielsen Lind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using Tomcat's HTTP processor and SSL
Jim Kennedy wrote: I am considering using Tomcat alone as my HTTP server as well as my servlet container with SSL. I know a lot of people use Apache HTTP Server instead of Tomcat for this and Tomcat is just the servlet container only. Is there any reason why I should not use just Tomcat alone for this. I'm actually using JBOSS with Tomcat, but Tomcat still handles the HTTP requests. I have no static pages on my site. Seems like a hassle to configure a separate server (Apache HTTP) when I don't have to. In case you don't need loadbalacing, you can live without Apache in that scenario. Also, are there any difficulties configuring Tomcat with SSL? It's not more difficult than using Apache. I would say it's even easier to setup Tomcat than Apache for SSL. But note: You should NOT use Tomcat+SSL, if you expect high HTTPS load. Standard JavaSSL is not too fast. In my load tests Apache/Tomcat is much faster for HTTPS than standalone Tomcat HTTPS, but it doesn't make a difference for HTTP (at least as long as you also have dynamic content). Thanks for any help or suggestions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems building mod_jk2 with ant
These instructions for for osx but are relevant to any *nix (at least most), I've done the same on slackware and redhat (albeit different directory structures). also the libtool stuff probably wont be a problem on linux http://homepage.mac.com/melowe/iblog/B141099555/C760077128/E1326304651/ index.html Mark On 12 Jun 2004, at 12:26, Lars Nielsen Lind wrote: I am having some problems building mod_jk2 with ant. I use jakarta-tomcat-connectors-jk2-2.0.4-src. I have modified ../jakarta-tomcat-connectors-jk2-2.0.4-src/jk/build.properties.sample this way: tomcat5.home=/opt/jakarta-tomcat-5.0.25 and saved it as ../jakarta-tomcat-connectors-jk2-2.0.4-src/jk/build.properties Now I am running ant this way: [EMAIL PROTECTED] root]# cd.. ../jakarta-tomcat-connectors-jk2-2.0.4-src/jk [EMAIL PROTECTED] root]# ant and the result is: BUILD FAILED file:/root/linux-downloadz/www.apache.org/jakarta/jakarta-tomcat- connectors-jk2-2.0.4-src/jk/build.xml:142: Warning: Could not find file /root/linux-downloadz/www.apache.org/jakarta/jakarta-tomcat- connectors-jk2-2.0.4-src/coyote/build/lib/tomcat-coyote.jar to copy. The coyote library is not there. I have also tried to do it another way: [EMAIL PROTECTED] root]# ./buildconf.sh [EMAIL PROTECTED] root]# ./configure --with-apxs2=/opt/apache-2.0.49/bin/apxs --with-tomcat5=/opt/jakarta-tomcat-5.0.25 --with-java-home=/opt/j2sdk1.4.2_04 --with-jni [EMAIL PROTECTED] root]# make but that won't work too. If I use: [EMAIL PROTECTED] root]# ./configure --help I can see that it is only possible to use --with-tomcat33, 40, 41 My OS is Fedora Core 2. Any one that can help me with this problem? /Lars Nielsen Lind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache/tomcat serving weird pages
I have tomcat 4.1.24 with apache 2.0.40-21. I am not sure of the version of mod_jk2. When the server was setup, the mod_jk2's that were available did not work (apache would display an error message when starting up). We were able to find a mod_jk2 with the file name rh_ap2_t4110_mod_jk2.so. Mike -- Message-ID: [EMAIL PROTECTED] From: Carl Olivier [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: Apache/tomcat serving weird pages Date: Sat, 12 Jun 2004 09:24:34 +0200 MIME-Version: 1.0 Content-Type: text/plain I have had similar problems. What version of Tomcat are you using? It could be that your mod_jk2.so is not of the correct version. If you are using TC 5.0.19 you should be using jk2.04 Carl -Original Message- From: Mike DiChiappari [mailto:[EMAIL PROTECTED] Sent: 12 June 2004 01:02 AM To: [EMAIL PROTECTED] Subject: Apache/tomcat serving weird pages I am seeing some weird behavior with Apache and Tomcat. When I quickly refresh the page from the browser, sometimes the wrong page appears. We have two web sites on our server with virtual hosts. If I am reloading a page on web site A, sometimes a page from web site B appears. This seems to only occur with JSPs. I am using Apache 2.0, Tomcat 4.1.24, and I believe jk2. I didn't originally configure the server. But this is how it seems to be configured. The workers2.properties file contains two workers - one for each of the virtual web sites. The lines look like: worker=ajp13:localhost:8019. The line for the other site uses 8009 for the port. The jk2.properties file is very simple. It has the following two lines: handler.list = channerlSocket,request channelSocket.port = 8009 I am still looking into how to interpret these configuration files. Any ideas or pointers would be appreciated. Thanks, Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk2.so for NetBSD
Hello everybody! I have a little problem running Apache2(.0.48) + Tomcat5(.0.25) (jakarta-tomcat) on NetBSD 1.6.2 + JDK 1.3.1_12b03 (sun-jdk13). I can't install a mod_jk2 connector :( SuSe and FreeBSD binaries won't work. They don't load into Apache. FreeBSD version: Syntax error on line 232 of /usr/pkg/etc/httpd/httpd.conf: Cannot load /usr/pkg/lib/httpd/mod_jk2.so into server: /usr/pkg/lib/httpd/mod_jk2.so: Undefined PLT symbol ___tolower (reloc type = 7, symnum = 238) SuSe version: Syntax error on line 232 of /usr/pkg/etc/httpd/httpd.conf: Cannot load /usr/pkg/lib/httpd/mod_jk2.so into server: Shared object libc.so.6 not found Where can I get these (emulators/freebsd_lib and emulators/suse_libc5 won't help) ? Or is anywhere a native NetBSD port of mod_jk2 for Apache 2??? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: How to implement setCharacterEncoding in Tomcat 4.1.x
OK, thank you very much Does it re-encode the text using 2 bytes per char as with real UTF encoding? Simone - Simone Chiaretta www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard -Messaggio originale- Da: news [mailto:[EMAIL PROTECTED] Per conto di Bill Barker Inviato: sabato 12 giugno 2004 7.19 A: [EMAIL PROTECTED] Oggetto: Re: How to implement setCharacterEncoding in Tomcat 4.1.x You can use: response.setContentType(text/xml; charset=utf-8); This works for TC 3-5. Simone - Dev [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello all, I made a servlet that generates a XML response that must be in UTF-8 because it can include any type of chars (Jap, Arabs, chinese, russian and so on) I developed it on Tomcat 5.0.x and I used, to set the correct encoding, the method setCharacterEncoding before calling the out.getWriter and everything works fine. But a developer (this servlet is part of an open source project available on sf.net) said that with tomcat 4.1.x it doesn't work (raise a NoSuchMethodError). I looked at the tomcat 4.1.x javadoc and saw that this method is not implemented since tomcat 5.0.x Since I'd like to support 4.1.x too how can I do to obtain the same functionality? Thank you Simone - Simone Chiaretta http://www.piyosailing.com/S www.piyosailing.com/S Any sufficiently advanced technology is indistinguishable from magic Life is short, play hard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Stop Tomcat over non-SSL connection with Apache2/JK2
I'm setting up a simple Apache 2/Tomcat4 configuration with Mod_JK2 and SSL. Without using SSL, I got going pretty quickly with Apache 2/Tomcat 4/JK2. i.e. I could go to http://hostname/gwise/blah (where gwise was a tomcat webapp) and that worked fine. I then introduced SSL, and I could then go to https://hostname/gwise/blah fine as well. The problem, is that I do *NOT* want the webapp available over the non-SSL connection. In the VirtualHost section in Apache 2 where I defined the SSL VirtualHost, I put a JkUriSet command, but the tomcat apps were still available over port 80 (non-SSL) - even though there was no other mention of tomcat elsewhere in the Apache config - or anything in workers2.properties. What do I need to do to only have tomcat apps available over SSL ? I'm using Apache v2.0.49, mod_ssl v2.0.49, mod_jk2 v2.04 and tomcat v4.1.29 Thanks, GTG Gordon Ross, Network Manager/Rheolwr Rhydwaith Countryside Council for Wales/Cyngor Cefn Gwlad Cymru - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stop Tomcat over non-SSL connection with Apache2/JK2
Gordon Ross wrote: The problem, is that I do *NOT* want the webapp available over the non-SSL connection. In the VirtualHost section in Apache 2 where I defined the SSL VirtualHost, I put a JkUriSet command, but the tomcat apps were still available over port 80 (non-SSL) - even though there was no other mention of tomcat elsewhere in the Apache config - or anything in workers2.properties. I had the same problem. Guess the virtual host support is not as good in connection with JkUriSet as we thought. I also tried to put some Mappings in http vhost only, some only https vhost. But JkUriSet seemed to ignore that. What do I need to do to only have tomcat apps available over SSL ? The solution is that you explicitly deny the UriMappings in your http vhost as Apache will block them before mod_jk comes in. e.g. something like Location ... Order Deny,Allow Deny from All /Location but check the Apache documentation for details. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Default page
You need to and a Context element to the server.xml file with a zero-length path attribute. Check out http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 6:15 PM To: [EMAIL PROTECTED] Subject: Tomcat Default page Hi, I am new to tomcat so bear with me. I set tomcat 5 up on a server today and it is working. I then setup webMathematica 2 and that is working fine. However, when I go to the address http://localhost the page shown is the default tomcat page. What I would like to do is have the address http://localhost bring up the webMathematica program. Can anyone shed some light onto how I can acomplish this? Thank you in advance -Seth- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Database connection problems after redeploying war
OK, finally figured it out. I moved the Resource elements that contained the connection pools into the GlobalNamingResources element in server.xml. I then created the context.xml file that contained ResourceLink elements that pointed to the ones defined in the global section mentioned before. I had tried this before with no luck, but I figured out why this didn't work before. When deploying the war via the manager app, I was specifying the path parameter in the URL. I guess in doing this the context.xml file was ignored during deployment. I can now redeploy the war without having to restart Tomcat. -Original Message- From: Chad Boyd Sent: Friday, June 11, 2004 10:01 PM To: Tomcat Users List Subject: RE: Database connection problems after redeploying war How about the original question. It seems we got off subject here. Can someone please read the original post and see if you have a solution. Thanks. -Original Message- From: Joyce Li [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 4:38 PM To: 'Tomcat Users List' Subject: RE: Database connection problems after redeploying war Hans, Thanks very much for your reply. I think it might still be related, because the null pointer exception I got is from DelegatingConnection.close(). However, I never thought it's bugs of dbcp or Oracle driver, since if I setup the datasource manually (following the example code in DBCP website), I have no problem to get database connection. I couldn't figure out why when Tomcat initiated the action of configuring the dbcp resource, it will fail. Anyway, thanks again for your input. It's encouraging to know someone else also works on the similar problem. Thanks again! -Original Message- From: Hans [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 2:29 PM To: Tomcat Users List; 'Tomcat Users List' Subject: RE: Database connection problems after redeploying war Oops! Misread the stacktrace I am afraid my previous mail does not apply to your problem... sorry ... hmm perhaps I should go get some sleep At 14:09 11/06/2004 -0700, Joyce Li wrote: I also have 1 problem related the database connection which needs help. I used to have the infamous No suitable driver error, but after I corrected my connect string by adding schema into it (defined in context.html), it works for me: parameter nameurl/name valuejdbc:oracle:thin:schema@server:port:sid/value /parameter After this, Tomcat has no problem to locate the driver, and I got a valid DataSource back via JNDI lookup. However, when I tried to use DataSource to getConnection, I got the following error: (part of the stack trace) init exception: java.lang.NullPointerException java.lang.NullPointerException at org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnecti on.java:195) at org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnec tion.java:129) at org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poola bleConnectionFactory.java:311) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas icDataSource.java:842) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:821) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:532) I have no idea where the Null Pointer Exception came from, and the DataSource I got back from server is not null either. I posted this problem before but no one answered. Now I write a class just to load the driver and get the database pool by myself, and it works! But I still want to have the database pooling functionalities be handled by Tomcat, and I really want to know what goes wrong after all! Just hope to post this problem to this thread can get some feedback! Thanks in advance for any input! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 1:28 PM To: [EMAIL PROTECTED] Subject: Re: Database connection problems after redeploying war We've got the exact same issue in our environment at all. Every time we define a datasource, we have to restart Tomcat so that datasource can be accessed. Additionally, when using a traditional web server frontend, like Apache or IIS, with mod_jk or mod_jk2, we have to restart the web server so the mod_jk connector will restart and be able to use the datasources available to the restarted Tomcat. We were hoping using a web server frontend with a mod_jk(2) connector would not require bouncing the web server each time we bounced Tomcat but that's just not the case. :( Any ideas for solving this would be greatly appreciated. Peace... Tom Chad Boyd [EMAIL PROTECTED] .net To [EMAIL PROTECTED] 06/11/2004 12:38 cc PM Subject Database connection problems after Please
RE: Database connection problems after redeploying war
Sweet! Thanks for the info! Peace Tom Chad Boyd [EMAIL PROTECTED] .net To Tomcat Users List 06/12/2004 12:14 [EMAIL PROTECTED] PM cc Subject Please respond to RE: Database connection problems Tomcat Users after redeploying war List [EMAIL PROTECTED] rta.apache.org OK, finally figured it out. I moved the Resource elements that contained the connection pools into the GlobalNamingResources element in server.xml. I then created the context.xml file that contained ResourceLink elements that pointed to the ones defined in the global section mentioned before. I had tried this before with no luck, but I figured out why this didn't work before. When deploying the war via the manager app, I was specifying the path parameter in the URL. I guess in doing this the context.xml file was ignored during deployment. I can now redeploy the war without having to restart Tomcat. -Original Message- From: Chad Boyd Sent: Friday, June 11, 2004 10:01 PM To: Tomcat Users List Subject: RE: Database connection problems after redeploying war How about the original question. It seems we got off subject here. Can someone please read the original post and see if you have a solution. Thanks. -Original Message- From: Joyce Li [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 4:38 PM To: 'Tomcat Users List' Subject: RE: Database connection problems after redeploying war Hans, Thanks very much for your reply. I think it might still be related, because the null pointer exception I got is from DelegatingConnection.close(). However, I never thought it's bugs of dbcp or Oracle driver, since if I setup the datasource manually (following the example code in DBCP website), I have no problem to get database connection. I couldn't figure out why when Tomcat initiated the action of configuring the dbcp resource, it will fail. Anyway, thanks again for your input. It's encouraging to know someone else also works on the similar problem. Thanks again! -Original Message- From: Hans [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 2:29 PM To: Tomcat Users List; 'Tomcat Users List' Subject: RE: Database connection problems after redeploying war Oops! Misread the stacktrace I am afraid my previous mail does not apply to your problem... sorry ... hmm perhaps I should go get some sleep At 14:09 11/06/2004 -0700, Joyce Li wrote: I also have 1 problem related the database connection which needs help. I used to have the infamous No suitable driver error, but after I corrected my connect string by adding schema into it (defined in context.html), it works for me: parameter nameurl/name valuejdbc:oracle:thin:schema@server:port:sid/value /parameter After this, Tomcat has no problem to locate the driver, and I got a valid DataSource back via JNDI lookup. However, when I tried to use DataSource to getConnection, I got the following error: (part of the stack trace) init exception: java.lang.NullPointerException java.lang.NullPointerException at org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnecti on.java:195) at org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnec tion.java:129) at org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poola bleConnectionFactory.java:311) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas icDataSource.java:842) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:821) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:532) I have no idea where the Null Pointer Exception came from, and the DataSource I got back from server is not null either. I posted this problem before but no one answered. Now I write a class just to load the driver and get the database pool by myself, and it works! But I still want to have the database
Using Tomcat's HTTP processor and SSL
I am considering using Tomcat alone as my HTTP server as well as my servlet container with SSL. I know a lot of people use Apache HTTP Server instead of Tomcat for this and Tomcat is just the servlet container only. Is there any reason why I should not use just Tomcat alone for this. I'm actually using JBOSS with Tomcat, but Tomcat still handles the HTTP requests. I have no static pages on my site. Seems like a hassle to configure a separate server (Apache HTTP) when I don't have to. Also, are there any difficulties configuring Tomcat with SSL? Thanks for any help or suggestions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Database connection problems after redeploying war
Just a side note. I couldn't get this to work in Tomcat 5.0.19. I had to upgrade to 5.0.25. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, June 12, 2004 2:27 PM To: [EMAIL PROTECTED] Subject: RE: Database connection problems after redeploying war Sweet! Thanks for the info! Peace Tom Chad Boyd [EMAIL PROTECTED] .net To Tomcat Users List 06/12/2004 12:14 [EMAIL PROTECTED] PM cc Subject Please respond to RE: Database connection problems Tomcat Users after redeploying war List [EMAIL PROTECTED] rta.apache.org OK, finally figured it out. I moved the Resource elements that contained the connection pools into the GlobalNamingResources element in server.xml. I then created the context.xml file that contained ResourceLink elements that pointed to the ones defined in the global section mentioned before. I had tried this before with no luck, but I figured out why this didn't work before. When deploying the war via the manager app, I was specifying the path parameter in the URL. I guess in doing this the context.xml file was ignored during deployment. I can now redeploy the war without having to restart Tomcat. -Original Message- From: Chad Boyd Sent: Friday, June 11, 2004 10:01 PM To: Tomcat Users List Subject: RE: Database connection problems after redeploying war How about the original question. It seems we got off subject here. Can someone please read the original post and see if you have a solution. Thanks. -Original Message- From: Joyce Li [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 4:38 PM To: 'Tomcat Users List' Subject: RE: Database connection problems after redeploying war Hans, Thanks very much for your reply. I think it might still be related, because the null pointer exception I got is from DelegatingConnection.close(). However, I never thought it's bugs of dbcp or Oracle driver, since if I setup the datasource manually (following the example code in DBCP website), I have no problem to get database connection. I couldn't figure out why when Tomcat initiated the action of configuring the dbcp resource, it will fail. Anyway, thanks again for your input. It's encouraging to know someone else also works on the similar problem. Thanks again! -Original Message- From: Hans [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 2:29 PM To: Tomcat Users List; 'Tomcat Users List' Subject: RE: Database connection problems after redeploying war Oops! Misread the stacktrace I am afraid my previous mail does not apply to your problem... sorry ... hmm perhaps I should go get some sleep At 14:09 11/06/2004 -0700, Joyce Li wrote: I also have 1 problem related the database connection which needs help. I used to have the infamous No suitable driver error, but after I corrected my connect string by adding schema into it (defined in context.html), it works for me: parameter nameurl/name valuejdbc:oracle:thin:schema@server:port:sid/value /parameter After this, Tomcat has no problem to locate the driver, and I got a valid DataSource back via JNDI lookup. However, when I tried to use DataSource to getConnection, I got the following error: (part of the stack trace) init exception: java.lang.NullPointerException java.lang.NullPointerException at org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnecti on.java:195) at org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnec tion.java:129) at org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poola bleConnectionFactory.java:311) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas icDataSource.java:842) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:821) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:532) I have no idea where the Null Pointer Exception came from, and the DataSource I got back from server is not null either. I posted this problem before but no one answered. Now I write a class just to load the driver and get the database pool by myself, and it works! But I still want to have the database pooling functionalities be handled by Tomcat, and I really want to know what goes wrong after all! Just hope to post this problem to this thread can get some feedback! Thanks in advance for any input! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 1:28 PM To: [EMAIL PROTECTED] Subject: Re: Database connection problems after redeploying war We've got the exact same issue in our environment at all. Every time we define a datasource, we
How do I run servlets on the root directory of localhost?
http://localhost:8080/ I actually got this to work, but it images, etc can't be found. Thanks for your help. Jarl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do I run servlets on the root directory of localhost?
Is your webapp located in c:/your-Tomcat-install-directory/webapps/yourapp/? Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. :: -Original Message- :: From: Jarl Skogsholm [mailto:[EMAIL PROTECTED] :: Sent: Sunday, June 13, 2004 12:35 AM :: To: Tomcat Users List :: Subject: How do I run servlets on the root directory of localhost? :: :: http://localhost:8080/ :: :: I actually got this to work, but it images, etc can't be found. :: :: Thanks for your help. :: :: Jarl :: :: - :: To unsubscribe, e-mail: [EMAIL PROTECTED] :: For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do I run servlets on the root directory of localhost?
What happens if you just enter: http://localhost:8080/ Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. :: -Original Message- :: From: Schalk [mailto:[EMAIL PROTECTED] :: Sent: Sunday, June 13, 2004 12:51 AM :: To: 'Tomcat Users List' :: Subject: RE: How do I run servlets on the root directory of localhost? :: Importance: High :: :: Is your webapp located in c:/your-Tomcat-install-directory/webapps/yourapp/? :: :: Kind Regards :: Schalk Neethling :: Web Developer.Designer.Programmer.President :: Volume4.Development.Multimedia.Branding :: emotionalize.conceptualize.visualize.realize :: Tel: +27125468436 :: Fax: +27125468436 :: email:[EMAIL PROTECTED] :: web: www.volume4.co.za :: :: This message contains information that is considered to be sensitive or :: confidential and may not be forwarded or disclosed to any other party :: without the permission of the sender. If you received this message in error, :: please notify me immediately so that I can correct and delete the original :: email. Thank you. :: :: :: -Original Message- :: :: From: Jarl Skogsholm [mailto:[EMAIL PROTECTED] :: :: Sent: Sunday, June 13, 2004 12:35 AM :: :: To: Tomcat Users List :: :: Subject: How do I run servlets on the root directory of localhost? :: :: :: :: http://localhost:8080/ :: :: :: :: I actually got this to work, but it images, etc can't be found. :: :: :: :: Thanks for your help. :: :: :: :: Jarl :: :: :: :: - :: :: To unsubscribe, e-mail: [EMAIL PROTECTED] :: :: For additional commands, e-mail: [EMAIL PROTECTED] :: :: :: :: - :: To unsubscribe, e-mail: [EMAIL PROTECTED] :: For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I run servlets on the root directory of localhost?
What happens if you just enter: http://localhost:8080/ I located it in c:/your-Tomcat-install-directory/webapps/ROOT/ What happens if you just enter: http://localhost:8080/ It runs my servlet except without images, .css, .js files. -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin (1755) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I run servlets on the root directory of localhost?
Jarl Skogsholm wrote: What happens if you just enter: http://localhost:8080/ It runs my servlet except without images, .css, .js files. Sounds like the paths in your servlet are wrong; are they relative or absolute? What do the 404 entries in your logs say? -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I run servlets on the root directory of localhost?
The paths in my servlet are relative. I didn't see any 404 entries in my logs. Is that a different debug level? If I try to access an image directly it still brings up my servlet. On Sat, 12 Jun 2004 17:02:39 -0700, Hassan Schroeder [EMAIL PROTECTED] wrote: Jarl Skogsholm wrote: What happens if you just enter: http://localhost:8080/ It runs my servlet except without images, .css, .js files. Sounds like the paths in your servlet are wrong; are they relative or absolute? What do the 404 entries in your logs say? -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin (1755) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I run servlets on the root directory of localhost?
Jarl Skogsholm wrote: The paths in my servlet are relative. I didn't see any 404 entries in my logs. Is that a different debug level? The standard Web logs from AccessLogValve -- if you haven't yet configured one, it'd probably be a good idea :-) But you can tell the effective URL of the image with `View Source` in your browser, as well. If I try to access an image directly it still brings up my servlet. If you enter the URL of an image within your webapp, it brings up your servlet? What's the servlet-mapping in web.xml?? -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I run servlets on the root directory of localhost?
Here is my log entry: 127.0.0.1 - - [12/Jun/2004:20:39:49 -0500] GET / HTTP/1.1 200 3567 127.0.0.1 - - [12/Jun/2004:20:39:49 -0500] GET /css/style.css HTTP/1.1 200 3567 127.0.0.1 - - [12/Jun/2004:20:39:49 -0500] GET /js/functions.js HTTP/1.1 200 3567 127.0.0.1 - - [12/Jun/2004:20:39:50 -0500] GET /images/button_showme.gif HTTP/1.1 200 3567 127.0.0.1 - - [12/Jun/2004:20:39:50 -0500] GET /images/bottom.gif HTTP/1.1 200 3567 web.xml mapping: servlet-mapping servlet-nameHome/servlet-name url-pattern//url-pattern /servlet-mapping On Sat, 12 Jun 2004 17:30:16 -0700, Hassan Schroeder [EMAIL PROTECTED] wrote: Jarl Skogsholm wrote: The paths in my servlet are relative. I didn't see any 404 entries in my logs. Is that a different debug level? The standard Web logs from AccessLogValve -- if you haven't yet configured one, it'd probably be a good idea :-) But you can tell the effective URL of the image with `View Source` in your browser, as well. If I try to access an image directly it still brings up my servlet. If you enter the URL of an image within your webapp, it brings up your servlet? What's the servlet-mapping in web.xml?? -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin (1755) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I run servlets on the root directory of localhost?
On Sat, Jun 12, 2004 at 08:11:57PM -0400, Jarl Skogsholm wrote: : The paths in my servlet are relative. Be careful with that -- the definition of relative within a servlet is sketchy, at best. I don't remember the specifics right now, but there's a way to get a context-relative path within the servlet. Use that to locate your images and other static content. If you're willing to convert the display logic to a JSP, there's a JSTL tag that'll do that, too. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I run servlets on the root directory of localhost?
Update to my original post: your problem likely lies in your servlet mapping: : servlet-mapping : servlet-nameHome/servlet-name : url-pattern//url-pattern : /servlet-mapping Mapping the servlet to / will pass *every* request through that servlet. Probably not what you want. That would explain why you keep getting HTTP status 200 (success) even though your static content doesn't load: the servlet is called, it returns its data, but it's not what the browser expects. The rest of the info my last post applies for long-term design, but changing your servlet mapping to a different path should get your app up and running right now. ;) -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Need directions on how to connect to an IP address
I have no knowledge of either Ant or Tomcat other than a partner told me that both were necessary to download a file from his IP address. This being said I have tried very hard to figure out how to use them to accomplish this. I seem to be able to start Tomcat up and shut it down (seemingly without ever using Ant), but the default port, 8080, causes a dns server error when I try to load http://localhost:8080/ . The documentation said this could be caused if I had something else running on that port. I don't know how to check if this is the case, nor see which ports I have available to reassign the default port to (which the documentation describes very well). Finally, if someday I get Tomcat running properly, I have no idea of how to connect to said IP address to download the file on my buddy's computer. It would seem to be the simplest of Tomcat tasks, but I can't find a description of how to do it on any of the web documentation. Could someone point me there? Thank you for your time, Reid
[Fwd: Tomcat5.0.25 and Java Mail not seem to work]
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 parameternamemail.smtp.host/namevaluemail.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 parameternamefactory/namevalueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter parameternameusername/namevalueour_user/value/parameter parameternamedriverClassName/namevalueoracle.jdbc.driver.OracleDriver/value/parameter parameternameurl/namevaluejdbc:oracle:thin:@192.168.0.6:1521:UTF8/value/parameter parameternamepassword/namevaluepassword/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
Re: Need directions on how to connect to an IP address
At 10:54 PM 6/12/2004 -0400, you wrote: I have no knowledge of either Ant or Tomcat other than a partner told me that both were necessary to download a file from his IP address. U. you need to download a file or you need to host a file for download by others? If the latter, you might need Tomcat (or some other web server), if the former, you need a browser. Just type in the URL (or IP address + path) and hit ENTER. Not to be too harsh, but if you don't understand this, you probably shouldn't be even thinking about using Tomcat or Ant, for that matter. Jake This being said I have tried very hard to figure out how to use them to accomplish this. I seem to be able to start Tomcat up and shut it down (seemingly without ever using Ant), but the default port, 8080, causes a dns server error when I try to load http://localhost:8080/ . The documentation said this could be caused if I had something else running on that port. I don't know how to check if this is the case, nor see which ports I have available to reassign the default port to (which the documentation describes very well). Finally, if someday I get Tomcat running properly, I have no idea of how to connect to said IP address to download the file on my buddy's computer. It would seem to be the simplest of Tomcat tasks, but I can't find a description of how to do it on any of the web documentation. Could someone point me there? Thank you for your time, Reid - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help: remote management for hello.war
i have a tomcat account at http://javac.eatj.com which tells me If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations! there are some links on the left, which i've mucked with: Administration Status Tomcat Administration Tomcat Manager Tomcat Managers shows the following info: Message:OK Manager List Applications HTML Manager Help Manager HelpServer Status Applications PathDisplay NameRunning SessionsCommands / Welcome to Tomcat true0Start Stop Reload Undeploy /admin Tomcat Administration Application true1Start Stop Reload Undeploy /balancer true0Start Stop Reload Undeploy /hello hello true0Start Stop Reload Undeploy /jsp-examples JSP 2.0 Examplestrue0Start Stop Reload Undeploy /managerTomcat Manager Application true0Start Stop Reload Undeploy /servlets-examples Servlet 2.4 Examplestrue0Start Stop Reload Undeploy /webdav Webdav Content Management true0Start Stop Reload Undeploy -/manager info sorry the above looks crummy, wordwrapping i suppose. in any event, how do make it so that going to http://javac.eatj.com displays not the default web page, but instead hello.war? thanks, [EMAIL PROTECTED] -- ___ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fwd: Tomcat5.0.25 and Java Mail not seem to work]
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 parameternamemail.smtp.host/namevaluemail.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 parameternamefactory/namevalueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter parameternameusername/namevalueour_user/value/parameter parameternamedriverClassName/namevalueoracle.jdbc.driver.OracleDriver/value/parameter parameternameurl/namevaluejdbc:oracle:thin:@192.168.0.6:1521:UTF8/value/parameter parameternamepassword/namevaluepassword/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 /
Re: [Fwd: Tomcat5.0.25 and Java Mail not seem to work]
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 parameternamemail.smtp.host/namevaluemail.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 parameternamefactory/namevalueorg.apache.commons.dbcp.BasicDataSourceFactory/value/parameter parameternameusername/namevalueour_user/value/parameter parameternamedriverClassName/namevalueoracle.jdbc.driver.OracleDriver/value/parameter parameternameurl/namevaluejdbc:oracle:thin:@192.168.0.6:1521:UTF8/value/parameter parameternamepassword/namevaluepassword/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