Re: how to unwrap a Request from RequestFacade
wrote in message news:of85b6a7da.49853bd1-on85257627.006211ee-85257627.00657...@sectra.se... > Thanks Chris. Still not having any luck. Let me give you the snippet of > the code so that you can understand the problem better: > > I have a servlet like this > > protected void doGet(HttpServletRequest request, HttpServletResponse > response) throws ServletException, IOException { > > // some code > > >RequestFacade rf = (RequestFacade) request;// this > throws a class cast exception >Request realRequest = new > MyRequestFacade().getRequest(rf); > Context ctx = _realRequest.getContext(); > StandardManager sessionMgr = (StandardManager) > ctx.getManager(); > sessionMgr.getActiveSessions(); > > } > > > When I debug I see that the request object coming into doGet method of the > servlet is RequestFacade but I can't assign it directly to a RequestFacade > object or can't type cast it. Although when I type cast it I don't get any > compilation error but at runtime it throws as a ClassCastException. > > Am I doing something stupid here? :-( Looks simple it is so frustrating as > when I debug I can open the RequestFacade object and see the Request > Object, Context, Manager and all the information I need but I don't know > how to access it. > > Any thoughts from fresh pair eyes? > Yes, TC 5.5 still has the server ClassLoader, so the RequestFacade is loaded in a ClassLoader that isn't the parent of your ClassLoader. You need to do one or more of the following: 1) upgrade to TC 6.0 so that the Request and RequestFacade are in your ClassLoader hierarchy (in the default settings) 2) declare your webapp 'privileged' in your context.xml (giving access to the server ClassLoader). 3) I think all the info that you want is exposed by JMX, so use JMX to retrieve it. 4) use introspection to grab the fields. On 5.5 this will be painful, since you have to use introspection everywhere (none of the classes will be in your ClassLoader hierachy) 5) change your catalina.properties file to have the same hierachy as TC 6 (but will get over-written on upgrades). > Thanks, > -- > Muthu Chandir > Sectra North America, Inc. > Phone: (800)307-4425 ext 222 > Email: mu-...@sectra.com > > > > From: > Christopher Schultz > To: > Tomcat Users List > Date: > 09/04/2009 10:28 AM > Subject: > Re: how to unwrap a Request from RequestFacade > > > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Bill, > > On 9/3/2009 10:47 PM, Bill Barker wrote: >> "Christopher Schultz" wrote in message >> news:4aa03ca3.4010...@christopherschultz.net... >> Muthu, >> >> On 9/3/2009 11:17 AM, muthu.chan...@sectra.se wrote: > I am using tomcat 5.5 and just wanted to write a simple servlet to > get > some information using StandardManager such as activeSessions, > expriedSessions, sessionCounter etc.. I am not that familiar with > these > classes. I noticed when the request comes into my servlet it comes as > RequestFacade where the org.apache.catalina.connector.Request is > wrapped > inside it. I haven't figured out how to unwrap the Request object so > that > I can get the Context from which I can get the Manager > (StandardManager) > to access the information I need. Any help with a snippet of code to > get > the Request Object from RequestFacade will be appreciated. >> >> Maybe try something like this: >> >> public class SneekyRequestFacade >> extends RequestFacade >> { >> public SneekyRequestFacade() { super(null); } >> >> public Request getRequest(RequestFacade rf) >> { >>return rf.request; >> } >> } >> >> Now: >> >> RequestFacade rf = ...; // get your requestfacade >> Request req = new SneekyRequestFacade().getRequest(rf); >> >> I think that ought to do it. Isn't OO abuse great? >> >> >>> It is great ;). But you save a couple of lines by just doing straight >>> introspection. > > I had thought about that, but I thought the JVM prevented code from > getting-around access privileges by using introspection. Or is that only > when a SecurityManager is running? > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkqhImUACgkQ9CaO5/Lv0PDVkgCaA9UWhDHNXKdfN2mSPZN1lauK > Z3oAnRphaMCX6vkmjvLH+t/tmUIxp52m > =qxEb > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to unwrap a Request from RequestFacade
"Christopher Schultz" wrote in message news:4aa12265.3020...@christopherschultz.net... > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Bill, > > On 9/3/2009 10:47 PM, Bill Barker wrote: >> "Christopher Schultz" wrote in message >> news:4aa03ca3.4010...@christopherschultz.net... >> Muthu, >> >> On 9/3/2009 11:17 AM, muthu.chan...@sectra.se wrote: > I am using tomcat 5.5 and just wanted to write a simple servlet to > get > some information using StandardManager such as activeSessions, > expriedSessions, sessionCounter etc.. I am not that familiar with > these > classes. I noticed when the request comes into my servlet it comes as > RequestFacade where the org.apache.catalina.connector.Request is > wrapped > inside it. I haven't figured out how to unwrap the Request object so > that > I can get the Context from which I can get the Manager > (StandardManager) > to access the information I need. Any help with a snippet of code to > get > the Request Object from RequestFacade will be appreciated. >> >> Maybe try something like this: >> >> public class SneekyRequestFacade >> extends RequestFacade >> { >> public SneekyRequestFacade() { super(null); } >> >> public Request getRequest(RequestFacade rf) >> { >>return rf.request; >> } >> } >> >> Now: >> >> RequestFacade rf = ...; // get your requestfacade >> Request req = new SneekyRequestFacade().getRequest(rf); >> >> I think that ought to do it. Isn't OO abuse great? >> >> >>> It is great ;). But you save a couple of lines by just doing straight >>> introspection. > > I had thought about that, but I thought the JVM prevented code from > getting-around access privileges by using introspection. Or is that only > when a SecurityManager is running? > No, without a SecurityManager, you can do pretty much anything with introspection by at most calling field.setAccessible(true). This is how the WebappClassLoader nulls out static fields when you undeploy a webapp. It's also a big part of the reason that the server ClassLoader went away by default, since it didn't really stop anyone from accessing Tomcat core classes. > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkqhImUACgkQ9CaO5/Lv0PDVkgCaA9UWhDHNXKdfN2mSPZN1lauK > Z3oAnRphaMCX6vkmjvLH+t/tmUIxp52m > =qxEb > -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Class loading question (with aspectj)
I don't explain well. I appologize for it. Those .java source were already compiled into .class file (I use maven I checked the war file. Class files are stored in the correct path.) It just looks like the webapp class loder doesn't load the aspectj class (whose source is ended with .aj and it is compiled into .class after packaged into war file.) But I think I could be wrong because I am not very sure whether the WebappLoader.java/ WebappClassLoader.java are the right place to look at. Just want to collect as many information as possible in order to find out what happends. It is interesting for me to understand more on how it works. Thanks again for your reply. Caldarale, Charles R wrote: > >> From: neo anderson [mailto:javadeveloper...@yahoo.co.uk] >> Subject: Re: Class loading question (with aspectj) >> >> I do not put the same class i.e. TapestryFilter.java in both location >> (WEB-INF/classes and WEB-INF/lib). > > A .java file is not a class file. > >> The way how I test is by copying TapestryFilter.java to another foler >> under WEB-INF/classes and renaming it to another name e.g. >> MyTapestryFilter.java. > > Again, a .java file is not a class file. More has to be changed than just > the file name, to say nothing of compiling it. > > - 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: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://www.nabble.com/Class-loading-question-%28with-aspectj%29-tp25288633p25304070.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Realm configuration issues
Hi, I have been trying to implement form based authentication using container managed security. I had tried originally to use the DataSource Realm but after struggling with that for so long I gave up because I had tried everything I could think of as far as putting the Realm declaration in varioius places with no luck, and I got conflicting answers between the the Apache-Tomcat docs ( which I've read multiple times) and what I found in places like mark-mail and nabble. So now I am trying to get it working with the JDBC realm instead. I have a simple webapp for mountain bike and trail reviews and bicycle reviews. In order to submit a new review you need to log on or register. Here is my server.xml: And my web.xml: http://www.w3.org/2001/XMLSchema-instance"; xmlns=" http://java.sun.com/xml/ns/javaee"; xmlns:web=" http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; id="WebApp_ID" version="2.5"> project-1c index.html index.htm index.jsp default.html default.htm default.jsp com.buzz.TrailsAppServletContextListener find trails based on category TrailFinderServlet TrailFinderServlet com.buzz.finder.TrailFinderServlet TrailFinderServlet /TrailFinderServlet TrailReviewSubmitServlet TrailReviewSubmitServlet com.buzz.review.TrailReviewSubmitServlet TrailReviewSubmitServlet /TrailReviewSubmitServlet TrailReviewServlet TrailReviewServlet com.buzz.review.TrailReviewServlet TrailReviewServlet /TrailReviewServlet bikeFinderServlet bikeFinderServlet com.buzz.finder.bikeFinderServlet bikeFinderServlet /bikeFinderServlet BikeFinderServlet BikeFinderServlet com.buzz.finder.BikeFinderServlet BikeFinderServlet /BikeFinderServlet 10 admin member guest UpdateTrails /* GET POST These are the roles who have access admin FORM Tomcat Server Configuration Form-Based Authentication Area /Login.html /auth-error.html DB Connection jdbc/trailsDB javax.sql.DataSource Container Even though it says DataSource in the above resource-ref tag, all the info I found told me to do that even with the JDBCRealm. So there seems to be 2 problems. Here's what Tomcat gives me when I attempt to login: HTTP Status 404 - /blurbV1/auth-error.html -- *type* Status report *message* */blurbV1/auth-error.html* *description* *The requested resource (/blurbV1/auth-error.html) is not available.* -- Apache Tomcat/6.0.16 But it should allow me to login since I have the users and the database setup with the correct user and role tables. Here is the tomcat-users.xml created by Tomcat: Any ideas why I might be getting this ? Thanks, Adam
RE: Tomcat 6 for Windows won't start
> From: John Oliver [mailto:joli...@john-oliver.net] > Subject: Tomcat 6 for Windows won't start > > Error occurred during initialization of VM > java/lang/NoClassDefFoundError: java/lang/Object Your JVM installation has been corrupted; you need to reinstall it. - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 6 for Windows won't start
I have Tomcat 6 installed on a W2K3 R2 Enterprise SP2 VM. It was running just fine. VMware had a stroke, and I had to reboot the physical host. When this VM came back up, Tomcat won't start. The only error I can see is stdout_log, and it says: Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object Pretty cryptic, and no useful details that I can discern. But that's what it gives me. How do I find and fix the problem? -- *** * John Oliver http://www.john-oliver.net/ * * * *** - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using multiple DataSource's for fail-over.
Mohit Anchlia wrote: Something like this: (DESCRIPTION=(FAILOVER=ON)(ADDRESS_LIST=(LOAD_BALANCE=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1526))(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1526)))(CONNECT_DATA=(SERVICE_NAME=somesid))) I still haven't been able to locate the documentation, but that seems to make connections. I'm wondering if I need to configure the DBCP connectionProperties attribute with anything special for fail-over? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18
I changed the servlet mapping to /servlet/HUControlServlet/* and it worked. Thanks, Chuck and Chris. Karl -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Friday, September 04, 2009 12:00 PM To: Tomcat Users List Subject: Re: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Karl, On 9/4/2009 11:10 AM, Lataxes, Karl wrote: > I tried your suggestion and replaced the trailing / in the url-pattern > of the servlet-mapping tag with *, but got the same result. I even > tried commenting out servlet-mapping altogether, but still received > the file not found exception. Chuck was right on both counts: remove the leading /UMI, and fix the trailing asterisk to include a /. So, the mapping uri would need to be: /servlet/HUControlServlet/* > The HUSim class is part of an application that I wrote years back to > test servlet functionality, and it has worked up to and including > servlet deployment in 5.0.25. I removed the trailing /, rebuilt the > application, and ran it again, with the same result. I strongly > believe it may be a mapping issue, but I just can't seem to nail it down. Go ahead and re-post your entire conf/Catalina/localhost/UMI.xml and web.xml from your webapp. Also, it wouldn't hurt to stop Tomcat, remove the entire 'work' directory from CATALINA_BASE (the root of the Tomcat install), and re-start Tomcat, just in case something is being inadvertently cached in there. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqhOXIACgkQ9CaO5/Lv0PAv5wCdFFcgXjtr836UYd251fNAy2GZ 8ngAn0FdAlstoJ2Z5yLq12lM8LL7iDbX =EoZC -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to unwrap a Request from RequestFacade
Thanks Chris. Still not having any luck. Let me give you the snippet of the code so that you can understand the problem better: I have a servlet like this protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // some code RequestFacade rf = (RequestFacade) request;// this throws a class cast exception Request realRequest = new MyRequestFacade().getRequest(rf); Context ctx = _realRequest.getContext(); StandardManager sessionMgr = (StandardManager) ctx.getManager(); sessionMgr.getActiveSessions(); } When I debug I see that the request object coming into doGet method of the servlet is RequestFacade but I can't assign it directly to a RequestFacade object or can't type cast it. Although when I type cast it I don't get any compilation error but at runtime it throws as a ClassCastException. Am I doing something stupid here? :-( Looks simple it is so frustrating as when I debug I can open the RequestFacade object and see the Request Object, Context, Manager and all the information I need but I don't know how to access it. Any thoughts from fresh pair eyes? Thanks, -- Muthu Chandir Sectra North America, Inc. Phone: (800)307-4425 ext 222 Email: mu-...@sectra.com From: Christopher Schultz To: Tomcat Users List Date: 09/04/2009 10:28 AM Subject: Re: how to unwrap a Request from RequestFacade -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill, On 9/3/2009 10:47 PM, Bill Barker wrote: > "Christopher Schultz" wrote in message > news:4aa03ca3.4010...@christopherschultz.net... > Muthu, > > On 9/3/2009 11:17 AM, muthu.chan...@sectra.se wrote: I am using tomcat 5.5 and just wanted to write a simple servlet to get some information using StandardManager such as activeSessions, expriedSessions, sessionCounter etc.. I am not that familiar with these classes. I noticed when the request comes into my servlet it comes as RequestFacade where the org.apache.catalina.connector.Request is wrapped inside it. I haven't figured out how to unwrap the Request object so that I can get the Context from which I can get the Manager (StandardManager) to access the information I need. Any help with a snippet of code to get the Request Object from RequestFacade will be appreciated. > > Maybe try something like this: > > public class SneekyRequestFacade > extends RequestFacade > { > public SneekyRequestFacade() { super(null); } > > public Request getRequest(RequestFacade rf) > { >return rf.request; > } > } > > Now: > > RequestFacade rf = ...; // get your requestfacade > Request req = new SneekyRequestFacade().getRequest(rf); > > I think that ought to do it. Isn't OO abuse great? > > >> It is great ;). But you save a couple of lines by just doing straight >> introspection. I had thought about that, but I thought the JVM prevented code from getting-around access privileges by using introspection. Or is that only when a SecurityManager is running? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqhImUACgkQ9CaO5/Lv0PDVkgCaA9UWhDHNXKdfN2mSPZN1lauK Z3oAnRphaMCX6vkmjvLH+t/tmUIxp52m =qxEb -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 4.1.31 problem
Christopher Schultz wrote: > Mark, > > On 9/4/2009 12:31 PM, Mark Thomas wrote: >> Christopher Schultz wrote: >>> Sorry, it's been a while since I used Tomcat 4.1, but I was suggesting >>> that he disable autoDeply, in which case using an XML file in webapps >>> wouldn't help. >> Sorry missed that. In that case the Context element would have to be in >> server.xml but you could still have a context specific resource defined >> in that Context element. > > Oh, really? When autoDeploy="false", Tomcat will still look in webapps > (or docBase/.. ??) for a [appname].xml and use that for configuration? > That's cool. No, that isn't what I meant. What I meant was that you can still define a per context resource in a Context element inside server.xml. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [ANN] Apache Tomcat 5.5.28 released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 9/4/2009 12:18 PM, Mark Thomas wrote: > Christopher Schultz wrote: >> Filip, >> >> On 9/3/2009 8:30 PM, Filip Hanik - Dev Lists wrote: >>> The Apache Tomcat team announces (a bit late) the immediate availability >>> of Apache Tomcat 5.5.28 stable. >> >> Great! >> >> I see this in the changelog, with no bug id or commit id: >> >> "Enable the CGIServlet to work with Windows Vista. (markt)" >> >> What's the best way to find out what the problem and fix actually was? > > Search MarkMail for that test and you'll find this: > > http://svn.apache.org/viewvc?view=rev&revision=681141 Thanks. I wanted to see what the change was to verify that it would work under Windows 7... if you're making a Vista Fix, you may as well make it work for both. The patch I see looks like it will work (since Windows 7, at least at RC1, returns "Windows Vista" for "os.name" on Sun JVM 1.6.0_13-b03). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqhWGEACgkQ9CaO5/Lv0PAFrgCgvhoOMUiE/wHURHuDc14dWB6Q QzEAoLh3jFNtoerLk5/K+JBR420Jj/55 =k06v -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 4.1.31 problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 9/4/2009 12:31 PM, Mark Thomas wrote: > Christopher Schultz wrote: >> Sorry, it's been a while since I used Tomcat 4.1, but I was suggesting >> that he disable autoDeply, in which case using an XML file in webapps >> wouldn't help. > > Sorry missed that. In that case the Context element would have to be in > server.xml but you could still have a context specific resource defined > in that Context element. Oh, really? When autoDeploy="false", Tomcat will still look in webapps (or docBase/.. ??) for a [appname].xml and use that for configuration? That's cool. Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqhV7wACgkQ9CaO5/Lv0PA7aACeOq0xkWAMo9F6Y0Zp6hQccKaz udUAnRF7uNmP0sdT5Uz+UnG6BWbvMsY0 =IQ/v -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 4.1.31 problem
Christopher Schultz wrote: > Mark, > > On 9/4/2009 11:21 AM, Mark Thomas wrote: >> Christopher Schultz wrote: >>> Jamez, >>> >>> On 9/3/2009 11:15 PM, jamez smith wrote: This is the exception when removing the element from the server.xml: [ERROR] [Cannot create JDBC driver of class '' for connect URL 'null']org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getDriver(DriverManager.java:243) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518) >>> Okay, now we're back to a simpler problem. I don't believe Tomcat 4.1.x >>> uses META-INF/context.xml files, which is a shame, because you can't >>> define context-specific elements anywhere. It looks like >>> you're going to have to have your in server.xml no matter what. >> Huh? > >> You put myapp.xml in the webapps directory in Tomcat 4.1.x. > > Sorry, it's been a while since I used Tomcat 4.1, but I was suggesting > that he disable autoDeply, in which case using an XML file in webapps > wouldn't help. Sorry missed that. In that case the Context element would have to be in server.xml but you could still have a context specific resource defined in that Context element. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [ANN] Apache Tomcat 5.5.28 released
Mark Thomas wrote: > Christopher Schultz wrote: >> Filip, >> >> On 9/3/2009 8:30 PM, Filip Hanik - Dev Lists wrote: >>> The Apache Tomcat team announces (a bit late) the immediate availability >>> of Apache Tomcat 5.5.28 stable. >> Great! >> >> I see this in the changelog, with no bug id or commit id: >> >> "Enable the CGIServlet to work with Windows Vista. (markt)" >> >> What's the best way to find out what the problem and fix actually was? > > Search MarkMail for that test and you'll find this: Sorry - text, not test. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [ANN] Apache Tomcat 5.5.28 released
Christopher Schultz wrote: > Filip, > > On 9/3/2009 8:30 PM, Filip Hanik - Dev Lists wrote: >> The Apache Tomcat team announces (a bit late) the immediate availability >> of Apache Tomcat 5.5.28 stable. > > Great! > > I see this in the changelog, with no bug id or commit id: > > "Enable the CGIServlet to work with Windows Vista. (markt)" > > What's the best way to find out what the problem and fix actually was? Search MarkMail for that test and you'll find this: http://svn.apache.org/viewvc?view=rev&revision=681141 Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [ANN] Apache Tomcat 5.5.28 released
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Filip, On 9/3/2009 8:30 PM, Filip Hanik - Dev Lists wrote: > The Apache Tomcat team announces (a bit late) the immediate availability > of Apache Tomcat 5.5.28 stable. Great! I see this in the changelog, with no bug id or commit id: "Enable the CGIServlet to work with Windows Vista. (markt)" What's the best way to find out what the problem and fix actually was? Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqhPQ8ACgkQ9CaO5/Lv0PA6pQCeK3HANjQCbESxzqc+hXSd7bqM IPEAnRXGJtwG1OV5mWQADVxnKfBN6tzi =XV9e -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 4.1.31 problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 9/4/2009 11:21 AM, Mark Thomas wrote: > Christopher Schultz wrote: >> Jamez, >> >> On 9/3/2009 11:15 PM, jamez smith wrote: >>> This is the exception when removing the element from the >>> server.xml: >> >>> [ERROR] [Cannot create JDBC driver of class '' for connect URL >>> 'null']org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver >>> of class '' for connect URL 'null', cause: >>> java.sql.SQLException: No suitable driver >>> at java.sql.DriverManager.getDriver(DriverManager.java:243) >>> at >>> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743) >>> at >>> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518) >> >> Okay, now we're back to a simpler problem. I don't believe Tomcat 4.1.x >> uses META-INF/context.xml files, which is a shame, because you can't >> define context-specific elements anywhere. It looks like >> you're going to have to have your in server.xml no matter what. > > Huh? > > You put myapp.xml in the webapps directory in Tomcat 4.1.x. Sorry, it's been a while since I used Tomcat 4.1, but I was suggesting that he disable autoDeply, in which case using an XML file in webapps wouldn't help. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqhOocACgkQ9CaO5/Lv0PC8AQCbBtykno9Vzuij/0OCMXQVBI1R nlYAmQGORk1qHSRk7bevSaNFmkjw1iOq =wAnt -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Karl, On 9/4/2009 11:10 AM, Lataxes, Karl wrote: > I tried your suggestion and replaced the trailing / in the url-pattern > of the servlet-mapping tag with *, but got the same result. I even > tried commenting out servlet-mapping altogether, but still received the > file not found exception. Chuck was right on both counts: remove the leading /UMI, and fix the trailing asterisk to include a /. So, the mapping uri would need to be: /servlet/HUControlServlet/* > The HUSim class is part of an application that I wrote years back to > test servlet functionality, and it has worked up to and including > servlet deployment in 5.0.25. I removed the trailing /, rebuilt the > application, and ran it again, with the same result. I strongly believe > it may be a mapping issue, but I just can't seem to nail it down. Go ahead and re-post your entire conf/Catalina/localhost/UMI.xml and web.xml from your webapp. Also, it wouldn't hurt to stop Tomcat, remove the entire 'work' directory from CATALINA_BASE (the root of the Tomcat install), and re-start Tomcat, just in case something is being inadvertently cached in there. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqhOXIACgkQ9CaO5/Lv0PAv5wCdFFcgXjtr836UYd251fNAy2GZ 8ngAn0FdAlstoJ2Z5yLq12lM8LL7iDbX =EoZC -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: The method setTest(boolean) in the type WhenTag is not applicable for the arguments (String)
Thanks Mark. markt-2 wrote: > > achittela wrote: >> Hi, >> >> I got the the below exception while i was accessing web application. I >> think >> this issue is related to Tomcat 6.0.20. Did anyone have fix for this? >> >> SEVERE: Servlet.service() for servlet debugjsp threw exception >> org.apache.jasper.JasperException: Unable to compile class for JSP: >> >> An error occurred at line: 45 in the jsp file: /cogadmin/addareas.jsp >> The method setTest(boolean) in the type WhenTag is not applicable for the >> arguments (String) >> 42: >> 43: >> 44: >> 45: > > Try removing the extra } ? > > Mark > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://www.nabble.com/The-method-setTest%28boolean%29-in-the-type-WhenTag-is-not-applicable-for-the-arguments-%28String%29-tp25296381p25296797.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 9/4/2009 10:50 AM, Caldarale, Charles R wrote: >> From: Christopher Schultz [mailto:ch...@christopherschultz.net] >> Subject: Re: Unable to Access Servlet After Migrating From Tomcat >> 5.0.25 to 6.0.18 >> >> what happens if you change your URI mapping to: >> >> HUControlServlet >> /UMI/servlet/HUControlServlet* >> > > That's not a valid ; /UMI/servlet/HUControlServlet/* > would be. (Note that the /UMI should be removed, as previously > discussed.) Aah, yes: no suffix mappings in web.xml :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqhK7AACgkQ9CaO5/Lv0PBP8gCeItMTGoTasFxOBf4+SK81bCHm 39QAn2aQ+YWxM1gwftdUSKwszLbAFS3n =4yZW -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: The method setTest(boolean) in the type WhenTag is not applicable for the arguments (String)
achittela wrote: > Hi, > > I got the the below exception while i was accessing web application. I think > this issue is related to Tomcat 6.0.20. Did anyone have fix for this? > > SEVERE: Servlet.service() for servlet debugjsp threw exception > org.apache.jasper.JasperException: Unable to compile class for JSP: > > An error occurred at line: 45 in the jsp file: /cogadmin/addareas.jsp > The method setTest(boolean) in the type WhenTag is not applicable for the > arguments (String) > 42: > 43: > 44: > 45: Try removing the extra } ? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 4.1.31 problem
Christopher Schultz wrote: > Jamez, > > On 9/3/2009 11:15 PM, jamez smith wrote: >> This is the exception when removing the element from the >> server.xml: > >> [ERROR] [Cannot create JDBC driver of class '' for connect URL >> 'null']org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver >> of class '' for connect URL 'null', cause: >> java.sql.SQLException: No suitable driver >> at java.sql.DriverManager.getDriver(DriverManager.java:243) >> at >> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743) >> at >> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518) > > Okay, now we're back to a simpler problem. I don't believe Tomcat 4.1.x > uses META-INF/context.xml files, which is a shame, because you can't > define context-specific elements anywhere. It looks like > you're going to have to have your in server.xml no matter what. Huh? You put myapp.xml in the webapps directory in Tomcat 4.1.x. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
The method setTest(boolean) in the type WhenTag is not applicable for the arguments (String)
Hi, I got the the below exception while i was accessing web application. I think this issue is related to Tomcat 6.0.20. Did anyone have fix for this? SEVERE: Servlet.service() for servlet debugjsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 45 in the jsp file: /cogadmin/addareas.jsp The method setTest(boolean) in the type WhenTag is not applicable for the arguments (String) 42: 43: 44: 45: 46: Your session has expired or an error has occured please use 47: Cog Search Page 48: to select a Cog to view Stacktrace: at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:621) at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99) at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462) at org.apache.jsp.frame.common.main_layout_jsp._jspx_meth_tiles_005finsert_005f2(main_layout_jsp.java:280) at org.apache.jsp.frame.common.main_layout_jsp._jspService(main_layout_jsp.java:144) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263) at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:302) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invo
RE: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18
Chris, I tried your suggestion and replaced the trailing / in the url-pattern of the servlet-mapping tag with *, but got the same result. I even tried commenting out servlet-mapping altogether, but still received the file not found exception. The HUSim class is part of an application that I wrote years back to test servlet functionality, and it has worked up to and including servlet deployment in 5.0.25. I removed the trailing /, rebuilt the application, and ran it again, with the same result. I strongly believe it may be a mapping issue, but I just can't seem to nail it down. Karl -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Friday, September 04, 2009 10:42 AM To: Tomcat Users List Subject: Re: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Karl, On 9/4/2009 8:56 AM, Lataxes, Karl wrote: > I am attempting to migrate a servlet from Tomcat 5.0.25 to 6.0.18, but > my efforts to access it while running under 6.0.18 have been > unsuccessful. [snip] > Here is the stack trace I received when running my server based > application to access the servlet: > > java.io.FileNotFoundException: > http://d1uap:4901/UMI/servlet/HUControlServlet/ > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructo > rA > ccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCo > ns > tructorAccessorImpl.java:27) > at > java.lang.reflect.Constructor.newInstance(Constructor.java:494) > at > sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.ja > va > :1240) > at java.security.AccessController.doPrivileged(Native Method) > at > sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpUR > LC > onnection.java:1234) > at > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConn > ec > tion.java:921) > at > com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.messages > .H > UStatus.sendStatus(HUStatus.java:104) > at > com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.messages > .H > UInitConn.sendStatus(HUInitConn.java:95) > at > com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.drivers. > HU > Session.Process(HUSession.java:431) > at > com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.drivers. > HU > Sim.main(HUSim.java:311) I'm just guessing that com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.drivers.HU Sim is your own class, right? Well, your code is definitely running. It's trying to access the URL "http://d1uap:4901/UMI/servlet/HUControlServlet/"; using an HttpURLConnection object. It looks like your code isn't properly catching FileNotFoundException (which really is a stupid exception for URLConnection to throw IMHO) when the URL is not accessible. Or do I have this wrong, and the exception is occurring in a driver class you've written to access the server? Could you post your configuration from server.xml? What happens when you telnet to d1uap:4901 ? > Here is the localhost_access_log entry from the test that generated > the stack trace (servlet running on Tomcat 6.0.18). As you can see, > it is generating an HTTP 404 error code: > > 10.38.164.58 - - [03/Sep/2009:13:53:42 -0400] "POST > /UMI/servlet/HUControlServlet/ HTTP/1.1" 404 1042 That trailing slash doesn't look right. It looks like that's what your code is requesting (it's up there in the exception) but you have mapped this exact URI in your web.xml: > > HUControlServlet > /UMI/servlet/HUControlServlet > The trailing slash is likely to be the problem. What happens if you make the request without the trailing slash? Or, what happens if you change your URI mapping to: HUControlServlet /UMI/servlet/HUControlServlet* - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqhJygACgkQ9CaO5/Lv0PD+owCghZFjel33q2anejx6BzvDpkE5 r+cAnA93bbfqqLk24fisYd01p/NxQuvg =ZxOF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: An unexpected error has been detected by Java Runtime Environment:
2009/9/4 Christopher Schultz > I've never seen one. The description of SIGBUS seems to indicate that > it's pretty bad: http://en.wikipedia.org/wiki/SIGBUS (bad physical > memory address, virtual memory pages have disappeared, etc.). > Or a misaligned physical memory access, which is a mere programming error and hence far more common. For example, accessing a 32-bit word at a non-32-bit aligned boundary. I've seen them plenty of times when I've cocked up pointer arithmetic in C and (say) incremented a pointer to int by 1 in a loop, rather than by sizeof(int). I wouldn't treat it as any more serious than a SIGSEGV, and it usually has the same root cause: bad code or bad RAM. - Peter
RE: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Subject: Re: Unable to Access Servlet After Migrating From Tomcat > 5.0.25 to 6.0.18 > > what happens if you change your URI mapping to: > > HUControlServlet > /UMI/servlet/HUControlServlet* > That's not a valid ; /UMI/servlet/HUControlServlet/* would be. (Note that the /UMI should be removed, as previously discussed.) - 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.
Re: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Karl, On 9/4/2009 8:56 AM, Lataxes, Karl wrote: > I am attempting to migrate a servlet from Tomcat 5.0.25 to 6.0.18, but > my efforts to access it while running under 6.0.18 have been > unsuccessful. [snip] > Here is the stack trace I received when running my server based > application to access the servlet: > > java.io.FileNotFoundException: > http://d1uap:4901/UMI/servlet/HUControlServlet/ > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA > ccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons > tructorAccessorImpl.java:27) > at > java.lang.reflect.Constructor.newInstance(Constructor.java:494) > at > sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java > :1240) > at java.security.AccessController.doPrivileged(Native Method) > at > sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLC > onnection.java:1234) > at > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec > tion.java:921) > at > com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.messages.H > UStatus.sendStatus(HUStatus.java:104) > at > com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.messages.H > UInitConn.sendStatus(HUInitConn.java:95) > at > com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.drivers.HU > Session.Process(HUSession.java:431) > at > com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.drivers.HU > Sim.main(HUSim.java:311) I'm just guessing that com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.drivers.HUSim is your own class, right? Well, your code is definitely running. It's trying to access the URL "http://d1uap:4901/UMI/servlet/HUControlServlet/"; using an HttpURLConnection object. It looks like your code isn't properly catching FileNotFoundException (which really is a stupid exception for URLConnection to throw IMHO) when the URL is not accessible. Or do I have this wrong, and the exception is occurring in a driver class you've written to access the server? Could you post your configuration from server.xml? What happens when you telnet to d1uap:4901 ? > Here is the localhost_access_log entry from the test that generated the > stack trace (servlet running on Tomcat 6.0.18). As you can see, it is > generating an HTTP 404 error code: > > 10.38.164.58 - - [03/Sep/2009:13:53:42 -0400] "POST > /UMI/servlet/HUControlServlet/ HTTP/1.1" 404 1042 That trailing slash doesn't look right. It looks like that's what your code is requesting (it's up there in the exception) but you have mapped this exact URI in your web.xml: > > HUControlServlet > /UMI/servlet/HUControlServlet > The trailing slash is likely to be the problem. What happens if you make the request without the trailing slash? Or, what happens if you change your URI mapping to: HUControlServlet /UMI/servlet/HUControlServlet* - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqhJygACgkQ9CaO5/Lv0PD+owCghZFjel33q2anejx6BzvDpkE5 r+cAnA93bbfqqLk24fisYd01p/NxQuvg =ZxOF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: maling list archives and bug tracker dumps for academic research evaluation
Dear Konstantin, >By the way, the mail archives are available here: >http://tomcat.apache.org/mail/dev/ > >Those are gzipped mbox files. Though I do not see that location to be >documented/mentioned anywhere. > > >Best regards, >Konstantin Kolinko thanks for the link to the archives. regards Aftab Iqbal - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: An unexpected error has been detected by Java Runtime Environment:
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tsirkin, On 9/4/2009 5:12 AM, Tsirkin Evgeny wrote: > Why SIGBUS is "Cool"? I've never seen one. The description of SIGBUS seems to indicate that it's pretty bad: http://en.wikipedia.org/wiki/SIGBUS (bad physical memory address, virtual memory pages have disappeared, etc.). > What is strange is that running 32 bit java helped. Of course i can > explain it that the 32 have less address space and it does not get to > the bad RAM ,but still ... It's possible. What is your architecture? You didn't mention it in your initial post. Do you have physical access? Can you run a memory tester on it? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqhJNgACgkQ9CaO5/Lv0PAHzwCff9RgReSy8KeQLVEnN5TX2XEB kSIAoJPHn+1g7VzvA/+FuCdvB8YzY9mt =d2Fg -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod jk - multiple applications, different server clusers, sticky sessions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, On 9/4/2009 12:52 AM, Rainer Jung wrote: > On 03.09.2009 23:31, Christopher Schultz wrote: >> Whenever a client browses to webapps found on / and /foo, the requests >> to /foo will get TWO cookies, and confusion may occur (I'm not sure what >> mod_jk will do in this situation... Rainer?). > > Not sure either :( > > Even if I looked at the code now, I wouldn't take it for granted, that > the behaviour can't change. Agreed. I don't have a cluster handy to test, but it would be good to know what mod_jk actually does in the case where multiple JSESSIONID cookies exist and have different jvmRoute suffixes. > Actually I'm not even sure what the browser is supposed to send (the > same cookie multiple times, or only the one with the longest path > match). My experience was that /both/ cookies were sent (which makes sense, since there's no prohibition against the same cookie name being used more than one time when a different path is used). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqhJEcACgkQ9CaO5/Lv0PDpggCgv1aVrfTiq9MH1SF2Td4Ha3EP iY0AoLnXxKeQ6iKeermF2JbvCRjEGoaQ =I2jx -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 4.1.31 problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jamez, On 9/3/2009 11:15 PM, jamez smith wrote: > This is the exception when removing the element from the > server.xml: > > [ERROR] [Cannot create JDBC driver of class '' for connect URL > 'null']org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver > of class '' for connect URL 'null', cause: > java.sql.SQLException: No suitable driver > at java.sql.DriverManager.getDriver(DriverManager.java:243) > at > org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743) > at > org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518) Okay, now we're back to a simpler problem. I don't believe Tomcat 4.1.x uses META-INF/context.xml files, which is a shame, because you can't define context-specific elements anywhere. It looks like you're going to have to have your in server.xml no matter what. So, either keep your webapp in C:\procurement (which you said works, right?) or turn off autoDeply in your . > If you need or elements inside your , then > you have two options: >> > 1. Set autoDeploy="false" on your >> > This is the error which is same as the JDBC driver error: The error you posted is really the consequence of another error, not an actual error in itself. Can you post the real error (probably in localhost.log or [yourwebappname].log)? > 2. Keep your 's docBase outside of your 's appBase >> >> I changed same. I'm sorry... which error? There's a lot going on here. > I agree with Chuck's and Mark's comments WRT JRE and Tomcat version. > > I am desperate now. Will try Tomcat 5 with JDK1.4 . Note that your existing server.xml will me worthless if you upgrade. Start with a fresh server.xml from the distro and merge-in any elements that you actually need. Don't try to modify your old server.xml to work in Tomcat 5. Oh, and move your into META-INF/context.xml and simplify your live greatly. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqhI6YACgkQ9CaO5/Lv0PBpAwCcCHbMwhbPuHPJ/GagQ3+bt/LX I58AoJ+PvyEtc+pZu2zDm8ko55UBywwD =pLYs -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: how to unwrap a Request from RequestFacade
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill, On 9/3/2009 10:47 PM, Bill Barker wrote: > "Christopher Schultz" wrote in message > news:4aa03ca3.4010...@christopherschultz.net... > Muthu, > > On 9/3/2009 11:17 AM, muthu.chan...@sectra.se wrote: I am using tomcat 5.5 and just wanted to write a simple servlet to get some information using StandardManager such as activeSessions, expriedSessions, sessionCounter etc.. I am not that familiar with these classes. I noticed when the request comes into my servlet it comes as RequestFacade where the org.apache.catalina.connector.Request is wrapped inside it. I haven't figured out how to unwrap the Request object so that I can get the Context from which I can get the Manager (StandardManager) to access the information I need. Any help with a snippet of code to get the Request Object from RequestFacade will be appreciated. > > Maybe try something like this: > > public class SneekyRequestFacade > extends RequestFacade > { > public SneekyRequestFacade() { super(null); } > > public Request getRequest(RequestFacade rf) > { >return rf.request; > } > } > > Now: > > RequestFacade rf = ...; // get your requestfacade > Request req = new SneekyRequestFacade().getRequest(rf); > > I think that ought to do it. Isn't OO abuse great? > > >> It is great ;). But you save a couple of lines by just doing straight >> introspection. I had thought about that, but I thought the JVM prevented code from getting-around access privileges by using introspection. Or is that only when a SecurityManager is running? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqhImUACgkQ9CaO5/Lv0PDVkgCaA9UWhDHNXKdfN2mSPZN1lauK Z3oAnRphaMCX6vkmjvLH+t/tmUIxp52m =qxEb -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18
Yes, the path exists, but I do have some symlinks to jar files in the ...DataColl/WEB-INF/lib directory. I set allowLinking="true" in the context and fired up Tomcat again, but got the same result. As far as I can tell from catalina.out, the context is being loaded properly. Could it be something in the conf directory, some security setting that I have somehow missed? -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Friday, September 04, 2009 9:51 AM To: Tomcat Users List Subject: RE: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18 > From: Lataxes, Karl [mailto:karl.lata...@nielsen.com] > Subject: RE: Unable to Access Servlet After Migrating From Tomcat > 5.0.25 to 6.0.18 > > I made the recommended changes but am still getting the exception. > The context file that I renamed to UMI.xml contains only the following: > >reloadable="true"> > Does that docBase actually exist? Does that path consist of hard links only? If any symlinks are involved, you will need to set allowLinking="true" in the . > Context still is being loaded at startup, so that is not the issue. Post the log for that, please. > > HUControlServlet > /servlet/HUControlServlet > > > I also tried removing the "/" from the beginning of the url-pattern > parameter and restarted Tomcat, but the results were the same. Read the servlet spec; the leading slash is required. What exact URL are you using? Should probably post your complete web.xml again. - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: /context not working -- mod_jk error: no match for /server-status
Rainer, Apparently apache is calling /server-status - I see that mod_status is enabled in httpd.conf and exercises that context. One of the frustrations, and I dont know Apache well, is that the access log seldom updates. The error log in the same folder does update, but contains little information--apache restarts is about it. I don't know if this helps, but I just tried to access the sample web app from the server machine's own browser httpd://localhost/sample and I get "Bad Gateway! The proxy server received an invalid response from an upstream server Error 502 locahost and this does update the access log. Dennis Christopher On Sep 4, 2009, at 12:49 AM, Rainer Jung wrote: On 03.09.2009 20:24, Dennis Christopher wrote: Rainer, Trying your /sample/ I get the same result. The log appears to respond to that try but the lines are similar to those I originally posted from mod_jk.log. It's as though every context request is translated into '/server- status'. Not very likely. Are those entries also appearing in times you are not testing? If so those are someone else, and your own request isn't handled by the Apache you are looking at. Can you find your request in the access log? Go through all config files and find out, what is configured about /server-status. That URL doesn't have anything to do with mod_jk. Regards, Rainer the bracketed numbers are: [221:268597152] [debug] attempting to map URI '/server-status' from 5 maps. . . [221:268597152] [debug] attempting to map context URI '/sample/*.=JBOSS1*' source JKMount . . all the entries are marked [debug]. 221 is process httpd with user _www. Dennis On Sep 3, 2009, at 1:26 PM, Rainer Jung wrote: On 03.09.2009 19:15, Dennis Christopher wrote: The problem is that I am trying to support simple references to my context without the tomcat port explicitly included. example: myexample.com/sample should invoke the web-app sample. You don't have a JkMount for /sample, only one for /sample/*. What happens, if you point your browser to http://my.apache.name/sample/ If it doesn't work, extract the lines from your mod_jk log, that refer to this request. Look for something like ... [A_NUMBER:ANOTHER_NUMBER] ... Attempting to map URI '/sample/' from ... Then note A_NUMBER:ANOTHER_NUMBER which are the process and thread id used for the request, and get all lines form the log, which have a timestamp close to your request and use the same IDs. Check whether there are any non-debug lines in there. If you can't see what goes wrong, post those lines. Regards, Rainer what happens instead: the browser tells me: "file not found". looking at catalina.out it seems the request doesnt reach Tomcat at all. How I did it: he quick start guide at http://tomcat.apache.org/connectors-doc/generic_howto/quick.html gives a simple proof of concept for a context setup (/examples"). which I have followed implicitly. I believe you have already seen what I have done with the config files I posted. Dennis P.S as it may be important - if I try example.com:8080/sample the main page of my web app loads but all of its subreferences, to gif images etc, are broken. On Sep 3, 2009, at 12:48 PM, Rainer Jung wrote: On 03.09.2009 15:34, Dennis Christopher wrote: Rainer, I am not sending /server-status explicitly. The mod_jk log which I excerpted earlier shows the processing of server-status before any context is asked for, apparently when Tomcat starts up. The log continues to repeat these entries - apparently mod_jk is looping trying to satisfy this context and never does. No I'm pretty sure this is not the case. I expect someone has a monitoring tool running or a browser windows with auto-refresh for /server-status and that's what produces those debug log lines in mod_jk. No problem per se. So back to the basic question: what is your problem? What are you trying to achieve, what did you do to make it work, how do you test it, what result do you expect and what happens instead? Regards, Rainer I added JkMountCopy All but this had no effect. Dennis On Sep 3, 2009, at 4:18 AM, Rainer Jung wrote: On 02.09.2009 21:45, Dennis Christopher wrote: Rainer, Thanks for the reply. I was confused in my orginal post: I am not using JBoss at all, only mod_jk. The file contents are as follows below. Apache has a hosts directory, but I'm not sure if the files matter. They are either the apache .default files or slight modifications of them, e.g. virtual_host_global.conf contains just: Listen *:80 I don't understand, why you test this with a request /server- status. That doesn't make sense, because you don't want /server-status to be forwarded by mod_jk and in fact you didn't configure it. So choose a better URL to test (one of the URLs you have a JkMount for) and add "JkMountCopy All". Regards, Rainer 1. uriworkermap.properties -- not used 2. from apache2/httpd.conf: LoadModule jk_module libex
RE: Can't fully undeploy a servlet application in Tomcat 6.0.18
> From: jo...@catholic-doc.org [mailto:jo...@catholic-doc.org] > Subject: Can't fully undeploy a servlet application in Tomcat 6.0.18 > > Are there any options that can be set in a Windows environment, that > will prevent this from happening? Look at the antiJARLocking and antiResourceLocking attributes: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18
> From: Lataxes, Karl [mailto:karl.lata...@nielsen.com] > Subject: RE: Unable to Access Servlet After Migrating From Tomcat > 5.0.25 to 6.0.18 > > I made the recommended changes but am still getting the exception. The > context file that I renamed to UMI.xml contains only the following: > >reloadable="true"> > Does that docBase actually exist? Does that path consist of hard links only? If any symlinks are involved, you will need to set allowLinking="true" in the . > Context still is being loaded at startup, so that is not the issue. Post the log for that, please. > > HUControlServlet > /servlet/HUControlServlet > > > I also tried removing the "/" from the beginning of the url-pattern > parameter and restarted Tomcat, but the results were the same. Read the servlet spec; the leading slash is required. What exact URL are you using? Should probably post your complete web.xml again. - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18
I made the recommended changes but am still getting the exception. The context file that I renamed to UMI.xml contains only the following: Context still is being loaded at startup, so that is not the issue. Here are the changes I made to servlet-mapping in web.xml: HUControlServlet /servlet/HUControlServlet I also tried removing the "/" from the beginning of the url-pattern parameter and restarted Tomcat, but the results were the same. -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Friday, September 04, 2009 9:16 AM To: Tomcat Users List Subject: RE: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18 > From: Lataxes, Karl [mailto:karl.lata...@nielsen.com] > Subject: Unable to Access Servlet After Migrating From Tomcat 5.0.25 > to > 6.0.18 > > The context.xml and web.xml files as described are similar to what we > have running under Tomcat 5.0.25. Which is likely the problem. The element has changed between the two levels. > element is in conf/Catalina/[host]; instead, that file must be named UMI.xml. >className="org.apache.naming.resources.FileDirContext" > allowLinking="true" /> Remove the element, since it's the default. Note that there is no allowLinking attribute for . > prefix="UMIAPDC_log." suffix=".txt" > directory="/amd/homes/lataxeks/umi/logs" > timestamp="true"/> There is no element in Tomcat 6.0; remove that. > Unless you're just testing, that's not a good choice for a . > The following are the contents of the web.xml file: > > HUControlServlet > /UMI/servlet/HUControlServlet > The /UMI should not be part of the . Clean up all of the above, and then let's see what happens. - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Can't fully undeploy a servlet application in Tomcat 6.0.18
I'm using the Tomcat Web Application Manager to deploy and undeploy servlet applications on a Windows 2003 server box. Sometimes, not all of the files are deleted from the application directory during an undeploy, because something has them locked. The files that are locked are one or more HTML files. When this happens I need to stop Tomcat, manually delete the application directory, then restart Tomcat and deploy the new version. Are there any options that can be set in a Windows environment, that will prevent this from happening? Thanks, Jon Oman
RE: Class loading question (with aspectj)
> From: neo anderson [mailto:javadeveloper...@yahoo.co.uk] > Subject: Re: Class loading question (with aspectj) > > I do not put the same class i.e. TapestryFilter.java in both location > (WEB-INF/classes and WEB-INF/lib). A .java file is not a class file. > The way how I test is by copying TapestryFilter.java to another foler > under WEB-INF/classes and renaming it to another name e.g. > MyTapestryFilter.java. Again, a .java file is not a class file. More has to be changed than just the file name, to say nothing of compiling it. - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: why datasource get an already closed connection?
> From: vicattomcat [mailto:vicattom...@googlemail.com] > Subject: why datasource get an already closed connection? > > Who can give me any advice to solve this problem in another way or tell > me which is the best way among the ways I talked about? Look at the validationQuery and testOnBorrow settings for the connection pool: http://commons.apache.org/dbcp/configuration.html Search the archives for real examples of how to use them with MySQL. http://marc.info/?l=tomcat-user - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Monitor Tomcat Performance
> From: Zaki Akhmad [mailto:zakiakh...@gmail.com] > Subject: Monitor Tomcat Performance > > I am using tomcat on my web application. Congratulations. Care to tell us the version of Tomcat and JVM you're using? > I want to monitor my tomcat performance. If you're running on a reasonably recent JVM, try the JConsole utility that comes with the Sun JDK. It's free, whereas YourKit is not. - 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.
Re: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18
As configured below, try http://d1uap:4901/UMI/UMI/servlet/HUControlServlet The servlet mapping in WEB-INF/web.xml should not include the context path of the webapp. --David Lataxes, Karl wrote: > I am attempting to migrate a servlet from Tomcat 5.0.25 to 6.0.18, but > my efforts to access it while running under 6.0.18 have been > unsuccessful. The servlet is accessed on the server via HTTP, but has > web interfaces for simple testing and to check servlet loading and > client-server message traffic. > > The context.xml and web.xml files as described are similar to what we > have running under Tomcat 5.0.25. Aside from the connector and shutdown > ports, the server.xml file is the same one that was bundled with 6.0.18. > We can access the servlet while running under 5.0.25, but not 6.0.18. > It is probably a simple configuration file or security setting that I > have not been able to locate. > > The servlet is initialized by a context file placed in > {$CATALINA_HOME}/conf/Catalina/localhost. Tailing the catalina.out > file, I have confirmed that the servlet context is being loadet at > Tomcat startup. The context path is set to my home area for testing, > but is similar to what we use for production deployment, i.e., it is not > deployed from {$CATALINA_HOME}/webapps. Here are the contents of my > context file: > >reloadable="true"> >className="org.apache.naming.resources.FileDirContext" > allowLinking="true" /> > prefix="UMIAPDC_log." suffix=".txt" > directory="/amd/homes/lataxeks/umi/logs" > timestamp="true"/> > > > > > The following are the contents of the web.xml file: > > > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> > > > > > HUControlServlet > > > > com.nielsenmedia.umi.ap.datacollection.servlet.HUControlServlet > > 1 > > > HUControlServlet > /UMI/servlet/HUControlServlet > > > > Protected > Area > > > /jsp/security/protected/* > > DELETE > GET > POST > PUT > > > > tomcat > role1 > > > > > > Here is the stack trace I received when running my server based > application to access the servlet: > > java.io.FileNotFoundException: > http://d1uap:4901/UMI/servlet/HUControlServlet/ > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA > ccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons > tructorAccessorImpl.java:27) > at > java.lang.reflect.Constructor.newInstance(Constructor.java:494) > at > sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java > :1240) > at java.security.AccessController.doPrivileged(Native Method) > at > sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLC > onnection.java:1234) > at > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec > tion.java:921) > at > com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.messages.H > UStatus.sendStatus(HUStatus.java:104) > at > com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.messages.H > UInitConn.sendStatus(HUInitConn.java:95) > at > com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.drivers.HU > Session.Process(HUSession.java:431) > at > com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.drivers.HU > Sim.main(HUSim.java:311) > Caused by: java.io.FileNotFoundException: > http://d1uap:4901/UMI/servlet/HUControlServlet/ > at > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec > tion.java:1183) > at > java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367) > at > com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.messages.H > UStatus.sendStatus(HUStatus.java:101) > ... 3 more > > > Here is the localhost_access_log entry from the test that generated the > stack trace (servlet running on Tomcat 6.0.18). As you can see, it is > generating an HTTP 404 error code: > > 10.38.164.58 - - [03/Sep/2009:13:53:42 -0400] "POST > /UMI/servlet/HUControlServlet/ HTTP/1.1" 404 1042 > > > Can anyone please help? Thanks > > Karl Lataxes > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomca
RE: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18
> From: Lataxes, Karl [mailto:karl.lata...@nielsen.com] > Subject: Unable to Access Servlet After Migrating From Tomcat 5.0.25 to > 6.0.18 > > The context.xml and web.xml files as described are similar to what we > have running under Tomcat 5.0.25. Which is likely the problem. The element has changed between the two levels. > element is in conf/Catalina/[host]; instead, that file must be named UMI.xml. >className="org.apache.naming.resources.FileDirContext" > allowLinking="true" /> Remove the element, since it's the default. Note that there is no allowLinking attribute for . > prefix="UMIAPDC_log." suffix=".txt" > directory="/amd/homes/lataxeks/umi/logs" > timestamp="true"/> There is no element in Tomcat 6.0; remove that. > Unless you're just testing, that's not a good choice for a . > The following are the contents of the web.xml file: > > HUControlServlet > /UMI/servlet/HUControlServlet > The /UMI should not be part of the . Clean up all of the above, and then let's see what happens. - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Unable to Access Servlet After Migrating From Tomcat 5.0.25 to 6.0.18
I am attempting to migrate a servlet from Tomcat 5.0.25 to 6.0.18, but my efforts to access it while running under 6.0.18 have been unsuccessful. The servlet is accessed on the server via HTTP, but has web interfaces for simple testing and to check servlet loading and client-server message traffic. The context.xml and web.xml files as described are similar to what we have running under Tomcat 5.0.25. Aside from the connector and shutdown ports, the server.xml file is the same one that was bundled with 6.0.18. We can access the servlet while running under 5.0.25, but not 6.0.18. It is probably a simple configuration file or security setting that I have not been able to locate. The servlet is initialized by a context file placed in {$CATALINA_HOME}/conf/Catalina/localhost. Tailing the catalina.out file, I have confirmed that the servlet context is being loadet at Tomcat startup. The context path is set to my home area for testing, but is similar to what we use for production deployment, i.e., it is not deployed from {$CATALINA_HOME}/webapps. Here are the contents of my context file: The following are the contents of the web.xml file: http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> HUControlServlet com.nielsenmedia.umi.ap.datacollection.servlet.HUControlServlet 1 HUControlServlet /UMI/servlet/HUControlServlet Protected Area /jsp/security/protected/* DELETE GET POST PUT tomcat role1 Here is the stack trace I received when running my server based application to access the servlet: java.io.FileNotFoundException: http://d1uap:4901/UMI/servlet/HUControlServlet/ at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA ccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons tructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java :1240) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLC onnection.java:1234) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec tion.java:921) at com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.messages.H UStatus.sendStatus(HUStatus.java:104) at com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.messages.H UInitConn.sendStatus(HUInitConn.java:95) at com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.drivers.HU Session.Process(HUSession.java:431) at com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.drivers.HU Sim.main(HUSim.java:311) Caused by: java.io.FileNotFoundException: http://d1uap:4901/UMI/servlet/HUControlServlet/ at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec tion.java:1183) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367) at com.nielsenmedia.umi.ap.datacollection.test.homeunitsimulator.messages.H UStatus.sendStatus(HUStatus.java:101) ... 3 more Here is the localhost_access_log entry from the test that generated the stack trace (servlet running on Tomcat 6.0.18). As you can see, it is generating an HTTP 404 error code: 10.38.164.58 - - [03/Sep/2009:13:53:42 -0400] "POST /UMI/servlet/HUControlServlet/ HTTP/1.1" 404 1042 Can anyone please help? Thanks Karl Lataxes
Re: Monitor Tomcat Performance
Hello, Try using yourkit. Ramzi On Fri, Sep 4, 2009 at 12:34 AM, Zaki Akhmad wrote: > Hello, > > I am using tomcat on my web application. I want to monitor my tomcat > performance. What tools I can use? From the cacti graph, shows that > the memory usage is very big (>90%). > > Thanks > -- > Zaki Akhmad > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: maling list archives and bug tracker dumps for academic research evaluation
2009/9/4 Iqbal, Aftab : > > Any update or news about the maling list archives and bug tracker dumps ? > > regards > Aftab Iqbal > By the way, the mail archives are available here: http://tomcat.apache.org/mail/dev/ Those are gzipped mbox files. Though I do not see that location to be documented/mentioned anywhere. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
jkstatus - Error connecting to tomcat - ajp_process_callback write failed
Hello everybody, i got many errors about mod_jk but i don't know whether it's the good forum ... I have configured 4 tomcat identical servers reached by a front server apache through mod_jk. When I look at the jkstatus page, I can note a strange behaviour: only the same server (4) is under loaded. Regular percentages are: 1st:30% , 2nd:29%, 3rd:28, 4th:13% (note: lbfactor is the same for the 4 workers) I don't know which way I can scrutinize. I just can see a lot of errors within error.log: "Error connecting to tomcat" (not necessarily the 4th) or ajp_process_callback write failed. So, the question is, which are the first checkings at tomcat configuration I can do ? Do you have an "how to" for interpreting jkstatus ? or is there any other way, a kind of pure tomcat tool, to check the tomcat perfs. Thank you very much jl
Re: Class loading question (with aspectj)
I do not put the same class i.e. TapestryFilter.java in both location (WEB-INF/classes and WEB-INF/lib). The way how I test is by copying TapestryFilter.java to another foler under WEB-INF/classes and renaming it to another name e.g. MyTapestryFilter.java. Then configure web.xml to use MyTapestryFilter in ... tag. The aspectj code will get printed if web.xml uses MyTapestryFilter class, but those code won't be printed if web.xml use default TapestryFilter class. I look up the source code and just notice one thing that makes me confused. My aspectj code e.g. FilterInterceptor.java is located under WEB-INF/classes folder and TapestryFilter.java is packaged as lib and located under WEB-INF/lib folder. What caught my attention is when I startup tomecat server version 6.0.20 (I build it from scratch), the WebappLoader.setRepositories() looks like does not load FilterInterceptor.java because it doesn't show e.g. FilterInterceptor.java get loaded (or it is because setRepositories only load jar files?) as below. ---> WebappLoader.java: setRepositories(): WEB-INF/classes/ loaderRepositories:[/WEB-INF/classes/] -> WebappClassLoader.java: addJar(): jarRealFiles.length:0 Then it starts to laod jar files under WEB-INF/lib ---> WebappLoader.java: setRepositories(): WEB-INF/lib loaderRepositories:[/WEB-INF/classes/, /WEB-INF/lib/antlr-2.7.6.jar] -> WebappClassLoader.java: addJar(): jarRealFiles.length:1 -> WebappClassLoader.java: addJar(): jarRealFiles[0]:/home/jackson5/app/apache-tomcat-6.0-snapshot/webapps/jecommerce/WEB-INF/lib/antlr-2.7.6.jar ... Does this mean the class ( compilied aspectj code ) is not loaded? Or where should I look up so that I can check if it is because the tapestry jar files get loaded, but not my aspectj code (located under WEB-INF/classes)? I appreciate any suggestion. Many thanks. markt-2 wrote: > > neo anderson wrote: >> I read the document at >> http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html and have >> a >> question. What is the class loading order if the classes are located >> under >> /WEB-INF/classes/ and /WEB-INF/lib/ respectively? > > The search order is always: > /WEB-INF/classes > /WEB-INF/lib > > You can distribute your classes between those locations any way you like > but if you put the same class in both locations, the one in classes will > always take priority. > > Mark > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://www.nabble.com/Class-loading-question-%28with-aspectj%29-tp25288633p25291325.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: maling list archives and bug tracker dumps for academic research evaluation
Dear Mark, >> >> thanks for your response and cooperation. For the evaluation of our research >> work, we would like to run experiments on the >last 12 months activity on >> Tomcat project. >> >> I would like to have the tomcat-dev archives of last 12 months (Aug2008 - >> Aug 2009). It would be even nicer if i can have 1 >compressed file for one >> month instead of 1 compressed file for all 12 months, if it is possible. >> >> regarding the bugzilla database, it is OK to get the whole dump. It would be >> great if you upload it somewhere and let me >download it from their. >> >> thanks for your cooperation and looking forward for your kind response. > >OK. Give me a couple of days and I'll get that sorted for you. Any update or news about the maling list archives and bug tracker dumps ? >Mark regards Aftab Iqbal - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: An unexpected error has been detected by Java Runtime Environment:
Why SIGBUS is "Cool"? What is strange is that running 32 bit java helped. Of course i can explain it that the 32 have less address space and it does not get to the bad RAM ,but still ... Evgeny On Fri, Sep 4, 2009 at 12:32 AM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Peter, > > On 9/3/2009 6:06 AM, Peter Crowther wrote: > > Have you got a creeping failure on your hardware? Bad RAM could cause > the > > problem you observe, for example. > > +1000 > > SIGBUS? Cool! > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkqgNgUACgkQ9CaO5/Lv0PAqsACcCm5+2laf48qTcSRRpIqKGE+K > 9AEAn3Vp6VvuSMYT4ZqI08wxSPV3kkoR > =0Ffv > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Class loading question (with aspectj)
neo anderson wrote: > I read the document at > http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html and have a > question. What is the class loading order if the classes are located under > /WEB-INF/classes/ and /WEB-INF/lib/ respectively? The search order is always: /WEB-INF/classes /WEB-INF/lib You can distribute your classes between those locations any way you like but if you put the same class in both locations, the one in classes will always take priority. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
why datasource get an already closed connection?
Hi buddies, I want to ask a question about connection pool, and my environment is apache-tomcat-5.5.27, mysql-5.0.67(mysql-connection-j-5.1.8) and default apache DBCP. Here is a short description of the problem I met. I configured a datasource in $catalina.base/conf/server.xml, and get a connection in my java code. url="jdbc:mysql://localhost:3306/xxx?useUnicode=true&characterEncoding=utf8" username="xxx" /> I can do all the operations using that connection. while, when I logout the application, and wait for a long time, about a whole day, and then an error will occur when I login again. The SQLException message is something like this: 2009-09-03 14:04:32,046 ERROR [xxx.xxx.xxxDao].[login] Communications link failure The last packet successfully received from the server was 1,398,531 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. 2009-09-03 14:04:52,062 ERROR [xxx.xxx.xxx.common.DatabaseUtils].[closeQuietly] Already closed. OR 2009-09-03 16:05:37,703 ERROR [xxx.xxx.xxxDao].[login] No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error: ** BEGIN NESTED EXCEPTION ** com.mysql.jdbc.exceptions.jdbc4.CommunicationsException MESSAGE: Communications link failure The last packet successfully received from the server was 910,485 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. STACKTRACE: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 910,485 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. .. so, I think the error is because I am using an already closed connection. and I have to wait a really long time to re-create this exception. After doing some googles, I found that there is an wait_timeout parameter in mysql: By default, the server closes the connection after eight hours if nothing has happened. You can change the time limit by setting the wait_timeout variable when you start mysqld. so, I think it because DBCP get the connection with the following way: The pool can be configured to behave as a LIFO queue with respect to idle objects - always returning the most recently used object from the pool, or as a FIFO queue, where borrowObject always returns the oldest object in the idle object pool. lifo determines whether or not the pool returns idle objects in last-in-first-out order. The default setting for this parameter is true. so, if 8 hours later, the mysql server closes the connection used the most recently in the pool ,then when I login again, I get an already closed connection, when I use it to do some operations, error occurs. Now I have some ways to solve it: First of all, I check the connection I get from the pool, if it has already closed, I set it to null, and get another one from the pool. Secondly, I add validationQuery="SELECT 1", which seems working well. Thirdly, I change the mysql wait_timeout to the max value, which can be 365 days. Who can give me any advice to solve this problem in another way or tell me which is the best way among the ways I talked about? Thanks so much for your patient and kind heart. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org