SV: JDBC connection - Please help
Hi! It sounds like the driver is not in your deployment. Either you put the driver in your WEB-INF directory of your application or in the tomcat-installdir/common/lib directory. Regards Roland Carlsson Den 05-02-21 08.31, skrev deepak suldhal [EMAIL PROTECTED]: When I write a simple java class to get the driver and connection it works fine. I am able to retrive row and print them. But I am not able to get the same on Tomcat server. Note: forwarded message attached. Do you Yahoo!? The all-new My Yahoo! http://my.yahoo.com What will yours do? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Increase in the connections, increases the percentage utilization of CPU
Hi All, I had a jsp application which actually deals with sending and receiving datapackets. when Ia accessing the application through a single browser ,the percentage utilization of CPU is around 23% the increase in the connections(through browsers) increasing the percentage utilization of CPU Can any one help me in knowing why it is happening? that is what causes the high resource usage? Thanks, Shyama Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments.
Sniffing loaclhost traffic for HHTP headers
Hi All, Just a 'silly question,' I downloaded a HTTP sniffing program because I want to get use to reading header information. I'm using Apache Tomcat, on a localhost configuration for development purposes. The sniffing program I downloaded from 'EffeTech,' in the FAQ section states, 'Due to the mechanism of Windows operating system, a sniffer can't capture local-to-local traffic.' Please note I found this out the hard way! The question I have is how do you do it? Thanks Marco Mastrocinque. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk CLOSE_WAIT state and 1 byte recv buffer
No one any clues on this issue? I've got about 3000 connections hanging around in CLOSE_WAIT now. Especially that 1 byte hanging in the receive buffer keeps me puzzled. Hi, i have the following problem with mod_jk from tomcat-connectors (1.2.5 - 1.2.8) including 1.2.9 (from cvs). Environment: apache is 2.0.52, forking model, server os is linux 2.6.10-1.760_FC3smp (fedora core 3), mod_jk 1.2.9 (others tested as well) After a while i get sockets stuck in CLOSE_WAIT state and netstat shows 1 byte in the receive queue for this socket. tcpdump shows, that the backend (jetty) half-closes the connection with FIN. That FIN is acked from the mod_jk machine but the connection is not closed (no FIN is send). sample netstat output: ... tcp1 0 192.168.100.1:51003 192.168.170.8:32511 CLOSE_WAIT tcp1 0 192.168.100.1:53875 192.168.170.8:12522 CLOSE_WAIT tcp1 0 192.168.100.1:53619 192.168.170.8:12521 CLOSE_WAIT ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sniffing loaclhost traffic for HHTP headers
From: Marco Mastrocinque [mailto:[EMAIL PROTECTED] 'Due to the mechanism of Windows operating system, a sniffer can't capture local-to-local traffic.' Please note I found this out the hard way! The question I have is how do you do it? You use another physical machine to send the requests, or you install and run a virtual Windows (or other) machine and run the sniffer and client on that, or you don't use Windows for your Tomcat server, or you use (and potentially modify) the RequestDumper valve on Tomcat. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sniffing loaclhost traffic for HHTP headers
If you only want to see the http headers, a tiny plugin for IE may help you: http://www.blunck.info/iehttpheaders.html On Mon, 21 Feb 2005 21:08:53 +1100, Marco Mastrocinque [EMAIL PROTECTED] wrote: Hi All, Just a 'silly question,' I downloaded a HTTP sniffing program because I want to get use to reading header information. I'm using Apache Tomcat, on a localhost configuration for development purposes. The sniffing program I downloaded from 'EffeTech,' in the FAQ section states, 'Due to the mechanism of Windows operating system, a sniffer can't capture local-to-local traffic.' Please note I found this out the hard way! The question I have is how do you do it? Thanks Marco Mastrocinque. - 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: mod_jk CLOSE_WAIT state and 1 byte recv buffer
Michael Stiller wrote: No one any clues on this issue? I've got about 3000 connections hanging around in CLOSE_WAIT now. Especially that 1 byte hanging in the receive buffer keeps me puzzled. Did you tried the latest CVS HEAD? It contains the hard close socket by disabling lingering. Further more try to set the socket_timeout for the worker. Also you did not mention what is the OS you are using. Is it suse 9 by any chance? Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk CLOSE_WAIT state and 1 byte recv buffer
On Mon, 2005-02-21 at 11:19 +0100, Mladen Turk wrote: Michael Stiller wrote: No one any clues on this issue? I've got about 3000 connections hanging around in CLOSE_WAIT now. Especially that 1 byte hanging in the receive buffer keeps me puzzled. Did you tried the latest CVS HEAD? I tried something i checked out from cvs last friday. The version is tomcat-connectors 1.2.9. The OS ist Fedora Core 3. It contains the hard close socket by disabling lingering. Where may i learn about the hard close patch. Maybe a pointer to the source file? Further more try to set the socket_timeout for the worker. You mean something like this: worker.proc2111.socket_timeout=10 worker.proc2111.recycle_timeout=2 worker.proc2111.cachesize=1 worker.proc2111.cache_timeout=2 Already tried it, no result so far. Cheers, -Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sniffing loaclhost traffic for HHTP headers
Depending on why you want to do this, you might find this useful: Valve className=org.apache.catalina.valves.RequestDumperValve / Its normally commented out in the server.xml, simply uncomment to dump out the requests. Cheers James -Original Message- From: Marco Mastrocinque [mailto:[EMAIL PROTECTED] Sent: 21 February 2005 10:09 To: tomcat-user@jakarta.apache.org Subject: Sniffing loaclhost traffic for HHTP headers Hi All, Just a 'silly question,' I downloaded a HTTP sniffing program because I want to get use to reading header information. I'm using Apache Tomcat, on a localhost configuration for development purposes. The sniffing program I downloaded from 'EffeTech,' in the FAQ section states, 'Due to the mechanism of Windows operating system, a sniffer can't capture local-to-local traffic.' Please note I found this out the hard way! The question I have is how do you do it? Thanks Marco Mastrocinque. - 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]
HTTP Status 403 (tomcat 5.0.28 JAASRealm)
When I login in my application with a usernamepassword valid I get a HTTP Status 403! I'm using Tomcat 5.0.28 and JAASRealm. I already looked into in my web.xml, and I think is alright. The valid username password: admin / admin Anyone knows what's the problem? Thanks.. web.xml: !-- login config -- security-constraint web-resource-collection web-resource-nameProtected Area/web-resource-name !-- Define the context-relative URL(s) to be protected -- url-pattern/web/layouts/*/url-pattern url-pattern/web/jsp/das/*/url-pattern !-- If you list http methods, only those methods are protected -- http-methodDELETE/http-method http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method /web-resource-collection auth-constraint !-- Anyone with one of the listed roles may access this area -- role-nameadmin/role-name /auth-constraint user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint !-- Default login configuration uses form-based authentication -- login-config auth-methodFORM/auth-method realm-nameJAASRealm/realm-name form-login-config form-login-page/security/login.jsp/form-login-page form-error-page/security/login.jsp?error=1/form-error-page /form-login-config /login-config !-- Security roles referenced by this web application -- security-role role-nameadmin/role-name /security-role - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk CLOSE_WAIT state and 1 byte recv buffer
Michael Stiller wrote: I tried something i checked out from cvs last friday. Use more recent :) The version is tomcat-connectors 1.2.9. The OS ist Fedora Core 3. Seems that I miss the OS. It contains the hard close socket by disabling lingering. Where may i learn about the hard close patch. Maybe a pointer to the source file? http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-connectors/jk/native/common/jk_connect.c?rev=1.44view=log You mean something like this: worker.proc2111.socket_timeout=10 worker.proc2111.recycle_timeout=2 worker.proc2111.cachesize=1 worker.proc2111.cache_timeout=2 First, two second recycle is far to small. It should be at least higher then socket_timeout. I mean, you have 10 second timeout and 2 second recycle !?. Second no need to cache_timeout on prefork, since you have only one cached worker (default), so you don't need cachesize too. Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Shutdown not working under SLES8 and FC2
I have had the same problem of Tomcat not terminating and having to be killed by hand. It occurred with Tomcat 5.0.27, JDK1.4.2, RH Enterprise Linux 3 when I enabled JMX via jk2 configuration. I tried 5.0.28 but the same happened using jk2, so I put JMX on a back burner. Now I'm using 5.5.7, JDK1.4.2_06 and the same thing happens - but again, only when mx.enabled is true. Uname -a gives: 2.4.21-4.ELsmp #1 SMP Fri Oct 3 17:52:56 EDT 2003 i686 i686 i386 GNU/Linux The problem seems to happen even with a clean distro - all it takes is for jk2.properties to be modified to start JMX support, with the MX jars in common/lib. Fortunately it happens every time on ./shutdown.sh so I hope someone can shed some light on it. I'd like to use JMX even without JDK1.5 - maybe using jsvc is a workaround. I don't want to force a process kill as normal procedure, in case some cleanup is skipped such as session persistence. Paul
Re: mod_jk CLOSE_WAIT state and 1 byte recv buffer
On Mon, 2005-02-21 at 11:39 +0100, Mladen Turk wrote: Michael Stiller wrote: I tried something i checked out from cvs last friday. Use more recent :) Ok, just running a fresh cvs tree. The problem is *still* there, but it seems that there are fewer sockets hanging around at the moment. First, two second recycle is far to small. It should be at least higher then socket_timeout. I mean, you have 10 second timeout and 2 second recycle !?. Second no need to cache_timeout on prefork, since you have only one cached worker (default), so you don't need cachesize too. Ok fixed that. Config is now: ... worker.proc2111.port=12111 worker.proc2111.lbfactor=1 worker.proc2111.local_worker=1 worker.proc2111.socket_timeout=5 worker.proc2111.recycle_timeout=10 ... Regards, -Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Authenticate JNDIrealm through Client
I wonder ive started a jndirealm and it works just fine against ldap. I have no problem to login from a webbrowser (BASIC mode). But i want to login from a Java client how do i do that ? _ Chat: Ha en fest på Habbo Hotel http://habbohotel.msn.se/habbo/sv/channelizer Checka in här! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk CLOSE_WAIT state and 1 byte recv buffer
Michael Stiller wrote: Ok, just running a fresh cvs tree. The problem is *still* there, but it seems that there are fewer sockets hanging around at the moment. Ok, we are getting somewhere :). Ok fixed that. Config is now: ... worker.proc2111.port=12111 worker.proc2111.lbfactor=1 worker.proc2111.local_worker=1 worker.proc2111.socket_timeout=5 worker.proc2111.recycle_timeout=10 Did you try to comment the recycle_timeout. Also what are you using for testing? ab or... Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk CLOSE_WAIT state and 1 byte recv buffer
Did you try to comment the recycle_timeout. ok will do. Also what are you using for testing? ab or... Eh hm it is in production now ;) So we use the clients for testing. 8) Part of a 10 machines cluster. Just checking without the recycle_timeout. Regards, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Name jdbc is not bound in this Context error
It seems you still have problem. You can google for the answer. One thing I know is GlobalNamingResources should come inside the Server element and not inside Context element. rgds Antony Paul On Fri, 18 Feb 2005 22:47:06 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: I could able to get thro' JarperException. Thanks for replies. Now facing new problem. I'm getting NameNotFoundException - Name jdbc is not bound in this Context Environment what i'm using is: Apache 2, Tomcat 5.5, Netscape 7.2, MsAccess 2003 on windows 2000 machine. I integrated tomcat and apache as apache doesn't support jsps. I wrote a JSP called test-db.jsp which in turn calls java program TestSQLLoad.java. This TestSQLLoad.java performs dattabase operation, fetches the data from table and that data is displayed on Netscape thro' jsp. 1. test-db.jsp resides ina directory TOMCAT_HOME/webapps/web/JSP. Contents are as follows: %@ page contentType=text/html import=testpkg.TestSQLLoad% html head titleDB Test/title /head body % TestSQLLoad tst = new TestSQLLoad(); tst.init(); % h2Results/h2 User - %= tst.getUser() %br/ Pwd - %= tst.getPassword() %br/ Id - %= tst.getID() % /body /html 2. TestSQLLoad.java is residing in following directory. TOMCAT_HOME/webapps/web/classes/testpkg direcotry. Contents of this file are as follows: package testpkg; import javax.naming.*; import javax.sql.*; import java.sql.*; public class TestSQLLoad { String user = Not Connected; String pwd = no pwd; int id = -1; public void init() { try{ Context ctx = new InitialContext(); if(ctx == null ) { throw new Exception(Boom - No Context); } Context envCtx = (Context) ctx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/db1); //DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/db1); if (ds != null) { Connection conn = ds.getConnection(); if(conn != null) { user = Got Connection +conn.toString(); Statement stmt = conn.createStatement(); String q = select name, password, id from user; ResultSet rst = stmt.executeQuery(q); if(rst.next()) { user=rst.getString(1); pwd=rst.getString(2); id = rst.getInt(3); } conn.close(); } } }catch(Exception e) { e.printStackTrace(); } } public String getUser() { return user; } public String getPassword() { return pwd; } public int getID() { return id; } } 3. I created a jar file using testpkg directory put it in TOMCAT_HOME/common/lib as well as TOMCAT_HOME/webapps/web/WEB-INF/lib directory. 4. I created MsAccess database called db1.mdb and put it in TOMCAT_HOME/WEBAPPS/WEB/db1 directory. I created a table called user with fields name, password and ID. ID is the primary key. 5. I included following in the server.xml of TOMCAT_HOME/conf directory. Context path=/db1 docBase=C:/tomcat/webapps/db1 debug=5 reloadable=true crossContext=true GlobalNamingResources Resource name=jdbc/db1 auth=Container type=javax.sql.DataSource factory=org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory driverClassName=sun.jdbc.odbc.JdbcOdbcDrive url=jdbc:odbc://localhost/db1 maxActive=20 maxIdle=10 maxWait=-1 / /GlobalNamingResources /Context 6. I included following in context.xml of TOMCAT_HOME/conf directory. ResourceLink global=jdbc/db1 name=jdbc/db1 type=javax.sql.DataSource/ 7. I included following in web.xml of TOMCAT_HOME/webapps/web/WEB-INF directory. resource-ref res-ref-namejdbc/db1/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref 8. I copied commons-collections-2.1.1.jar, commons-dbcp-1.2.1.jar and commons-pool-1.2.jar into TOMCAT_HOME/common/lib directory. 9. I started apache, tomcat and then opened a browser and typed http://localhost/web/JSP/test-db.jsp. 10. I get following on the browser. Results User - Not Connected Pwd - no pwd Id - -1 11. On the tomcat window where tomcat is running i'm getting following error. javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:769) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.naming.factory.ResourceLinkFactory.getObjectInstance(Resou rceLinkFactory.java:96) at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source) at
Re: mod_jk CLOSE_WAIT state and 1 byte recv buffer
Michael Stiller wrote: Also what are you using for testing? ab or... Eh hm it is in production now ;) So we use the clients for testing. 8) You are really brave :). Just checking without the recycle_timeout. What happens if you issue 'apachectl restart' ? Can you make 'JkLoglevel trace' and post me the clear log. I'm really interested :). Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SV: Authenticate JNDIrealm through Client
Hi! Without beeing to sure about this I guess that if you are going to authenticate a user via any kind of client against a tomcat-server you have to talk the language Tomcat talks, and that language is HTTP. So, you have to make your client able to talk http and then send the login-request as an http-request and then look at the http-response. Regards Roland Carlsson Den 05-02-21 12.20, skrev bohldan bohldan [EMAIL PROTECTED]: I wonder ive started a jndirealm and it works just fine against ldap. I have no problem to login from a webbrowser (BASIC mode). But i want to login from a Java client how do i do that ? _ Chat: Ha en fest på Habbo Hotel http://habbohotel.msn.se/habbo/sv/channelizer Checka in här! - 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]
LD_ASSUME_KERNEL with tanuki wrapper?
Hi, We're running: fedora tomcat 4.1.30 tanukisoftware.com wrapper # rpm -q fedora-release fedora-release-1-3 # uname -a Linux example.com 2.4.20-021stab022.5.777-enterprise #1 SMP Fri Sep 3 12:45:02 MSD 2004 i686 i686 i386 GNU/Linux We're seeing tomcat crash and occasionally hang (and refuse to let go of port 8080 without a kill -9). Everything I've found seems to point to this being a classic LD_ASSUME_KERNEL issue. The gotcha here is that I can't seem to find the right way to set the LD_ASSUME_KERNEL environment variable so that it will get through the service script. It seems that service is using /etc/init.d/tomcat4, which in turn is a link to /opt/tomcat4/bin/tomcat4. I've tried adding LD_ASSUME_KERNEL in there. I've also tried adding it in /opt/tomcat4/bin/setclasspath.sh. I've tried setting up a .bash_profile in /opt/tomcat4 (which is the home directory for the tomcat user). One caveat is that I may not be using the right technique to check on things. I've been assuming that if I do ps -fu tomcat and then cat /proc/pid/environ I should see LD_ASSUME_KERNEL show up in the environment variables for the tomcat process. Is this a valid test? -- Steven J. Owens [EMAIL PROTECTED] I'm going to make broad, sweeping generalizations and strong, declarative statements, because otherwise I'll be here all night and this document will be four times longer and much less fun to read. Take it all with a grain of salt. - http://darksleep.com/notablog - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Deploying / Update Web Applications without deploying JSP files
Dear sirs, I have to deploy a Tomcat app that has several thousands of JSP files (using Struts of course). The application will be run in Tomcat 5.0.28 under J2SDK 1.4.2_07. It's an application that will be deployed as a client application with a browser interface. The customer don't want me to release the JSP files due to security reasons. (In fact, the customer asked us if we could encrypt the .class files as well). I know that if I precompile the JSP files and change the web.xml file to include one tag servlet servlet-nameservlet-class/servlet for each JSP file I could do it, but I have a problem: the web.xml file became very, very large, and I can't update it each time I need to update the application (my team wrote an application updater that downloads only the changed class files, but the updater program can't do file editing). Is there any way to update a web application without having to update the web.xml file? Thank you for your attention. ___ Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed?
Shakeel, Thanks for the suggestion but we were already using DBCP 1.2.1. I downloaded it and tried it again, but get the same error. Any other ideas why the username would not be passed correctly when creating the datasource/pool? -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 10:43 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Wel we did the same to upgrade our product all went wel except for the connector. Then after some research I found that mysql-connector-java-3.1.6-bin.jar was the missing part. But your trace also shows that the PoolableConnectionFactory is not being created may be try commons-dbcp-1.2.1.jar if not already upgraded. Best Regards, S H A K E E L A H M A D http://members.fortunecity.com/javaclub/shakeel.htm Voice: 00923002723316 Senior Software Engineer. NorthStar Technologies. www.globalnorthstar.com EE(Computer Engineering), UET Lahore, Pakistan. SCJP,SCWCD SCBCD Sun Microsystems, Inc. Brain Bench Certified Java Programmer. -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 10:24 AM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Actually I tried MySQL Connector/J 3.0.15, and then updated to the latest 3.1.7. Each was placed in in $CATALINA_HOME/common/lib and tried - same result/error message. -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 10:22 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Have you changed the corresponding mysql connector jar file ? -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 7:53 AM To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resourcename=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=10 maxWait=1 defaultAutoCommit=true userName=ltojsw password=586579 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://192.168.11.3:3306/ltojsw?aut oReconnect=trueamp;autoCommit=true removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true / /Context ***- CATALINA ERROR MESSAGES: SNIP 19:37:27,642 INFO [http-8080-Processor25] DatasourceConnectionProvider:51 - Using datasource: java:comp/env/jdbc/stars 19:37:27,648 INFO [http-8080-Processor25] TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) AbandonedObjectPool is used ([EMAIL PROTECTED]) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 60 19:37:41,696 WARN [http-8080-Processor25] SettingsFactory:107 - Could not obtain connection metadata org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES)'. ** BEGIN NESTED EXCEPTION ** java.sql.SQLException MESSAGE: Access denied for user ''@'kingfishS11' (using password: YES) STACKTRACE: java.sql.SQLException: Access denied for user
RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed?
Try to hard code user name as the error shows '' as a user name. Also you can write a simple stand alone java program other than your web application to figure out exact problem. More things more problems. Less things quick findings, might help. By the way is your new MySQL communicating to you via any front end tool like SQL Yog or MySQL Front etc. Best Regards, S H A K E E L A H M A D http://members.fortunecity.com/javaclub/shakeel.htm Voice: 00923002723316 Senior Software Engineer. NorthStar Technologies. www.globalnorthstar.com EE(Computer Engineering), UET Lahore, Pakistan. SCJP,SCWCD SCBCD Sun Microsystems, Inc. Brain Bench Certified Java Programmer. -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 6:16 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Shakeel, Thanks for the suggestion but we were already using DBCP 1.2.1. I downloaded it and tried it again, but get the same error. Any other ideas why the username would not be passed correctly when creating the datasource/pool? -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 10:43 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Wel we did the same to upgrade our product all went wel except for the connector. Then after some research I found that mysql-connector-java-3.1.6-bin.jar was the missing part. But your trace also shows that the PoolableConnectionFactory is not being created may be try commons-dbcp-1.2.1.jar if not already upgraded. Best Regards, S H A K E E L A H M A D http://members.fortunecity.com/javaclub/shakeel.htm Voice: 00923002723316 Senior Software Engineer. NorthStar Technologies. www.globalnorthstar.com EE(Computer Engineering), UET Lahore, Pakistan. SCJP,SCWCD SCBCD Sun Microsystems, Inc. Brain Bench Certified Java Programmer. -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 10:24 AM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Actually I tried MySQL Connector/J 3.0.15, and then updated to the latest 3.1.7. Each was placed in in $CATALINA_HOME/common/lib and tried - same result/error message. -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 10:22 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Have you changed the corresponding mysql connector jar file ? -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 7:53 AM To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resourcename=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=10 maxWait=1 defaultAutoCommit=true userName=ltojsw password=586579 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://192.168.11.3:3306/ltojsw?aut oReconnect=trueamp;autoCommit=true removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true / /Context ***- CATALINA ERROR MESSAGES: SNIP 19:37:27,642 INFO [http-8080-Processor25] DatasourceConnectionProvider:51 - Using datasource:
RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed?
I am able to connect fine using the mysql client - either locally or remotely. It is just with the web application using the JDBC driver that it is not working. Yes, maybe I'm at the point of having to do a simple JDBC application to figure this out - though it seems silly given my application works in Tomcat 5.0.19, but not in Tomcat 5.5.7. Thanks - Richard -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 6:39 AM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Try to hard code user name as the error shows '' as a user name. Also you can write a simple stand alone java program other than your web application to figure out exact problem. More things more problems. Less things quick findings, might help. By the way is your new MySQL communicating to you via any front end tool like SQL Yog or MySQL Front etc. Best Regards, S H A K E E L A H M A D http://members.fortunecity.com/javaclub/shakeel.htm Voice: 00923002723316 Senior Software Engineer. NorthStar Technologies. www.globalnorthstar.com EE(Computer Engineering), UET Lahore, Pakistan. SCJP,SCWCD SCBCD Sun Microsystems, Inc. Brain Bench Certified Java Programmer. -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 6:16 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Shakeel, Thanks for the suggestion but we were already using DBCP 1.2.1. I downloaded it and tried it again, but get the same error. Any other ideas why the username would not be passed correctly when creating the datasource/pool? -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 10:43 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Wel we did the same to upgrade our product all went wel except for the connector. Then after some research I found that mysql-connector-java-3.1.6-bin.jar was the missing part. But your trace also shows that the PoolableConnectionFactory is not being created may be try commons-dbcp-1.2.1.jar if not already upgraded. Best Regards, S H A K E E L A H M A D http://members.fortunecity.com/javaclub/shakeel.htm Voice: 00923002723316 Senior Software Engineer. NorthStar Technologies. www.globalnorthstar.com EE(Computer Engineering), UET Lahore, Pakistan. SCJP,SCWCD SCBCD Sun Microsystems, Inc. Brain Bench Certified Java Programmer. -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 10:24 AM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Actually I tried MySQL Connector/J 3.0.15, and then updated to the latest 3.1.7. Each was placed in in $CATALINA_HOME/common/lib and tried - same result/error message. -Original Message- From: Shakeel Ahmad [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 10:22 PM To: Tomcat Users List Subject: RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? Have you changed the corresponding mysql connector jar file ? -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: 21 February, 2005 7:53 AM To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resourcename=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100
Class GtorActionServlet is not a Servlet
Hi, I am having a problem with Tomcat - I am running JBOSS 4.0.1 using Tomcat as the web container, and I am getting this odd Exception thrown, it says that my class (which definitely extends Servlet) is not a Servlet ?!?!? I see that a ClassCastException is the root cause. Anyone have any idea what may cause this? Any help appreciated. Thanks, Adrian Wilford (see stack trace below) 14:47:51,278 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=file:/usr/local/bin/jboss-4.0.0/server/default/tmp/deploy/tmp18955Gtor.ear-contents/Gtor-exp.war/ 14:47:51,811 INFO [Engine] StandardContext[]Marking servlet Gtor as unavailable 14:47:51,812 ERROR [Engine] StandardContext[]Servlet threw load() exception javax.servlet.ServletException: Class GtorActionServlet is not a Servlet at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:991) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503) at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642) at org.apache.catalina.core.StandardContext.init(StandardContext.java:5441) at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503) at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642) at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:336) at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:83) at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:370) at org.jboss.web.WebModule.startModule(WebModule.java:62) at org.jboss.web.WebModule.startService(WebModule.java:40) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:416) at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176) at $Proxy24.start(Unknown Source) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:362) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746) at
Re: Class GtorActionServlet is not a Servlet
Could you post the class itself? Perhaps it does _not_ implement servlet (most likely scenario). On Feb 21, 2005, at 9:41 AM, Adrian Wilford wrote: Hi, I am having a problem with Tomcat - I am running JBOSS 4.0.1 using Tomcat as the web container, and I am getting this odd Exception thrown, it says that my class (which definitely extends Servlet) is not a Servlet ?!?!? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Class GtorActionServlet is not a Servlet
Well you are correct, it does not directly extend HTTPServlet, it extends the Struts ActionServlet (which extends HttpServlet). This Servlet worked previously, until I tried to package the war inside an ear file and move the classes into a common jar file inside the ear. (I have added a web services interface in a separate war file). In the Manifest file of both the war files, I have specified the common jar file in the Class-Path property. Here is the class declaration: import java.io.File; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import org.apache.struts.action.ActionServlet; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.RollingFileAppender; public class GtorActionServlet extends ActionServlet{ Thanks, Adrian On Monday 21 February 2005 17:15, Michael Greer wrote: Could you post the class itself? Perhaps it does _not_ implement servlet (most likely scenario). On Feb 21, 2005, at 9:41 AM, Adrian Wilford wrote: Hi, I am having a problem with Tomcat - I am running JBOSS 4.0.1 using Tomcat as the web container, and I am getting this odd Exception thrown, it says that my class (which definitely extends Servlet) is not a Servlet ?!?!? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Adrian Wilford Email (Home): [EMAIL PROTECTED] Email (Work): [EMAIL PROTECTED] Work: +27 11 722 7498 Cell: +27 83 260 4034 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with using xerces 2.6.2 in embedded tomcat 5.5
I have class not found exception: Exception in thread AWT-EventQueue-0 javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:104) at org.apache.commons.modeler.util.DomUtil.readXml(DomUtil.java:284) at org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.execute(MbeansDescriptorsDOMSource.java:130) I did include the xerces libs in the class path: xercesImpl.jar xml-apis.jar xmlParserAPIs.jar resolver.jar Looking in the JRE/JDK lib/ext folder to see if the xerces are already there, and I didn't see anything. Could someone please let me know how to fix this? I searched the web, and there are some pages about this error, but I found no answer from these pages. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HttpServletInputStream is corrupting data?
Hi I don't think that this is a Tomcat problem per-se, but it involves Tomcat so I'm asking here in the hope that someone else has seen this before. An external program reads XML from a file on disk into a ByteArrayOutputStream to calculate the length of the data. The byte array is extracted from the stream and written to the OutputStream of a URLConnection object which is pointing to my servlet running under Tomcat 4.1.31. The servlet reads the XML from the HttpServletRequest InputStream and performs an XSLT transformation on it. If I point the URL to the normal port 80, the request is routed through Microsoft IIS server and passed to Tomcat. The input stream read by Tomcat is corrupt - parts of the file are missing. However, if I point the URL to Tomcat directly via port 8080 everything works fine. I've verified that the original disk file is valid, the byte array created by the external program is correct and contains correct data and that all the correct data is written to the URLConnection by the external program. Has anyone either seen something like this before or have any suggestions as to where to start looking. Regards Roger __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HttpServletInputStream is corrupting data?
I'd worry about character encoding if I were you. I bet someone is transcoding. -Original Message- From: Varley, Roger [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 11:00 AM To: Tomcat Users List (E-mail) Subject: HttpServletInputStream is corrupting data? Hi I don't think that this is a Tomcat problem per-se, but it involves Tomcat so I'm asking here in the hope that someone else has seen this before. An external program reads XML from a file on disk into a ByteArrayOutputStream to calculate the length of the data. The byte array is extracted from the stream and written to the OutputStream of a URLConnection object which is pointing to my servlet running under Tomcat 4.1.31. The servlet reads the XML from the HttpServletRequest InputStream and performs an XSLT transformation on it. If I point the URL to the normal port 80, the request is routed through Microsoft IIS server and passed to Tomcat. The input stream read by Tomcat is corrupt - parts of the file are missing. However, if I point the URL to Tomcat directly via port 8080 everything works fine. I've verified that the original disk file is valid, the byte array created by the external program is correct and contains correct data and that all the correct data is written to the URLConnection by the external program. Has anyone either seen something like this before or have any suggestions as to where to start looking. Regards Roger __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - 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: HttpServletInputStream is corrupting data?
I'd worry about character encoding if I were you. I bet someone is transcoding. I'd thought about that, but if it was an encoding issue, wouldn't I expect the same problem regardless of whether I routed the request through IIS first or sent it directly to Tomcat? The XML header specifies iso-8859-1 - I wouldn't have expected a problem in a UK locale with this. Regards Roger -Original Message- From: Varley, Roger [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 11:00 AM To: Tomcat Users List (E-mail) Subject: HttpServletInputStream is corrupting data? Hi I don't think that this is a Tomcat problem per-se, but it involves Tomcat so I'm asking here in the hope that someone else has seen this before. An external program reads XML from a file on disk into a ByteArrayOutputStream to calculate the length of the data. The byte array is extracted from the stream and written to the OutputStream of a URLConnection object which is pointing to my servlet running under Tomcat 4.1.31. The servlet reads the XML from the HttpServletRequest InputStream and performs an XSLT transformation on it. If I point the URL to the normal port 80, the request is routed through Microsoft IIS server and passed to Tomcat. The input stream read by Tomcat is corrupt - parts of the file are missing. However, if I point the URL to Tomcat directly via port 8080 everything works fine. I've verified that the original disk file is valid, the byte array created by the external program is correct and contains correct data and that all the correct data is written to the URLConnection by the external program. Has anyone either seen something like this before or have any suggestions as to where to start looking. Regards Roger __ __ __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ __ __ - 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] __ This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: moving all classes to shared
On Sat, Feb 19, 2005 at 06:38:03PM -0800, Oleg wrote: : If I have 200 users deployed on tomcat with 99% using identical : classes, would it be ok to move all classes to shared/classes : directory? Will that give better memory usage? Also, can I later add : the classes that are different directly to WEB-INF/classes and will : they be given priority? You've already received answers to the other points, so I'll address just the last question: it depends With hierarchical classloaders, you can get yourself into a right snit when 1/ there's version skew between the per-webapp class and the one in shared/lib; and 2/ when a class in shared/lib depends on a class that's in the per-webapp area (that is, it can't see a dependent class because it's out of the scope of the current classloader). IIRC, both result in NoClassDefFoundError, and both can be a mess to sort out if you don't know in advance where to start looking. -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: Sniffing loaclhost traffic for HHTP headers
Hi, I have been recommending the TCPMON tool from Apache Axis project, its an applet. This allows you to see the the request response between client and Tomcat. Also with nmap you can make a proxy and capture data flowing, I just cant find my note that has this tip at the moment. aka_sergio --- James Richardson [EMAIL PROTECTED] wrote: Depending on why you want to do this, you might find this useful: Valve className=org.apache.catalina.valves.RequestDumperValve / Its normally commented out in the server.xml, simply uncomment to dump out the requests. Cheers James -Original Message- From: Marco Mastrocinque [mailto:[EMAIL PROTECTED] Sent: 21 February 2005 10:09 To: tomcat-user@jakarta.apache.org Subject: Sniffing loaclhost traffic for HHTP headers Hi All, Just a 'silly question,' I downloaded a HTTP sniffing program because I want to get use to reading header information. I'm using Apache Tomcat, on a localhost configuration for development purposes. The sniffing program I downloaded from 'EffeTech,' in the FAQ section states, 'Due to the mechanism of Windows operating system, a sniffer can't capture local-to-local traffic.' Please note I found this out the hard way! The question I have is how do you do it? Thanks Marco Mastrocinque. - 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] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] getOutputStream() has already been called for this response - ignored content-disposition header
Hi Guys, I hope this not entirely off-topic. Just the other day I started getting a getOutputStream() has already been called for this response error when I was calling a servlet that sends back a CSV file (uses Content-Disposition also to cause a popup save prompt). This had been working for some time without problem on our test server and production server and the other day just the test box instance started prompting this error. I am aware what the error means and what causes it - I found that although I had set the content type and content disposition correctly, both those headers were being ignored, and by that time my servlet had called response.getOutputStream, but because the headers were not being respected somewhere, my servlet returned a JSP view that would also require calling response.getOutputStream. I fiddled for hours on this, and found that if I called flush on the output stream each time I wrote a CSV row, this caused the headers to be respected, my Save prompt appeared and all was well. I put it down to experience. But I have just found that an auto-PDF generating features is exhibiting the precise same problem, and this time I am using JasperReports - a 3rd party API for generating the PDF and all I am allowed to pass it is response.getOutputStream() direct into the streamToPDF function. Therefore I have to return to my original pondering over what could possibly cause all our streaming functions to start exhibiting this problem. And why would flush correct this even though I explicity set the content-disposition file header. Any thoughts very much appreciated. Allistair. java.lang.IllegalStateException: getOutputStream() has already been called for this response org.apache.catalina.connector.Response.getWriter(Response.java:596) org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:186) org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:124) org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:117) org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:172) org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:887) org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460) org.apache.jsp.views.core.layout.page.layout_jsp._jspx_meth_tiles_insert_0(org.apache.jsp.views.core.layout.page.layout_jsp:361) org.apache.jsp.views.core.layout.page.layout_jsp._jspService(org.apache.jsp.views.core.layout.page.layout_jsp:122) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056) org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261) org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:237) org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:300) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) com.qas.newmedia.common.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:65) FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Developers of QuickAddress Software a href=http://www.qas.com;www.qas.com/a Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple login-config for one webapp
You may only have one login-config per webapp. Mark Thiwanka Wimalasuriya wrote: dear all, the servlet spec 2.4 says (page 109 of servlet-2_4-fr-spec.pdf from http://www.jcp.org/aboutJava/communityprocess/final/jsr154/ ) However, the deployment descriptor instance file must not contain multiple elements of session-config, jsp-config, and login-config. so does it mean that you cant have two login-config elements in one web.xml. kind regards -thiwanka - Original Message - From: Thiwanka Wimalasuriya [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Monday, February 21, 2005 9:31 AM Subject: multiple login-config for one webapp dear all, is it possible to have two login-config elements in one web.xml (tomcat 4.1) what's i need to do is use form based authentication for a webapp exept for one specific URL (http://localhost:8080/smsdeo/system/Autopush.do?survey=testSMSSurveyphoneN umber=777425205) for which i need to use basic authenntication. is there a way to use two authentication methods for one webapp ? kind regards -thiwanka - 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: moving all classes to shared
Well regarding #1 from what I understand the class in webapp web-inf will take priority, however, I can see how #2 can be a problem, but, does it only work one way? Meaning a class in sared/classes will not see webapp/web-inf/classes, so down the hierarchy, however, it will work just fine going up, so class in webapp will see classes in shared? Thank you Oleg On Mon, 21 Feb 2005 10:54:45 -0600, QM [EMAIL PROTECTED] wrote: On Sat, Feb 19, 2005 at 06:38:03PM -0800, Oleg wrote: : If I have 200 users deployed on tomcat with 99% using identical : classes, would it be ok to move all classes to shared/classes : directory? Will that give better memory usage? Also, can I later add : the classes that are different directly to WEB-INF/classes and will : they be given priority? You've already received answers to the other points, so I'll address just the last question: it depends With hierarchical classloaders, you can get yourself into a right snit when 1/ there's version skew between the per-webapp class and the one in shared/lib; and 2/ when a class in shared/lib depends on a class that's in the per-webapp area (that is, it can't see a dependent class because it's out of the scope of the current classloader). IIRC, both result in NoClassDefFoundError, and both can be a mess to sort out if you don't know in advance where to start looking. -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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Facing problems in tomcat configuration - on XP Professional
Hi all, I am new to this mailing list. for the past one week i was trying to run tomcat on my XP Professional OS but in vein. I downloaded the latest JDK and downloaded tomcat 4.1 version and has set the CATALINA_HOME and JAVA_HOME respectively. when I start the server its getting started properly but, when i try to access 8080 port I am getting page can not be displayed. I did the same installation on XP Home and its working fine. Is there some problem ? Has any one has configured tomcat on XP Professional.. If so, kindly reply back to this stating the solution. That will be very helpful. Thanks in advance, Raghavendra Datt __ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Facing problems in tomcat configuration - on XP Professional
From: raghavendra datt [mailto:[EMAIL PROTECTED] I am new to this mailing list. for the past one week i was trying to run tomcat on my XP Professional OS but in vein. I downloaded the latest JDK and downloaded tomcat 4.1 version and has set the CATALINA_HOME and JAVA_HOME respectively. when I start the server its getting started properly but, when i try to access 8080 port I am getting page can not be displayed. I did the same installation on XP Home and its working fine. Is there some problem ? Has any one has configured tomcat on XP Professional.. If so, kindly reply back to this stating the solution. That will be very helpful. Are both machines on XP Service Pack 2? Does the Pro machine have the XP firewall enabled, but the home one not? The XP firewall could easily prevent access on port 8080 and not tell you. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Facing problems in tomcat configuration - on XP Professional
Yeah.. both machines are on service pack 2.. and I dont see any firewall in XP Pro machine. Can you please tell me how to figure out whether firewall is running or not? Do you think changing port would solve the problem.. Thanks for the instant reply, Raghavendra --- Peter Crowther [EMAIL PROTECTED] wrote: From: raghavendra datt [mailto:[EMAIL PROTECTED] I am new to this mailing list. for the past one week i was trying to run tomcat on my XP Professional OS but in vein. I downloaded the latest JDK and downloaded tomcat 4.1 version and has set the CATALINA_HOME and JAVA_HOME respectively. when I start the server its getting started properly but, when i try to access 8080 port I am getting page can not be displayed. I did the same installation on XP Home and its working fine. Is there some problem ? Has any one has configured tomcat on XP Professional.. If so, kindly reply back to this stating the solution. That will be very helpful. Are both machines on XP Service Pack 2? Does the Pro machine have the XP firewall enabled, but the home one not? The XP firewall could easily prevent access on port 8080 and not tell you. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jk vs. jk2
If jk2 is abandoned, why would I use it over jk_1.2.8? Platform reasons? Feature reasons? Performance reaosns? Other? Anyone? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Facing problems in tomcat configuration - on XP Professional
There is a Windows Firewall (Control Panel, Windows Firewall) which is probably preventing hackers from attacking strange ports like 8080. -Original Message- From: raghavendra datt [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 1:30 PM To: Tomcat Users List; Oleg Subject: Facing problems in tomcat configuration - on XP Professional Hi all, I am new to this mailing list. for the past one week i was trying to run tomcat on my XP Professional OS but in vein. I downloaded the latest JDK and downloaded tomcat 4.1 version and has set the CATALINA_HOME and JAVA_HOME respectively. when I start the server its getting started properly but, when i try to access 8080 port I am getting page can not be displayed. I did the same installation on XP Home and its working fine. Is there some problem ? Has any one has configured tomcat on XP Professional.. If so, kindly reply back to this stating the solution. That will be very helpful. Thanks in advance, Raghavendra Datt __ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com - 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: Facing problems in tomcat configuration - on XP Professional
raghavendra datt wrote: Can you please tell me how to figure out whether firewall is running or not? To check whether that port is being blocked: C:\telnet localhost 8080 You'll see either tomcat responding or something (firewall, or ...) preventing access :-) HTH! -- 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: moving all classes to shared
On Mon, Feb 21, 2005 at 11:21:01AM -0800, Oleg wrote: : Well regarding #1 from what I understand the class in webapp web-inf : will take priority, however, I can see how #2 can be a problem, but, : does it only work one way? Meaning a class in sared/classes will not : see webapp/web-inf/classes, so down the hierarchy, however, it will : work just fine going up, so class in webapp will see classes in : shared? Correct -- the per-webapp classloader is the child of the shared/lib classloader. (This is an oversimplification but please bear with me.) Really, there are more than two classloaders involved, forming several parent/child relationships in a hierarchy... Try to think of it as the GoF Chain of Responsiblity pattern: when the per-webapp classloader can't find a class, it delegates (passes the request) to its parent. This keeps going until you hit a classloader that can successfully load the class, or until the innermost classloader -- which doesn't delegate to anyone else -- gives up and says there's no such class. Going the other way thus isn't possible: that innermost (parent) classloader can't see what its children see, and so on. If a class under shared/lib needs access to (depends on) a class in a child classloader, it will never find it, and the system throws a NoClassDefFoundError. It's for a similar reason one webapp can't see another webapp's classes: they only have a relationship with their parent classloader, and not that of their siblings. -QM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk vs. jk2
On Mon, Feb 21, 2005 at 02:57:48PM -0500, Matt wrote: : If jk2 is abandoned, why would I use it over jk_1.2.8? : Platform reasons? Feature reasons? Performance reaosns? Other? : Anyone? Depends on how you define use -- continue using an existing JK2 install -- either because you're in the process of migrating off JK2 but haven't finished; or because you feel you have the in-house expertise to tweak and support JK2 yourself long-term. use JK2 on a new project -- no real reason, unless (again) you feel you have the in-house expertise to tweak and support JK2 yourself long-term. I recall JK2 had some features over JK(1), but those have already been backported or developers are in the process of doing so. -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: jk vs. jk2
Thanks! This is a new install, so that sums it up. I'll stick with jk_1.2.8 for Tomcat 5.5. Of course, the only hurdle now is an explicit example of exactly how to ADD a docbase (say, C:\MYwebapps\MYexamples\) that Tomcat will see and not 404 or blank page, while still having $CATALINA_HOME/webapps working. Any ideas? I've tried all sorts of CONTEXT tags to no avail. What files need to be edited (uriworkermap.properties server.xml ?) and how (relative to docbase CONTEXT ?)? Thanks! -Matt On Mon, 21 Feb 2005, QM wrote: On Mon, Feb 21, 2005 at 02:57:48PM -0500, Matt wrote: : If jk2 is abandoned, why would I use it over jk_1.2.8? : Platform reasons? Feature reasons? Performance reaosns? Other? : Anyone? Depends on how you define use -- continue using an existing JK2 install -- either because you're in the process of migrating off JK2 but haven't finished; or because you feel you have the in-house expertise to tweak and support JK2 yourself long-term. use JK2 on a new project -- no real reason, unless (again) you feel you have the in-house expertise to tweak and support JK2 yourself long-term. I recall JK2 had some features over JK(1), but those have already been backported or developers are in the process of doing so. -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] Matthew Kozak Rutgers University-Camden [EMAIL PROTECTED] ** They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -Ben Franklin ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Class GtorActionServlet is not a Servlet
I would manually declare that class to be implementing the Servlet interface. Can't hurt (can it?) if it already does so by its ancestry. At least it is quick to add and test. On Feb 21, 2005, at 10:28 AM, Adrian Wilford wrote: HTTPServlet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Facing problems in tomcat configuration - on XP Professional
Start, Control Panel, Windows Firewall (That's assuming that you've got it set up to show you the viruses (file extensions, system files, system and hidden files, etc) and to not show stuff as web-enabled whatever. SP2 will almost certainly have set up and enabled a firewall. There may be something like Switch to classic view that shows everything not just a selected few. Good Luck! -Original Message- From: raghavendra datt [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 1:44 PM To: Tomcat Users List Subject: RE: Facing problems in tomcat configuration - on XP Professional Yeah.. both machines are on service pack 2.. and I dont see any firewall in XP Pro machine. Can you please tell me how to figure out whether firewall is running or not? Do you think changing port would solve the problem.. Thanks for the instant reply, Raghavendra --- Peter Crowther [EMAIL PROTECTED] wrote: From: raghavendra datt [mailto:[EMAIL PROTECTED] I am new to this mailing list. for the past one week i was trying to run tomcat on my XP Professional OS but in vein. I downloaded the latest JDK and downloaded tomcat 4.1 version and has set the CATALINA_HOME and JAVA_HOME respectively. when I start the server its getting started properly but, when i try to access 8080 port I am getting page can not be displayed. I did the same installation on XP Home and its working fine. Is there some problem ? Has any one has configured tomcat on XP Professional.. If so, kindly reply back to this stating the solution. That will be very helpful. Are both machines on XP Service Pack 2? Does the Pro machine have the XP firewall enabled, but the home one not? The XP firewall could easily prevent access on port 8080 and not tell you. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - 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: jk vs. jk2
Matt wrote: If jk2 is abandoned, why would I use it over jk_1.2.8? Platform reasons? Feature reasons? Performance reaosns? Other? Anyone? Well, for one, it works and I have a ready to run config files. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
log4j.properties not found in tomcat
I have a wierd problem. Tomcat on W2k barks FileNotFound Exceptions for the log4j.properties file when i execute a servlet that instantiates log4j. Strangely enough the actual file that i create and log to with log4j.properties file logs out just fine even though stdout.log said that it couldn't find my log4j.properties file. Only time i don't get an error is when i put log4j.properites in my winnt/system32 directory. But this doesnt make sense to me. I supply -Dlog4j.configuration=log4j.properties to Java at startup and still get the same error. I also tried the FULL path to my log4j.properties in the -D option. Instantiated like this across my app. private static final Logger zLogger = Logger.getLogger(MyClassName.class); Can anyone tell me where I went wrong. thanks
Re: jk vs. jk2
So does jk_1.2.8, so, for new installs, why would I use it? The overwhelming answers that I've gotten offline have been don't bother, so that seems to be the best answer. Thanks, -Matt On Mon, 21 Feb 2005, Nikola Milutinovic wrote: Matt wrote: If jk2 is abandoned, why would I use it over jk_1.2.8? Platform reasons? Feature reasons? Performance reaosns? Other? Anyone? Well, for one, it works and I have a ready to run config files. Nix. [snip] Matthew Kozak Rutgers University-Camden [EMAIL PROTECTED] ** They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -Ben Franklin ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sniffing loaclhost traffic for HHTP headers
You should be able to telnet to the Tomcat server and send it a request. The response including headers will be visible in your telnet session. Subir -Original Message- From: Marco Mastrocinque [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 2:09 AM To: tomcat-user@jakarta.apache.org Subject: Sniffing loaclhost traffic for HHTP headers Hi All, Just a 'silly question,' I downloaded a HTTP sniffing program because I want to get use to reading header information. I'm using Apache Tomcat, on a localhost configuration for development purposes. The sniffing program I downloaded from 'EffeTech,' in the FAQ section states, 'Due to the mechanism of Windows operating system, a sniffer can't capture local-to-local traffic.' Please note I found this out the hard way! The question I have is how do you do it? Thanks Marco Mastrocinque. - 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: Cluster and Connection Pooling problem
Define the connection pool in either META-INF/context.xml (if using a WAR) or ${catalina_home}/conf/engine/host/app.xml And the link by the usual resource ref in the web.xml Remember that the JDBC drivers need to be in common/lib PJ Sumpter, Chuck wrote: Environment = Tomcat 5.5.7, Java 1.5_01, IIS (win2k) using the isapi redirector. Problem: Using the scenario outlined by Graham King (http://www.javaworld.com/javaworld/jw-12-2004/jw-1220-tomcat.html ), a simple cluster is easily configured. However, when attempting to deploy our application, I run into a wall attempting to get things in the proper order regarding the connection pooling needed by the application. The application's error log indicates that the connection pooling parms are not really being read in the server.xml. What is the conflict? Anyone else encountered this? I hesitate to supply xml in this forum if someone else has encountered this problem TIA Chuck - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? New approach
Sorry to repost - but, except for some great suggestions from Shakeel, I have not made much progress on this. To my way of thinking this seems maddenly simple - either a config error or possibly bug. But what? So my first place to start is to try and see where it is that the userName property get mangled or swallowed. I've double checkd and it is correctly specified in my context.xml But by the time the failure occurs, it is a null or empty string. So, how can I enable logging on my DBCP datasource so that I can see where the connection userName property gets trashed? I've tried putting org.apache.commons.dbcp in my log4j.properties, but do not seem to get any additional output. Once I can see if things are passed correctly here, I'll look at the MySQL Connector/J logging (although it is not obvious how to do this). Any suggestions? Thanks - Richard -Original Message- From: Richard Mixon (qwest) [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 7:53 PM To: tomcat-user@jakarta.apache.org Subject: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resourcename=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=10 maxWait=1 defaultAutoCommit=true userName=ltojsw password=586579 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://192.168.11.3:3306/ltojsw?aut oReconnect=trueamp;autoCommit=true removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true / /Context ***- CATALINA ERROR MESSAGES: SNIP 19:37:27,642 INFO [http-8080-Processor25] DatasourceConnectionProvider:51 - Using datasource: java:comp/env/jdbc/stars 19:37:27,648 INFO [http-8080-Processor25] TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) AbandonedObjectPool is used ([EMAIL PROTECTED]) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 60 19:37:41,696 WARN [http-8080-Processor25] SettingsFactory:107 - Could not obtain connection metadata org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES)'. ** BEGIN NESTED EXCEPTION ** java.sql.SQLException MESSAGE: Access denied for user ''@'kingfishS11' (using password: YES) STACKTRACE: java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES) SNIP - 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]
Tomcat: who is knocking on my door?
First, I'm sure this is documented so can anyone point me to the documentation on how to determine the client application. Second, does Tomcat itself do anything different depending on who's making the request. I sometimes notice that IE's requests are fielded faster than wget's requests. Finally, is there a blanket way to prevent wget requests? Many thanks in advacne! Dola __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: moving all classes to shared
Hmm, quick question, do you know of a reason why this ould not work for Struts, I did it and for some reason I get an error org.apache.struts.action.RequestProcessor - ERROR - No action instance for path /selectTiles could be created this class was moved to shared. Thansk, Oleg On Mon, 21 Feb 2005 14:39:52 -0600, QM [EMAIL PROTECTED] wrote: On Mon, Feb 21, 2005 at 11:21:01AM -0800, Oleg wrote: : Well regarding #1 from what I understand the class in webapp web-inf : will take priority, however, I can see how #2 can be a problem, but, : does it only work one way? Meaning a class in sared/classes will not : see webapp/web-inf/classes, so down the hierarchy, however, it will : work just fine going up, so class in webapp will see classes in : shared? Correct -- the per-webapp classloader is the child of the shared/lib classloader. (This is an oversimplification but please bear with me.) Really, there are more than two classloaders involved, forming several parent/child relationships in a hierarchy... Try to think of it as the GoF Chain of Responsiblity pattern: when the per-webapp classloader can't find a class, it delegates (passes the request) to its parent. This keeps going until you hit a classloader that can successfully load the class, or until the innermost classloader -- which doesn't delegate to anyone else -- gives up and says there's no such class. Going the other way thus isn't possible: that innermost (parent) classloader can't see what its children see, and so on. If a class under shared/lib needs access to (depends on) a class in a child classloader, it will never find it, and the system throws a NoClassDefFoundError. It's for a similar reason one webapp can't see another webapp's classes: they only have a relationship with their parent classloader, and not that of their siblings. -QM - 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: Tomcat: who is knocking on my door?
Front it with apache and restrict access by user agent. -Michael Greer On Feb 21, 2005, at 5:55 PM, Dola Woolfe wrote: First, I'm sure this is documented so can anyone point me to the documentation on how to determine the client application. Second, does Tomcat itself do anything different depending on who's making the request. I sometimes notice that IE's requests are fielded faster than wget's requests. Finally, is there a blanket way to prevent wget requests? Many thanks in advacne! Dola __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - 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]
[SECURITY ISSUE] Using allowLinking with deprecated HTTP 1.1 connector
All, A security issue has come to light where a mal-formed request may result in JSP source code disclosure. This issue only applies if all of the following are true: 1. You are using any Tomcat 4 version = 4.1.15 2. You are using the deprecated HTTP 1.1 connector (org.apache.catalina.connector.http.HttpConnector) 3. You have configured 1 or more contexts served by the connector with a resources element that uses the allowLinking parameter and this parameter is set to true. The fix is to use the Coyote HTTP connector (org.apache.coyote.tomcat4.CoyoteConnector). The on-line Tomcat 4 docs have been updated to include a warning about this configuration combination. The next Tomcat 4 release will include the updated documentation. If you are using Tomcat 4 with the standard Coyote HTTP connector this issue does not apply. Tomcat 5.0.x and 5.5.x are unaffected by this issue. Thanks are due to Glenn Choat who reported this issue to the Tomcat team last week. As a reminder, if you have a verified security bug to report please do not post it to email lists or submit a bug report. Security bugs should be reported privately by email to [EMAIL PROTECTED] Regards, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat: who is knocking on my door?
On Mon, Feb 21, 2005 at 02:55:53PM -0800, Dola Woolfe wrote: : First, I'm sure this is documented so can anyone point : me to the documentation on how to determine the client : application. Check for the User-Agent header. (I may have made a typo on the name, but if you iterate through the headers you'll see it right away) : Second, does Tomcat itself do anything different : depending on who's making the request. I sometimes : notice that IE's requests are fielded faster than : wget's requests. It shouldn't -- perhaps there's something different about how wget makes its requests? : Finally, is there a blanket way to prevent wget : requests? Yes and no: yes - use a Servlet Filter that refuses requests based on the User-Agent header. yes - employ user authentication. If the offending clients are coming from off-site, adjust your network topology such that the app in question is only available from the inside (proactive), or block the offending IPs using a firewall (reactive). no - if the user changes the User-Agent header from wget. IIRC wget has a switch for this; and if not, the source is wide-open. Note that user auth/firewall/etc are the solid solutions. There are myriad non-browser clients out there besides wget, and you'll have a devil of a time fending the all off. -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: moving all classes to shared
From: Oleg [EMAIL PROTECTED] Hmm, quick question, do you know of a reason why this ould not work for Struts, I did it and for some reason I get an error org.apache.struts.action.RequestProcessor - ERROR - No action instance for path /selectTiles could be created this class was moved to shared. You can't share the Struts libraries across multiple webapps. (Well, you can, but it probably won't work, and it's not a supported configuration-- the developers specifically warn against it.) Scroll down to section 5.5: http://struts.apache.org/userGuide/configuration.html -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
?? Yet Another Tomcat Documentation Bug ??
If you go here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html#Automatic%20Application%20Deployment The first bullet point starts out: Any XML file in the $CATALINA_HOME/conf/[engine_name]/[host_name] directory is assumed... I believe this should say, Any XML file in the $CATALINA_BASE/conf/[engine_name]/[host_name] directory is assumed... Is that right? It's another typo, right? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.7 cannot connect to mysql datasource - what changed? New approach [SOLVED]
OK, yes it turned out to be one of those dumb configuration errors - BUT also a difference in how Tomcat 5.5.7 (or maybe is is Commons DBCP 1.2.1) behaves under Windows versus Linux. I had camelcased the username property in the context.xml Resource tag as userName. This worked under Windows, but NOT for Linux. Anyway, all seems to be working great now that I used just plain username. Thanks for the earlier help and suggestions. - Richard Richard Mixon (qwest) wrote: We have been using Sun Java 1.4.2, Tomcat 5.0.19, MySQL 4.1.7, MySQL Connector/J 3.0.15 with Hibernate 2.1.7c with no problems. This is on both Windows XP Pro SP2 (development) and SuSE Linux SLES9 (test and production). In order to get failover to work the way we wanted we upgraded to Tomcat 5.5.7 and Sun Java 1.5. The main change in our application was the new format for data soruces in the application context. No problem on Windows XP. We've tried to install on one of our Linux servers and are having no end of grief getting a DB connection to properly happen. Any help or ideas would be much appreciated. I've included the application context and the catalina log error messages below. Thanks in advance - Richard ***- APPLICATION CONTEXT: Context path=/stars docBase=stars debug=99 reloadable=true privileged=true antiResourceLocking=false antiJARLocking=true Logger className=org.apache.catalina.logger.FileLogger prefix=stars. suffix=.log timestamp=true/ Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://192.168.11.3:3306/ltojsw?autoReconnec t=trueamp;autoCommit=true connectionName=ltojsw connectionPassword=586579 userTable=PoAssociate userNameCol=userid userCredCol=password userRoleTable=PoUserRole roleNameCol=roleName / Resource name=jdbc/stars type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=10 maxWait=1 defaultAutoCommit=true userName=ltojsw password=586579 driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://192.168.11.3:3306/ltojsw?aut oReconnect=trueamp;autoCommit=true removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true / /Context ***- CATALINA ERROR MESSAGES: SNIP 19:37:27,642 INFO [http-8080-Processor25] DatasourceConnectionProvider:51 - Using datasource: java:comp/env/jdbc/stars 19:37:27,648 INFO [http-8080-Processor25] TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) AbandonedObjectPool is used ([EMAIL PROTECTED]) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 60 19:37:41,696 WARN [http-8080-Processor25] SettingsFactory:107 - Could not obtain connection metadata org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES)'. ** BEGIN NESTED EXCEPTION ** java.sql.SQLException MESSAGE: Access denied for user ''@'kingfishS11' (using password: YES) STACKTRACE: java.sql.SQLException: Access denied for user ''@'kingfishS11' (using password: YES) SNIP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Richard Mixon (qwest) wrote: Sorry to repost - but, except for some great suggestions from Shakeel, I have not made much progress on this. To my way of thinking this seems maddenly simple - either a config error or possibly bug. But what? So my first place to start is to try and see where it is that the userName property get mangled or swallowed. I've double checkd and it is correctly specified in my context.xml But by the time the failure occurs, it is a null or empty string. So, how can I enable logging on my DBCP datasource so that I can see where the connection userName property gets trashed? I've tried putting org.apache.commons.dbcp in my log4j.properties, but do not seem to get any additional output. Once I can see if things are passed correctly here, I'll look at the MySQL Connector/J logging (although it is not obvious how to do this). Any suggestions? Thanks - Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fwd: JDBC connection - Please help
Deepak, This '' and null error means that the Tomcat is not finding the JDBC JNDI resource. This is how to fix this on Tomcat 5.5: Make sure that you have a Resource element properly configured in your context.xml that is in $CATALINA_HOME/conf/ directory. Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=someuser password=somepassword driverClassName=your driver url=proper url for your db's jdbc conventions/ /Context Make sure it is available to your web app, by setting the references in your web.xml. resource-ref descriptionDB Connection/description res-ref-namejdbc/TestDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Thank you, Edmon http://blogs.ittoolbox.com/eai/software deepak suldhal wrote: When I write a simple java class to get the driver and connection it works fine. I am able to retrive row and print them. But I am not able to get the same on Tomcat server. Note: forwarded message attached. Do you Yahoo!? The all-new My Yahoo! http://my.yahoo.com What will yours do? Subject: JDBC connection - Please help From: deepak suldhal [EMAIL PROTECTED] Date: Sun, 20 Feb 2005 22:22:48 -0800 (PST) To: tomcat users tomcat-user@jakarta.apache.org To: tomcat users tomcat-user@jakarta.apache.org Please help me make my first JDBC connection My web.xml web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 descriptionMySQL Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/TestDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app --- In server.xml I have the following context ( trying to connect to Sybase database) Context path=/DBTest docBase=DBTest debug=5 reloadable=true crossContext=true Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=javauser password=javadude driverClassName=com.sybase.jdbc2.jdbc.SybDriver url=jdbc:sybase:Tds:re2unx188:2025/ /Context --- I have copied the JDCB drive Jar under commons/lib I have a test.jsp as follows --- %@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql % %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % sql:query var=rs dataSource=jdbc/TestDB select id, foo, bar from testdata /sql:query html head titleDB Test/title /head body h2Results/h2 c:forEach var=row items=${rs.rows} Foo ${row.foo}br/ Bar ${row.bar}br/ /c:forEach /body /html --- My directory structue is as follows webapps/DBTest/WEB-INF/web.mxl /DBTest/test.jsp --- And when I try the url http://localhost:8080/DBTest/test.jsp I am getting the following errors description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) org.apache.jsp.test_jsp._jspService(test_jsp.java:82) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unknown Source)
?? Does META-INF/context.xml Work ??
All, I'm using TC 5.0.30. I'm looking at this quote regarding META-INF/context.xml from the TC docs (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html): Instead, put them in the META-INF/context.xml directory of your WAR file or the conf directory as described above. These instruction, by my interpretation, are saying we can arrange a web application's directory structure like this: ROOT/ | | + WEB-INF/ + META-INF/ | | + context.xml Context.xml would then contain the Context element. Has anyone gotten this to work? When I arrange my directory structure as shown above it seems the Context.xml file is simply ignored. I'm not using a WAR file, this is just the directory structure. I hope someone can try this -- arrange your directory structure as shown above and make sure your context.xml is being processed. Mine is not. If I put the context.xml in $CATALINA_BASE/conf/[enginename]/[hostname]/, however, it is picked up just fine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ?? Does META-INF/context.xml Work ??
the META-INF is only valid within a WAR file. PJ Tony LaPaso wrote: All, I'm using TC 5.0.30. I'm looking at this quote regarding META-INF/context.xml from the TC docs (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html): Instead, put them in the META-INF/context.xml directory of your WAR file or the conf directory as described above. These instruction, by my interpretation, are saying we can arrange a web application's directory structure like this: ROOT/ | | + WEB-INF/ + META-INF/ | | + context.xml Context.xml would then contain the Context element. Has anyone gotten this to work? When I arrange my directory structure as shown above it seems the Context.xml file is simply ignored. I'm not using a WAR file, this is just the directory structure. I hope someone can try this -- arrange your directory structure as shown above and make sure your context.xml is being processed. Mine is not. If I put the context.xml in $CATALINA_BASE/conf/[enginename]/[hostname]/, however, it is picked up just fine. - 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: Facing problems in tomcat configuration - on XP Professional
I verified. No fire wall is enabled in my machine. also I tried changing port to something else (8789) and still am getting the page can not be diplayed error. I dont understand what is preventing from accessing port. i tried giving telnet localhost 8789 and its not connecting to it.. what else can be the reason for not hitting the port? How to know whether the server is running properly or not? because, when i start tomcat it looks fine and open in another window.. but, can not access it. :( --- [EMAIL PROTECTED] wrote: Start, Control Panel, Windows Firewall (That's assuming that you've got it set up to show you the viruses (file extensions, system files, system and hidden files, etc) and to not show stuff as web-enabled whatever. SP2 will almost certainly have set up and enabled a firewall. There may be something like Switch to classic view that shows everything not just a selected few. Good Luck! -Original Message- From: raghavendra datt [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 1:44 PM To: Tomcat Users List Subject: RE: Facing problems in tomcat configuration - on XP Professional Yeah.. both machines are on service pack 2.. and I dont see any firewall in XP Pro machine. Can you please tell me how to figure out whether firewall is running or not? Do you think changing port would solve the problem.. Thanks for the instant reply, Raghavendra --- Peter Crowther [EMAIL PROTECTED] wrote: From: raghavendra datt [mailto:[EMAIL PROTECTED] I am new to this mailing list. for the past one week i was trying to run tomcat on my XP Professional OS but in vein. I downloaded the latest JDK and downloaded tomcat 4.1 version and has set the CATALINA_HOME and JAVA_HOME respectively. when I start the server its getting started properly but, when i try to access 8080 port I am getting page can not be displayed. I did the same installation on XP Home and its working fine. Is there some problem ? Has any one has configured tomcat on XP Professional.. If so, kindly reply back to this stating the solution. That will be very helpful. Are both machines on XP Service Pack 2? Does the Pro machine have the XP firewall enabled, but the home one not? The XP firewall could easily prevent access on port 8080 and not tell you. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - 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] __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
loading JNI .so file with tomcat 5.5.4
Hi folks, Correct me if I sound stupid here :) I am trying to load a simple JNI based .so lib file with Tomcat 5.5.4.(on linux) I am trying to load the .so file within the JSP page. I am not sure if this is allowed. I have tried all the following methods.. 1. putting the .so file in JAVA_HOME//jre/lib/i386/ 2. setting the LD_LIBRARY_PATH to where my lib is and exporting it 3. inside the catelina.sh file added an extra -Djava.library.path=mylibpath Inside the JSP i tried the following options... 1. try { //System.loadLibrary(AriaJava); // the name of the file is libAriaJava.so } catch (UnsatisfiedLinkError e) { System.err.println(Native code library failed to load.\n + e); } 2. try { System.load( /home/path_to_lib/libAriaJava.so); } catch (UnsatisfiedLinkError e) { System.err.println(Native code library failed to load.\n + e); } in all these trials it fails with unsatisfied link error !! Any help is appreciated !! r -Vaheesan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Facing problems in tomcat configuration - on XP Professional
On Mon, 21 Feb 2005 19:21:54 -0800 (PST), raghavendra datt [EMAIL PROTECTED] wrote: I verified. No fire wall is enabled in my machine. also I tried changing port to something else (8789) and still am getting the page can not be diplayed error. I dont understand what is preventing from accessing port. i tried giving telnet localhost 8789 and its not connecting to it.. what else can be the reason for not hitting the port? How to know whether the server is running properly or not? because, when i start tomcat it looks fine and open in another window.. but, can not access it. :( Have you tried running the startup.bat file manually to see if it generates any errors? A common cause of errors on Windows is due to spaces in directory paths, could it be due to something like that? Also try turning off Show friendly HTTP errors in IE, that option has to be the single most annoying option I have seen, nothing annoys me more when I get a screenshot of that friendly error page that tells you absolutely nothing about the real problem. Regards, -- Jason Bainbridge http://kde.org - [EMAIL PROTECTED] Personal Site - http://jasonbainbridge.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Name jdbc is not bound in this Context error
As just moved the GlobalNamingResources inside the main server in my server.xml residing in TOMCAT_HOME/conf directory. When i restart tomcat 5.5.7 it's throwing up following exception. INFO: Starting Servlet Engine: Apache Tomcat/5.5.7 Feb 22, 2005 11:51:46 AM org.apache.catalina.realm.UserDatabaseRealm start SEVERE: Exception looking up UserDatabase under key UserDatabase javax.naming.NameNotFoundException: Name UserDatabase is not bound in this Conte xt at org.apache.naming.NamingContext.lookup(NamingContext.java:769) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.j ava:222) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 50) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) Feb 22, 2005 11:51:46 AM org.apache.catalina.startup.Catalina start SEVERE: Catalina.start: LifecycleException: No UserDatabase component found under key UserDatabase at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.j ava:228) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 50) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) Feb 22, 2005 11:51:46 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 391 ms Pls help to fix the problem. Thanks, Laxmi --- Antony Paul [EMAIL PROTECTED] wrote: It seems you still have problem. You can google for the answer. One thing I know is GlobalNamingResources should come inside the Server element and not inside Context element. rgds Antony Paul On Fri, 18 Feb 2005 22:47:06 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: I could able to get thro' JarperException. Thanks for replies. Now facing new problem. I'm getting NameNotFoundException - Name jdbc is not bound in this Context Environment what i'm using is: Apache 2, Tomcat 5.5, Netscape 7.2, MsAccess 2003 on windows 2000 machine. I integrated tomcat and apache as apache doesn't support jsps. I wrote a JSP called test-db.jsp which in turn calls java program TestSQLLoad.java. This TestSQLLoad.java performs dattabase operation, fetches the data from table and that data is displayed on Netscape thro' jsp. 1. test-db.jsp resides ina directory TOMCAT_HOME/webapps/web/JSP. Contents are as follows: %@ page contentType=text/html import=testpkg.TestSQLLoad% html head titleDB Test/title /head body % TestSQLLoad tst = new TestSQLLoad(); tst.init(); % h2Results/h2 User - %= tst.getUser() %br/ Pwd - %= tst.getPassword() %br/ Id - %= tst.getID() % /body /html 2. TestSQLLoad.java is residing in following directory. TOMCAT_HOME/webapps/web/classes/testpkg direcotry. Contents of this file are as follows: package testpkg; import javax.naming.*; import javax.sql.*; import java.sql.*; public class TestSQLLoad { String user = Not Connected; String pwd = no pwd; int id = -1; public void init() { try{ Context ctx = new InitialContext(); if(ctx == null ) { throw new Exception(Boom - No Context); } Context envCtx = (Context) ctx.lookup(java:comp/env); DataSource ds = (DataSource) envCtx.lookup(jdbc/db1); //DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/db1);
Re: log4j.properties not found in tomcat
Where do you put log4j.properties currently? -Michael Greer On Feb 21, 2005, at 5:02 PM, Brian McGovern wrote: I have a wierd problem. Tomcat on W2k barks FileNotFound Exceptions for the log4j.properties file when i execute a servlet that instantiates log4j. Strangely enough the actual file that i create and log to with log4j.properties file logs out just fine even though stdout.log said that it couldn't find my log4j.properties file. Only time i don't get an error is when i put log4j.properites in my winnt/system32 directory. But this doesnt make sense to me. I supply -Dlog4j.configuration=log4j.properties to Java at startup and still get the same error. I also tried the FULL path to my log4j.properties in the -D option. Instantiated like this across my app. private static final Logger zLogger = Logger.getLogger(MyClassName.class); Can anyone tell me where I went wrong. thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ?? Yet Another Tomcat Documentation Bug ??
From: Tony LaPaso [mailto:[EMAIL PROTECTED] Subject: ?? Yet Another Tomcat Documentation Bug ?? The first bullet point starts out: Any XML file in the $CATALINA_HOME/conf/[engine_name]/[host_name] directory is assumed... I believe this should say, Any XML file in the $CATALINA_BASE/conf/[engine_name]/[host_name] directory is assumed... Is that right? It's another typo, right? There's a fairly prominent note at the introduction to the host element: The description below uses the variable name $CATALINA_HOME to refer to the directory into which you have installed Tomcat 5, and is the base directory against which most relative paths are resolved. However, if you have configured Tomcat 5 for multiple instances by setting a CATALINA_BASE directory, you should use $CATALINA_BASE instead of $CATALINA_HOME for each of these references. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Facing problems in tomcat configuration - on XP Professional
By verified, do you mean that you found Windows firewall and it was disabled? or that you didn't find Windows firewall? Control panel, Security Center might give you another way in. Also, spaces WITHIN names can create almost as much havok as spaces AFTER names. -Original Message- From: raghavendra datt [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 9:22 PM To: Tomcat Users List Subject: RE: Facing problems in tomcat configuration - on XP Professional I verified. No fire wall is enabled in my machine. also I tried changing port to something else (8789) and still am getting the page can not be diplayed error. I dont understand what is preventing from accessing port. i tried giving telnet localhost 8789 and its not connecting to it.. what else can be the reason for not hitting the port? How to know whether the server is running properly or not? because, when i start tomcat it looks fine and open in another window.. but, can not access it. --- [EMAIL PROTECTED] wrote: Start, Control Panel, Windows Firewall (That's assuming that you've got it set up to show you the viruses (file extensions, system files, system and hidden files, etc) and to not show stuff as web-enabled whatever. SP2 will almost certainly have set up and enabled a firewall. There may be something like Switch to classic view that shows everything not just a selected few. Good Luck! -Original Message- From: raghavendra datt [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 1:44 PM To: Tomcat Users List Subject: RE: Facing problems in tomcat configuration - on XP Professional Yeah.. both machines are on service pack 2.. and I dont see any firewall in XP Pro machine. Can you please tell me how to figure out whether firewall is running or not? Do you think changing port would solve the problem.. Thanks for the instant reply, Raghavendra --- Peter Crowther [EMAIL PROTECTED] wrote: From: raghavendra datt [mailto:[EMAIL PROTECTED] I am new to this mailing list. for the past one week i was trying to run tomcat on my XP Professional OS but in vein. I downloaded the latest JDK and downloaded tomcat 4.1 version and has set the CATALINA_HOME and JAVA_HOME respectively. when I start the server its getting started properly but, when i try to access 8080 port I am getting page can not be displayed. I did the same installation on XP Home and its working fine. Is there some problem ? Has any one has configured tomcat on XP Professional.. If so, kindly reply back to this stating the solution. That will be very helpful. Are both machines on XP Service Pack 2? Does the Pro machine have the XP firewall enabled, but the home one not? The XP firewall could easily prevent access on port 8080 and not tell you. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - 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] __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - 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: Name jdbc is not bound in this Context error
By default server.xml contains have a GlobalNamingResources. You have to add your resources in there. rgds Antony Paul On Mon, 21 Feb 2005 19:56:23 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: As just moved the GlobalNamingResources inside the main server in my server.xml residing in TOMCAT_HOME/conf directory. When i restart tomcat 5.5.7 it's throwing up following exception. INFO: Starting Servlet Engine: Apache Tomcat/5.5.7 Feb 22, 2005 11:51:46 AM org.apache.catalina.realm.UserDatabaseRealm start SEVERE: Exception looking up UserDatabase under key UserDatabase javax.naming.NameNotFoundException: Name UserDatabase is not bound in this Conte xt at org.apache.naming.NamingContext.lookup(NamingContext.java:769) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.j ava:222) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 50) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) Feb 22, 2005 11:51:46 AM org.apache.catalina.startup.Catalina start SEVERE: Catalina.start: LifecycleException: No UserDatabase component found under key UserDatabase at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.j ava:228) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 50) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) Feb 22, 2005 11:51:46 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 391 ms Pls help to fix the problem. Thanks, Laxmi --- Antony Paul [EMAIL PROTECTED] wrote: It seems you still have problem. You can google for the answer. One thing I know is GlobalNamingResources should come inside the Server element and not inside Context element. rgds Antony Paul On Fri, 18 Feb 2005 22:47:06 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: I could able to get thro' JarperException. Thanks for replies. Now facing new problem. I'm getting NameNotFoundException - Name jdbc is not bound in this Context Environment what i'm using is: Apache 2, Tomcat 5.5, Netscape 7.2, MsAccess 2003 on windows 2000 machine. I integrated tomcat and apache as apache doesn't support jsps. I wrote a JSP called test-db.jsp which in turn calls java program TestSQLLoad.java. This TestSQLLoad.java performs dattabase operation, fetches the data from table and that data is displayed on Netscape thro' jsp. 1. test-db.jsp resides ina directory TOMCAT_HOME/webapps/web/JSP. Contents are as follows: %@ page contentType=text/html import=testpkg.TestSQLLoad% html head titleDB Test/title /head body % TestSQLLoad tst = new TestSQLLoad(); tst.init(); % h2Results/h2 User - %= tst.getUser() %br/ Pwd - %= tst.getPassword() %br/ Id - %= tst.getID() % /body /html 2. TestSQLLoad.java is residing in following directory. TOMCAT_HOME/webapps/web/classes/testpkg direcotry. Contents of this file are as follows: package testpkg; import javax.naming.*; import javax.sql.*; import java.sql.*; public class TestSQLLoad { String user = Not Connected; String pwd = no pwd; int id = -1; public void init() { try{
Tomcat 5.5.7 - error trying to replicate session on Linux
OK, we still have one more issue with our Tomcat cluster as we move to our Linux environment. For some reason, both instances (jvmRoute=srv1 and jvmRoute=srv2) see each other at startup. We see that they each join the cluster just fine. But when the first request comes through we get an exception timeout trying to replicate. Of course it works fine in our Windows development environment, but now we are moving to our testing and production environments - SuSE Linux SLES9. Any ideas and suggestions are much appreciated. The catalina.log messages for both Tomcat instances are below. Thanks - Richard CLUSTER MEMBER 2 (jvmRoute=srv1): INFO: Server startup in 7332 ms Feb 21, 2005 9:02:58 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://140.99.50.58:4 001,140.99.50.58,4001, alive=2] 21:03:36,258 INFO [TP-Processor3] UserCounterListener:137 - Before increment, User Count: 0 21:03:36,262 INFO [TP-Processor3] UserCounterListener:140 - After increment, User Count: 1 21:03:36,263 INFO [TP-Processor3] UserCounterListener:73 - sessionCreated - Session info: id: '6615ABC7BD43B096AB54C031B7BE02C5.srv1'; createdAt '21:03:36'; lastAccessedAt '21:03:36'; currentTime '21:03:36; session count: '1 21:03:36,264 INFO [TP-Processor3] UserCounterListener:76 - sessionCreated - Session info: id: '6615ABC7BD43B096AB54C031B7BE02C5.srv1'; createdAt '21:03:36'; lastAccessedAt '21:03:36'; currentTime '21:03:36; session count: '1 21:05:14,482 INFO [TP-Processor2] UserCounterListener:137 - Before increment, User Count: 1 21:05:14,483 INFO [TP-Processor2] UserCounterListener:140 - After increment, User Count: 2 21:05:14,484 INFO [TP-Processor2] UserCounterListener:73 - sessionCreated - Session info: id: '61B3F35D9B0AAAE46F75AAA19FFC7D1B.srv1'; createdAt '21:05:14'; lastAccessedAt '21:05:14'; currentTime '21:05:14; session count: '2 21:05:14,485 INFO [TP-Processor2] UserCounterListener:76 - sessionCreated - Session info: id: '61B3F35D9B0AAAE46F75AAA19FFC7D1B.srv1'; createdAt '21:05:14'; lastAccessedAt '21:05:14'; currentTime '21:05:14; session count: '2 Feb 21, 2005 9:06:45 PM org.apache.catalina.cluster.tcp.ReplicationTransmitter sendMessageData WARNING: Unable to send replicated message, is server down? java.net.ConnectException: Connection timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364) at java.net.Socket.connect(Socket.java:507) at java.net.Socket.connect(Socket.java:457) at java.net.Socket.init(Socket.java:365) at java.net.Socket.init(Socket.java:207) at org.apache.catalina.cluster.tcp.SocketSender.connect(SocketSender.java:1 10) at org.apache.catalina.cluster.tcp.SocketSender.sendMessage(SocketSender.ja va:157) at org.apache.catalina.cluster.tcp.PooledSocketSender.sendMessage(PooledSoc ketSender.java:147) at org.apache.catalina.cluster.tcp.ReplicationTransmitter.sendMessageData(R eplicationTransmitter.java:247) at org.apache.catalina.cluster.tcp.ReplicationTransmitter.sendMessage(Repli cationTransmitter.java:281) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.send(SimpleTcpCluster.j ava:454) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.send(SimpleTcpCluster.j ava:467) at org.apache.catalina.cluster.session.DeltaManager.createSession(DeltaMana ger.java:290) at org.apache.catalina.cluster.session.DeltaManager.createSession(DeltaMana ger.java:239) at org.apache.catalina.connector.Request.doGetSession(Request.java:2199) at org.apache.catalina.connector.Request.getSessionInternal(Request.java:21 50) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut henticator.java:230) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator Base.java:446) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126) at org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve .java:130) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAcc essLogValve.java:481) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1 48) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:306) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:745)
Re: log4j.properties not found in tomcat
You have to understand that any relative path is going to be resolved relative to the location where the JVM started. If you started Tomcat via the service rather than the batch files, then the VM would be run, by default, from C:\winnt\System32. So, when you supplied -Dlog4j.configuration=log4j.properties, you got exactly what should be expected if log4j.properties were located in c:\winnt\System32. Same goes for relatively defined paths to log files defined for FileAppenders in log4j.properties. BTW, can you post your error? FileNotFoundExceptions aren't thrown when Log4j can't find its config file. You'd get a simple error saying as much. The FileNotFoundExceptions are usually thrown when you specify a file for a FileAppender in a directory that doesn't exist. Log4j makes no attempt to create directories if they don't exist already. This is the correct and safe thing to do. It is your responsibility to make sure the directory exists before Log4j attempts to use it. Jake At 11:09 PM 2/21/2005 -0500, you wrote: Where do you put log4j.properties currently? -Michael Greer On Feb 21, 2005, at 5:02 PM, Brian McGovern wrote: I have a wierd problem. Tomcat on W2k barks FileNotFound Exceptions for the log4j.properties file when i execute a servlet that instantiates log4j. Strangely enough the actual file that i create and log to with log4j.properties file logs out just fine even though stdout.log said that it couldn't find my log4j.properties file. Only time i don't get an error is when i put log4j.properites in my winnt/system32 directory. But this doesnt make sense to me. I supply -Dlog4j.configuration=log4j.properties to Java at startup and still get the same error. I also tried the FULL path to my log4j.properties in the -D option. Instantiated like this across my app. private static final Logger zLogger = Logger.getLogger(MyClassName.class); Can anyone tell me where I went wrong. thanks - 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: Name jdbc is not bound in this Context error
I tried without GlobalNamingResources. No luck. When googled, i found that if we include GlobalNamingResource tag, then it will be available in all web context. After spending enough time on that, now i coded all database related stuff in JSP in the way we do in stand alone application. I mean - Coding like this in jspo itself. code -- %@ page contentType=text/html import=java.sql.*% html headtitlesimmPlan - simple material planning system/title script language=JavaScript src=/js/default.js/script % String userid = request.getParameter(userid); String passwd = request.getParameter(passwd); System.out.println(Password: + passwd); String pwd = , str = ; int level = -1, ind = -1; try { Connection conn = null; Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); conn=DriverManager.getConnection(jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=C:/tomcat/webapps/db1/db1.mdb); Statement stmt = conn.createStatement(); String query = SELECT * FROM user where name = ' + userid + '; ResultSet st = stmt.executeQuery(query); if (st.next()) { pwd = st.getString(password); level = st.getInt(level); System.err.println(Query result=+userid+/+pwd+/+level); } else { ind = -2; System.out.println(No user with name + userid + available in the database); } if (stmt != null) { stmt.close(); } if (conn != null) { conn.close(); } } catch (Exception e) { e.printStackTrace(); } if(pwd.equals(passwd)) { ind = level; } // else ind = -1; System.out.println(Ind - + ind); % script language=JavaScript type=text/JavaScript var ind = %= ind % function loadHtml() { //alert(in loadHtml()); if(ind == -2) { alert(Not a valid user); location.href = login.jsp; return; } if (ind == -1) { alert(Incorrect password); location.href = login.jsp; return; } else { //alert(Correct password); location.href = Second_Page.html; return; } } /script /head body onload=javascript:loadHtml() !-- User Name : %= userid %br Password : %= passwd % -- /body /html --- code ends here --- It works. But is it the right way to do? Pls advice. --- Antony Paul [EMAIL PROTECTED] wrote: By default server.xml contains have a GlobalNamingResources. You have to add your resources in there. rgds Antony Paul On Mon, 21 Feb 2005 19:56:23 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: As just moved the GlobalNamingResources inside the main server in my server.xml residing in TOMCAT_HOME/conf directory. When i restart tomcat 5.5.7 it's throwing up following exception. INFO: Starting Servlet Engine: Apache Tomcat/5.5.7 Feb 22, 2005 11:51:46 AM org.apache.catalina.realm.UserDatabaseRealm start SEVERE: Exception looking up UserDatabase under key UserDatabase javax.naming.NameNotFoundException: Name UserDatabase is not bound in this Conte xt at org.apache.naming.NamingContext.lookup(NamingContext.java:769) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.j ava:222) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 50) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) Feb 22, 2005 11:51:46 AM org.apache.catalina.startup.Catalina
Re: volunteering to enhance docs for mod_jk local_worker_only (server quiescence)
Mladen, Built new jk from CVS. How to I access the lovely status page? /jkstatus as in jk2? Do have to enable it? Docs do not seem to be updated yet. Looking forward to playing with it! thanks, -Michael Greer On Feb 19, 2005, at 2:44 PM, Mladen Turk wrote: Michael Greer wrote: Mladen , That sounds like the right solution! I think I remember the status page from jk2, and it is a good idea. Yes, we are trying to backport all goodies from jk2 now that is deprecated and no longer maintained. Not only that. It will have options to fully edit properties, as well to add or disable uri mappings, to reflect the dynamic deployment in tomcat. You can try new features either from cvs, or wait for a public beta release, before releasing stable version. Regards, Mladen. - 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: Facing problems in tomcat configuration - on XP Professional
Sorry guys.. I got the problem.. Actually firewall was disabled but, norton antivirus was blocking the port.. now, its working... Thanks for all your sugestions I learnt a lot today --- [EMAIL PROTECTED] wrote: By verified, do you mean that you found Windows firewall and it was disabled? or that you didn't find Windows firewall? Control panel, Security Center might give you another way in. Also, spaces WITHIN names can create almost as much havok as spaces AFTER names. -Original Message- From: raghavendra datt [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 9:22 PM To: Tomcat Users List Subject: RE: Facing problems in tomcat configuration - on XP Professional I verified. No fire wall is enabled in my machine. also I tried changing port to something else (8789) and still am getting the page can not be diplayed error. I dont understand what is preventing from accessing port. i tried giving telnet localhost 8789 and its not connecting to it.. what else can be the reason for not hitting the port? How to know whether the server is running properly or not? because, when i start tomcat it looks fine and open in another window.. but, can not access it. --- [EMAIL PROTECTED] wrote: Start, Control Panel, Windows Firewall (That's assuming that you've got it set up to show you the viruses (file extensions, system files, system and hidden files, etc) and to not show stuff as web-enabled whatever. SP2 will almost certainly have set up and enabled a firewall. There may be something like Switch to classic view that shows everything not just a selected few. Good Luck! -Original Message- From: raghavendra datt [mailto:[EMAIL PROTECTED] Sent: Monday, February 21, 2005 1:44 PM To: Tomcat Users List Subject: RE: Facing problems in tomcat configuration - on XP Professional Yeah.. both machines are on service pack 2.. and I dont see any firewall in XP Pro machine. Can you please tell me how to figure out whether firewall is running or not? Do you think changing port would solve the problem.. Thanks for the instant reply, Raghavendra --- Peter Crowther [EMAIL PROTECTED] wrote: From: raghavendra datt [mailto:[EMAIL PROTECTED] I am new to this mailing list. for the past one week i was trying to run tomcat on my XP Professional OS but in vein. I downloaded the latest JDK and downloaded tomcat 4.1 version and has set the CATALINA_HOME and JAVA_HOME respectively. when I start the server its getting started properly but, when i try to access 8080 port I am getting page can not be displayed. I did the same installation on XP Home and its working fine. Is there some problem ? Has any one has configured tomcat on XP Professional.. If so, kindly reply back to this stating the solution. That will be very helpful. Are both machines on XP Service Pack 2? Does the Pro machine have the XP firewall enabled, but the home one not? The XP firewall could easily prevent access on port 8080 and not tell you. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - 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] __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - 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] __ Do you Yahoo!? The all-new My Yahoo! - What will yours do? http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: volunteering to enhance docs for mod_jk local_worker_only (server quiescence)
Ah, I extrapolated from the jk2 docs: workers.properties: worker.status.type=status httpd.conf: JkMount /jkstatus/* status Nice! -Michael Greer On Feb 22, 2005, at 1:01 AM, Michael Greer wrote: Mladen, Built new jk from CVS. How to I access the lovely status page? /jkstatus as in jk2? Do have to enable it? Docs do not seem to be updated yet. Looking forward to playing with it! thanks, -Michael Greer On Feb 19, 2005, at 2:44 PM, Mladen Turk wrote: Michael Greer wrote: Mladen , That sounds like the right solution! I think I remember the status page from jk2, and it is a good idea. Yes, we are trying to backport all goodies from jk2 now that is deprecated and no longer maintained. Not only that. It will have options to fully edit properties, as well to add or disable uri mappings, to reflect the dynamic deployment in tomcat. You can try new features either from cvs, or wait for a public beta release, before releasing stable version. Regards, Mladen. - 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: Name jdbc is not bound in this Context error
U K, It works as you said, but there are a couple of things I'll recommend: First, you should move your Connection, ResultSet and Statement declarations before the try {} block and add a finally {} block where you check for null values and close the resources if not null. Connection conn = null; Statement stmt = null; ResultSet res = null; try { .. } catch { } finally { if (stmt != null ) { try { stmnt.close(); } catch (SQLException se) { log.error(se.getMessage); } } Second, you should use a connection pool. I don't have a Tomcat config readily available. But can follow up with one if you need it. -Robert U K Laxmi wrote: I tried without GlobalNamingResources. No luck. When googled, i found that if we include GlobalNamingResource tag, then it will be available in all web context. After spending enough time on that, now i coded all database related stuff in JSP in the way we do in stand alone application. I mean - Coding like this in jspo itself. code -- %@ page contentType=text/html import=java.sql.*% html headtitlesimmPlan - simple material planning system/title script language=JavaScript src=/js/default.js/script % String userid = request.getParameter(userid); String passwd = request.getParameter(passwd); System.out.println(Password: + passwd); String pwd = , str = ; int level = -1, ind = -1; try { Connection conn = null; Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); conn=DriverManager.getConnection(jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=C:/tomcat/webapps/db1/db1.mdb); Statement stmt = conn.createStatement(); String query = SELECT * FROM user where name = ' + userid + '; ResultSet st = stmt.executeQuery(query); if (st.next()) { pwd = st.getString(password); level = st.getInt(level); System.err.println(Query result=+userid+/+pwd+/+level); } else { ind = -2; System.out.println(No user with name + userid + available in the database); } if (stmt != null) { stmt.close(); } if (conn != null) { conn.close(); } } catch (Exception e) { e.printStackTrace(); } if(pwd.equals(passwd)) { ind = level; } // else ind = -1; System.out.println(Ind - + ind); % script language=JavaScript type=text/JavaScript var ind = %= ind % function loadHtml() { //alert(in loadHtml()); if(ind == -2) { alert(Not a valid user); location.href = login.jsp; return; } if (ind == -1) { alert(Incorrect password); location.href = login.jsp; return; } else { //alert(Correct password); location.href = Second_Page.html; return; } } /script /head body onload=javascript:loadHtml() !-- User Name : %= userid %br Password : %= passwd % -- /body /html --- code ends here --- It works. But is it the right way to do? Pls advice. --- Antony Paul [EMAIL PROTECTED] wrote: By default server.xml contains have a GlobalNamingResources. You have to add your resources in there. rgds Antony Paul On Mon, 21 Feb 2005 19:56:23 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: As just moved the GlobalNamingResources inside the main server in my server.xml residing in TOMCAT_HOME/conf directory. When i restart tomcat 5.5.7 it's throwing up following exception. INFO: Starting Servlet Engine: Apache Tomcat/5.5.7 Feb 22, 2005 11:51:46 AM org.apache.catalina.realm.UserDatabaseRealm start SEVERE: Exception looking up UserDatabase under key UserDatabase javax.naming.NameNotFoundException: Name UserDatabase is not bound in this Conte xt at org.apache.naming.NamingContext.lookup(NamingContext.java:769) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.j ava:222) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 50) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at
Re: Name jdbc is not bound in this Context error
If you followed the tomcat docs you will have no problem in DBCP getting to work. Going for Globalnamingresources is needed if you need to access it will all applications. Try to configure it as per the doc in following URL. http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html follow MySQL config. And no need to put commons*.jar in commons/lib as TC by default comes with it. rgds Antony Paul On Mon, 21 Feb 2005 21:52:13 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: I tried without GlobalNamingResources. No luck. When googled, i found that if we include GlobalNamingResource tag, then it will be available in all web context. After spending enough time on that, now i coded all database related stuff in JSP in the way we do in stand alone application. I mean - Coding like this in jspo itself. code -- %@ page contentType=text/html import=java.sql.*% html headtitlesimmPlan - simple material planning system/title script language=JavaScript src=/js/default.js/script % String userid = request.getParameter(userid); String passwd = request.getParameter(passwd); System.out.println(Password: + passwd); String pwd = , str = ; int level = -1, ind = -1; try { Connection conn = null; Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); conn=DriverManager.getConnection(jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=C:/tomcat/webapps/db1/db1.mdb); Statement stmt = conn.createStatement(); String query = SELECT * FROM user where name = ' + userid + '; ResultSet st = stmt.executeQuery(query); if (st.next()) { pwd = st.getString(password); level = st.getInt(level); System.err.println(Query result=+userid+/+pwd+/+level); } else { ind = -2; System.out.println(No user with name + userid + available in the database); } if (stmt != null) { stmt.close(); } if (conn != null) { conn.close(); } } catch (Exception e) { e.printStackTrace(); } if(pwd.equals(passwd)) { ind = level; } // else ind = -1; System.out.println(Ind - + ind); % script language=JavaScript type=text/JavaScript var ind = %= ind % function loadHtml() { //alert(in loadHtml()); if(ind == -2) { alert(Not a valid user); location.href = login.jsp; return; } if (ind == -1) { alert(Incorrect password); location.href = login.jsp; return; } else { //alert(Correct password); location.href = Second_Page.html; return; } } /script /head body onload=javascript:loadHtml() !-- User Name : %= userid %br Password : %= passwd % -- /body /html --- code ends here --- It works. But is it the right way to do? Pls advice. --- Antony Paul [EMAIL PROTECTED] wrote: By default server.xml contains have a GlobalNamingResources. You have to add your resources in there. rgds Antony Paul On Mon, 21 Feb 2005 19:56:23 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: As just moved the GlobalNamingResources inside the main server in my server.xml residing in TOMCAT_HOME/conf directory. When i restart tomcat 5.5.7 it's throwing up following exception. INFO: Starting Servlet Engine: Apache Tomcat/5.5.7 Feb 22, 2005 11:51:46 AM org.apache.catalina.realm.UserDatabaseRealm start SEVERE: Exception looking up UserDatabase under key UserDatabase javax.naming.NameNotFoundException: Name UserDatabase is not bound in this Conte xt at org.apache.naming.NamingContext.lookup(NamingContext.java:769) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.j ava:222) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 50) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683 ) at
problem with ssl
Hi all, I am using tomcat as my local server. I removed some keystore files which I created earlier using the keytool delete command . Then I created new keystore file using the command below keytool -genkey -keyalg RSA -alias tomcat -keystore .keystore But when I browse the secure page via the web it throws an error message mozilla and localhost cannot communicate securely because they have no common encryption algorithms what should i do to eliminate this problem? Thanks for any help Regards Kumaran - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Name jdbc is not bound in this Context error
Sure to do the changes you mentioned. Pls do send the config file for connection pooling and also guidelines for how to use it in my program. It will be a great help. I'm developing web based application for using it inhouse. Later part of time, it may grow to a big MRP application based on the requirement of the company. If i go ahead with this kind of structure (the one i sent in my previous mail), does it cause any rpoblems? Pls advice. --- Robert F Hall [EMAIL PROTECTED] wrote: U K, It works as you said, but there are a couple of things I'll recommend: First, you should move your Connection, ResultSet and Statement declarations before the try {} block and add a finally {} block where you check for null values and close the resources if not null. Connection conn = null; Statement stmt = null; ResultSet res = null; try { .. } catch { } finally { if (stmt != null ) { try { stmnt.close(); } catch (SQLException se) { log.error(se.getMessage); } } Second, you should use a connection pool. I don't have a Tomcat config readily available. But can follow up with one if you need it. -Robert U K Laxmi wrote: I tried without GlobalNamingResources. No luck. When googled, i found that if we include GlobalNamingResource tag, then it will be available in all web context. After spending enough time on that, now i coded all database related stuff in JSP in the way we do in stand alone application. I mean - Coding like this in jspo itself. code -- %@ page contentType=text/html import=java.sql.*% html headtitlesimmPlan - simple material planning system/title script language=JavaScript src=/js/default.js/script % String userid = request.getParameter(userid); String passwd = request.getParameter(passwd); System.out.println(Password: + passwd); String pwd = , str = ; int level = -1, ind = -1; try { Connection conn = null; Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); conn=DriverManager.getConnection(jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=C:/tomcat/webapps/db1/db1.mdb); Statement stmt = conn.createStatement(); String query = SELECT * FROM user where name = ' + userid + '; ResultSet st = stmt.executeQuery(query); if (st.next()) { pwd = st.getString(password); level = st.getInt(level); System.err.println(Query result=+userid+/+pwd+/+level); } else { ind = -2; System.out.println(No user with name + userid + available in the database); } if (stmt != null) { stmt.close(); } if (conn != null) { conn.close(); } } catch (Exception e) { e.printStackTrace(); } if(pwd.equals(passwd)) { ind = level; } // else ind = -1; System.out.println(Ind - + ind); % script language=JavaScript type=text/JavaScript var ind = %= ind % function loadHtml() { //alert(in loadHtml()); if(ind == -2) { alert(Not a valid user); location.href = login.jsp; return; } if (ind == -1) { alert(Incorrect password); location.href = login.jsp; return; } else { //alert(Correct password); location.href = Second_Page.html; return; } } /script /head body onload=javascript:loadHtml() !-- User Name : %= userid %br Password : %= passwd % -- /body /html --- code ends here --- It works. But is it the right way to do? Pls advice. --- Antony Paul [EMAIL PROTECTED] wrote: By default server.xml contains have a GlobalNamingResources. You have to add your resources in there. rgds Antony Paul On Mon, 21 Feb 2005 19:56:23 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: As just moved the GlobalNamingResources inside the main server in my server.xml residing in TOMCAT_HOME/conf directory. When i restart tomcat 5.5.7 it's throwing up following exception. INFO: Starting Servlet Engine:
Tomcat 5.5 working, BUT not outside of webapps/
Is this simply not possible? I have tried extrapolating form the docs (which seems to work fine under webapps/ or $CATALINA_HOME) but anything outside of it fails as badly as the other works perfectly, even if I try to swap-out webapps/ for an otuside docbase using the HOST tag already present. There's got to be a file or simple edit that I'm missing for this? Anyone? Thanks, -Matt On Sun, 20 Feb 2005, Matt wrote: OK, the docs out there are good, but they either concern old versions of IIS and/or Tomcat -OR- they concern the JK2 module (including this list's archives I have searched). If JK2 is NO LONGER SUPPORTED, why in the heck would I care to use it? So, I am using the very nice jk_1.2.8.exe installer. With that, most of the steps found in the various, partially-helpful docs are already done! ;^) That said: I am using Win2K + IIS5, and also Win2K3 + IIS6, and in either case, also Tomcat 5.5: I can go to http://localhost and get my IIS index page. I can go to http://localhost:8080 and get my Tomcat index page. I can go to http://localhost/jsp-examples/index.html and run all the wonderful examples. HOWEVER, if I simply want to -ALSO- hand-off jsp pages to Tomcat that are in C:\Inetpub\wwwroot (and below) everything goes to hell. I have tried adding CONTEXT tags to server.xml until I turn blue in the face, and when I do so I get either 404 not found errors from Tomcat (can't find the subdirectory b/c I assume it is looking for it in webapps/, but then again it can't find it even if I copy the whole thing into webapps/) or The specified module could not be found message on the page (IIS result of a uriworkermap.properties issue). I have even tried editing the existing HOST tag to change webapps to C:/Inetpub/wwwroot and all sorts of folders below wwwroot. In those cases, if I manage to edit the uriworkermap.properties file correctly, all I get is a blank page for any .jsp, while IIS still handles the other stuff just fine. So, instead of these outdated docs everyone keeps pointing to, does anyone have any simple instructions to get Tomcat to properly use a folder OUTSIDE of webapps, and ALONG WITH webapps to work (especially assuming you've already got the basics working just fine as I do)? I'd like to start by getting a copy of jsp-examples working in wwwroot/ if possible (which is also how I was testing in the situation above, if that means anything), rather than also confusing the situation by learning how to create apps myself at the same time. Perhaps that has caused my problem - maybe the issue lies in a web.xml file somewhere for the jsp-examples (I;ve even copied all of webapps to wwwroot to try and get that to work, but no luck). Thanks, Matthew Kozak Rutgers University-Camden [EMAIL PROTECTED] ** They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -Ben Franklin ** Matthew Kozak Rutgers University-Camden [EMAIL PROTECTED] ** They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -Ben Franklin ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Name jdbc is not bound in this Context error
Yes i read and did as per the document. When it didn't work, i followed the suggetions given to many users in the mailing lists in the internet and now i guess i messed up. Actually in the error, it says, no suitable driver found. I'm using Ms Access as it's free. Do we have any free driver available in the form of jar to use in place of JDBC-ODBC bridge driver? Or it's not required if configuration is correct. Pls let me know. I've pasted all relevant code in my first mail itself. If time permits, any of you can try give me the solution. It'll be a great help. I've integrated tomcat 5.5.7 with apache 2. Does this has any impact on the above. --- Antony Paul [EMAIL PROTECTED] wrote: If you followed the tomcat docs you will have no problem in DBCP getting to work. Going for Globalnamingresources is needed if you need to access it will all applications. Try to configure it as per the doc in following URL. http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html follow MySQL config. And no need to put commons*.jar in commons/lib as TC by default comes with it. rgds Antony Paul On Mon, 21 Feb 2005 21:52:13 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: I tried without GlobalNamingResources. No luck. When googled, i found that if we include GlobalNamingResource tag, then it will be available in all web context. After spending enough time on that, now i coded all database related stuff in JSP in the way we do in stand alone application. I mean - Coding like this in jspo itself. code -- %@ page contentType=text/html import=java.sql.*% html headtitlesimmPlan - simple material planning system/title script language=JavaScript src=/js/default.js/script % String userid = request.getParameter(userid); String passwd = request.getParameter(passwd); System.out.println(Password: + passwd); String pwd = , str = ; int level = -1, ind = -1; try { Connection conn = null; Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); conn=DriverManager.getConnection(jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=C:/tomcat/webapps/db1/db1.mdb); Statement stmt = conn.createStatement(); String query = SELECT * FROM user where name = ' + userid + '; ResultSet st = stmt.executeQuery(query); if (st.next()) { pwd = st.getString(password); level = st.getInt(level); System.err.println(Query result=+userid+/+pwd+/+level); } else { ind = -2; System.out.println(No user with name + userid + available in the database); } if (stmt != null) { stmt.close(); } if (conn != null) { conn.close(); } } catch (Exception e) { e.printStackTrace(); } if(pwd.equals(passwd)) { ind = level; } // else ind = -1; System.out.println(Ind - + ind); % script language=JavaScript type=text/JavaScript var ind = %= ind % function loadHtml() { //alert(in loadHtml()); if(ind == -2) { alert(Not a valid user); location.href = login.jsp; return; } if (ind == -1) { alert(Incorrect password); location.href = login.jsp; return; } else { //alert(Correct password); location.href = Second_Page.html; return; } } /script /head body onload=javascript:loadHtml() !-- User Name : %= userid %br Password : %= passwd % -- /body /html --- code ends here --- It works. But is it the right way to do? Pls advice. --- Antony Paul [EMAIL PROTECTED] wrote: By default server.xml contains have a GlobalNamingResources. You have to add your resources in there. rgds Antony Paul On Mon, 21 Feb 2005 19:56:23 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: As just moved the GlobalNamingResources inside the main server in my server.xml residing in TOMCAT_HOME/conf directory. When i restart tomcat 5.5.7 it's throwing up following exception. INFO: Starting Servlet Engine: Apache Tomcat/5.5.7 Feb 22, 2005 11:51:46 AM org.apache.catalina.realm.UserDatabaseRealm start SEVERE:
Re: ?? Yet Another Tomcat Documentation Bug ??
Yea, I know, I saw that note. It's in the Host element description but references to $CATALINA_HOME (which should be $CATALINA_BASE) are all over the place -- not just under Host documentation. What's more, a reader could easily think that the note you mentioned *only* referred to the Host element description since it says, The description below IMHO, instead of asking the reader to do a mental substitution I think the documentation should be updated s.t. it uses $CATALINA_BASE when $CATALINA_BASE is appropriate. This documentation anomaly has bothered me for a long time and I felt I needed to mention it. - Original Message - From: Caldarale, Charles R [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Monday, February 21, 2005 10:20 PM Subject: RE: ?? Yet Another Tomcat Documentation Bug ?? From: Tony LaPaso [mailto:[EMAIL PROTECTED] Subject: ?? Yet Another Tomcat Documentation Bug ?? The first bullet point starts out: Any XML file in the $CATALINA_HOME/conf/[engine_name]/[host_name] directory is assumed... I believe this should say, Any XML file in the $CATALINA_BASE/conf/[engine_name]/[host_name] directory is assumed... Is that right? It's another typo, right? There's a fairly prominent note at the introduction to the host element: The description below uses the variable name $CATALINA_HOME to refer to the directory into which you have installed Tomcat 5, and is the base directory against which most relative paths are resolved. However, if you have configured Tomcat 5 for multiple instances by setting a CATALINA_BASE directory, you should use $CATALINA_BASE instead of $CATALINA_HOME for each of these references. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - 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: problem with ssl
You can check whether the keystore is properly created using the following command keytool -list -alias tomcat rgds Antony Paul On 22 Feb 2005 12:24:05 +0600, Thavarajah Kurinchikumaran [EMAIL PROTECTED] wrote: Hi all, I am using tomcat as my local server. I removed some keystore files which I created earlier using the keytool delete command . Then I created new keystore file using the command below keytool -genkey -keyalg RSA -alias tomcat -keystore .keystore But when I browse the secure page via the web it throws an error message mozilla and localhost cannot communicate securely because they have no common encryption algorithms what should i do to eliminate this problem? Thanks for any help Regards Kumaran - 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: Class GtorActionServlet is not a Servlet
Hi, This does not help - the class now implements Servlet, and also extends ActionServlet - still get Tomcat saying that this class is not a Servlet. import java.io.File; import javax.servlet.Servlet; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import org.apache.struts.action.ActionServlet; import org.codeMound.kronos.DBConnectionPool; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.RollingFileAppender; public class GtorActionServlet extends ActionServlet implements Servlet { Thanks, Adrian On Monday 21 February 2005 23:37, Michael Greer wrote: I would manually declare that class to be implementing the Servlet interface. Can't hurt (can it?) if it already does so by its ancestry. At least it is quick to add and test. On Feb 21, 2005, at 10:28 AM, Adrian Wilford wrote: HTTPServlet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Adrian Wilford Email (Home): [EMAIL PROTECTED] Email (Work): [EMAIL PROTECTED] Work: +27 11 722 7498 Cell: +27 83 260 4034 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Name jdbc is not bound in this Context error
I dont whether MS Access is considered as RDBMS. For serious development it is not recommended. Using ODBC have several problems. I will recommend PostgreSQL. Now it runs very well on Windows. But requires Windows 2000 or higher. You can find it at http://www.postgresql.org/ftp/binary/v8.0.1/win32/. I am using it and have no problems. I am posting my configuration that I used to set up DBCP. server.xml --- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / Resource name=jdbc/db1 auth=Container type=javax.sql.DataSource factory=org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory driverClassName=org.postgresql.Driver url=jdbc:postgresql://192.168.4.248/antony maxActive=20 maxIdle=10 maxWait=-1 username=benchmark password=benchmark / /GlobalNamingResources TOMCAT_HOME/conf/context.xml --- ResourceLink global=jdbc/db1 name=jdbc/db1 type=javax.sql.DataSource/ TOMCAT_HOME/webapps/web/WEB-INF/web.xml - resource-ref res-ref-namejdbc/db1/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Did you defined your newly created context web in server.xml or at TOMCAT_HOME\conf\Catalina\localhost\some name.xml hope it will help. rgds Antony Paul On Mon, 21 Feb 2005 22:25:59 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: Yes i read and did as per the document. When it didn't work, i followed the suggetions given to many users in the mailing lists in the internet and now i guess i messed up. Actually in the error, it says, no suitable driver found. I'm using Ms Access as it's free. Do we have any free driver available in the form of jar to use in place of JDBC-ODBC bridge driver? Or it's not required if configuration is correct. Pls let me know. I've pasted all relevant code in my first mail itself. If time permits, any of you can try give me the solution. It'll be a great help. I've integrated tomcat 5.5.7 with apache 2. Does this has any impact on the above. --- Antony Paul [EMAIL PROTECTED] wrote: If you followed the tomcat docs you will have no problem in DBCP getting to work. Going for Globalnamingresources is needed if you need to access it will all applications. Try to configure it as per the doc in following URL. http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html follow MySQL config. And no need to put commons*.jar in commons/lib as TC by default comes with it. rgds Antony Paul On Mon, 21 Feb 2005 21:52:13 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: I tried without GlobalNamingResources. No luck. When googled, i found that if we include GlobalNamingResource tag, then it will be available in all web context. After spending enough time on that, now i coded all database related stuff in JSP in the way we do in stand alone application. I mean - Coding like this in jspo itself. code -- %@ page contentType=text/html import=java.sql.*% html headtitlesimmPlan - simple material planning system/title script language=JavaScript src=/js/default.js/script % String userid = request.getParameter(userid); String passwd = request.getParameter(passwd); System.out.println(Password: + passwd); String pwd = , str = ; int level = -1, ind = -1; try { Connection conn = null; Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); conn=DriverManager.getConnection(jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=C:/tomcat/webapps/db1/db1.mdb); Statement stmt = conn.createStatement(); String query = SELECT * FROM user where name = ' + userid + '; ResultSet st = stmt.executeQuery(query); if (st.next()) { pwd = st.getString(password); level = st.getInt(level); System.err.println(Query result=+userid+/+pwd+/+level); } else { ind = -2; System.out.println(No user with name + userid + available in the
Re: Tomcat 5.5 working, BUT not outside of webapps/
Why don't you show us your config file. This behavior work fine for me with 5.5.7, with Apache mod_jk. On Feb 22, 2005, at 1:20 AM, Matt wrote: Is this simply not possible? I have tried extrapolating form the docs (which seems to work fine under webapps/ or $CATALINA_HOME) but anything outside of it fails as badly as the other works perfectly, even if I try to swap-out webapps/ for an otuside docbase using the HOST tag already present. There's got to be a file or simple edit that I'm missing for this? Anyone? Thanks, -Matt On Sun, 20 Feb 2005, Matt wrote: OK, the docs out there are good, but they either concern old versions of IIS and/or Tomcat -OR- they concern the JK2 module (including this list's archives I have searched). If JK2 is NO LONGER SUPPORTED, why in the heck would I care to use it? So, I am using the very nice jk_1.2.8.exe installer. With that, most of the steps found in the various, partially-helpful docs are already done! ;^) That said: I am using Win2K + IIS5, and also Win2K3 + IIS6, and in either case, also Tomcat 5.5: I can go to http://localhost and get my IIS index page. I can go to http://localhost:8080 and get my Tomcat index page. I can go to http://localhost/jsp-examples/index.html and run all the wonderful examples. HOWEVER, if I simply want to -ALSO- hand-off jsp pages to Tomcat that are in C:\Inetpub\wwwroot (and below) everything goes to hell. I have tried adding CONTEXT tags to server.xml until I turn blue in the face, and when I do so I get either 404 not found errors from Tomcat (can't find the subdirectory b/c I assume it is looking for it in webapps/, but then again it can't find it even if I copy the whole thing into webapps/) or The specified module could not be found message on the page (IIS result of a uriworkermap.properties issue). I have even tried editing the existing HOST tag to change webapps to C:/Inetpub/wwwroot and all sorts of folders below wwwroot. In those cases, if I manage to edit the uriworkermap.properties file correctly, all I get is a blank page for any .jsp, while IIS still handles the other stuff just fine. So, instead of these outdated docs everyone keeps pointing to, does anyone have any simple instructions to get Tomcat to properly use a folder OUTSIDE of webapps, and ALONG WITH webapps to work (especially assuming you've already got the basics working just fine as I do)? I'd like to start by getting a copy of jsp-examples working in wwwroot/ if possible (which is also how I was testing in the situation above, if that means anything), rather than also confusing the situation by learning how to create apps myself at the same time. Perhaps that has caused my problem - maybe the issue lies in a web.xml file somewhere for the jsp-examples (I;ve even copied all of webapps to wwwroot to try and get that to work, but no luck). Thanks, Matthew Kozak Rutgers University-Camden [EMAIL PROTECTED] ** They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -Ben Franklin ** Matthew Kozak Rutgers University-Camden [EMAIL PROTECTED] *** *** They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -Ben Franklin *** *** - 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: Name jdbc is not bound in this Context error
Thank you for the replies. Ms Access is not a relational databaase. It's just DBMS. I didn't know that PostGreSQL is a open source RDBMS system. All the sqls, table creation etc.. works similar to Oracle or any other RDBMS? I'm working on windows 2000 machine. --- Antony Paul [EMAIL PROTECTED] wrote: I dont whether MS Access is considered as RDBMS. For serious development it is not recommended. Using ODBC have several problems. I will recommend PostgreSQL. Now it runs very well on Windows. But requires Windows 2000 or higher. You can find it at http://www.postgresql.org/ftp/binary/v8.0.1/win32/. I am using it and have no problems. I am posting my configuration that I used to set up DBCP. server.xml --- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / Resource name=jdbc/db1 auth=Container type=javax.sql.DataSource factory=org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory driverClassName=org.postgresql.Driver url=jdbc:postgresql://192.168.4.248/antony maxActive=20 maxIdle=10 maxWait=-1 username=benchmark password=benchmark / /GlobalNamingResources TOMCAT_HOME/conf/context.xml --- ResourceLink global=jdbc/db1 name=jdbc/db1 type=javax.sql.DataSource/ TOMCAT_HOME/webapps/web/WEB-INF/web.xml - resource-ref res-ref-namejdbc/db1/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Did you defined your newly created context web in server.xml or at TOMCAT_HOME\conf\Catalina\localhost\some name.xml hope it will help. rgds Antony Paul On Mon, 21 Feb 2005 22:25:59 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: Yes i read and did as per the document. When it didn't work, i followed the suggetions given to many users in the mailing lists in the internet and now i guess i messed up. Actually in the error, it says, no suitable driver found. I'm using Ms Access as it's free. Do we have any free driver available in the form of jar to use in place of JDBC-ODBC bridge driver? Or it's not required if configuration is correct. Pls let me know. I've pasted all relevant code in my first mail itself. If time permits, any of you can try give me the solution. It'll be a great help. I've integrated tomcat 5.5.7 with apache 2. Does this has any impact on the above. --- Antony Paul [EMAIL PROTECTED] wrote: If you followed the tomcat docs you will have no problem in DBCP getting to work. Going for Globalnamingresources is needed if you need to access it will all applications. Try to configure it as per the doc in following URL. http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html follow MySQL config. And no need to put commons*.jar in commons/lib as TC by default comes with it. rgds Antony Paul On Mon, 21 Feb 2005 21:52:13 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: I tried without GlobalNamingResources. No luck. When googled, i found that if we include GlobalNamingResource tag, then it will be available in all web context. After spending enough time on that, now i coded all database related stuff in JSP in the way we do in stand alone application. I mean - Coding like this in jspo itself. code -- %@ page contentType=text/html import=java.sql.*% html headtitlesimmPlan - simple material planning system/title script language=JavaScript src=/js/default.js/script % String userid = request.getParameter(userid); String passwd = request.getParameter(passwd); System.out.println(Password: + passwd); String pwd = , str = ; int level = -1, ind = -1; try { Connection conn = null; Class.forName(sun.jdbc.odbc.JdbcOdbcDriver); conn=DriverManager.getConnection(jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=C:/tomcat/webapps/db1/db1.mdb); Statement stmt = conn.createStatement(); String query = SELECT * FROM user where name = ' + userid + ';
Re: Name jdbc is not bound in this Context error
Most SQL is same and it supports a subset of SQL 92 and SQL 99 standards. Every RDBMS vendor have some proprietory code which dont work in other databases. There is one RDBMS Firebird(http://firebird.sourceforge.net/). The site claims that it is more like Oracle. rgds Antony Paul On Mon, 21 Feb 2005 23:01:40 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: Thank you for the replies. Ms Access is not a relational databaase. It's just DBMS. I didn't know that PostGreSQL is a open source RDBMS system. All the sqls, table creation etc.. works similar to Oracle or any other RDBMS? I'm working on windows 2000 machine. --- Antony Paul [EMAIL PROTECTED] wrote: I dont whether MS Access is considered as RDBMS. For serious development it is not recommended. Using ODBC have several problems. I will recommend PostgreSQL. Now it runs very well on Windows. But requires Windows 2000 or higher. You can find it at http://www.postgresql.org/ftp/binary/v8.0.1/win32/. I am using it and have no problems. I am posting my configuration that I used to set up DBCP. server.xml --- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / Resource name=jdbc/db1 auth=Container type=javax.sql.DataSource factory=org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory driverClassName=org.postgresql.Driver url=jdbc:postgresql://192.168.4.248/antony maxActive=20 maxIdle=10 maxWait=-1 username=benchmark password=benchmark / /GlobalNamingResources TOMCAT_HOME/conf/context.xml --- ResourceLink global=jdbc/db1 name=jdbc/db1 type=javax.sql.DataSource/ TOMCAT_HOME/webapps/web/WEB-INF/web.xml - resource-ref res-ref-namejdbc/db1/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Did you defined your newly created context web in server.xml or at TOMCAT_HOME\conf\Catalina\localhost\some name.xml hope it will help. rgds Antony Paul On Mon, 21 Feb 2005 22:25:59 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: Yes i read and did as per the document. When it didn't work, i followed the suggetions given to many users in the mailing lists in the internet and now i guess i messed up. Actually in the error, it says, no suitable driver found. I'm using Ms Access as it's free. Do we have any free driver available in the form of jar to use in place of JDBC-ODBC bridge driver? Or it's not required if configuration is correct. Pls let me know. I've pasted all relevant code in my first mail itself. If time permits, any of you can try give me the solution. It'll be a great help. I've integrated tomcat 5.5.7 with apache 2. Does this has any impact on the above. --- Antony Paul [EMAIL PROTECTED] wrote: If you followed the tomcat docs you will have no problem in DBCP getting to work. Going for Globalnamingresources is needed if you need to access it will all applications. Try to configure it as per the doc in following URL. http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html follow MySQL config. And no need to put commons*.jar in commons/lib as TC by default comes with it. rgds Antony Paul On Mon, 21 Feb 2005 21:52:13 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: I tried without GlobalNamingResources. No luck. When googled, i found that if we include GlobalNamingResource tag, then it will be available in all web context. After spending enough time on that, now i coded all database related stuff in JSP in the way we do in stand alone application. I mean - Coding like this in jspo itself. code -- %@ page contentType=text/html import=java.sql.*% html headtitlesimmPlan - simple material planning system/title script language=JavaScript src=/js/default.js/script % String userid = request.getParameter(userid); String passwd = request.getParameter(passwd); System.out.println(Password: + passwd); String pwd = , str = ;
Re: Name jdbc is not bound in this Context error
Thanks for the replies. What do u mean by the following in ur erlier mail. Did you defined your newly created context web in server.xml or at TOMCAT_HOME\conf\Catalina\localhost\some name.xml Does it mean i need to create a new xml file in TOMCAT_HOME\conf\Catalina\localhost? What should be it's name? What should it contain? Pls let me know. I will try that. I didn't create any file there. Thanks again. hope it will help. rgds Antony Paul On Mon, 21 Feb 2005 22:25:59 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: Yes i read and did as per the document. When it didn't work, i followed the suggetions given to many users in the mailing lists in the internet and now i guess i messed up. Actually in the error, it says, no suitable driver found. I'm using Ms Access as it's free. Do we have any free driver available in the form of jar to use in place of JDBC-ODBC bridge driver? Or it's not required if configuration is correct. Pls let me know. I've pasted all relevant code in my first mail itself. If time permits, any of you can try give me the solution. It'll be a great help. I've integrated tomcat 5.5.7 with apache 2. Does this has any impact on the above. --- Antony Paul [EMAIL PROTECTED] wrote: If you followed the tomcat docs you will have no problem in DBCP getting to work. Going for Globalnamingresources is needed if you need to access it will all applications. Try to configure it as per the doc in following URL. http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html follow MySQL config. And no need to put commons*.jar in commons/lib as TC by default comes with it. rgds Antony Paul On Mon, 21 Feb 2005 21:52:13 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: I tried without GlobalNamingResources. No luck. When googled, i found that if we include GlobalNamingResource tag, then it will be available in all web context. After spending enough time on that, now i === message truncated === __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Name jdbc is not bound in this Context error
You can name it the name of the context(web). The content should be similar to any other file there. I am giving a sample Context docBase=${catalina.home}/webapps/web antiResourceLocking=false antiJARLocking=false /Context rgds Antony Paul On Mon, 21 Feb 2005 23:18:55 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: Thanks for the replies. What do u mean by the following in ur erlier mail. Did you defined your newly created context web in server.xml or at TOMCAT_HOME\conf\Catalina\localhost\some name.xml Does it mean i need to create a new xml file in TOMCAT_HOME\conf\Catalina\localhost? What should be it's name? What should it contain? Pls let me know. I will try that. I didn't create any file there. Thanks again. hope it will help. rgds Antony Paul On Mon, 21 Feb 2005 22:25:59 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: Yes i read and did as per the document. When it didn't work, i followed the suggetions given to many users in the mailing lists in the internet and now i guess i messed up. Actually in the error, it says, no suitable driver found. I'm using Ms Access as it's free. Do we have any free driver available in the form of jar to use in place of JDBC-ODBC bridge driver? Or it's not required if configuration is correct. Pls let me know. I've pasted all relevant code in my first mail itself. If time permits, any of you can try give me the solution. It'll be a great help. I've integrated tomcat 5.5.7 with apache 2. Does this has any impact on the above. --- Antony Paul [EMAIL PROTECTED] wrote: If you followed the tomcat docs you will have no problem in DBCP getting to work. Going for Globalnamingresources is needed if you need to access it will all applications. Try to configure it as per the doc in following URL. http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html follow MySQL config. And no need to put commons*.jar in commons/lib as TC by default comes with it. rgds Antony Paul On Mon, 21 Feb 2005 21:52:13 -0800 (PST), U K Laxmi [EMAIL PROTECTED] wrote: I tried without GlobalNamingResources. No luck. When googled, i found that if we include GlobalNamingResource tag, then it will be available in all web context. After spending enough time on that, now i === message truncated === __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]