Re: SQLException when using a datasource
Hi Samuel, I am getting same problem... if you solve this problem send me the solution. Thanks in advance vijay --- Samuel Cheung <[EMAIL PROTECTED]> wrote: > > I am trying to setup a hibernate example with Tomcat > 4.1.27. So I add a > datasource to my server.xml. But when I access a > connection, I got this > exception: > 20:56:49,072 WARN SessionFactoryImpl:171 - Could not > obtain connection > metadata > java.sql.SQLException: Cannot load JDBC driver class > 'null' > > could some one please tell me how to fix that. I > check the parameter of the > DBCP connection, they are correct. > > Thanks in advance. > > Sam > > > I have added the following in my server.xml of > Tomcat: > > type="javax.sql.DataSource"/> > > > factory > org.apache.commons.dbcp.BasicDataSourceFactory > > > > > url > jdbc:mysql://localhost:3306/mysql > > > driverClassNameorg.gjt.mm.mysql.Driver > > > username > remote > > > password > remote > > > > > maxWait > 5000 > > > maxIdle > 2 > > > maxActive > 4 > > > > > > << from the Tomcat console >> > 20:56:49,010 INFO DatasourceConnectionProvider:51 - > Using datasource: > java:comp/env/jdbc/quickstart > 20:56:49,010 INFO SessionFactoryImpl:155 - Use outer > join fetching: true > 20:56:49,057 WARN JDBCExceptionReporter:36 - SQL > Error: 0, SQLState: null > 20:56:49,057 ERROR JDBCExceptionReporter:44 - Cannot > load JDBC driver class > 'null' > 20:56:49,072 WARN SessionFactoryImpl:171 - Could not > obtain connection > metadata > java.sql.SQLException: Cannot load JDBC driver class > 'null' > at > org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav > a:529) > at > org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3 > 12) > at > net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(Datas > ourceConnectionProvider.java:60) > at > net.sf.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:160) > at > net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:59 > 4) > at > net.sf.hibernate.examples.quickstart.TestHibernateServlet.initHibernate(Test > HibernateServlet.java:109) > at > net.sf.hibernate.examples.quickstart.TestHibernateServlet.doGet(TestHibernat > eServlet.java:26) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IMP:Problem migrating to Latest Tomcat 5
Paresh Varatkar wrote: Found out thwe problem. One of our class is making hard coded refernce to resources that is creating trouble in deploying the application. One more problem though. I am trying to start Tomcat as service. It starts and stops immediately saying "The apache service on computer started then stopped some services stop automatically if they have no work to do" has anyone came across this. That bug has been fixed already, and 5.0.14 will have the fix. Sorry Chris, I am putting files under webapps\WEB-INF\\lib directory. No, it's webapps\\WEB-INF\lib -- x Rémy Maucherat Senior Developer & Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session affinity doesn't work
add tomcatId to the channles # tomcat1 [channel.socket:localhost:11009] port=11009 host=localhost type=ajp13 lb_factor=100 tomcatId=tomcat1 # tomcat2 [channel.socket:localhost:12009] port=12009 host=localhost type=ajp13 lb_factor=100 tomcatId=tomcat2 and modify jvmRoute for tomcat2 to Klaus - Original Message - From: "Dinh Nguyen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, October 25, 2003 7:00 AM Subject: Session affinity doesn't work Hi all, I have downloaded these following packages and installed them on my machine (Win 2K): Apache 2.0.47 Tomcat 2.0.47 Jk2_mod connector 2.0.43. I have 2 instances of tomcat (tomcat1, tomcat2 on the same host) on my machine on a load balancing environment. The load balancing works well with one exception: the session affinity doesn't work as expected. Everytime I refresh my browser, it gives me a different session id. If anyone experimented this problem, please help me. These are my settings and modifications to apache and tomcat. Apache httpd.conf == LoadModule jk2_module modules/mod_jk2.dll == Apache workers2.properties (entire content) == [logger] level=DEBUG [config:] #file=${serverRoot}/conf/workers2.properties #file=c:/Apache2/conf/workers2.properties file=conf/workers2.properties debug=0 debugEnv=0 [shm:] info=Scoreboard. Required for reconfiguration and status with multiprocess servers #file=${serverRoot}/logs/jk2.shm file=logs/jk2.shm size=100 debug=0 disabled=0 [workerEnv:] info=Global server options timing=1 debug=0 # Default Native Logger (apache2 or win32 ) # can be overriden to a file logger, useful # when tracing win32 related issues #logger=logger.file:0 [lb:lb] info=Default load balancer. debug=0 # tomcat1 [channel.socket:localhost:11009] port=11009 host=localhost type=ajp13 lb_factor=100 # tomcat2 [channel.socket:localhost:12009] port=12009 host=localhost type=ajp13 lb_factor=100 [uri:/jkstatus/*] info=Display status information and checks the config file for changes. #group=status: [uri:/*.jsp] info=Extension mapping == Tomcat1 server.xml == 1. Comment out Coyote HTTP/1.1 Connector at port 8080 2. Change to 3. Change to (notice: I DID rename the misspelling from jmvRoute to jvmRoute in the orginal release) 4. Change Coyote/JK2 AJP 1.3 Connector to listen at 11009 5. No change for jk2.properties == Tomcat2 server.xml == The same with Tomcat1, but with different port numbers (12005 for server, 12009 for Coyote/JK2 AJP 1.3 Connector) == At the ROOT directory of each tomcat instance, I create a jsp file with a single command "request.getSession().getId()" Then I start tomcat1, tomcat2, apache (in order). Everything is OK. No error reported on the screen. The only bad thing is that with every request, this page returns a different session id (they are suffixed with .tomcat1 and .tomcat2), if the session affinity works correctly, they must be the same, right? Is there anything wrong with my configuration? If anyone have solution, please share it to me. I appreciate it. Dinh. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat doesn't start under Windows XP
I see in another post that you've got tomcat to startup. :) The reason your approach here didn't work is because you set the JAVA_HOME variable locally in the current shell. When you then executed startup.bat it started another shell in which to run tomcat. This new shell didn't have its parent's environment variables, only the ones set globally. Setting the environment variables using Control Panel was definately the way to go. Setting the environment variables globally allowed tomcat to start. Changing JAVA_HOME to being an SDK install rather than a JRE will allow tomcat to compile jsp files on the fly. Enjoy, Jon Giorgio Franceschetti wrote: Hardee, Brenda G NAVSAFECEN wrote: I had the same problem installing Tomcat under Win2000. Be sure that all your environment variables are set properly. I actually created a batch file that sets all my environment variables before I run Tomcat. That solved my problem. Be sure that you have set Java_Home environment under "My Computer". Here's a sample of the batch file (just change the directories to match your environment): set JAVA_HOME=c:\j2sdk1.4.1 set CATALINA_HOME=D:\tomcat set path=D:\tomcat\bin;c:\j3sdk1.4.1\bin;c:\winnt;c:\winnt\system32;e:\oracle\ora92\bin; set classpath=d:\tomcat\common\lib\mail.jar;d:\tomcat\common\lib\soap.jar;d:\tomcat\common\lib\activation.jar;c:\j2sks1.4.1\lib;d:\tomcat\common\lib\servlet.jar;d:\tomcat\common\lib\classes12.jar;d:\tomcat\server\lib\catalina.jar;d:\tomcat\common\lib\jaxp.jar; Run your batch file then to to d:\tomcat\bin\startup Good lucK! I have tyred to set my .bat this way: set JAVA_HOME=C:\Programmi\Java\j2re1.4.2 set CATALINA_HOME=C:\OpenSource\tomcat set path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\WBEM;C:\OpenSource\tomcat\bin; C:\Programmi\Java\j2re1.4.2\bin classpath=%CATALINA_HOME%\common\lib\mail.jar;%CATALINA_HOME%\common\lib\soap.jar;%CATALINA_HOME%\common\lib\activation.jar;%JAVA_HOME%\lib;%CATALINA_HOME%\common\lib\servlet.jar;%CATALINA_HOME%\common\lib\classes12.jar;%CATALINA_HOME%\server\lib\catalina.jar;%CATALINA_HOME%\common\lib\jaxp.jar; CD %CATALINA_HOME%\bin startup but it didn't work.. :-( Giorgio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Turning cookie JSESSIONID off (selectively)
Hi. Is it possible to turn JSESSIONID cookie off, but just for several pages? I have problem with caching tomcat-generated html pages (tomcat 4.1.x) using Squid in reverse-proxy mode and I suspect it is because of this cookie. I cannot turn it at all, because my webapp has parts requiring session information. Any suggestions will be appreciated. Richard. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Embedding Tomcat Continued...
--- Robert Charbonneau <[EMAIL PROTECTED]> wrote: > On October 24, 2003 11:56 pm, Sriram N wrote: > > Hi: > > > > I think you do not have tools.jar in your CLASSPATH. > > > > > > -- Sriram > > > > That did the trick, thanks my friend. > > I have another question on the same subject for the list at large. Now that > my application can create it's own contexts for my webapps to run inside of, > is there a way that my JSPs and Servlets can modify and make use of objects > that are instantiated inside the application? > Sure they can. If you're not loading your Contexts via special classloaders, then it's as simple as getting an instance of your application's objects and making use of them. See an example that I've mentioned below. If you're using custom classloaders to load Contexts in separate classloaders, you need to give information on the Classloader hierarchies that you're using. > For example, my application is multi-threaded and it starts Tomcat, retrieves > > some data from the database and performs a few other functions. The reason > why I'm embedding Tomcat is to give my application a web front-end. Could > anyone provide some insight as to how I can make this happen, and perhaps > provide some code samples? > a. Get hold of your application's objects via JNDI. b. Create a class called the Environment, and register your application objects into this class. Such a class could be just a wrapper for a Hashtable. Make this Environment class a Singleton. Next, from within the contexts, access this Environment singleton, and go on to access your application objects. e.g. To share a data source between a Context and your application, you might try: // in your application Environment env = Environment.getInstance(); Connection connection = createConnection(); // returns a connection to a database. env.registerObject("DataConnection",connection); // In your web application Environment env = Environment.getInstance(); Object anObject = env.getObject("DataConnection"); if(anObject==null) throw new Exception("No Data Connection in environment !"); Connection connection = (Connection) anObject; connection.execute("select * from sales"); > Thanks. > > -- > Robert Charbonneau > [EMAIL PROTECTED] > -- > -- Sriram Object Edge Software India Pvt. Ltd. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using JMX to talk to TC5
All: I had once developed a GUI that used the Tomcat code TC 4.0.1 to deliver a Swing UI that is functionally similar to IBM's Websphere GUI Console in a limited sort of way. I'd referred to Embedded's main(), to learn how to create Contexts, Connectors, etc, and create these as required within my Swing application (MVC style design). I'm now working on porting the code to make use of TC5. Could someone please advice me on: 1. What is the paradigm in TC5/JMX ? Do I need to register with some central object that notifies me about TC5 events such as Context creation, failures, etc? 2. Could I connect to the TC5 objects via JMX and make changes to them ? I know I should read the source, but I will have access to high speed internet only tomorrow, and would like to be better armed on exactly what I need to download and read. Thanks, -- Sriram __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unable to find servlet class after reload
All, I'm not sure exactly when this started happening, but now reloads cause all my load-on-startup servlets classes to cause the following errors: 2003-10-25 11:57:14 StandardContext[/diagnosis]: Servlet /diagnosis threw load() exception javax.servlet.ServletException: Wrapper cannot find servlet class org.apache.struts.action.ActionServlet or a class it depends on at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:891) . . . - Root Cause - java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1444) . . 2003-10-25 11:57:14 StandardContext[/diagnosis]: Servlet /diagnosis threw load() exception javax.servlet.ServletException: Wrapper cannot find servlet class org.childhealthcare.diagnosis.servlet.InitServlet or a class it depends on at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:891) . . . - Root Cause - java.lang.ClassNotFoundException: org.childhealthcare.diagnosis.servlet.InitServlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1444) . . Pretty much one for each of the servlets that I have listed as load-on-startup. I checked, and there's no overlap between what I have in my web application's local lib directory and what's in TOMCAT_HOME/common/lib. Does anyone have any ideas? I only started noticing this behavior this morning; I have been switching over to Struts with Velocity-Tools, so those are the last two libraries that I have added to my application. Otherwise, I'm not doing anything crazy. Thanks in advance for any help, -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to find servlet class after reload
Hi: Just a blind shot (I've not used Struts yet). Do these load-on-startup servlets require anything to be initialized in struts ? Does Struts require initialization by the web app developer ? If so, perhaps you need to somehow ensure that such initialization takes place before you load your servlets ? Separately, what exactly do you mean by "reloads cause the errors" ? Does everything work fine when Tomcat is started ? If this is the case, then perhaps you need to try maintaining webapp specific copies of files that you're using from common/lib - stuff like struts, for e.g. Perhaps this is a problem with Classloader hierarchies. -- Sriram --- Christopher Schultz <[EMAIL PROTECTED]> wrote: > All, > I'm not sure exactly when this started happening, but now reloads cause > all my load-on-startup servlets classes to cause the following errors: > > 2003-10-25 11:57:14 StandardContext[/diagnosis]: Servlet /diagnosis > threw load() exception > javax.servlet.ServletException: Wrapper cannot find servlet class > org.apache.struts.action.ActionServlet or a class it depends on > at > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:891) > . > . > . > - Root Cause - > java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1444) > . > . > 2003-10-25 11:57:14 StandardContext[/diagnosis]: Servlet /diagnosis > threw load() exception > javax.servlet.ServletException: Wrapper cannot find servlet class > org.childhealthcare.diagnosis.servlet.InitServlet or a class it depends on > at > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:891) > . > . > . > - Root Cause - > java.lang.ClassNotFoundException: > org.childhealthcare.diagnosis.servlet.InitServlet > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1444) > . > . > > > Pretty much one for each of the servlets that I have listed as > load-on-startup. I checked, and there's no overlap between what I have > in my web application's local lib directory and what's in > TOMCAT_HOME/common/lib. > > Does anyone have any ideas? > > I only started noticing this behavior this morning; I have been > switching over to Struts with Velocity-Tools, so those are the last two > libraries that I have added to my application. > > Otherwise, I'm not doing anything crazy. > > Thanks in advance for any help, > -chris > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to find servlet class after reload
Christopher Schultz wrote: I'm not sure exactly when this started happening, but now reloads cause all my load-on-startup servlets classes to cause the following errors: Let me guess: You're running 4.1.27, right? Make sure you've applied the hotfix. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to find servlet class after reload
Your load on startup is in your applications web.xml file? Are you saying it works fine the first time you start Tomcat? If so, then maybe it doesn't get shutdown propertly, when you restart. Or do you mean just reloading the application? There's supposed to be a patch to Tomcat for fixing reloading issues, but I don't know if this is one of them. I use startup servlets in Struts, but I don't have my app setup for reloading. Oscar On Sat, 25 Oct 2003, Christopher Schultz wrote: > All, > I'm not sure exactly when this started happening, but now reloads cause > all my load-on-startup servlets classes to cause the following errors: > > 2003-10-25 11:57:14 StandardContext[/diagnosis]: Servlet /diagnosis > threw load() exception > javax.servlet.ServletException: Wrapper cannot find servlet class > org.apache.struts.action.ActionServlet or a class it depends on > at > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:891) > . > . > . > - Root Cause - > java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1444) > . > . > 2003-10-25 11:57:14 StandardContext[/diagnosis]: Servlet /diagnosis > threw load() exception > javax.servlet.ServletException: Wrapper cannot find servlet class > org.childhealthcare.diagnosis.servlet.InitServlet or a class it depends on > at > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:891) > . > . > . > - Root Cause - > java.lang.ClassNotFoundException: > org.childhealthcare.diagnosis.servlet.InitServlet > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1444) > . > . > > > Pretty much one for each of the servlets that I have listed as > load-on-startup. I checked, and there's no overlap between what I have > in my web application's local lib directory and what's in > TOMCAT_HOME/common/lib. > > Does anyone have any ideas? > > I only started noticing this behavior this morning; I have been > switching over to Struts with Velocity-Tools, so those are the last two > libraries that I have added to my application. > > Otherwise, I'm not doing anything crazy. > > Thanks in advance for any help, > -chris > > > - > 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]
Map all URL to one servlet
Hi, Is it possible to map all URI''s from tomcat to just one servlet? for example: http://localhost:8080/hello/you http://localhost:8080/startme/now thanx in advance stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to find servlet class after reload
Oscar, Your load on startup is in your applications web.xml file? Yes. Are you saying it works fine the first time you start Tomcat? If so, then maybe it doesn't get shutdown propertly, when you restart. Or do you mean just reloading the application? No, everything works okay when I start tomcat. If I recomplie my classes and redeploy them while the server is running (or otherwise trigger an auto-reload), I get these messages in my webapp's log file, and the webapp is essentially dead after that. There's supposed to be a patch to Tomcat for fixing reloading issues, but I don't know if this is one of them. I'm running 4.1.27-LE with: java version "1.4.2" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode) on Linux kernel 2.4.20. Does this version still need a patch? -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to find servlet class after reload
Sriram, Does Struts require initialization by the web app developer ? If so, perhaps you need to somehow ensure that such initialization takes place before you load your servlets ? The first tim I load the web app (i.e. on Tomcat startup) everything works fine. It's only after a webapp re-load that things fall apart. Separately, what exactly do you mean by "reloads cause the errors" ? Does everything work fine when Tomcat is started ? If this is the case, then perhaps you need to try maintaining webapp specific copies of files that you're using from common/lib - stuff like struts, for e.g. Perhaps this is a problem with Classloader hierarchies. I have just about everything in my webapp's lib directory. The only things that are shared are commons-dbcp and commons-pool, which are required for my DataSourceRealm configured in server.xml. I have used this Realm in the past any of these issues. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to find servlet class after reload
David, Let me guess: You're running 4.1.27, right? Yep, that would be the version (apologies for not giving that in the first place). > Make sure you've applied the hotfix. Stupid question: where can I download this fix? The tomcat download page doesn't give any indication that there's a fix. Thanks so much for the help. I assume that this is a common symptom of the bug that's been fixed? -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Map all URL to one servlet
Stefan, Is it possible to map all URI''s from tomcat to just one servlet? for example: http://localhost:8080/hello/you http://localhost:8080/startme/now Yes. Do this in your web.xml: everything-servlet name.or.servlet.class everything-servlet * That should do the trick. I believe if you map other servlets first, you can have a few "special" URLs that will go to other servlets. You will have to use this technique to allow JSP files to work as expected. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using JMX to talk to TC5
Sriram N wrote: All: I had once developed a GUI that used the Tomcat code TC 4.0.1 to deliver a Swing UI that is functionally similar to IBM's Websphere GUI Console in a limited sort of way. I'd referred to Embedded's main(), to learn how to create Contexts, Connectors, etc, and create these as required within my Swing application (MVC style design). I'm now working on porting the code to make use of TC5. Could someone please advice me on: 1. What is the paradigm in TC5/JMX ? Do I need to register with some central object that notifies me about TC5 events such as Context creation, failures, etc? First download: http://apache.crihan.fr/dist/jakarta/tomcat-5/v5.0.12-beta/bin/jakarta-tomcat-5.0.12-embed.tar.gz 2. Could I connect to the TC5 objects via JMX and make changes to them ? Yes, you can. Take a look at the admin application, which use JMX to creates Tomcat 5 objects. -- Jeanfrancois I know I should read the source, but I will have access to high speed internet only tomorrow, and would like to be better armed on exactly what I need to download and read. Thanks, -- Sriram __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Map all URL to one servlet
Hi: You might also consider editing the $CATALINA_HOME/conf/web.xml to replace the "org.apache.catalina.servlets.DefaultServlet" with your own Servlet. You could then respond to ALL requests. -- Sriram --- Christopher Schultz <[EMAIL PROTECTED]> wrote: > Stefan, > > > Is it possible to map all URI''s from tomcat to just one servlet? > > > > for example: > > http://localhost:8080/hello/you > > http://localhost:8080/startme/now > > Yes. Do this in your web.xml: > > > everything-servlet > name.or.servlet.class > > > > everything-servlet > * > > > That should do the trick. I believe if you map other servlets first, you > can have a few "special" URLs that will go to other servlets. You will > have to use this technique to allow JSP files to work as expected. > > -chris > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using JMX to talk to TC5
Thanks, I'll get started right away ! :-) -- Sriram --- Jean-Francois Arcand <[EMAIL PROTECTED]> wrote: > > > Sriram N wrote: > > >All: > > > >I had once developed a GUI that used the Tomcat code TC 4.0.1 to deliver a > >Swing UI that is functionally similar to IBM's Websphere GUI Console in a > >limited sort of way. I'd referred to Embedded's main(), to learn how to > create > >Contexts, Connectors, etc, and create these as required within my Swing > >application (MVC style design). > > > >I'm now working on porting the code to make use of TC5. > > > >Could someone please advice me on: > >1. What is the paradigm in TC5/JMX ? > >Do I need to register with some central object that notifies me about TC5 > >events such as Context creation, failures, etc? > > > First download: > > http://apache.crihan.fr/dist/jakarta/tomcat-5/v5.0.12-beta/bin/jakarta-tomcat-5.0.12-embed.tar.gz > > > > > >2. Could I connect to the TC5 objects via JMX and make changes to them ? > > > Yes, you can. Take a look at the admin application, which use JMX to > creates Tomcat 5 objects. > > -- Jeanfrancois > > > > >I know I should read the source, but I will have access to high speed > internet > >only tomorrow, and would like to be better armed on exactly what I need to > >download and read. > > > >Thanks, > > > >-- Sriram > > > >__ > >Do you Yahoo!? > >The New Yahoo! Shopping - with improved product search > >http://shopping.yahoo.com > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to find servlet class after reload
All, Let me guess: You're running 4.1.27, right? Make sure you've applied the hotfix. Got the hotfix, installed it, all better now. Thanks everyone for your patience and help. I'm sure a lot of people do what I just did and ask for help without doing enough research. :( -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to find servlet class after reload
Christopher Schultz wrote: Let me guess: You're running 4.1.27, right? Yep, that would be the version (apologies for not giving that in the first place). > > Make sure you've applied the hotfix. Stupid question: where can I download this fix? The tomcat download page doesn't give any indication that there's a fix. Thanks so much for the help. I assume that this is a common symptom of the bug that's been fixed? Download the hotfix here: http://www.apache.org/dist/jakarta/tomcat-4/binaries/ Something needs to be done about making it known that the hotfix is available! -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to find servlet class after reload
David Rees wrote: Something needs to be done about making it known that the hotfix is available! Opened a bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=24121 -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to find servlet class after reload
Christopher Schultz wrote: Got the hotfix, installed it, all better now. Thanks everyone for your patience and help. I'm sure a lot of people do what I just did and ask for help without doing enough research. :( Well, the hotfix should be easier to find, so you can't entirely blame yourself. ;) From what I can tell, there's no mention of the hotfix -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Socket permission in a CGI Script
I'm not a servlets-cgi expert (never used), but I think, if Tomcat runs with a Security Manager, you can fix the problem by adding the following in server.policy: // Give all permission to servlets-cgi.jar grant codeBase "file:${catalina.home}/server/lib/servlets-cgi.jar" { permission java.security.AllPermission; }; If it works then try to only give the socket permission. If you are not running with a Security Manager, then it's a permission/group OS setting. --Jeanfrancois Joao Machado wrote: Hi all, I'm trying to execute a CGI script and this Script tries to connect with a database opening a socket to it. This raises a problem that this script can't do this (permission?). I found in the mail archive someone with the same problem but I didn't found an answer. Anyone has solved this issue ? Thanks in advance, Joao Machado --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problems with JK2... does max_connections do anything?!
Hi, I have found what appears to be a serious problem in JK2. Am I doing something wrong? I'm tracking down a problem wherein some requests get lost. At first I saw this when doing a large number of requests, but I was able to narrow the problem down to a situation that avoids memory issues. First: Tomcat 4.1.27, Apache 1.3.28, mod_jk2 2.02 I configured Tomcat's JK connector to have a min and max of 3 processors. There is an accept count of 0. What I expect to see now is that up to 3 requests may be served at a time, and anymore will be denied. Instead, I can serve up to 2 simultaneous requests. On the third request, I see the following in catalina.out: Oct 24, 2003 7:05:25 PM org.apache.tomcat.util.threads.ThreadPool logFull SEVERE: All threads are busy, waiting. Please increase maxThreads or check the servlet status3 3 That third request never returns to the client. Now, if I do more requests, I see hit and miss results. If I do 10 simultaneous requests, I'll see two of them succeed, and the rest never return. Meanwhile, I am looking at the JK2 /status/ worker. On the scoreboard, I see (after my first two requests) 2 slots. As I keep making requests, I see the slots increase gradually. By the time I've made 84 requests there are 71 slots, but only 24 requests have succeeded. I've even tried setting the max_connections paramater on my worker to 2, expecting that might do something... no effect. I'm planning to dive into the jakarta-tomcat-connectors source code in order to determine what the problem is here, but I feel as though I must be doing something wrong this is too serious a problem and must affect other people besides me... any ideas? Thanks, Erik -- http://www.spectacle.ca/ The New Online Source for Live Music in Montreal .::514.286.1699::. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to find servlet class after reload
Agreed. If you only look in the directory that apache.org links to, you'll see the main download but you won't see the hotfix. Only if you click on the binaries folder will you see it. I now mention it on my HOWTO page: http://daydream.stanford.edu/tomcat/install_web_services.html Maybe others like John Turner can add it as well. Oscar On Sat, 25 Oct 2003, David Rees wrote: > Christopher Schultz wrote: > >> Let me guess: You're running 4.1.27, right? > > Yep, that would be the version (apologies for not giving that in the > > first place). > > > > > Make sure you've applied the hotfix. > > Stupid question: where can I download this fix? The tomcat download page > > doesn't give any indication that there's a fix. > > > > Thanks so much for the help. I assume that this is a common symptom of > > the bug that's been fixed? > > Download the hotfix here: > http://www.apache.org/dist/jakarta/tomcat-4/binaries/ > > Something needs to be done about making it known that the hotfix is > available! > > -Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk 1.2 binary for Linux?
I am unsure if I'm asking this question in the right forum, and while I did a quick look through the archives, I may be repeating a question that someone else has asked and has had answered. If so, I apologize. Someone in my org is trying to put together a development server image (Linux, Apache, Tomcat, JVM, etc.), and needs a clean binary of mod_jk. I pointed him at http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/linux/, but it turns out that there's no binary there. It's an empty directory. He and I both did some surfing around, and can't seem to spot a binary anywhere else. Do need to compile our own version of the binary? Is there someplace else I should be looking? Thanks for the help, apologies for what's probably a noob question ... Stu Statman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk 1.2 binary for Linux?
Hi, I sugest that you compile the src, it's not to dificult if you now the steps, download it from here: http://apache.towardex.com/jakarta/tomcat-connectors/jk/jakarta-tomcat-connectors-jk-1.2-src-current.tar.gz to compile (in Redhat 9): $ tar xzf XXX $ cd XXX/jk/native/ $ sh buildconf.sh $ ./configure --with-apxs=/usr/sbin/apxs $ make The binary file will be in XXX/jk/native/apache-2.0/mod_jk.so I hope this helps. Regards, _ Manolo Ramirez T. Stu Statman wrote: I am unsure if I'm asking this question in the right forum, and while I did a quick look through the archives, I may be repeating a question that someone else has asked and has had answered. If so, I apologize. Someone in my org is trying to put together a development server image (Linux, Apache, Tomcat, JVM, etc.), and needs a clean binary of mod_jk. I pointed him at http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/linux/, but it turns out that there's no binary there. It's an empty directory. He and I both did some surfing around, and can't seem to spot a binary anywhere else. Do need to compile our own version of the binary? Is there someplace else I should be looking? Thanks for the help, apologies for what's probably a noob question ... Stu Statman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk 1.2 binary for Linux?
I would recommend compiling it, and it doesn't seem that there's a linux binary available for download. I will be adding JK2 tutorial (only JK1.2 for now) shortly on my site, but looking at it now and John Turner's site, you should be able to figure it out. I find that it's always a gamble using a pre-built connector anyways. http://daydream.stanford.edu/tomcat/install_web_services.html I link to John Turner's site and other helpful sites on my page. Oscar On Sat, 25 Oct 2003, Stu Statman wrote: > > I am unsure if I'm asking this question in the right forum, and while I > did a quick look through the archives, I may be repeating a question > that someone else has asked and has had answered. If so, I apologize. > > Someone in my org is trying to put together a development server image > (Linux, Apache, Tomcat, JVM, etc.), and needs a clean binary of mod_jk. > I pointed him at > http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/linux/, > but it turns out that there's no binary there. It's an empty directory. > He and I both did some surfing around, and can't seem to spot a binary > anywhere else. > > Do need to compile our own version of the binary? Is there someplace > else I should be looking? > > Thanks for the help, apologies for what's probably a noob question ... > > Stu Statman > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk 1.2 binary for Linux?
Silly me. I thought you were looking for ModJK2.0. You should have no problem. And full instructions are on my site as well. http://daydream.stanford.edu/tomcat/install_web_services.html Oscar On Sat, 25 Oct 2003, Manolo Ramirez T. wrote: > Hi, > > I sugest that you compile the src, it's not to dificult if you now the > steps, download it from here: > > http://apache.towardex.com/jakarta/tomcat-connectors/jk/jakarta-tomcat-connectors-jk-1.2-src-current.tar.gz > > to compile (in Redhat 9): > > $ tar xzf XXX > $ cd XXX/jk/native/ > $ sh buildconf.sh > $ ./configure --with-apxs=/usr/sbin/apxs > $ make > > The binary file will be in XXX/jk/native/apache-2.0/mod_jk.so > > I hope this helps. > > Regards, > > _ > Manolo Ramirez T. > > > > Stu Statman wrote: > > > > I am unsure if I'm asking this question in the right forum, and while I > > did a quick look through the archives, I may be repeating a question > > that someone else has asked and has had answered. If so, I apologize. > > > > Someone in my org is trying to put together a development server image > > (Linux, Apache, Tomcat, JVM, etc.), and needs a clean binary of mod_jk. > > I pointed him at > > http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/linux/, > > but it turns out that there's no binary there. It's an empty directory. > > He and I both did some surfing around, and can't seem to spot a binary > > anywhere else. > > > > Do need to compile our own version of the binary? Is there someplace > > else I should be looking? > > > > Thanks for the help, apologies for what's probably a noob question ... > > > > Stu Statman > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk 1.2 binary for Linux?
Oscar Carrillo wrote: Silly me. I thought you were looking for ModJK2.0. Heh, no prob. We'll go to 2.0 eventually, but we're not quite ready (organizationally) to take that leap quite yet. You should have no problem. And full instructions are on my site as well. http://daydream.stanford.edu/tomcat/install_web_services.html Thanks! Stu Statman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk 1.2 binary for Linux?
Manolo Ramirez T. wrote: Hi, I sugest that you compile the src, it's not to dificult if you now the steps, download it from here: http://apache.towardex.com/jakarta/tomcat-connectors/jk/jakarta-tomcat-connectors-jk-1.2-src-current.tar.gz to compile (in Redhat 9): $ tar xzf XXX $ cd XXX/jk/native/ $ sh buildconf.sh $ ./configure --with-apxs=/usr/sbin/apxs $ make The binary file will be in XXX/jk/native/apache-2.0/mod_jk.so I hope this helps. That's approximately the way I built it last (though expressed somewhat more cleanly than my "Uh, just, you know, build it."). I'll pass it on, thanks much ... Stu Statman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Map all URL to one servlet
"Christopher Schultz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Stefan, > > > Is it possible to map all URI''s from tomcat to just one servlet? > > > > for example: > > http://localhost:8080/hello/you > > http://localhost:8080/startme/now > > Yes. Do this in your web.xml: > > > everything-servlet > name.or.servlet.class > > > > everything-servlet > * > > It's actually '/*'. > That should do the trick. I believe if you map other servlets first, you > can have a few "special" URLs that will go to other servlets. You will > have to use this technique to allow JSP files to work as expected. > This is correct. Any exact-mapped (e.g. /foo/bar) or longer prefix-mapped (e.g. /protected/*) Servlet will take precedence over this mapping. However, this mapping will override any extension-mapped (e.g. *.jsp) Servlet. Of course, your Servlet also has to be able to handle serving any static resources (e.g. gifs, stylesheets) as well. > -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk 1.2 binary for Linux?
You should be able to get the RPM from http://www.jpackage.org. "Stu Statman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > I am unsure if I'm asking this question in the right forum, and while I > did a quick look through the archives, I may be repeating a question > that someone else has asked and has had answered. If so, I apologize. > > Someone in my org is trying to put together a development server image > (Linux, Apache, Tomcat, JVM, etc.), and needs a clean binary of mod_jk. > I pointed him at > http://apache.towardex.com/jakarta/tomcat-connectors/jk/binaries/linux/, > but it turns out that there's no binary there. It's an empty directory. > He and I both did some surfing around, and can't seem to spot a binary > anywhere else. > > Do need to compile our own version of the binary? Is there someplace > else I should be looking? > > Thanks for the help, apologies for what's probably a noob question ... > > Stu Statman - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Experience: Tomcat @ PDA @ PersonalJava 1.2 implementation
You can try searching the tomcat-dev archives (since the post I saw was on tomcat-dev). Can't be bothered myself, but try keywords like: PDA, J2ME, Toaster (a running joke on tomcat-dev, don't ask). Of course, I don't like giving out other developer's email addresses without their permission. However, it should turn up fast enough in a search. "Ralf Bierig" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, thanks for the hint to rise hope in me. Do you have any kind of link, > name or further info to help searching for it? > > Cheers, > Ralf > > -- > NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien... > Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService > > Jetzt kostenlos anmelden unter http://www.gmx.net > > +++ GMX - die erste Adresse für Mail, Message, More! +++ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]