RE: Tomcat Configuration in Eclipse
This information applies to the Tomcat support found in the Eclipse Web Tools Platform, see http://www.eclipse.org/webtools. I believe Ados has stated he is using the Sysdeo Tomcat plug-in, which is quite different. For those using or considering the Web Tools Tomcat support, see http://wiki.eclipse.org/WTP_Tomcat_FAQ for additional information about this support. Cheers, Larry -Original Message- From: Mike Altieri [mailto:mca...@yahoo.com] Sent: Friday, May 08, 2009 12:12 PM To: Tomcat Users List Subject: Re: Tomcat Configuration in Eclipse Hi Ados, Ognjen is right; the default setting in the eclipse plugin for tomcat6 is to use the workspace metadata; this way when you start tomcat from eclipse only the projects you have deployed on it inside of eclipse will be the running apps. If you want you can alter this setting by double clicking on the server; and when the serve config opens look under 'Server Locations' ; if you choose the 'use tomcat installation' then all the apps that are installed in your server should also start when you start the server inside of eclipse. This may or may not be desirable depending on your environment's needs. Good Luck! -Mike - Original Message From: ados1...@gmail.com ados1...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Friday, May 8, 2009 11:17:02 AM Subject: Re: Tomcat Configuration in Eclipse I am stuck on same issue. I tried reconfiguring Tomcat on Eclipse using sysdeo plugin but when I try to run simple jsp page am getting same 404 error. Any help would be highly appreciated ? Thanks, Ados On Fri, May 8, 2009 at 8:51 AM, Chris Lenart wrote: I'm getting simular issue. Tomcat is working and see its welcome page in Firefox. When I run a imple jsp in Eclipse, it is giving 404. What do I have to do? Chris -Original Message- From: Ognjen Blagojevic [mailto:ogn...@etf.bg.ac.rs] Sent: Friday, May 08, 2009 4:50 AM To: Tomcat Users List Subject: Re: Tomcat Configuration in Eclipse This is normal. When you start Tomcat manually, it uses YOUR-TOMCAT-HOME/webapps as default webapp directory. This directory contains ROOT webapp (visible on context /), and that is the welcome page you see. On the other side, when you start Tomcat inside Eclipse, it uses some other webapp folder like YOUR-ECLIPSE-WORKSPACE/.metadata/.plugins/org.eclipse.wst.server.core/tm p0/wtpwebapps, which doesn't contains ROOT webapp (or, sometimes contains blank ROOT webapp). In that case on context / (http://localhost:8080/), you will get either HTTP error 404 or blank page. Regards, Ognjen ados1...@gmail.com wrote: Interesting Things are happening with my Tomcat. Points to Note: 1. I am installing tomcat version 6.x and than running it by clicking startup.bat file and it is running fine as when I check in browser typing http://localhost:8080/ it shows me the Apache Foundation Welcome pages saying that Installation works fine. 2. Interesting thing to note is that when I stop my server using shutdown.bat file than it work fine but now if I start my server using eclipse than it starts but when I go to browser to check Apache Foundation Welcome Page than it is not there and I get message as under and it is confusing. Apache Tomcat/6.0.18 - Error report Apache Tomcat/6.0.18 - Error report HTTP Status 404 - / -- *type* Status report *message* */* *description* *The requested resource (/) is not available.* -- Apache Tomcat/6.0.18 Any guidance would be appreciated. - 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 - 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: Tomcat 6.0 in Eclipse
This is also explained in the WTP Tomcat FAQ: http://wiki.eclipse.org/WTP_Tomcat_FAQ or specifically: http://wiki.eclipse.org/WTP_Tomcat_FAQ#If_I_start_my_Tomcat_server_and_try_to_display_Tomcat.27s_default_page.2C_why_do_I_see_a_directory_listing_or_404_error_page.3F Cheers, Larry -Original Message- From: Ingmar Lötzsch [mailto:iloetz...@asci-systemhaus.de] Sent: Tuesday, March 17, 2009 4:31 AM To: Tomcat Users List Subject: Re: Tomcat 6.0 in Eclipse I downloaded apache-tomcat-6.0.16 and ran the startup.bat. I could see the page display at http://localhost:8080/ Later, I configured the same in eclipse 3.4 and started the tomcat using eclipse.Eclipse started the tomcat with no exception. However, when I go to the page at http://localhost:8080/ I see HTTP Status 404 error. The plugin you use inside Eclipse starts Tomcat with a different configuration including an empty ROOT context. If you develop with the WTP plugin, look at workspace\.metadata\.plugins\org.eclipse.wst.server.core and than for example \tmp0\conf\server.xml or \tmp0\wtpwebapps Ingmar - 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: HELP!!! java.lang.NoClassDefFoundError running CXF-based client in Tomcat
Be aware that in Eclipse WTP, your web project is published to the server to be served. Jars that are added to the project as runtime dependencies will be copied to the WEB-INF/lib of the published webapp. Just adding a jar to the build path of the web project DOES NOT add the jar as a runtime dependency. The project builds fine, but won't work at runtime due to missing classes. Normally, the Problems view will show warnings when this is the case. Assuming this is your problem, go the Java EE Module Dependencies page in the web project's Properties dialog. Make sure all the jars you want in WEB-INF/lib at runtime are checked. Cheers, Larry -Original Message- From: Steve Cohen [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 26, 2008 11:44 AM To: Tomcat Users List Subject: Re: HELP!!! java.lang.NoClassDefFoundError running CXF-based client inTomcat It's the Real Tomcat, but running inside Eclipse WTP, which starts and stops the server. Caldarale, Charles R wrote: From: Steve Cohen [mailto:[EMAIL PROTECTED] Subject: Re: HELP!!! java.lang.NoClassDefFoundError running CXF-based client inTomcat Another piece of information I omitted: JDK version java-1.5.0-sun-1.5.0.13 running under Ubuntu Linux. Is this a real Tomcat or a 3rd-party repackaged version? If the latter, please install a real one from tomcat.apache.org and try again, as the 3rd-party ones often break things in subtle ways. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat unable to find jars when deployed from Eclipse
-Original Message- From: Bai Shen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2008 2:54 PM To: Tomcat Users List Subject: Tomcat unable to find jars when deployed from Eclipse I'm running Eclipse 3.4 with Tomcat 6.0.18 configured as a server. After a bit of consternation, I was able to see my test html and jsp files. However, for some reason, my servlet doesn't see the jar files it needs unless I put them in WebContent\WEB-INF\lib. Now I've already defined them in Eclipse and checked the export option. So why doesn't that work? You are probably specifying the build time classpath, but not the runtime classpath. Am I doing something wrong, or am I stuck with the only solution being to put them in the WebContent\WEB-INF\lib dir? The alternative is to go to the Java EE Module Dependencies page of the project's properties. You should see your build time jars listed there. Check them to include them in the runtime classpath. These jars will then be included in the WEB-INF/lib of the Web application when the project is published to a server or exported as a war. Cheers, Larry TIA. Bai Shen - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: stupid tomcat/eclipse question
-Original Message- From: Steve Cohen [mailto:[EMAIL PROTECTED] Sent: Monday, September 08, 2008 1:34 PM To: Tomcat Users List Subject: stupid tomcat/eclipse question I've had a stable development environment running Tomcat 6.0 within Eclipse 3.3. I did something stupid to configuration and now I can't get away from this error as soon as the server starts. java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja va:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso rImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.lang.NoClassDefFoundError: javax/servlet/Servlet at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) ... In spite of trying putting everything I can think of onto the runtime classpath I can't make this go away. The Tomcat batch files deliberately ignore the CLASSPATH environment variable because failing to do so greatly increases the odds of Tomcat not starting. Modifying the runtime classpath in Eclipse is going to have the same effect on your odds of Tomcat starting for the exact same reason. Tomcat 6.0.x only needs bootstrap.jar on the classpath. Some additional jars get added automatically by Java per the Class-Path attribute in the MANIFEST.MF found in bootstrap.jar. With this set of jars, the bootstrap process will use the common.loader property value found in the conf/catalina.properties file to create the common classloader which will contain the javax.servlet classes among many others required by the Tomcat server. Not knowing what your original Tomcat configuration was, it's hard to guess what the original change was that caused Tomcat not to start. Modifying the runtime classpath can easily result in this same symptom. You might try creating a new Tomcat server from the same Tomcat runtime in Eclipse and see if it will start. If not, it suggests you have done something to your Tomcat installation. Cheers, Larry Where is Tomcat supposed to find javax/servlet/Servlet and why was this so easy before and so difficult now. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat within Eclipse
Backing up slightly, maybe the first step should be to confirm whether the Web Tools Platform, Sysdeo, or other plug-in is being used for the Tomcat server support. The fact that C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\tomcat-users.xml is being renamed suggests that if WTP was being used, the non-default Use Tomcat installation option would have to be enabled. In this case, tomcat-users.xml would have being copied from the Servers project to the conf directory. If this file isn't writable, this copy would likely have failed before even attempting to start the server. This would suggest that WTP is not being used. I'm guessing that it may be the Sysdeo plug-in and that it might be a permissions problem. The user running Eclipse, and thus the user running the Tomcat server from Eclipse, doesn't have permission to modify this file. Any details about the OS, server plug-in, and any configuration done to set up this server would likely help. The stack trace alone doesn't provide a lot in the way of hard clues. Cheers, Larry -Original Message- From: Konstantin Kolinko [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 12, 2008 4:54 AM To: Tomcat Users List Subject: Re: Tomcat within Eclipse Hi, Sam If you installed Tomcat using the .exe installer, the *.bat files are not included with it. You can download the zip archive to get them. Eclipse does not need them, because it lauches Tomcat as a java application, loading its Bootstrap class. When you create a server launch configuration (a new Server), a new supplemental project is created in your workspace, that stores your launch configuration. When it is created, the configuration files are copied there from the Tomcat installation. You should check, that those files do exist. They are shown in the Servers project on your Project Explorer view, in a subfolder which name reflects the name of your configuration. E.g. Servers\Tomcat v6.0 Server at localhost-config The following files should be there: catalina.policy catalina.properties context.xml server.xml tomcat-users.xml web.xml If you want, you can replace them with some fresh copies from your Tomcat installation, or from the zip archive, but do not forget to refresh the Servers project (using the context menu, or pressing F5). Eclipse uses those files when launching Tomcat. (Actually it copies them further, publishing them into a temporary directory inside .metadata. That is why refreshing the Servers project is important). You may also want to check the following FAQ: http://wiki.eclipse.org/WTP_Tomcat_FAQ Best regards, Konstantin Kolinko 2008/8/11 Sam Wun [EMAIL PROTECTED]: Hi, I have the server.xml path defined in Eclipse (3.4): C:\Program Files\Apache Software Foundation\Tomcat 6.0 Where is the startup.bat file? I can't find this batch file. Thanks On Mon, Aug 11, 2008 at 3:27 PM, Johnny Kewl [EMAIL PROTECTED] wrote: - Original Message - From: Sam Wun [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, August 11, 2008 6:57 AM Subject: Tomcat within Eclipse Hi, Can anyone tell me how to resolve the followoing exception? and how do I know whether tomcat service is really running. 11/08/2008 14:47:47 org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.6.0_07\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system3 2;C:\Windows;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\ Wbem;d:\ant171\bin;D:\apache-maven-2.0.9\bin;C:\Program Files\Nmap 11/08/2008 14:47:47 org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 11/08/2008 14:47:47 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 502 ms 11/08/2008 14:47:47 org.apache.naming.NamingContext lookup WARNING: Unexpected exception resolving reference java.io.IOException: Cannot rename original file to C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\tomcat- users.xml.old at org.apache.catalina.users.MemoryUserDatabase.save(MemoryUserDatabase.ja va:582) at org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance(M emoryUserDatabaseFactory.java:104) at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFac tory.java:140) at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source) at org.apache.naming.NamingContext.lookup(NamingContext.java:793) at org.apache.naming.NamingContext.lookup(NamingContext.java:140) at org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal( NamingContextBindingsEnumeration.java:113) at
RE: Unable to run tomcat in Eclipse
For details about the Tomcat support, see: http://wiki.eclipse.org/WTP_Tomcat_FAQ You might also check the Error Log view to see if any complaints are being logged related to this. Cheers, Larry -Original Message- From: KANIKA GUPTA [mailto:[EMAIL PROTECTED] Sent: Saturday, July 19, 2008 2:18 PM To: Tomcat Users List Subject: Re: Unable to run tomcat in Eclipse I am using the tomcat version downloaded from apache site only... I just cant figure out what the problem is... Kanika --- On Sat, 7/19/08, Ken Bowen [EMAIL PROTECTED] wrote: From: Ken Bowen [EMAIL PROTECTED] Subject: Re: Unable to run tomcat in Eclipse To: Tomcat Users List users@tomcat.apache.org Date: Saturday, July 19, 2008, 9:50 PM Are you running a version of Tomcat supplied by your Linux distribution? Often these cause many problems. You might try downloading a clean version of Tomcat from the Apache site, unzipping that, and trying it. On Jul 19, 2008, at 12:37 AM, KANIKA GUPTA wrote: Hi I am using tomcat V6.0.16 on openSuse 11.0 along with eclipse 3.4.0 genameyde. The tomcat starts and stop normally when i do the same on command line, but when i try to start the server through eclipse... it gives me the following error: 'Starting Tomcat v6.0 Server at localhost has encountered a problem. Could not load the Tomcat server configuration at /Servers/Tomcat v6.0 Server at localhost-config. The configuration may be corrupt or incomplete. I am running the server at port 8085. I changed it to same in the server.xml file located in the installation directory of tomcat in conf folder. This was done because i am using was ce at 8080. I have jdk5 as well as jdk6 installed bt currently working with jdk5. Please help what to do... Kanika - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Singleton in Tomcat 6.0 not working
I think the Tomcat support in Eclipse WTP is pretty reasonable, but it isn't perfect. For example, if you name your project ROOT, Eclipse won't tell you that you are asking for trouble because some web servers, like Tomcat, may give that particular name special treatment. This would explain the: Context docBase=ROOT path=/ROOT reloadable=true source=org.eclipse.jst.jee.server:ROOT/ Thus, I would recommend not naming a Dynamic Web Project ROOT. You can make a Dynamic Web Project the default webapp by opening the Web Project Setting page of the project's Properties dialog and set the Context Root field to a blank string. When published to a Tomcat server in Eclipse, it will become the default (i.e. ROOT) webapp. Because putting Contexts in server.xml is supported by all versions of Tomcat, this is the default behavior. For Tomcat 5.x and later, you can enable the Publish module contexts to separate XML files option in the server editor. This will remove the Contexts from the server.xml (the one found under the Servers project in your workspace) and write the Contexts to separate files when publishing the server. Obviously, this implies the server.xml you find under the Servers project in your workspace is not the one used by Tomcat when it is running. Tomcat runs off a modified copy created when the server is published. See http://wiki.eclipse.org/WTP_Tomcat_FAQ for more details about the Tomcat support in Eclipse. Cheers, Larry -Original Message- From: ktou Ho [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2008 2:24 PM To: Tomcat Users List Subject: RE: Singleton in Tomcat 6.0 not working By the way, I was using the Eclipse 3.3, it integrated the Tomcat development tool. It was the Eclipse add that line to the server.xml. May be we need to let them know about this. Thanks Elwin From: [EMAIL PROTECTED] To: users@tomcat.apache.org Date: Thu, 5 Jun 2008 13:15:03 -0500 Subject: RE: Singleton in Tomcat 6.0 not working From: ktou Ho [mailto:[EMAIL PROTECTED] Subject: RE: Singleton in Tomcat 6.0 not working Did you mean I should just remove this Context element from the server.xml? You should never have put it in there, so definitely remove it. If you need to set the reloadable attribute, then put just this: Context reloadable=true/ in the file META-INF/context.xml inside the webapp. Note that setting reloadable incurs some additional overhead inside Tomcat, so it is normally not used for production. The doc reference: 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Instantly invite friends from Facebook and other social networks to join you on Windows Live(tm) Messenger. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_InviteFriends - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Eclipse with tomcat and mysql
For some info about the Tomcat support in the Web Tools Platform of Eclipse, see this FAQ: http://wiki.eclipse.org/WTP_Tomcat_FAQ If you happen to have put your mysql driver jar in shared/lib, then this question might explain the behavior: http://wiki.eclipse.org/WTP_Tomcat_FAQ#Why_are_classes_in_my_Tomcat_installation.27s_shared.2Flib_not_seen_by_my_Web_application.3F If your mysql server access depends on changes to the server.xml made after the Eclipse Tomcat server was created, see this question: http://wiki.eclipse.org/WTP_Tomcat_FAQ#When_I_create_my_first_Tomcat_server.2C_why_is_a_Servers_project_created_in_my_workspace.3F If neither of these covers your situation, check the other questions to see if any might explain what is different between your Tomcat installation and the Tomcat server in Eclipse. Cheers, Larry P.S. That FAQ page can be fairly slow to come up, perhaps because of its size. Be patient. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] enterprises.com] Sent: Monday, March 10, 2008 11:50 AM To: Len Popp; Tomcat Users List Subject: Re: Eclipse with tomcat and mysql Eclipse (Eurpoa) version 3.1.1 I am using the Web Standard Tools. (The project I created is a Dynamic Web Project). I do NOT have the Sysdeo Tomcat plugin. Would this help? Thanks, Kevin - Original Message - From: Len Popp [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org; [EMAIL PROTECTED] Sent: Monday, March 10, 2008 6:42 AM Subject: Re: Eclipse with tomcat and mysql What version of Eclipse are you using, and what extensions are you using for your webapp project (e.g. Web Standard Tools or Sysdeo Tomcat plug-in)? -- Len On Mon, Mar 10, 2008 at 11:32 AM, [EMAIL PROTECTED] wrote: Hello, I'm having trouble getting Eclipse to work with Mysql/Tomcat. In Eclipse, I have set up a project and have added a Tomcat server and added the project to the server. The project consists of a simple example of a standard struts architecture for the MVC. Model: Artist.java, ArtistSearchService.java View: search.jsp, SearchForm.java Controller: ArtistSearchAction.java The ArtistSearchSerview.java connects to mysql, searches for Artists and creates Artists objects. If I deploy this to Tomcat, every thing works fine. But when I run inside Eclipse it will not connect to the database. I get the errors listed below. Funny thing is, in Eclipse I have also tried setting a data source for this database. This also works fine and I can connect to the DB from the data source, but I still get the error. So how do you use Eclipse with Tomcat and MySQL? Any ideas? Thanks in advance for the help, Kevin HTTP Status 500 - --- - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRe questProcessor.java:286) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataS ource.java:1150) org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSour ce.java:880) model.ArtistSearchService.selectArtists(ArtistSearchService.java:30) controller.ArtistSearchAction.execute(ArtistSearchAction.java:34) org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteA ction.java:58) org.apache.struts.chain.commands.AbstractExecuteAction.execute(Abstract ExecuteAction.java:67) org.apache.struts.chain.commands.ActionCommandBase.execute(ActionComman dBase.java:51) org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.ja va:304) org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRe questProcessor.java:283) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause java.sql.SQLException: No suitable driver
RE: [Eclipse-Tomcat] Problem by deploying from Eclipse to Tomcat
There is not enough detail about your Eclipse configuration to make much of a guess. Basically the exception says that the ServletRequestListener class is not visible to one of the listener classes loaded in your web.xml. Either because it's missing (which seems not to be the case), or because your listener class is being loaded in a classloader that isn't allowed to see classes in common\lib's classloader. Launching Tomcat with the listener class loaded by the system classloader would be a simple way to cause this. Cheers, Larry -Original Message- From: Thomas Chang [mailto:[EMAIL PROTECTED] Sent: Saturday, February 09, 2008 3:31 PM To: users@tomcat.apache.org Subject: Re: [Eclipse-Tomcat] Problem by deploying from Eclipse to Tomcat The servlet-api-2.4.jar is already in /common/lib. I doubt that's the cause. :-) * The missing class: javax/servlet/ServletRequestListener occurs in servlet-api.jar which appears to be missing in your configuration. The best place for it is in Tomcat's common/lib. -Ken Thomas Chang wrote: Hi all, I am not sure if I should put my question here. But I can't google out the right place. Hope someone here can help. :-) I built a web-app and can deploy it successfully from Tomcat Manager. But as I deploy it from the Eclipse, I get the following exception. P.S.: I use Eclipse 3.4 and the WTP package. Regards Thomas SCHWERWIEGEND: Error configuring application listener of class org.springframework.web.context.request.RequestContextListener java.lang.NoClassDefFoundError: javax/servlet/ServletRequestListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappCl assLoader.java:1812) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoade r.java:866) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.java:1319) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade r.java:1198) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext. java:3677) at org.apache.catalina.core.StandardContext.start(StandardContext.java:418 7) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450 ) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja va:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso rImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) 09.02.2008 20:57:23 org.apache.catalina.core.StandardContext listenerStart - Ihre erste Baustelle? Wissenswertes für Bastler und Hobby Handwerker. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 6.0.14 and Eclipse 3.3
Alec, I'm not aware of any specific causes for this behavior with Eclipse 3.3.x and WTP 2.0.x. To begin searching for a cause, it would be helpful to know what happens if you unzip a new Tomcat install, create a runtime and server from that install in Eclipse, and try starting that server from the Servers tab. Does it exhibit the same behavior? Cheers, Larry -Original Message- From: Alec Bickerton [mailto:[EMAIL PROTECTED] Sent: Monday, January 21, 2008 6:28 AM To: users@tomcat.apache.org Subject: Tomcat 6.0.14 and Eclipse 3.3 I've been seeing some unusual behaviour when staring eclipse from the server tab. When I start tomcat the server tab never reports that tomcat as started. It always appears as either stopped or starting... The server is actually running an I'm able to use the installed webapps and do debugging so this is not a blocker for me. It is however, a little annoying. Does anyone know a workaround for this. I've seen a few reports about this on the Internet, but no useful suggestions. On other thing, under MyEclipse 6; (same workspace and launch config) this issue does not appear. The server starts up and shows started. in the server tab. Is it likely to be an eclipse problem, tomcat 5.5 did start correctly. Server launch config... Program arguments: start VM arguments: -Dcatalina.home=C:\Develop\Tomcat6_14 -Dcatalina.base=C:\Develop\Tomcat6_14 -Djava.endorsed.dirs=C:\Develop\Tomcat6_14\common\endorsed -Djava.io.tmpdir=C:/Develop/Tomcat6_14/work -Djava.library.path=C:/Develop/Java/JDK6/bin;C:/Develop/Tomcat6_14/bin -Dsun.io.useCanonCaches=false -Dcatalina.base=C:/Develop/Tomcat6_14 -Dcatalina.home=C:/Develop/Tomcat6_14 -Djava.endorsed.dirs=C:/Develop/Tomcat6_14/common/endorsed -Djava.io.tmpdir=/var/tmp -Xmx512m -XX:+AggressiveOpts -XX:+UseParallelGC -XX:+Inline -Dwtp.deploy=C:\Develop\eclipse\workspaces\ws_eclipse32 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I got the following error while running my very simple JSP onTomcat 4.1. server
One other thing to be aware of is that if you installed Tomcat 4.1.x using the exe, and you chose to install Tomcat as a service, then the install would copy tools.jar from the JDK to Tomcat's common/lib directory. This allowed the service to run off the JRE associated with the JDK (much much easier to find via the Windows registry) instead of the JDK itself. I have seen cases where it was an old tools.jar in common/lib that caused this symptom when running Tomcat in a newer JVM. Cheers, Larry -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Saturday, December 01, 2007 5:05 PM To: Tomcat Users List Subject: RE: I got the following error while running my very simple JSP onTomcat 4.1. server From: peri [mailto:[EMAIL PROTECTED] Subject: I got the following error while running my very simple JSP onTomcat 4.1. server class file has wrong version 49.0, should be 48.0 You appear to have multiple JRE/JDKs installed on your system. The above message would be displayed by a 1.4 JVM when encountering a class file created for a 1.5 or newer JVM. Try finding and removing the older JRE/JDK installations. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: CLASSPATH, .jar files, packages, and so forth
Classes downloaded to the client browser for execution is just static content as far as Tomcat is concerned. Modifying the server's or webapp's classpath isn't going to make any difference. It's the client browser's classpath that needs adjusting to use the jar. This means modifying the HTML that runs the applet. Unfortunately, or perhaps fortunately, it has been many years since I have messed with such HTML, so I can't say what those modifications would look like. Likely something in the HTML has to point at the jar where it lives in the content portion of the webapp. HTH. Cheers, Larry -Original Message- From: Mann, Ivan H [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 31, 2007 4:26 PM To: users@tomcat.apache.org Subject: CLASSPATH, .jar files, packages, and so forth I have an application that consists of 150 classes, organized in several different packages. In the past I have installed the application in .../webapps/appl/directories where the directory tree corresponds to the package layout, and this has worked fine. I am trying to change this to using .jar files for a couple of reasons. I took one package and created a jar file like this: cd webapps/appl/ jar cvf schedule.jar applet/schedule/*.class mv schedule.jar WEB-INF/lib rm applet/schedule/*.class I modified setupclasspath.sh to read WEB-INF/lib and add all .jar files to the CLASSPATH before starting tomcat. Now when I try to access one of the classes that I put into schedule.jar it throws a NoClassDefFoundError. If I run a test program with CLASSPATH pointing to the webapps/appl directory and WEB-INF/lib/schedule.jar it works fine. In tomcat it doesn't find the class. I would suspect that there an issue with the way I build the jar file, but I can't figure out why it works outside of tomcat but not inside. What I would really like is a cookbook document telling me how to distribute an application in jar files to the web. I have Googled many combinations of words and can't find one. If anybody has one of those I would really appreciate it. I thing I am missing a step here, possibly making the manifest, but I just don't know what that missing step is. Thanks for the help. Ivan Mann - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can I specify the Tomcat directory?
I've reinstalled the Tomcat server isn't much detail to go on. See if the following link helps by explaining the Tomcat support in Eclipse: http://www.eclipse.org/webtools/faq/TomcatServerFAQ.php It covers WTP 1.5.x, but the majority of the info applies to WTP 2.0.x as well. Cheers, Larry -Original Message- From: Jaime Almeida [mailto:[EMAIL PROTECTED] Sent: Monday, October 08, 2007 11:14 AM To: users@tomcat.apache.org Subject: How can I specify the Tomcat directory? Hello. I've reinstalled the Tomcat server v6.0 on my computer, but when I try to run my application on the Eclipse, I get the error: 'The specified Tomcat installation directory does not exist'. How can I specify the Tomcat installation directory? What am I missing in the configurations of the Eclipse? Waiting for a reply, with the best regards, Jaime Almeida. IPLNet WebMail http://www.net.ipl.pt/mail - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Fresh install of Tomcat - getting frustrated with the JSP no working
If I recall correctly, in JSP spec 1.1, the argument for handlePageException() was Exception. In JSP spec 1.2 and later, the argument is Throwable. It would appear you have a servlet.jar from Servlet 2.2/JSP 1.1 somehow becoming the jar this JSP is running against, causing the method signature mismatch. Make sure you don't have a copy of servlet.jar in the WEB-INF/lib of your webapp or somewhere else involved with the running server, such as in the lib/ext directory of your JDK or JRE. In Tomcat 6, the JSP API classes are found in jsp-api.jar and servlet API classes are found in servlet-api.jar, with both located in the lib directory of the Tomcat 6 installation. Any servlet.jar you find involved with this server would contain out of date classes for this server. Cheers, Larry -Original Message- From: niblz [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 03, 2007 4:29 AM To: users@tomcat.apache.org Subject: Fresh install of Tomcat - getting frustrated with the JSP no working Hello I have install a new fresh Tomcat 6, and I have JAVA 6 (all the newest versions from their sites) I have tried many things, but still while html and servlet work, JSP just won't work! I even tried using this Tomcat version and help - http://www.coreservlets.com/Apache-Tomcat-Tutorial/ http://www.coreservlets.com/Apache-Tomcat-Tutorial/ But still nothing This are the errors I get type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 22 in the generated java fileThe method getJspApplicationContext(ServletContext) is undefined for the type JspFactory An error occurred at line: 82 in the generated java fileThe method handlePageException(Exception) in the type PageContext is not applicable for the arguments (Throwable) Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorH andler.java:92) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.j ava:330) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:4 23) org.apache.jasper.compiler.Compiler.compile(Compiler.java:308) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.compiler.Compiler.compile(Compiler.java:273) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.j ava:566) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j ava:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320 ) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:865) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs and this one HTTP Status 500 - --- - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP: Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorH andler.java:85) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.j ava:330) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:4 15) org.apache.jasper.compiler.Compiler.compile(Compiler.java:308) org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) org.apache.jasper.compiler.Compiler.compile(Compiler.java:273) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.j ava:566) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j ava:308) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320 ) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:865) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.10 logs. What can I do please? Thank you! -- View this message in context: http://www.nabble.com/Fresh-install-of- Tomcat---getting-frustrated-with-the-JSP-no-working- tf4560454.html#a13014781 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Getting 404 when trying to access default page in Tomcat when running in Eclipse
A FAQ I've written has been submitted, but hasn't made it to the Web Tools web site yet. For the time being, the answer to your question can be viewed here as Troubleshooting question #5: https://bugs.eclipse.org/bugs/attachment.cgi?id=67392#trouble_5 Cheers, Larry -Original Message- From: Morten Simonsen [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 16, 2007 4:13 AM To: users@tomcat.apache.org Subject: Getting 404 when trying to access default page in Tomcat when running in Eclipse Hi I have tried everything I can think of, but can't make the default page http://localhost:8080/ appear when I run Tomcat inside Eclipse. When I run Tomcat outside Eclipse, then I get the default page, no sweat! One difference I can see with my naked eye, is that there is some kind of basic authentication when I access the default page outside Eclipse, but no authentication when I access the default page inside Eclipse. I positive that the server.xml and web.xml are pretty correct (I can find the definition for the default-servlet, the web.xml is loaded, the server.xml is loaded, etc...) Still, there is no response other than 404. I can also not find any way to trigger a debug-mode (log) for the server. I am getting pretty frustrated now, so if someone can please help me, I would be very glad. thanks Morten Simonsen - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache - tomcat connection on Suse Lnux
The presence of /usr/share/tomcat5 in the servlet-api.jar path suggests you are using a packaged install of Tomcat. While doing some Eclipse Web Tools testing on SUSE 10.x (I think 10.1), the servlet-api.jar it was installed as a dependency of the Tomcat install and was symlinked as [servletapi5].jar. It worked fine as a symlink, but for this install, you won't be able to use standard (i.e. Apache Tomcat download equivalent) batch scripts or names which aren't compatible with alterations made to create the packaged Tomcat install. There isn't enough info to tell why startup is looking for a jar named servlet-api.jar. The packaged install wouldn't normally do that. Cheers, Larry -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 13, 2007 1:56 PM To: Tomcat Users List Subject: Re: Apache - tomcat connection on Suse Lnux Looks like the error says it all. Tomcat can't find servlet-api.jar in common/lib. Check that it really exists there and isn't a symlink. Tomcat isn't known for tolerating symlinks all that well. --David dianelane wrote: On a Suse linu 10 server, with Apache2 I am trying to setup Tomcat5 (coonector with Apache2) to run web applicatons. I do foolow the Apache Tomcat Coonector - webserver how-to, but have errors. Java and Tomcat installed from Suse repository via YAst. mod_jk.so downloaded and stored in /usr/lib/apache2 /etc/tomcat5/base/workers.properties modified as follows ... #workers.tomcat_home=/var/tomcat3 workers.tomcat_home=/usr/share/tomcat5 # # workers.java_home should point to your Java installation. Normally # you should have a bin and lib directories beneath it. # #workers.java_home=/opt/IBMJava2-13 workers.java_home=/usr/lib/java ... in /etc/apache2/httpd.con file added last line Include /usr/share/tomcat5/conf/jk/mod_jk.conf-auto /ets/tomcat5/base/server.xml modified as follows: Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycle Listener debug=0/ Listener className=org.apache.jk.config.ApacheConfig modJk=/usr/lib/apache2/mod_jk.so / tomcat restarted with error 7 and log files start.log: Using CATALINA_BASE: /srv/www/tomcat5/base/ Using CATALINA_HOME: /usr/share/tomcat5 Using CATALINA_TMPDIR: /srv/www/tomcat5/base//temp Using JAVA_HOME: /usr/lib/jvm/java catalina.out: Bootstrap: Class loader creation threw exception java.lang.IllegalArgumentException: addRepositoryInternal: repository='file:/usr/share/tomcat5/common/lib/servlet-api.jar' at org.apache.catalina.loader.StandardClassLoader.addRepositoryIn ternal(StandardClassLoader.java:957) at org.apache.catalina.loader.StandardClassLoader.init(Standard ClassLoader.java:153) at org.apache.catalina.startup.ClassLoaderFactory.createClassLoad er(ClassLoaderFactory.java:207) at org.apache.catalina.startup.Bootstrap.createClassLoader(Bootst rap.java:163) at org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstr ap.java:104) at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:196) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:402) Caused by: java.util.zip.ZipException: No such file or directory at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.init(ZipFile.java:203) at java.util.jar.JarFile.init(JarFile.java:132) at java.util.jar.JarFile.init(JarFile.java:70) at org.apache.catalina.loader.StandardClassLoader.addRepositoryIn ternal(StandardClassLoader.java:944) ... 6 more Could you help me? thank you - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat policy file, advice and clarification please
It is likely that some other class in your webapp is on the stack when the permission check occurs and it causing the check to fail. You could try .../WEB-INF/- to expand the grant to the entire webapp and see what happens. To diagnose this kind of exception, you can add the following system property to your Tomcat startup: -Djava.security.debug=access,failure In the volumes of log output created, search for access denied. A little beyond where you find this, look for domain that failed. That will tell you what is missing the required permission. Note that some permission failures are normal and won't cause a problem. Cheers, Larry -Original Message- From: Hugues Ferland [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 5:30 PM To: users@tomcat.apache.org Subject: Tomcat policy file, advice and clarification please Hi, I have a Tomcat 5.5 installation on Debian Linux with Java 1.6. I have a web application that create its own connection to an Oracle database. The ojdbc14.jar is included in the WEB-INF/lib directory of the web application. Now with the default configuration with security enabled, a SecurityException java.lang.RuntimePermission getClassLoader is thrown. I tried to apply a security policy to ojdbc14.jar with grant AllPermission, but without success. This is what I added to /etc/tomcat5.5/policy.d/50user.policy: grant codeBase file:/the path to the web application/WEB-INF/lib/ojdbc.jar { permission java.security.AllPermission; } This did not work. One particularity of the web application is that I do not deploy it with a war file. I created it using a context xml file in ${catalina.home}/conf/Catalina/localhost/context name.xml. Also the docBase point outside the ${catalina.home}. Of course, I'd like to know what I'm doing wrong... I looked on google, tomcat-docs, and other places without any luck... Maybe somebody could point me in the right direction? Or better yet tell me what is wrong :) Thanks, Hugues - All new Yahoo! Mail - Get news delivered. Enjoy RSS feeds right on your Mail page. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat policy file, advice and clarification please
Hi Huges, The standard Tomcat 5.5 policy file includes: grant codeBase file:${catalina.home}/common/- { permission java.security.AllPermission; }; which grants permission to the common/endorsed jars. It is possible for code to programmatically grant itself some extra permissions, such as permission to use getClassLoader, an not impose this permission on any of the classes involved in the calling of this code. In the absence of this programmatic handling of permissions, all callers must have the permission, i.e. all classes in the stack above where the permission check occurs must have the permission. It is likely that you have a servlet, filter, listener, or some other class in your webapp that is involved in calling ojdbc.jar. Since it wasn't being granted the getClassLoader permission, it was causing the exception once permission was granted to ojdbc.jar. Cheers, Larry -Original Message- From: Hugues Ferland [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 07, 2007 3:30 PM To: Tomcat Users List Subject: RE: Tomcat policy file, advice and clarification please Hi Larry, Thank you very much! That was it. I'm not sure I understand well what the context of a checkPermission is made of... hum... Is it that it uses the context from the web apps to checkPermission...? But then why is checkPermission for my jar in common/endorsed succeed for getClassLoader but fail for SocketPermission? I did not find anything for that in Tomcat's policies files. Thanks again for your help! Hugues Larry Isaacs [EMAIL PROTECTED] wrote: It is likely that some other class in your webapp is on the stack when the permission check occurs and it causing the check to fail. You could try .../WEB-INF/- to expand the grant to the entire webapp and see what happens. To diagnose this kind of exception, you can add the following system property to your Tomcat startup: -Djava.security.debug=access,failure In the volumes of log output created, search for access denied. A little beyond where you find this, look for domain that failed. That will tell you what is missing the required permission. Note that some permission failures are normal and won't cause a problem. Cheers, Larry -Original Message- From: Hugues Ferland [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 5:30 PM To: users@tomcat.apache.org Subject: Tomcat policy file, advice and clarification please Hi, I have a Tomcat 5.5 installation on Debian Linux with Java 1.6. I have a web application that create its own connection to an Oracle database. The ojdbc14.jar is included in the WEB-INF/lib directory of the web application. Now with the default configuration with security enabled, a SecurityException java.lang.RuntimePermission getClassLoader is thrown. I tried to apply a security policy to ojdbc14.jar with grant AllPermission, but without success. This is what I added to /etc/tomcat5.5/policy.d/50user.policy: grant codeBase file:/ application/WEB-INF/lib/ojdbc.jar { permission java.security.AllPermission; } This did not work. One particularity of the web application is that I do not deploy it with a war file. I created it using a context xml file in ${catalina.home}/conf/Catalina/localhost/.xml. Also the docBase point outside the ${catalina.home}. Of course, I'd like to know what I'm doing wrong... I looked on google, tomcat-docs, and other places without any luck... Maybe somebody could point me in the right direction? Or better yet tell me what is wrong :) Thanks, Hugues - All new Yahoo! Mail - Get news delivered. Enjoy RSS feeds right on your Mail page. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - All new Yahoo! Mail - Get news delivered. Enjoy RSS feeds right on your Mail page. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Context problem in tomcat 5.5
The URL http://localhost:8080/samena/, in the absence of a welcome file such as index.jsp, will request a directory listing. However, in Tomcat 5.5, directory listings are disabled by default, which will result in the error you see. I would guess that you either need to enable directory listings (see the conf/web.xml file) or add a welcome file to your webapp. Also disabled is the non-spec legacy /servlet/classname method of executing servlets, which may have allowed your web.xml to work elsewhere. This is why servlet mappings are needed to execute your servlets as noted by Chuck. Cheers, Larry -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 05, 2006 10:18 AM To: Tomcat Users List Subject: RE: Context problem in tomcat 5.5 From: Rizwan Ahmad [mailto:[EMAIL PROTECTED] Subject: Context problem in tomcat 5.5 When I startup tomcat it automatically unpacks war file but when I try to access my website using http://localhost:8080/samena/ it says The requested resource (/samena/) is not available. Your web.xml file is missing servlet-mapping entries. Look at the servlet spec for definition and the various Tomcat web.xml files for examples. I also don't find any context name specified anywhere for http://localhost:8080/servlets-examples/ provided with the tomcat. The context name is determined by the name of the directory or .war file the application is in. In the above case, webapps/servlets-examples automatically results in the above context. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Webapp runs on Tomcat 5.5.9 but not 5.5.20
Just in case, does your web application display a directory listing in 5.5.9? If so, be aware that directory listings have been turned off in conf/web.xml for 5.5.20 (I forget in which version this occurred) due to the potential of a DOS attack if your web application contains lots of files. Other URLs that don't request a directory listing should work. Cheers, Larry -Original Message- From: John Langan [mailto:[EMAIL PROTECTED] Sent: Monday, November 06, 2006 2:07 PM To: users@tomcat.apache.org Subject: Webapp runs on Tomcat 5.5.9 but not 5.5.20 Webapp runs on Tomcat 5.5.9 but not 5.5.20 I compile my war file using eclipse and it runs no problem on Tomcat 5.5.9 but if I try to run the same war on 5.5.20 then I get the error report The requested resource (/ProjectName/) is not available. I have tried various things with no luck including editing C:\apache-tomcat-5.5.20\conf\server.xml, C:\apache-tomcat-5.5.20\conf\Catalina\localhost\context.xml and C:\apache-tomcat-5.5.20\conf\Catalina\localhost\ProjectName.xml. I'm really stumped so any suggestions as to why an identical webapp runs on one version of Tomcat but not a more recent one would be gratefully received. I'm using Struts, Windows XP and JDK 1.5.0_09. John. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classloader Question
Since you are using Tomcat 5, check out the shared.loader property specified in the catalina.properties file of your Tomcat instances. You could change it to use catalina.home instead of catalina.base, or add an additional path. Cheers, Larry -Original Message- From: Fran Varin [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 10, 2006 12:49 PM To: users@tomcat.apache.org Subject: Classloader Question We are running multiple Tomcat 5.5 instances as Windows services. We have some .jar files that are common between the multiple Tomcat instances. We have been searching for a way to configure Tomcat in such a way where we could share the .jar files across those multiple instances. According to what we understand about the Tomcat class loaders, we could place the .jar files at the java_home level. But, this is not advisable since it really is intended to be used for runtime system support. We currently have the .jar files placed in the shared/lib path. This allows us access to the .jar files from each application within a given instance of Tomcat. But, we cannot share those .jar files across Tomcat instances. Is there a location where we could store .jar files with the intent of sharing them with multiple running instances of Tomcat and each one's associated application? -- View this message in context: http://www.nabble.com/Classloader-Question-tf2417987.html#a6740606 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat plugin sysdeo
Feel free to ask Web Tools questions on the Web Tools newsgroup, see http://www.eclipse.org/newsgroups/. Other comments below. Cheers, Larry hallo, thanks for the antworts. after first Antwort. i have installed the WTP plugin and it seems good to work with servlets. but i have some problems with jsps : i make a new project -- dynamic web project then i can add a new servlet to this project and i can test it under eclipse (in this case what i must to do is only edit the web.xml file). this is really good but my question ist. the folder architecture is not the same as the architecture under tomcat. but if i make a war file from my eclipse project than it works under tomcat. can this directory differences make a problem?? No. Assembly of the project into a webapp image occurs when you do certain things with the project, like export it as a WAR file or publish it to a server. the second question is : how can i add a jsp to this project??? Just create the JSP file in the WebContent folder or a subfolder of that folder. You can use File - New - Other - Web - JSP to get the built-in JSP templates that are available. if i add a servlet, it will be placed under src folder but if i try to add a jsp then i must to place it under Webcontent. make it a problem ??? and must i edit the web.xml file for jsp file too??? This is not required if you access the JSP by its name. It is possible to create a declaration and mapping that will allow you to access the JSP using a URL of your own design. At least for the portion beyond the context name of the URL. and another question. this is not a tomcat question but maybe can anybody give me an answer. i want to use jsp servlet and ejb. for example with a html form i will take the login information from an user and then make a connection with the DB and check whether this info true is or not. in this scenario what is for what responsible??? should ejb with the DB communicate?if yes how can i realize it? only the logic :) not the code :) thanks a lot - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSP Compilation Errors - Tomcat 5.5.17
This implies you are picking up older Servlet 2.2/JSP 1.1 API classes somehow, which is overriding the desired Servlet 2.4/JSP 2.0 API classes. The API classes are backward compatible, but not forward compatible as this case illustrates. I don't know enough about Fedora to say how this could come about with what you are copying to the second system. It does imply the classpath isn't what you are assuming it to be. Check around for j2ee.jar or servlet.jar somehow getting into the picture. HTH. Cheers, Larry -Original Message- From: AC [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 31, 2006 1:48 PM To: users@tomcat.apache.org Subject: JSP Compilation Errors - Tomcat 5.5.17 Hi, I'm working on setting up a couple of new webservers -- Fedora with Apache 2.2.2, jdk 1.5.0_06 and tomcat 5.5.17. I successfully got everything working on the first, and then tar'd up the entire setup (all 3 apps are on a dedicated filesystem) and copied it over to the second machine. When I untar'd it and it started up, it's unable to compile any jsp pages...gives the org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error: The method handlePageException(Exception) in the type PageContext is not applicable for the arguments (Throwable) error. I've tried reinstalling the O/S to no avail, as well as the apache/java/tomcat, but it just doesn't seem to want to work. Any ideas? Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [tomcat] : request.setCharacterEncoding (UTF-8) doesn't work ?
Assuming you are using a version of Tomcat 5, you will have to modify something on the Connector to fix this, easily. If you want request.setCharacterEncoding(UTF-8) to affect the encoding of GET query parameters (not just POST parameters), then you must set useBodyEncodingForURI=true on the Connector. The default value of useBodyEncodingForURI is false for Tomcat 5, so GET query parameters are assumed to be encoded according to the URIEncoding attribute setting and setCharacterEncoding() doesn't effect their encoding. Cheers, Larry -Original Message- From: sol myr [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 07, 2006 5:11 AM To: users@tomcat.apache.org Subject: [tomcat] : request.setCharacterEncoding (UTF-8) doesn't work ? Hi, I'm having a problem with HttpServletRequest.setCharacterEncoding(UTF-8). Basically, tomcat seems to ignore it completely, and assume latin1 encoding. Here's the details: - I have an html form where user should type data in *Chinese*. - The browser (IE6) knows that the form data should be sent to the server, encoded as UTF-8 ( this encoding is mentioned in my content-type as well as in from accept-charset=UTF-8 ). - I can actually see that the browser sends the data correctly (this is a GET, so I can see the encoding)... - On the servlet size, I write: request.setCharacterEncoding(UTF-8); String p=request.getParameter(name); Unfortunatelly, this simply doesn't work. Tomcat reads the parameters as if they were latin1 ... I can extract them by forcefully converting back to utf-8, but it's ugly and not portable... I know you can configure tomcat's Connector to use utf-8, but I really don't want to do it ( client has a standard Tomcat installation, and I'm absolutely not allowed to touch it). Is there any reason why tomcat would ignore my request.setCharacterEncoding ? Am I doing something wrong, or is Tomcat just ignoring the j2ee spec in this point ? Thanks - Brings words and photos together (easily) with PhotoMail - it's free and works with Yahoo! Mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 3 -- servlets don't reload..
I has been quite a while since I have used Tomcat 3.3.x. My recollection is that accessing the changed servlet would trigger a reload of the webapp. This differs from the newer Tomcats which have a background thread checking for changes. Also, with a default configuration, I don't recall anything special that was needed beyond setting the context to be reloadable. I can't say why this isn't working for you. As for the manager, Tomcat came with an admin webapp. However, it never got far enough along to be worthy of its own manual. It's mentioned briefly in the User's Guide, but I think that is about it. If you want a real manager/admin webapp, you will need to upgrade to a newer Tomcat. Cheers, Larry -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Frances Sent: Tuesday, February 28, 2006 12:49 PM To: users@tomcat.apache.org Subject: Tomcat 3 -- servlets don't reload.. when I make changes to a servlet I don't see changes unless I turn tomcat off and on... this is a huge pain, it's at work, where we can't be turning Tomcat off and on all day long whenever we make changes to a servlet.. Is there a way around this? (Does Tomcat 3 come with a Manager? I can't find manager-howto.html among docs (which does come with Tomcat 5..) many thanks.. Frances - 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: ClassLoader/Security Manager Question
For reasons that are difficult to predict or calculate, some other protection domain (i.e. codeBase) for somebody in the stack may be missing this permission. I've given up trying to figure these out after the obvious doesn't fix it. Try adding: -Djava.security.debug=access,failure to your Tomcat startup arguments. Hopefully you can capture the output around the point of failure. There will be a lot of output. Look for access denied. That will give you the missing permission. Not to far below that you can find the domain that failed, which will give you the codeBase missing the permission. It is not unusual to see something unexpected. Somewhere below that you can see the permissions that this domain does currently have. This is where you might find that a permission you tried to grant has a typo, so it doesn't serve its purpose. Give it a try and see if anything turns up. Cheers, Larry -Original Message- From: George Sexton [mailto:[EMAIL PROTECTED] Sent: Friday, January 20, 2006 3:46 PM To: 'Tomcat Users List' Subject: ClassLoader/Security Manager Question I'm trying to get my app to run under the security manager and I'm hitting some problems. I have class B, derived from class A, in Jar B in the WEB-INF/lib directory Class A is in Jar A in the shared/lib directory. I created an entry in the catalina.policy file: grant codeBase file:${catalina.base}/shared/- { permission java.lang.RuntimePermission accessClassInPackage.*; permission java.security.AllPermission; }; When a method defined in Class A uses reflection to get the constructors for Class B, the following error message happens: 01/20/2006 13:24:36 java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers) at java.security.AccessControlContext.checkPermission(AccessContr olContext.java :264) at java.security.AccessController.checkPermission(AccessControlle r.java:427) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) at java.lang.SecurityManager.checkMemberAccess(SecurityManager.java:1662) at java.lang.Class.checkMemberAccess(Class.java:2125) at java.lang.Class.getDeclaredConstructor(Class.java:1952) I've done some research and it seems like what I'm trying to do should work if I specify accessClassInPackage. I've tried explicitly setting the class A package in the accessClassInPackage statement but I'm not making any headway. I would rather not put Jar A in WEB-INF/lib because I have something like 100 contexts that all use that jar and I'm already hitting issues with PermGenSpace. I also can't put Jar B in shared/lib because of design (or lack thereof). Does anyone have any ideas (other than the obvious one of putting Jar A in WEB-INF/lib)? George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 - 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: Error loop for R - Tomcat 3.3.1a
Sid, The code where the exception is occurring is: private final String getAbsolutePathRelativeToContext(String relativeUrlPath) { String path = relativeUrlPath; if (!path.startsWith(/)) { String uri = (String) request.getAttribute(javax.servlet.include.servlet_path); if (uri == null) uri = ((HttpServletRequest) request).getServletPath(); 401 String baseURI = uri.substring(0, uri.lastIndexOf('/')); path = baseURI+'/'+path; } return path; } The code is trying to convert the weblmpagetop.jsp relative path to a path from the root of the webapp. What Jasper has to work with to establish where weblmpagetop.jsp is located is failing the uri.lastIndexOf('/'). This suggests the problem is related to the forwards that are occurring prior to reaching the include. Perhaps there is something that needs to start with a '/' that doesn't. I can't say that this isn't due to a quirk, bug, or spec ambiguity, as opposed the webapp doing something wrong with respect to the Servlet 2.2 spec. It sounds like you are stuck with 3.3.1 as is. Hopefully a reasonable workaround can be found. Cheers, Larry -Original Message- From: Siddhartha Mehta [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 1:50 AM To: users@tomcat.apache.org Subject: Error loop for R - Tomcat 3.3.1a I am currently working on a web application that uses Tomcat 4.1.27 and JDK 1.4.2_03. The same piece of code now needs to be supported on Tomcat 3.3.1 and JDK 1.4.2_08. I managed to get the classes, jsps coompile and built by modifying the ant script. In fact even the application runs perfect and the functionalities are working as expected. Although, all is not good as it seems so. In the backend, the tomcat - startup windows isn't quite happy with the changes. I repeatedly get the following error and I can make out very little from it. I can think of possible cause as this code in my jsp but not really sure: jsp:include page=weblmpagetop.jsp flush=true jsp:param name=disable-session-validation value=true / jsp:param name=body-title-text value=%= title % / jsp:param name=body-location-text value=%= location % / /jsp:include Exception thrown in tomcat-start up window is below: 2006-01-10 11:48:04 - Ctx(/WebLM) : Exception in R( /WebLM + /weblmlogin.jsp + n ull) - javax.servlet.ServletException: String index out of range: -1 at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon textImpl.java:460) at com.avaya.weblm.weblmlogin._jspService(Unknown Source) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java :574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4 85) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa tcherImpl.java:272) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc herImpl.java:174) at com.avaya.weblm.WebLMServlet.forwardToNextPage(Unknown Source) at com.avaya.weblm.WebLMClientLogin.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java :574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4 85) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa tcherImpl.java:272) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc herImpl.java:174) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.jav a:423) at com.avaya.weblm.weblmlogin._jspService(Unknown Source) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java :574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4 85) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa tcherImpl.java:272) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc
RE: Error loop for R - Tomcat 3.3.1a
I'm afraid I don't have any simple guesses as to what to change. It appears there are multiple forwards occurring and it may be the multiple that is the root cause of this behavior. You can experiment with changes to see what happens, or try to run tomcat in a debugger to see if you can determine what ((HttpServletRequest) request).getServletPath() is returning and why it doesn't have the expected '/'. If you want to try the latter, source for Tomcat 3.3.1 or 3.3.1.a can be found here: http://archive.apache.org/dist/tomcat/tomcat-3/archive/ An alternative to debugging is to create a classes directory under lib/container and extract the source for PageContextImpl into the package appropriate subdirectory. Then add System.out.println()s, and compile. When Tomcat is run, the PageContextImpl under classes will take precedence over the one in jasper.jar, allowing you to gather clues. HTH, Larry -Original Message- From: Siddhartha Mehta [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 8:51 AM To: Tomcat Users List Subject: RE: Error loop for R - Tomcat 3.3.1a Hey Larry, Finally a refresh click brought a smile on my face :-) Yeah, it is one of those scenarios where people want backward support as against to moving forward. One thing that I dont understand is that the UIs are working very well. In fact I am able to change the password (that is when these exceptions are thrown) and is updated as well. Then why this backend exception. Any thoughts here? Also, there is a forward that is called before the include as you pointed out. Do you have any ideas on what tweaking I can try? Thanks again for your reply. Sid Larry Isaacs [EMAIL PROTECTED] wrote: Sid, The code where the exception is occurring is: private final String getAbsolutePathRelativeToContext(String relativeUrlPath) { String path = relativeUrlPath; if (!path.startsWith(/)) { String uri = (String) request.getAttribute(javax.servlet.include.servlet_path); if (uri == null) uri = ((HttpServletRequest) request).getServletPath(); 401 String baseURI = uri.substring(0, uri.lastIndexOf('/')); path = baseURI+'/'+path; } return path; } The code is trying to convert the weblmpagetop.jsp relative path to a path from the root of the webapp. What Jasper has to work with to establish where weblmpagetop.jsp is located is failing the uri.lastIndexOf('/'). This suggests the problem is related to the forwards that are occurring prior to reaching the include. Perhaps there is something that needs to start with a '/' that doesn't. I can't say that this isn't due to a quirk, bug, or spec ambiguity, as opposed the webapp doing something wrong with respect to the Servlet 2.2 spec. It sounds like you are stuck with 3.3.1 as is. Hopefully a reasonable workaround can be found. Cheers, Larry -Original Message- From: Siddhartha Mehta [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 1:50 AM To: users@tomcat.apache.org Subject: Error loop for R - Tomcat 3.3.1a I am currently working on a web application that uses Tomcat 4.1.27 and JDK 1.4.2_03. The same piece of code now needs to be supported on Tomcat 3.3.1 and JDK 1.4.2_08. I managed to get the classes, jsps coompile and built by modifying the ant script. In fact even the application runs perfect and the functionalities are working as expected. Although, all is not good as it seems so. In the backend, the tomcat - startup windows isn't quite happy with the changes. I repeatedly get the following error and I can make out very little from it. I can think of possible cause as this code in my jsp but not really sure: name=body-title-text % name=body-location-text Exception thrown in tomcat-start up window is below: 2006-01-10 11:48:04 - Ctx(/WebLM) : Exception in R( /WebLM + /weblmlogin.jsp + n ull) - javax.servlet.ServletException: String index out of range: -1 at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon textImpl.java:460) at com.avaya.weblm.weblmlogin._jspService(Unknown Source) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java :574) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4 85) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa tcherImpl.java:272) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc herImpl.java:174) at com.avaya.weblm.WebLMServlet.forwardToNextPage(Unknown Source) at com.avaya.weblm.WebLMClientLogin.doPost(Unknown Source
RE: UnsupportedClassVersionError
I believe the message: java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main (Unsupported major.minor version 49.0) indicates that while running with 1.4.2, you are attempting to use a tools.jar from a JDK 1.5.x. The simplest way I know to encounter this is to install Tomcat using the exe on Windows with JAVA_HOME pointing to a JDK 1.5.x. During the installation process, tools.jar will be copied from the JDK to the common/lib directory of the installation. As long as you use this installation with 1.5 you are okay. But if you switch back to using 1.4.x, you will get this symptom because 1.4 doesn' know how to load the newer format classes in the 1.5 tools.jar. Assuming the diagnosis above is correct, how to address this depends on how you are running Tomcat. If running as a service, I think the only option is to overwrite the tools.jar in common/lib with a version from JDK 1.4.x. If running using batch scripts, and don't care about running it as a service, I believe you can delete the tools.jar in common/lib and ensure your JAVA_HOME points to a JDK. HTH. Cheers, Larry -Original Message- From: e-Denton Subscriber [mailto:[EMAIL PROTECTED] Sent: Thursday, December 08, 2005 8:06 AM To: 'Tomcat Users List' Subject: UnsupportedClassVersionError Hi, I recently uploaded an updated Struts application to a remote server. Now I get this message (below: UnsupportedClassVersionError). I am using Tomcat 5.0.27. I do have 5.5 on that system, but everything points to 5.0.27 (as far as I can tell). I am running Java 1.4.2_01_b06. I have the same setup on my dev machine--except Tomcat 5.5 is not on that system--and everything works fine. Thanks for your help. (I already tried to email this under the wrong email address. Sorry if both show up.) 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: Resource parameters for jdbc/portal = ResourceParams[name=jdbc/portal, parameters={factory=org.apache.commons.dbcp.BasicDataSourceFactory, maxWait=1, maxActive=10, password=small1, url=jdbc:mysql://127.0.0.1:3306/fortune?autoReconnect=true, driverClassName=com.mysql.jdbc.Driver, maxIdle=5, username=fortune}] 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: Adding resource ref jdbc/portal 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: ResourceRef[className=javax.sql.DataSource,factoryClassLocatio n=null,factory ClassName=org.apache.naming.factory.ResourceFactory,{type=scop e,content=Shar eable},{type=auth,content=Container},{type=factory,content=org .apache.common s.dbcp.BasicDataSourceFactory},{type=maxWait,content=1},{t ype=maxActive, content=10},{type=password,content=small1},{type=url,content=j dbc:mysql://12 7.0.0.1:3306/fortune?autoReconnect=true},{type=driverClassName ,content=com.m ysql.jdbc.Driver},{type=maxIdle,content=5},{type=username,cont ent=fortune}] 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: Resource parameters for mail/Session = ResourceParams[name=mail/Session, parameters={mail.smtp.host=mars.webappcabaret.net}] 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: Adding resource ref mail/Session 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: ResourceRef[className=javax.mail.Session,factoryClassLocation= null,factoryCl assName=org.apache.naming.factory.ResourceFactory,{type=scope, content=Sharea ble},{type=auth,content=Container},{type=mail.smtp.host,conten t=mars.webappc abaret.net}] 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: Resource parameters for UserTransaction = null 2005-12-08 04:32:43 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537) at java.security.SecureClassLoader.defineClass(SecureClassLoader. java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at org.apache.catalina.loader.StandardClassLoader.loadClass(Stand ardClassLoader .java:803) at org.apache.catalina.loader.StandardClassLoader.loadClass(Stand ardClassLoader