Re: Logging and Tomcat 5.0.16
At 02:44 PM 1/10/2004 -0800, you wrote: Shapira, Yoav wrote: 1) Is there a reason why the startup.sh script that comes bundled with Tomcat 5.0.16 adds commons-logging-api.jar to the CLASSPATH? As far as I can tell, it's the only script that uses it. Yes, there's a good reason: tomcat internals use commons-logging to do their logging. Yes, but why put it in the CLASSPATH and not in /server/lib? Doesn't this mean that any configuration would affect all webapps? probably, except that Tomcat loads stuff from WEB-INF/lib and WEB-INF/classes before trying from the parent classloaders (opposite of normal Java2 classloading). This is defined by the servlet spec and allows for applications to use their own libs even when the server contains its own duplicates. 2) Is there a recommended way to control what gets spewed into catalina.out? The fact that all the messages I'm getting have an INFO tag would indicate that this should be possible. Yes, add a commons-logging configuration file to common/classes, e.g. as suggested in this link off the tomcat FAQ: http://jakarta.apache.org/tomcat/faq/misc.html#catalina.out I saw that, and that has a config file for log4j, not commons-logging. There is no way to actually filter the output through the commons-logging config file. I'd like a way to only suppress catalina's output. If I use a log4j.properties, it means I'd need to install log4j in /common/lib. It also means that I have to specify all logging config info in /common/classes instead of on a per-webapp basis (see http://www.mail-archive.com/[EMAIL PROTECTED]/msg113292.html). Well, only if you don't put log4j.jar under WEB-INF/lib. As stated above, if you do this, log4j.jar will load for your webapp even if a common one is available to other webapps. Otherwise, you can also use a custom repositor selector http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/AppContainerLogging 3) In any case, why doesn't Tomcat just come with commons-logging.jar and log4j.jar bundled in /server/libs? Tomcat does not want to tie you into a specific logging implementation, e.g. log4j. Tomcat wants to make its logging available to webapps by default, so server/lib is not a possible location. But doesn't this just lead to classloader hell? Sometimes, yes. commons-logging leads to classloader hell on its own no matter where you put it. It's nothing but trouble, if you ask me. http://www.qos.ch/logging/thinkAgain.html http://radio.weblogs.com/0122027/2003/08/15.html 4) Is there a FAQ or HOWTO on recommended approaches to handling logging in Tomcat somewhere? It won't hurt to search the archives of this list, there are many answers there. The link above also has some information. I'm sorry, but I have searched the archives, and there just doesn't seem to be one conclusive answer. I see a lot of e-mails talking about the use of commons-logging and how it causes all sorts of classloader wierdness. We get it all too often on the Log4j-user list. Users report Log4j isn't working and then proceed to provide a commons-logging config file. There have been very few cases where Log4j itself was causing the problems. I won't say it never does, but commons-logging seems to be the primary cause of issues in getting Log4j to work, not Log4j itself. What I'm looking for is a way to specify logging configuration for catalina that is independent of any webapps I may have. I don't want 1 log4j.properties for everything. Is this possible? If so, how? I'd be more than happy to write up a HOW-TO if I could just figure this out, but I haven't stumbled across anything that works yet. If you follow my advice above, you should be all set. Separate logger repositories for each app, even though you provide log4j and a config file in a parent classloader. Jake Thanks, -Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 5 will not start
Anthony Gray wrote: Hi All, I've recently unpacked tomcat 5.0.16 and am trying to use it with Apache 2 and the Coyote/JK2 AJP 1.3 connector (on Redhat linux 7.3). When I try to start tomcat using the startup.sh script, it appears to start briefly (I can see Java processes) then all the processes just die. I see the following in the catalina.out : * Jan 11, 2004 4:10:17 PM org.apache.commons.digester.Digester startElement SEVERE: Begin event threw exception java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1480) at java.lang.String.substring(String.java:1447) ... Stack traces should at least go up to the first Tomcat class, otherwise, you might as well not give the exception. * The error appears to be related to the Coyote/JK2 AJP 1.3 connector Host sections in my server.xml. When I hash out the Host sections in my server.xml Tomcat does not die. Even simple jsp apps in the Host section seem to cause the problem. I've searched google and the archives but have not found anyone with a similar issue. Previously this was all working for Tomcat 4, if you can think what might be causing this problem please let me know. I'll list my server.xml below in case you want to view it, Thanks for your time Regards Anthony *** server.xml : *** Server port=8005 shutdown=SHUTDOWN debug=2 !-- Define an Apache-Connector Service -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / !-- Global JNDI resources -- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved /Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources Service name=Catalina !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector port=8080 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector port=8009 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=1 connectionTimeout=2 useURIValidationHack=false protocol=AJP/1.3 / Engine name=Catalina defaultHost=test2.foo.bar debug=2 Logger className=org.apache.catalina.logger.FileLogger prefix=apache_log. suffix=.txt timestamp=true/ Host name=test2.foo.bar debug=0 appBase=/home/anthony/www/jsp unpackWARs=true autoDeploy=true Context path= docBase= debug=1/ Use . as the docBase. -- 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: Datasource - OK in app context - Fails in Global context
So, could someone summarize for me the different ways of creating a JDBC DataSource in Tomcat? I will start the summary, so that it's easier to correct/complete. Please fill in the gaps ;-) 1. Have the DataSource defined in your application's context. That way, if you have two apps, you have to copy the datasource definition from one to the other. Two connection pools will be created. 2. Have the DataSource defined in DefaultContext. If you have two apps, you need to ... ... connection pool(s) will be created. 3. Have the DataSource defined in GlobalNamingResources. If you have two apps, you need to ResourceLink in both contexts. ... connection pool(s) will be created. Thank you very much. Antonio Fiol Jacob Kjome wrote: At 03:44 PM 1/9/2004 -0600, you wrote: Bingo!!! That was it. It might be a good idea to add a paragraph to the JDBC DataSources section of the documentation that mentions: (a) That global datasources are defined in GlobalNamingResources of server.xml (b) The need for the ResourceLink in the application context .xml file I had the mistaken impression that anything placed in the server.xml file was automatically applied to all application contexts. I am sure that others make the same mistake. Thanks, I have been pulling my hair on this issue for almost a month. This is true for DefaultContext. Maybe you were confusing GlobalNamingResources with that. The latter lets you define things once and let applications link to it if they want the service whereas the former makes the service available for every app whether it is wanted or not. Jake smime.p7s Description: S/MIME Cryptographic Signature
Possible to disable session persistence at shutdown?
Hi, is there a possibility to disable the session persistence performed by Tomcat (4 and 5) when shutting down? I'm not interested in this feature and it reports many exceptions as my objects stored in session scope aren't serializable. Marc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems after creating new hosts / contexts
At 1/8/2004 10:45 PM Patrick Willart worte: is your WEB-INF directory fully in uppercase? For this simple test.jsp I've no WEB-INF directory in the DocBase dirs of the contexts. Must I create one in any case? The older hosts also don't have WEB-INF directories. Now we have restartet the TC engine and the new hosts and contexts now works. But: Is this behavior ok? Isn't it enough setting up the hosts and contexts in the Admin tool and pressing Commit changes? Manually TC restarting always needs some extra job for the server admin. Thanks Robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems after creating new hosts / contexts
Am 1/8/2004 10:49 PM meinte Howard Watson folgendes: Do you need a webapps directory? I don't understand your question correctly? You mean, that I need an extra DocBase directory for the context in the new host? Like $HOME/html/servlet/myapp In my understanding of the TC docs there must be a context with an extra DocBase directory .. even I'm using just one context in the new host. Isn't that correct? Thanks Robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mapping in workers2.properties
There are actually several ways to map between Apache and Tomcat via mod_jk2. The first is using workers2.properties. If you've compiled with -pcre, then perl regular expressions should work as well as individual names. Also, remember that servlets traditionally live in /app-name/servlet/servlet-name. This is This is the physical location. controlled by the web.xml for the particular application (context) and is found in: $TOMCAT_HOME/webapps/app-name/WEB-INF/web.xml The example context is especially confusing, primarily due to the name. In Tomcat 4.1.29, you have the following: /examples/jsp/index.html /examples/servlets/index.html However, the actual location of the servlets according to web.xml would be: /examples/servlet/servlet-name This is the deployment path, which can be set to anything you choose. So, in your workers2.properties file you will need to have the following in order to map all servlets in the examples: [uri:/examples/servlet/*] worker=ajp13:unixsocket Why not [uri:/examples/*]? That way you map an entire web application to Tomcat's worker. I'll elaborate a bit more later. or whatever you called your worker name. While workers2.properties works well for a small number of sites, it does not scale very well since the match lookup is linear. Another way to manage mod_jk2 mapping is detailed in the source of mod_jk2. I know, I know, reading the source is not supposed to be a requirement, but then again this is open source so you do have the opportunity. Anyway, in jk/native2/server/apache2/mod_jk2.c, there is a little documentation concerning JkUriSet. Basically, you use Apache constructs to map the location and within that you use the JkUriSet directive to map the location to the appropriate worker. I've tried both ways, and they both work well. According to the source, using JkUriSet is the preferred method. OK, there are three things at work here. 1. Location of your files You can place files anywhere within your web application's subdir tree. Servlets go into ./WEB-INF/lib/*.jar (if packaged) or ./WEB-INF/classes/* (if unpacked). JSP files are anywhere outside ./WEB-INF. All other, static, files are outside ./WEB-INF. 2. Tomcat's deployment of the web-app You setup your Host and Context directives in server.xml so that each web application will have their URI, like http://your.host.domain.com/context/path/. Your web app will be invoked for all URIs of this kind. The invocation will come either from a Coyote HTTP connector or from mod_jk/mod_jk2/mod_webapp. 3. Apache's mapping of URI to a handler This is the mod_webapp/mod_jk/mod_jk2 stuff. In workers2.properties you map an URI from Apache to a worker. AFAIK, the URIs of Apache and Tomcat MUST match or Tomcat will ignore it. So, if you're setting up Virtual Hosts, both Apache and Tomcat must be the same (as they should, anyway) and deployment (deployment, not location path!) path of Tomcat's context must match. With this, there is no real benefit from using either workers2.properties [uri:...] or JkUriSet in httpd.conf, that I can see. Maybe I'm wrong? As for in-process, there has been some discussion on this mailing list about why in-process does not work with the current MPM (multi-processor modules) available for Apache httpd. The real problem seems to be that there is currently no MPM that runs all of apache within one process in UNIX, using threads exclusively to handle separate requests. Actually, this is not quite true since there is an experimental MPM that accomplishes this. However, according to the documentation this is slower than the current worker model (multi-process, multi-thread) and not recommended for production work. The problem is that when multiple processes get started, each process attempts to start its own Tomcat (if in-process is being used). This can't be done using the same server,xml. In recent kernels (Redhat 2.4.2x, generic 2.6.0, 2.6.1) there has been a new implementation of threads. It might be possible to build a new MPM that takes advantage of this. As far as I know, this is not being done (yet). This sounds like a great opportunity to make a contribution :-). What we need is new functionality in mod_jk2 for this, to support the notion of one worker process and multiple proxy workers. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ServletInputStream comes up closed.
Hi Folks, Never Mind. Solved the problem. Thanks, Dinesh -Original Message- From: Dinesh V [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 1:19 AM To: [EMAIL PROTECTED] Subject: ServletInputStream comes up closed. Hello Folks, I am experiencing a problem with my dump servlet. The servlet simply echoes back the content it recieved. The ServletInputStream comes up closed (inputStream.available() returns 0). I do not understand what is consuming the input. This does not happen on jetty 4.2.14. Please tell me what am I doing wrong. I have tried Tomcat 4.1.29 and 5.0.16 on Win 2K and JDK 1.4.2_01 TIA, Dinesh package servlet; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class upload extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { InputStream is = request.getInputStream(); OutputStream os = response.getOutputStream(); os.write(new String(Following data was postedbr).getBytes(US-ASCII)); int chrsRead = 0; while (is.available() 0) { int j = is.read(); StringBuffer sb = new StringBuffer(); switch (j) { case '': sb.append(lt;);break; case '': sb.append(gt;);break; case '': sb.append(amp;);break; case '\n': sb.append(br);break; default: sb.append((char)j);break; } for (int i = 0; i sb.length(); i++) os.write(sb.charAt(i)); chrsRead++; } os.write(new String(brTotal chars read = +Integer.toString(chrsRead)).getBytes(US-ASCII)); os.close(); os.flush(); } } Deployment descriptor is here: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameXMLHttp Request Response/display-name description Http Req Resp /description servlet servlet-nameupload/servlet-name servlet-classservlet.upload/servlet-class /servlet servlet-mapping servlet-nameupload/servlet-name url-pattern/upload/url-pattern /servlet-mapping security-constraint web-resource-collection web-resource-nameupload/web-resource-name url-pattern/http/*/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint /web-app - 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]
Using JNI with Tomcat 4.1.27 and IIS 5
Hi all, Can someone explain me how do I configure the tomcat to work with JNI and IIS 5? Regards, Yuval Zantkeren Domain The Net Technologies Ltd. 81 Sokolov St. Ramat-Hasharon Israel 47238 Tel: 972-3-7600500 Fax: 972-3-7600505 www.DomainTheNet.com This email message and any attachments hereto are intended only for use by the addressee(s) named above, and may contain legally privileged and/or confidential information. If you are not the intended addressee, you are hereby kindly notified that any dissemination, distribution or copying of this email and any attachments hereto is strictly prohibited. If you have received this email in error, kindly delete it from your computer system, and notify us at the telephone number or email address appearing above. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: ServletInputStream comes up closed.
Hi Never Mind. Solved the problem. Please, always also show the solution, since the intention of this list is to share solutions. Someone else might trap into the same problem, others might simlpy learn from mistakes. Thanks, Steffen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Xmx and Xms setting in tomcat 5.0.16
Hey Folks, I am currently running tomcat 5.0.16 and I am not quite sure how to set the memory parameters at start time nor how to test if they worked. If anybody out there has a good unix startup script with an example I would greatly appreciate it. -Pablo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Xmx and Xms setting in tomcat 5.0.16
Pablo Garaitonandia wrote: Hey Folks, I am currently running tomcat 5.0.16 and I am not quite sure how to set the memory parameters at start time nor how to test if they worked. If anybody out there has a good unix startup script with an example I would greatly appreciate it. You can check the max memory on the status page in TC 5. -- 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]
Server.xml Resources and LDAP DirContext Object Factories
I'm hoping maybe someone might be able give an example of how to bind an Ldap DirContext as a Resource into the context (using Resource tags in the server.xml). As such I'm hoping to be able to build a Federated Namespace and be able to access my ldap context in a federated fashion from the java:comp context for instance java:comp/env/ldap/ou=foo,o=bar. Resource type=com.sun.jndi.ldap.LdapCtxFactory auth=Container name=ldap/ ResourceParams name=ldap parameter namejava.naming.factory.initial/name valuecom.sun.jndi.ldap.LdapCtxFactory/value /parameter parameter namejava.naming.provider.url/name valueldap://localhost:389/value /parameter parameter namejava.naming.security.authentication/name valuenone/value /parameter parameter namejava.naming.referral/name valuefollow/value /parameter parameter namejava.naming.ldap.referral.limit/name value1/value /parameter /ResourceParams Is this possible, does anyone have any tips on how to do this and be able to use the Federated Namespaces in JNDI DirContext methods? -Mark -- Mark Diggory Software Developer Harvard MIT Data Center http://osprey.hmdc.harvard.edu - 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: remote debugging
I do this with Eclipse all the time. The steps to reproduce my configuration are shown below. 1. Configure the following environment variables: JPDA_ADDRESS=8999 JPDA_TRANSPORT=dt_socket 2. Start tomcat from the command line with: catalina jpda start or catalina jpda run 3. In Eclipse configure a Remote Java Application with the following settings: Connection type Standard (socket attach) Host localhost Port 8999 This assumes you have the correct tomcat source code setup in an Eclipse project. Don't worry if you Eclipse shows build errors, it will still let you debug. Mark -Original Message- From: Afshartous, Nick [mailto:[EMAIL PROTECTED] Sent: Saturday, January 10, 2004 3:54 AM To: '[EMAIL PROTECTED]' Subject: remote debugging Hi, Could someone please advise on the steps to enable remote debugging on Tomcat 4.1, thanks. -- Nick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems after creating new hosts / contexts
At 1/8/2004 10:45 PM Patrick Willart worte: is your WEB-INF directory fully in uppercase? For this simple test.jsp I've no WEB-INF directory in the DocBase dirs of the contexts. Must I create one in any case? The older hosts also don't have WEB-INF directories. Now we have restartet the TC engine and the new hosts and contexts now works. But: Is this behavior ok? Isn't it enough setting up the hosts and contexts in the Admin tool and pressing Commit changes? Manually TC restarting always needs some extra job for the server admin. Thanks Robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems after creating new hosts / contexts
Am 1/8/2004 10:49 PM meinte Howard Watson folgendes: Do you need a webapps directory? I don't understand your question correctly? You mean, that I need an extra DocBase directory for the context in the new host? Like $HOME/html/servlet/myapp In my understanding of the TC docs there must be a context with an extra DocBase directory .. even I'm using just one context in the new host. Isn't that correct? Thanks Robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Please help me for jk_nt_service problem
Hi : Please help me for jk_nt_service problem . Description : [I followed your guiding : http://jakarta.apache.org/tomcat/tomcat-3.3-doc/NT-Service-howto.html] After I install JAVA and Jakarta, I run jk_nt_service -I Jakarta wrapper.properties. It's OK, and I ran jk_nt_service -s Jakarta. It shows : C:\jakarta-tomcat-3.3.1a\bin\win32\i386jk_nt_service -s Jakarta Asked (and given) winsock 1.1 Starting Jakarta. Jakarta failed to start. My env : JAVA_HOME=C:\Program Files\Java\j2re1.4.2_01 TOMCAT_HOME=C:\jakarta-tomcat-3.3.1a JVM.STDerr shows below : java.lang.NoClassDefFoundError: $(wrapper/jvm/options) Exception in thread main java.lang.NoClassDefFoundError: $(wrapper/jvm/options) Could you please help me for this issue ? Thanks. * Dreamy Wu Professional Service Dept. ADVANCED SYSTEM STORAGE CORP. TEL: +886-2-8792-0108 #812 Mobile : 0913391369 FAX: +886-2-8792-0109 *
Serialization problems
From: bartek [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Date: 11 stycznia 2004 17:59 Hi could anyone give me an example of objects serialization and sending them through http connection? I made simple application and servlet. Servlet was sending object String to application . It was written in jbuilder9 but when I lunched servlet on web wiev shows something like this: No pilot for x-java-serialized-object [I set content type to application/x-java-serialized-object] and SAVE button [I may save object to a file]. Of course applicattion doesn't get anything. I didnt modify web.xml because I don't know what should i add there. Cheers Tom
built mod_jk2 on fedora with tomcat 5.0.16 (working)
hi all, after very long nights, i finally got mod_jk2 built so that it now works on a fedora system with with apache2 and tomcat5. i don't know if everything i did when building and configuring is really required, but with the given steps it worked for me. as i read a lot on this list i want to give this back to you, perhaps it's useful for someone and saves some time. if you find things which are unnecessary or unimportant, please post it. --- Prerequisites, System * Fedora Core 1, 2.4.22-1.2140.nptl (fc1 binary rpm) * httpd-2.0.48-1.2, httpd-devel-2.0.48-1.2 (fc1 binary rpm) * apr-util-0.9.4-2, apr-devel-0.9.4-2, apr-0.9.4-2, apr-util-devel-0.9.4-2 (fc1 binary rpm) * java-1.4.2-sun-1.4.2.01-4jpp, java-1.4.2-sun-devel-1.4.2.01-4jpp (jpackage.org) * tomcat5-5.0.16-2jpp (jpackage.org) --- Building Configure jakarta-tomcat-connectors-jk2-src # unzip jakarta-tomcat-connectors-jk2-src-current.zip -d . # cd jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2/ # export CPPFLAGS=-I/usr/include/apr-0 # sh ./buildconf. # chmod 755 configure # ./configure --with-apxs2=/usr/sbin/apxs --with-apr-lib=/usr/lib --with-apr-include=/usr/include/apr-0 --with-tomcat-41=/usr/share/tomcat5 --with-jni --with-java-home=/usr/lib/jvm/java Modify server/apache2/Makefile: # vi server/apache2/Makefile * Change LIBTOOL to LIBTOOL=/usr/bin/libtool * Change JK_LDFLAGS to JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt -lapr-0 -lpcre -lpcreposix -laprutil-0 Build # make # libtool --finish /usr/lib/httpd/modules --- Verify Build and Install change to build dir # cd jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2/ # ldd jkjni.so gives [EMAIL PROTECTED] apache2]# ldd jkjni.so libcrypt.so.1 = /lib/libcrypt.so.1 (0x008e3000) libapr-0.so.0 = /usr/lib/libapr-0.so.0 (0x00179000) libpcre.so.0 = /lib/libpcre.so.0 (0x00bb5000) libpcreposix.so.0 = /usr/lib/libpcreposix.so.0 (0x00713000) libaprutil-0.so.0 = /usr/lib/libaprutil-0.so.0 (0x00342000) libc.so.6 = /lib/tls/libc.so.6 (0x00e65000) librt.so.1 = /lib/tls/librt.so.1 (0x00686000) libm.so.6 = /lib/tls/libm.so.6 (0x005a3000) libnsl.so.1 = /lib/libnsl.so.1 (0x00839000) libdl.so.2 = /lib/libdl.so.2 (0x00615000) libldap.so.2 = /usr/lib/libldap.so.2 (0x002f6000) liblber.so.2 = /usr/lib/liblber.so.2 (0x00111000) libgdbm.so.2 = /usr/lib/libgdbm.so.2 (0x00361000) libdb-4.1.so = /usr/lib/tls/libdb-4.1.so (0x00199000) libexpat.so.0 = /usr/lib/libexpat.so.0 (0x00571000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x00b29000) libpthread.so.0 = /lib/tls/libpthread.so.0 (0x0011d000) libresolv.so.2 = /lib/libresolv.so.2 (0x0012d000) libsasl2.so.2 = /usr/lib/libsasl2.so.2 (0x00d99000) libssl.so.4 = /lib/libssl.so.4 (0x0013f000) libcrypto.so.4 = /lib/libcrypto.so.4 (0x003fb000) libgssapi_krb5.so.2 = /usr/lib/libgssapi_krb5.so.2 (0x0055d000) libkrb5.so.3 = /usr/lib/libkrb5.so.3 (0x00723000) libcom_err.so.2 = /lib/libcom_err.so.2 (0x00174000) libk5crypto.so.3 = /usr/lib/libk5crypto.so.3 (0x0025a000) libz.so.1 = /usr/lib/libz.so.1 (0x0027c000) # ldd mod_jk2.so gives [EMAIL PROTECTED] apache2]$ ldd mod_jk2.so libc.so.6 = /lib/tls/libc.so.6 (0x0056f000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x00d3b000) # cp *.so /usr/lib/httpd/modules/ --- [Additional] Configuration Add to /etc/tomcat5/tomcat5.conf: serverRoot=/etc/httpd export serverRoot User/Groups of apache and tomcat4: [EMAIL PROTECTED] conf]# id apache uid=48(apache) gid=48(apache) groups=48(apache),91(tomcat4) [EMAIL PROTECTED] conf]# id tomcat4 uid=91(tomcat4) gid=91(tomcat4) groups=91(tomcat4),48(apache) Configuration files (and this description, too) can be found at http://www.javakaffee.de/wiki/jsp/Wiki?BuildModJk (at the bottom of the page): workers2.properties, jk2.properties, example for vhost that's all, i hope it's helpful, cheers, martin signature.asc Description: This is a digitally signed message part
Re: Please help me for jk_nt_service problem
It looks like you commented out the line: Dreamy Wu [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi : Please help me for jk_nt_service problem . wrapper.jvm.options= in your wrapper.properties file. Description : [I followed your guiding : http://jakarta.apache.org/tomcat/tomcat-3.3-doc/NT-Service-howto.html] After I install JAVA and Jakarta, I run jk_nt_service -I Jakarta wrapper.properties. It's OK, and I ran jk_nt_service -s Jakarta. It shows : C:\jakarta-tomcat-3.3.1a\bin\win32\i386jk_nt_service -s Jakarta Asked (and given) winsock 1.1 Starting Jakarta. Jakarta failed to start. My env : JAVA_HOME=C:\Program Files\Java\j2re1.4.2_01 TOMCAT_HOME=C:\jakarta-tomcat-3.3.1a JVM.STDerr shows below : java.lang.NoClassDefFoundError: $(wrapper/jvm/options) Exception in thread main java.lang.NoClassDefFoundError: $(wrapper/jvm/options) Could you please help me for this issue ? Thanks. * Dreamy Wu Professional Service Dept. ADVANCED SYSTEM STORAGE CORP. TEL: +886-2-8792-0108 #812 Mobile : 0913391369 FAX: +886-2-8792-0109 * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
linking between contexts
Hi, Relating to a similar recent post, how do I configure Tomcat so that I can link between contexts, to appear in the same browser? Many thanks Gerald. - Yahoo! Messenger - Communicate instantly...Ping your friends today! Download Messenger Now
RE: Possible to disable session persistence at shutdown?
you can define a Manager element, using the same class (org.apache.catalina.session.StandardManager) and then setting the path variable to an invalid path. no sessions will be persisted Manager class=org.apache.catalina.session.StandardManager path=/sadasdas/ -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Marc Guillemot Sent: Sunday, January 11, 2004 1:57 AM To: [EMAIL PROTECTED] Subject: Possible to disable session persistence at shutdown? Hi, is there a possibility to disable the session persistence performed by Tomcat (4 and 5) when shutting down? I'm not interested in this feature and it reports many exceptions as my objects stored in session scope aren't serializable. Marc. - 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 finding my JDBC driver for Oracle
Hi, Im having a great deal of trouble getting tomcat to see my OracleDriver for the JDBC class. I have tried putting it the file classes.jar in both my tomcat/jakarta-tomcat-4.1.29/common/lib/ directory and my WEB-INF/lib directory in my docroot, and nothing seems to work. It seems to pick up the MySQL drivers just fine, but when I stick in the Oracle Driver is comes up with: Caught in processRequest java.lang.RuntimeException: java.lang.ClassNotFoundException: oracle/jdbc/driver/OracleDriver. Can anybody help? Thanks alot Dor -- Dor Orgad Support Center SolNet Solutions Ltd Ph: +64 4 462 5129 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems finding my JDBC driver for Oracle
make sure your jar file ends with .jar and also, make sure it is not corrupt Filip -Original Message- From: Dor Orgad [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 5:18 PM To: [EMAIL PROTECTED] Subject: Problems finding my JDBC driver for Oracle Hi, Im having a great deal of trouble getting tomcat to see my OracleDriver for the JDBC class. I have tried putting it the file classes.jar in both my tomcat/jakarta-tomcat-4.1.29/common/lib/ directory and my WEB-INF/lib directory in my docroot, and nothing seems to work. It seems to pick up the MySQL drivers just fine, but when I stick in the Oracle Driver is comes up with: Caught in processRequest java.lang.RuntimeException: java.lang.ClassNotFoundException: oracle/jdbc/driver/OracleDriver. Can anybody help? Thanks alot Dor -- Dor Orgad Support Center SolNet Solutions Ltd Ph: +64 4 462 5129 - 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: Problems finding my JDBC driver for Oracle
It is a .jar file and I can fully unzip it, and the contents contain the directory oracle/jdbc/driver/OracleDriver So i don't think its that. Filip Hanik wrote: make sure your jar file ends with .jar and also, make sure it is not corrupt Filip -Original Message- From: Dor Orgad [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 5:18 PM To: [EMAIL PROTECTED] Subject: Problems finding my JDBC driver for Oracle Hi, Im having a great deal of trouble getting tomcat to see my OracleDriver for the JDBC class. I have tried putting it the file classes.jar in both my tomcat/jakarta-tomcat-4.1.29/common/lib/ directory and my WEB-INF/lib directory in my docroot, and nothing seems to work. It seems to pick up the MySQL drivers just fine, but when I stick in the Oracle Driver is comes up with: Caught in processRequest java.lang.RuntimeException: java.lang.ClassNotFoundException: oracle/jdbc/driver/OracleDriver. Can anybody help? Thanks alot Dor -- Dor Orgad Support Center SolNet Solutions Ltd Ph: +64 4 462 5129 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems finding my JDBC driver for Oracle
can you do this inside of a JSP % try { this.getClass().getClassLoader().loadClass(oracle.jdbc.driver.OracleDriver ); }catch ( Exception x ) { x.printStackTrace(); } % without an exception being thrown? Filip -Original Message- From: Dor Orgad [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 5:28 PM To: Tomcat Users List Subject: Re: Problems finding my JDBC driver for Oracle It is a .jar file and I can fully unzip it, and the contents contain the directory oracle/jdbc/driver/OracleDriver So i don't think its that. Filip Hanik wrote: make sure your jar file ends with .jar and also, make sure it is not corrupt Filip -Original Message- From: Dor Orgad [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 5:18 PM To: [EMAIL PROTECTED] Subject: Problems finding my JDBC driver for Oracle Hi, Im having a great deal of trouble getting tomcat to see my OracleDriver for the JDBC class. I have tried putting it the file classes.jar in both my tomcat/jakarta-tomcat-4.1.29/common/lib/ directory and my WEB-INF/lib directory in my docroot, and nothing seems to work. It seems to pick up the MySQL drivers just fine, but when I stick in the Oracle Driver is comes up with: Caught in processRequest java.lang.RuntimeException: java.lang.ClassNotFoundException: oracle/jdbc/driver/OracleDriver. Can anybody help? Thanks alot Dor -- Dor Orgad Support Center SolNet Solutions Ltd Ph: +64 4 462 5129 - 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: Problems finding my JDBC driver for Oracle
No, that one bombs out too. Filip Hanik wrote: can you do this inside of a JSP % try { this.getClass().getClassLoader().loadClass(oracle.jdbc.driver.OracleDriver ); }catch ( Exception x ) { x.printStackTrace(); } % without an exception being thrown? Filip -Original Message- From: Dor Orgad [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 5:28 PM To: Tomcat Users List Subject: Re: Problems finding my JDBC driver for Oracle It is a .jar file and I can fully unzip it, and the contents contain the directory oracle/jdbc/driver/OracleDriver So i don't think its that. Filip Hanik wrote: make sure your jar file ends with .jar and also, make sure it is not corrupt Filip -Original Message- From: Dor Orgad [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 5:18 PM To: [EMAIL PROTECTED] Subject: Problems finding my JDBC driver for Oracle Hi, Im having a great deal of trouble getting tomcat to see my OracleDriver for the JDBC class. I have tried putting it the file classes.jar in both my tomcat/jakarta-tomcat-4.1.29/common/lib/ directory and my WEB-INF/lib directory in my docroot, and nothing seems to work. It seems to pick up the MySQL drivers just fine, but when I stick in the Oracle Driver is comes up with: Caught in processRequest java.lang.RuntimeException: java.lang.ClassNotFoundException: oracle/jdbc/driver/OracleDriver. Can anybody help? Thanks alot Dor -- Dor Orgad Support Center SolNet Solutions Ltd Ph: +64 4 462 5129 - 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] -- Dor Orgad Support Center SolNet Solutions Ltd Ph: +64 4 462 5129
Re: Problems finding my JDBC driver for Oracle
Hi! Dor Orgad wrote: Im having a great deal of trouble getting tomcat to see my OracleDriver for the JDBC class. I have tried putting it the file classes.jar in both my tomcat/jakarta-tomcat-4.1.29/common/lib/ directory and my WEB-INF/lib directory in my docroot, and nothing seems to work. It seems to pick up the MySQL drivers just fine, but when I stick in the Oracle Driver is comes up with: Caught in processRequest java.lang.RuntimeException: java.lang.ClassNotFoundException: oracle/jdbc/driver/OracleDriver. From what you are writing, I get the impression that you packed the jdbc driver jar _into_ another jar called classes.jar and placed this second jar in your WEB-INF/lib directory. If this is indeed the case, that's your problem. A setup like this does not work, because the classloader does not see jars inside jars. You have to place the jar file containing the _package_ oracle.jdbc.driver in WEB-INF/lib, not a jar containing that jar. HTH Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems finding my JDBC driver for Oracle
Sorry, i screwed up... it does seem to be working So what does that mean? Filip Hanik wrote: can you do this inside of a JSP % try { this.getClass().getClassLoader().loadClass(oracle.jdbc.driver.OracleDriver ); }catch ( Exception x ) { x.printStackTrace(); } % without an exception being thrown? Filip -Original Message- From: Dor Orgad [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 5:28 PM To: Tomcat Users List Subject: Re: Problems finding my JDBC driver for Oracle It is a .jar file and I can fully unzip it, and the contents contain the directory oracle/jdbc/driver/OracleDriver So i don't think its that. Filip Hanik wrote: make sure your jar file ends with .jar and also, make sure it is not corrupt Filip -Original Message- From: Dor Orgad [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 5:18 PM To: [EMAIL PROTECTED] Subject: Problems finding my JDBC driver for Oracle Hi, Im having a great deal of trouble getting tomcat to see my OracleDriver for the JDBC class. I have tried putting it the file classes.jar in both my tomcat/jakarta-tomcat-4.1.29/common/lib/ directory and my WEB-INF/lib directory in my docroot, and nothing seems to work. It seems to pick up the MySQL drivers just fine, but when I stick in the Oracle Driver is comes up with: Caught in processRequest java.lang.RuntimeException: java.lang.ClassNotFoundException: oracle/jdbc/driver/OracleDriver. Can anybody help? Thanks alot Dor -- Dor Orgad Support Center SolNet Solutions Ltd Ph: +64 4 462 5129 testing.jsp - 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] -- Dor Orgad Support Center SolNet Solutions Ltd Ph: +64 4 462 5129
Re: Problems finding my JDBC driver for Oracle
No no, I got the driver classes12.jar from the net. I was just saying that it can be full unzipped without any problems, to prove the integrity of the file. Other then that, nothing else has been done to the file. Cheers Dor Philipp Taprogge wrote: Hi! Dor Orgad wrote: Im having a great deal of trouble getting tomcat to see my OracleDriver for the JDBC class. I have tried putting it the file classes.jar in both my tomcat/jakarta-tomcat-4.1.29/common/lib/ directory and my WEB-INF/lib directory in my docroot, and nothing seems to work. It seems to pick up the MySQL drivers just fine, but when I stick in the Oracle Driver is comes up with: Caught in processRequest java.lang.RuntimeException: java.lang.ClassNotFoundException: oracle/jdbc/driver/OracleDriver. From what you are writing, I get the impression that you packed the jdbc driver jar _into_ another jar called classes.jar and placed this second jar in your WEB-INF/lib directory. If this is indeed the case, that's your problem. A setup like this does not work, because the classloader does not see jars inside jars. You have to place the jar file containing the _package_ oracle.jdbc.driver in WEB-INF/lib, not a jar containing that jar. HTH Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Dor Orgad Support Center SolNet Solutions Ltd Ph: +64 4 462 5129 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problems finding my JDBC driver for Oracle
that means that it works just fine. and that YOU are doing something wrong, not tomcat :) so try this % try { java.sql.Driver driver = new oracle.jdbc.driver.OraceDriver(); String url = jdbc:oracle:thin:@localhost:1521:ora; //of course substitute your own values java.sql.Connection con = driver.getConnection(url,scott,tiger); java.sql.Statement stmt = con.createStatement(); java.sql.ResultSet rs = stmt.executeQuery(select 1 from dual); while ( rs.next() ) { System.out.println(Received database result=+rs.getObject(1)); } rs.close(); stmt.close(); con.close(); }catch ( Exception x ) { x.printStackTrace(); } % if that works, then Oracle and Tomcat works great together, post your code, and I can tell you what is wrong Filip -Original Message- From: Dor Orgad [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 6:51 PM To: Tomcat Users List Subject: Re: Problems finding my JDBC driver for Oracle Sorry, i screwed up... it does seem to be working So what does that mean? Filip Hanik wrote: can you do this inside of a JSP % try { this.getClass().getClassLoader().loadClass(oracle.jdbc.driver.Orac leDriver ); }catch ( Exception x ) { x.printStackTrace(); } % without an exception being thrown? Filip -Original Message- From: Dor Orgad [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 5:28 PM To: Tomcat Users List Subject: Re: Problems finding my JDBC driver for Oracle It is a .jar file and I can fully unzip it, and the contents contain the directory oracle/jdbc/driver/OracleDriver So i don't think its that. Filip Hanik wrote: make sure your jar file ends with .jar and also, make sure it is not corrupt Filip -Original Message- From: Dor Orgad [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 5:18 PM To: [EMAIL PROTECTED] Subject: Problems finding my JDBC driver for Oracle Hi, Im having a great deal of trouble getting tomcat to see my OracleDriver for the JDBC class. I have tried putting it the file classes.jar in both my tomcat/jakarta-tomcat-4.1.29/common/lib/ directory and my WEB-INF/lib directory in my docroot, and nothing seems to work. It seems to pick up the MySQL drivers just fine, but when I stick in the Oracle Driver is comes up with: Caught in processRequest java.lang.RuntimeException: java.lang.ClassNotFoundException: oracle/jdbc/driver/OracleDriver. Can anybody help? Thanks alot Dor -- Dor Orgad Support Center SolNet Solutions Ltd Ph: +64 4 462 5129 testing.jsp - 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] -- Dor Orgad Support Center SolNet Solutions Ltd Ph: +64 4 462 5129 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems finding my JDBC driver for Oracle
I think this thing is playing funny buggers cos with this new code its giving me the driver not found exception. a i dont know what to d!!! 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: 6 in the jsp file: /testing.jsp Generated servlet error: [javac] Compiling 1 source file /export/home/tomcat/jakarta-tomcat-4.1.29/work/Standalone/localhost/_/testing_jsp.java:48: cannot resolve symbol symbol : class OraceDriver location: package driver java.sql.Driver driver = new oracle.jdbc.driver.OraceDriver(); ^ An error occurred at line: 6 in the jsp file: /testing.jsp Generated servlet error: /export/home/tomcat/jakarta-tomcat-4.1.29/work/Standalone/localhost/_/testing_jsp.java:50: cannot resolve symbol symbol : method getConnection (java.lang.String,java.lang.String,java.lang.String) location: interface java.sql.Driver java.sql.Connection con = driver.getConnection(url,ontrack,iamontrack); ^ 2 errors at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) at java.lang.Thread.run(Thread.java:536) Filip Hanik wrote: that means that it works just fine. and that YOU are doing something wrong, not tomcat :) so try this % try { java.sql.Driver driver = new oracle.jdbc.driver.OraceDriver(); String url = jdbc:oracle:thin:@localhost:1521:ora; //of course substitute your own values java.sql.Connection con = driver.getConnection(url,scott,tiger); java.sql.Statement stmt = con.createStatement(); java.sql.ResultSet rs = stmt.executeQuery(select 1 from dual); while ( rs.next() ) { System.out.println(Received database result=+rs.getObject(1));
RE: Problems finding my JDBC driver for Oracle
did you put the classes12.jar in WEB-INF/lib only, not in common/lib -Original Message- From: Dor Orgad [mailto:[EMAIL PROTECTED] Sent: Sunday, January 11, 2004 7:20 PM To: Tomcat Users List Subject: Re: Problems finding my JDBC driver for Oracle I think this thing is playing funny buggers cos with this new code its giving me the driver not found exception. a i dont know what to d!!! 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: 6 in the jsp file: /testing.jsp Generated servlet error: [javac] Compiling 1 source file /export/home/tomcat/jakarta-tomcat-4.1.29/work/Standalone/localhost/ _/testing_jsp.java:48: cannot resolve symbol symbol : class OraceDriver location: package driver java.sql.Driver driver = new oracle.jdbc.driver.OraceDriver(); ^ An error occurred at line: 6 in the jsp file: /testing.jsp Generated servlet error: /export/home/tomcat/jakarta-tomcat-4.1.29/work/Standalone/localhost/ _/testing_jsp.java:50: cannot resolve symbol symbol : method getConnection (java.lang.String,java.lang.String,java.lang.String) location: interface java.sql.Driver java.sql.Connection con = driver.getConnection(url,ontrack,iamontrack); ^ 2 errors at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErr orHandler.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatche r.java:293) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContex t.java:473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrappe r.java:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App licationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application FilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapper Valve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveConte xt.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContext Valve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveConte xt.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve. java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveConte xt.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatch erValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveConte xt.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve. java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveConte xt.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVa lve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveConte xt.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proc essConnection(Http11Protocol.java:549) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thread Pool.java:666) at java.lang.Thread.run(Thread.java:536) Filip Hanik wrote: that means that it works just fine. and that YOU are doing something wrong, not tomcat :) so try this % try { java.sql.Driver driver = new oracle.jdbc.driver.OraceDriver(); String url = jdbc:oracle:thin:@localhost:1521:ora; //of course substitute your own values
Isapi redirector jk2.02 Installer
Hi I have tried using the Isapi redirector jk2.02 Installer from http://www.shiftomat.com/opensource/ It does not seem to work on my machine .I am running Windows 2000 and IIS 5 and Tomcat v 5, Also tried the documentation from http://virtualict.net/support/kb/iis6-Tomcat5-JK2.html I dont know where I am getting wrong please help kwiri - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems finding my JDBC driver for Oracle
Dor Orgad wrote: I think this thing is playing funny buggers cos with this new code its giving me the driver not found exception. a i dont know what to d!!! 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: 6 in the jsp file: /testing.jsp Generated servlet error: [javac] Compiling 1 source file /export/home/tomcat/jakarta-tomcat-4.1.29/work/Standalone/localhost/_/testing_jsp.java:48: cannot resolve symbol symbol : class OraceDriver location: package driver java.sql.Driver driver = new oracle.jdbc.driver.OraceDriver(); ^ This would indicate that Oracle's classes are not loaded up. At least not for this run :-) An error occurred at line: 6 in the jsp file: /testing.jsp Generated servlet error: /export/home/tomcat/jakarta-tomcat-4.1.29/work/Standalone/localhost/_/testing_jsp.java:50: cannot resolve symbol symbol : method getConnection (java.lang.String,java.lang.String,java.lang.String) location: interface java.sql.Driver java.sql.Connection con = driver.getConnection(url,ontrack,iamontrack); Now, this is bad. Looks like the java.sql.* package didn't load properly, either. Are you sure you haven't shot your classloader full of holes? Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]