Re: Re: problem with new 2.04 mod_jk2
Le dim 04/04/2004 à 00:01, QM a écrit : On Sat, Apr 03, 2004 at 11:38:37PM -0500, Daniel Savard wrote: : I know it's no longer a Tomcat question, but anyone knows what can : influence the result of the ldd command? A but? A problem with the glibc : library? Anyone has ever encountered such a problem? Smells like $LD_PRELOAD. What's the result of a diff between env | sort for each user? -QM Ok, that's right. The LD_PRELOAD variable is set for the offending user reporting incorrect libraries. Thanks, -- === Daniel Savard Consultation Informatique Daniel Savard 551, boul. Sir-Wilfrid-Laurier suite 105 Beloeil, (Québec) Canada J3G 4J1 Tél: (450) 467-8014 Internet: [EMAIL PROTECTED] === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: problem with new 2.04 mod_jk2
Walter Truitt a écrit: ... I don't know why someone would have X11 libraries linked in with an Apache module. -walter I don't know either, but it's a simple fact. However, I discovered I am getting different results from different users while running the ldd on the mod_jk2.so module: With my user, I am getting: [EMAIL PROTECTED] dsavard]$ ldd /usr/local/apps/apache2/modules/mod_jk2.so /usr/lib/libgdkxft.so = /usr/lib/libgdkxft.so (0x4002c000) libgcc_s.so.1 = /usr/local/lib/libgcc_s.so.1 (0x40031000) libc.so.6 = /lib/i686/libc.so.6 (0x40054000) libgtk-1.2.so.0 = /usr/lib/libgtk-1.2.so.0 (0x4019) libgdk-1.2.so.0 = /usr/lib/libgdk-1.2.so.0 (0x402be000) libgmodule-1.2.so.0 = /usr/lib/libgmodule-1.2.so.0 (0x402f4000) libglib-1.2.so.0 = /usr/lib/libglib-1.2.so.0 (0x402f7000) libdl.so.2 = /lib/libdl.so.2 (0x4031b000) libXi.so.6 = /usr/lib/libXi.so.6 (0x4031f000) libXext.so.6 = /usr/lib/libXext.so.6 (0x40327000) libX11.so.6 = /usr/lib/libX11.so.6 (0x40336000) libm.so.6 = /lib/i686/libm.so.6 (0x4040) libXft.so.1 = /usr/lib/libXft.so.1 (0x40423000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000) libXrender.so.1 = /usr/lib/libXrender.so.1 (0x4044d000) libfreetype.so.6 = /usr/lib/libfreetype.so.6 (0x40452000) libz.so.1 = /usr/lib/libz.so.1 (0x404a3000) And using another user: [EMAIL PROTECTED] gnometest]$ ldd /usr/local/apps/apache2/modules/mod_jk2.so libgcc_s.so.1 = /lib/libgcc_s.so.1 (0x40046000) libc.so.6 = /lib/i686/libc.so.6 (0x4004f000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000) I know it's no longer a Tomcat question, but anyone knows what can influence the result of the ldd command? A but? A problem with the glibc library? Anyone has ever encountered such a problem? I tried unsetting the LIBRARY and LD_LIBRARY_PATH environment variables without anoy success. And anyway, I don't see how any variable can influence which libraries are required to resolve a symbol, except the path to these libraries. -- === Daniel Savard Consultation Informatique Daniel Savard 551, boul. Sir-Wilfrid-Laurier suite 105 Beloeil, (Québec) Canada J3G 4J1 Tél: (450) 467-8014 Internet: [EMAIL PROTECTED] === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with new 2.04 mod_jk2
Le mer 31/03/2004 à 16:24, [EMAIL PROTECTED] a écrit : I am using apache 2.0.40-21.9 (the default for redhat9) . Does this version of apache not come with APR support? I just installed apr 0.9.4 from source, but httpd still complains about apr_socket_send. I'm wondering... do I need to link these apr libraries to apache somehow? thanks, devin You don't need to link anything. They are shared libraries and symbols are resolved at runtime. This is the reason it fails at runtime. To see which libraries the module expect, just type: ldd mod_jk2.so You should get something like: /usr/lib/libgdkxft.so = /usr/lib/libgdkxft.so (0x4002c000) libgcc_s.so.1 = /usr/local/lib/libgcc_s.so.1 (0x40031000) libc.so.6 = /lib/i686/libc.so.6 (0x40054000) libgtk-1.2.so.0 = /usr/lib/libgtk-1.2.so.0 (0x4019) libgdk-1.2.so.0 = /usr/lib/libgdk-1.2.so.0 (0x402be000) libgmodule-1.2.so.0 = /usr/lib/libgmodule-1.2.so.0 (0x402f4000) libglib-1.2.so.0 = /usr/lib/libglib-1.2.so.0 (0x402f7000) libdl.so.2 = /lib/libdl.so.2 (0x4031b000) libXi.so.6 = /usr/lib/libXi.so.6 (0x4031f000) libXext.so.6 = /usr/lib/libXext.so.6 (0x40327000) libX11.so.6 = /usr/lib/libX11.so.6 (0x40336000) libm.so.6 = /lib/i686/libm.so.6 (0x4040) libXft.so.1 = /usr/lib/libXft.so.1 (0x40423000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000) libXrender.so.1 = /usr/lib/libXrender.so.1 (0x4044d000) libfreetype.so.6 = /usr/lib/libfreetype.so.6 (0x40452000) libz.so.1 = /usr/lib/libz.so.1 (0x404a3000) Try to run ldconfig -v as root, it will rebuild the cache /etc/ld.so.cache. The problem may be your library is located somewhere out of reach of the directories specified in /etc/ld.so.conf. If it is the case, add you directory in /etc/ld.so.conf before running ldconfig -v. -- === Daniel Savard Consultation Informatique Daniel Savard 551, boul. Sir-Wilfrid-Laurier suite 105 Beloeil, (Québec) Canada J3G 4J1 Tél: (450) 467-8014 Internet: [EMAIL PROTECTED] === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with new 2.04 mod_jk2
Le mer 31/03/2004 à 22:07, E Cunningham a écrit : add libapr.dll or .so to your LD_LIBRARY_PATH? e --- [EMAIL PROTECTED] wrote: Hello, I decided to try the new mod_jk2 today. I put all the files in the right place, but fot this error when starting up httpd: Starting httpd: Syntax error on line 5 of /etc/httpd/conf.d/jk2.conf: Cannot load /etc/httpd/modules/mod_jk2.so into server: /etc/httpd/modules/mod_jk2.so: undefined symbol: apr_socket_send has anyone seen this or know what I have done wrong? Thanks, Devin __ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Well, you may get more than just symbols in the apr library unresolved at runtime. The error you got is for the first unresolved symbol encountered at runtime. But, anyway, starting with the APR library is probably good. It's definitely a .so file, I assume you are on a Linux or Unix variant system. Adding the library path to the LD_LIBRARY_PATH may worth trying... Personnally, I didn't get this problem with 2.0.4, since I am still with 2.0.2, but I got the same problem with 2.0.2 and I rebuilt the module after correcting a buggy Makefile. But, anyway, the symptoms you described are definitely pointing to something like: The module cannot find the library, even if you know the library is effectively installed on your system. So, the problem is the loader cannot find the library with the information it has. I am not sure if LD_LIBRARY_PATH, or even the ld.so.conf follow by ldconfig, will be enough to correct the problem because I don't know if there is a way to force the module to look only at specific directories determined at compile time, even if it is shared libraries. Your last solution is to build yourself the module. -- === Daniel Savard Consultation Informatique Daniel Savard 551, boul. Sir-Wilfrid-Laurier suite 105 Beloeil, (Québec) Canada J3G 4J1 Tél: (450) 467-8014 Internet: [EMAIL PROTECTED] === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk2.properties documentation
Le ven 19/03/2004 à 01:06, Chong Yu Meng a écrit : Daniel Savard wrote: Is there any documentation on the jk2.properties? There is the Jakarta documentation available on their site. Or you could dig through the source code. I also looked at the Jakarta docs, however, for the mod_jk2 part, they are not very helpful. There is no complete list of properties with a short description of each. Seems the approach is: Apply receipt A, if it fails you are on your own... BTW, I don't blame anyone for this, this is just a fact of life. That's an insensitive question ! I have only one computer at home. This is my primary development workstation, and I don't want to mess around with it. I can't afford another machine because I am currently unemployed. So, unless you're willing to buy me another PC, or offer me a job, you're not likely to see any other configurations. Again, I do not personnally blame anyone for this, it is just a question if anything else exist or any some other documentation that can be helpful to overcome the beast. Your error does not lie in jk2.properties. Check that you have all the necessary packages installed (see http://cymulacrum.net/writings/tomcat5/c831.html#JK2_INTEGRATION_SETUP). If you are using Fedora Core, the package you need is apr-util-devel and apr-devel. If you're using Mandrake, the rpm packages are libapr-util (I think) and ... something else. So, locate the name of the package and install it. Because you did not mention your platform (Windows? Linux distro? Solaris?), I can't be more specific. Well, the checking is supposed to be done by the configure. So, it passes the configure step, I assume the prereqs are all satisfied. I do not use any standard Linux distro. I have something like a RedHat++ (I mean I started a long time ago with RedHat 5.2, the upgraded until 7.2 and then upgraded manually some pieces beside the RedHat package system). Anyway, the problem is the buggy Makefile in the native2/server/apache2 directory. In particular, the JK_LDFLAGS variable which didn't have an appropriate list of libraries to include. BTW, I found on the mailing list the list of libraries to include. However, even if db-4.0 was required, it is perfectly possible to use another version of the Berkeley DB. Again, since I didn't have the version 4 installed on my system, the configure step should have stopped processing to let me know the prereqs were not satisfied. I insist, don't take it personnally. It is just an observation on the state of the mod_jk2 packaging. Maybe the README file could include some kind of warnings or hints to help newbies... -- === Daniel Savard === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Apache connector not working
Le ven 19/03/2004 à 05:11, Allan Bruce a écrit : I used an rpm to install the connector. Do you suggest I uninstall the rpm and compile the source? Thanks Allan Before you may do the following check: Locate the mod_jk2.so file and issue the following command: ldd mod_jk2.so It will list all the required libraries for the module to work properly. I got the following list on my system: /usr/lib/libgdkxft.so = /usr/lib/libgdkxft.so (0x4002c000) libgcc_s.so.1 = /usr/local/lib/libgcc_s.so.1 (0x40031000) libc.so.6 = /lib/i686/libc.so.6 (0x40054000) libgtk-1.2.so.0 = /usr/lib/libgtk-1.2.so.0 (0x4019) libgdk-1.2.so.0 = /usr/lib/libgdk-1.2.so.0 (0x402be000) libgmodule-1.2.so.0 = /usr/lib/libgmodule-1.2.so.0 (0x402f4000) libglib-1.2.so.0 = /usr/lib/libglib-1.2.so.0 (0x402f7000) libdl.so.2 = /lib/libdl.so.2 (0x4031b000) libXi.so.6 = /usr/lib/libXi.so.6 (0x4031f000) libXext.so.6 = /usr/lib/libXext.so.6 (0x40327000) libX11.so.6 = /usr/lib/libX11.so.6 (0x40336000) libm.so.6 = /lib/i686/libm.so.6 (0x4040) libXft.so.1 = /usr/lib/libXft.so.1 (0x40423000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000) libXrender.so.1 = /usr/lib/libXrender.so.1 (0x4044d000) libfreetype.so.6 = /usr/lib/libfreetype.so.6 (0x40452000) libz.so.1 = /usr/lib/libz.so.1 (0x404a3000) If you get something similar, the problem may be with the LD_LIBRARY_PATH or the /etc/ld.so.conf, your libraries are not located were they are expected and they cannot be found to resolve the symbols at runtime. It seems to me the safest approach would be to recompile from source and have some sort of control over what you are doing. There are already some recent questions on the current mailing list which described the options you should pass to the configure. Just be warn if it fails at runtime with similar problem, the solution is to edit manually the Makefile in native2/server/apache2 directory to include manually the missing libraries at the JK_LDFLAGS definition line. I found db-4.0 is not required, another version of the Berkeley DB will do as well, given you provide the correct naming to the -l option. -- === Daniel Savard === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Apache connector not working
Le ven 19/03/2004 à 12:30, Allan Bruce a écrit : My output is: [EMAIL PROTECTED] apache2]# ldd mod_jk2.so libc.so.6 = /lib/i686/libc.so.6 (0x4003) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000) is this a problem? I am quite new to linux so I dont know much about libraries. Thanks Allan Yes, that is. Your output indicates the mod_jk2.so doesn't know it needs to bind with many other shared libraries in order to resolve all symbols. So, it will look only in the two above libraries to resolve all the symbols, and will not find the ap_server_root (as well as many others) symbol causing the error. You may look at the list of symbols which will required to be resolved at runtime with the nm command: nm mod_jk2.so and all lines beginning with a U are for undefined symbols. Those with a T are defined within the current library. There is no other way than building the module yourself to make it aware it requires to bind with all other libraries. -- === Daniel Savard === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems building jk 2.0.4
Le jeu 18/03/2004 à 09:01, Jens Saade a écrit : Yes, I did --with-jni Yiannis Mavroukakis wrote: You probably did not include the jni option in the ./configure script. I noticed some deviation with 2.0.4 from instructions. Instead of jkjni.so, there is a libjkjni.so library produced in the modules directory. Did you copy this file in your Apache modules directory? -- === Daniel Savard === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems building jk 2.0.4
Le jeu 18/03/2004 à 10:56, Jens Saade a écrit : Hm, libjnjni.so or jkjni.so is not built ... here's my configure line: ../configure --with-apxs=/usr/bin/apxs --with-apr-util=/home/ratze/apr-util-0.9.4 --with-apr=/home/ratze/apr-0.9.4 --with-tomcat41=/var/tomcat/ --with-java-home=/usr/java/java --with-jni Do i need it to be built separately? //Jens No. The --with-jni is the option to build it. BTW, /var/tomcat is not an appropriate location for Tomcat. Not it will cause any problem to it, but there is some conventions on directories usage on Linux/Unix and /var is not the place to install software. You should instead use /opt or /usr/local. -- === Daniel Savard === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configure Apache for running Perl(cgi)
Le jeu 18/03/2004 à 13:01, Vivek Sivagiri a écrit : How would this be incorrect for this message board? It is a question about configuring Apache for CGI scripts. Well, there is Apache (the http server) and there is Apache Tomcat (the servlet container). Obviously, you are looking for advise on the http server. So, you are on the wrong mailinglist. You should rather look at the following URL: http://httpd.apache.org/lists.html#http-users -- === Daniel Savard === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jk2.properties documentation
Is there any documentation on the jk2.properties? After reading the document: http://cymulacrum.net/writings/tomcat5/c831.html#USING_MOD_JK2 I still get a problem lying with my jk2.properties. However, I was unable to find any complete documentation on this. Also, the above document mention 4 connection modes (Unix sockets, JNI channels, APR sockets and channel sockets). Only Unix sockets is described (or at least shown). What about other modes? I am getting the following error while starting tomcat: INFO: APR not loaded, disabling jni components: java.io.IOException: java.lang.UnsatisfiedLinkError: /usr/local/apps/apache2/lib/libjkjni.so: /usr/local/apps/apache2/lib/libjkjni.so: undefined symbol: apr_md5_final 2004-03-18 15:02:45 org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 The undefined symbol is actually in the apr-util shared library, so I guess I need to add something in the jk2.properties to indicate where to search or explicitly load it. The library is in the LD_LIBRARY_PATH and also configured in the ld.so.conf and ld.so.cache. -- === Daniel Savard === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configure Apache for running Perl(cgi)
I wonder why someone would like to run perl scripts from the Tomcat servlet container rather than using the Apache http server for this purpose? Because it is possible? Well, it is perfectly possible for me to jump the bridge, should I? (Please, do not answer this one.) It seems to me, much more easier to setup an Apache http server for this purpose. And I am under the impression there will be a performance penality running such scripts under a Tomcat server. There is so much people and production sites running CGIs from Apache http server, it is almost bug free and well documented to do so. -- === Daniel Savard === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jk2 problems
Le jeu 18/03/2004 à 19:14, Allan Bruce a écrit : - catalina.out 18-Mar-2004 10:01:57 org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 8080 18-Mar-2004 10:01:58 org.apache.jk.server.JkMain start INFO: APR not loaded, disabling jni components: java.io.IOException: /usr/lib/apache2/mod_jk2.so: /usr/lib/apache2/mod_jk2.so: undefined symbol: ap_server_root 18-Mar-2004 10:01:58 org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8019 18-Mar-2004 10:01:58 org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=23/505 config=/usr/local/sites/tomcat/tomcat/conf/jk2.properties 18-Mar-2004 10:01:58 org.apache.jk.server.JkMain start INFO: APR not loaded, disabling jni components: java.io.IOException: /usr/lib/apache2/mod_jk2.so: /usr/lib/apache2/mod_jk2.so: undefined symbol: ap_server_root 18-Mar-2004 10:01:58 org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 18-Mar-2004 10:01:58 org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=5/126 config=/usr/local/sites/tomcat/tomcat/conf/jk2.properties Allan, the problem is the mod_jk2.so shared library is not able to find the undefined symbol ap_server_root. I don't know in which library it resides, but I have a similar problem with a different library, since my connexion uses Unix sockets. You can look at the content of the shared library using the nm command. The symbol prefixed by a U are the undefined symbols and the symbols defined within the library are prefixed with a T. For example, nm libjkjni.so | grep md5 will produce the following output: U apr_md5_final U apr_md5_init U apr_md5_update c460 T jk2_md5 The jk2_md5 symbol is defined within the library and it probably requires apr_md5_final, apr_md5_init and apr_md5_update which are tagged undefined. $ nm libaprutil-0.so.0.9.5 | grep md5 8590 T apr_md5 8f80 T apr_md5_encode 84d0 T apr_md5_final 82a0 T apr_md5_init 82e0 T apr_md5_set_xlate 8330 T apr_md5_update Shows required symbols are in the libaprutil-0.so.0.9.5 shared library. Normally, with a right shared library configuration /etc/ld.so.conf or appropriate LD_LIBRARY_PATH, the required symbols in libjkjni.so should be resolved properly. And the error message from your catalina.out logfile should not appear. Now, why it happens? I just don't know. I am getting a apr_md5_final undefined symbol error even if my configuration seems OK. Is there something different when the library is loaded from the Java JNI? I don't know. So, at least you better understand what is happening, even if I am useless to provide you with a solution... -- === Daniel Savard === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Apache connector not working
Le jeu 18/03/2004 à 06:27, Allan Bruce a écrit : I have apache and tomcat both up and running. Now I want to be able to set up a connector so that I can browse the 'examples' directory of the tomcat installation through apaches port. The below config doesnt seem to work, can somebody please tell me where I am going wrong? Thanks - catalina.out 18-Mar-2004 10:01:57 org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on port 8080 18-Mar-2004 10:01:58 org.apache.jk.server.JkMain start INFO: APR not loaded, disabling jni components: java.io.IOException: /usr/lib/apache2/mod_jk2.so: /usr/lib/apache2/mod_jk2.so: undefined symbol: ap_server_root 18-Mar-2004 10:01:58 org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8019 18-Mar-2004 10:01:58 org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=23/505 config=/usr/local/sites/tomcat/tomcat/conf/jk2.properties 18-Mar-2004 10:01:58 org.apache.jk.server.JkMain start INFO: APR not loaded, disabling jni components: java.io.IOException: /usr/lib/apache2/mod_jk2.so: /usr/lib/apache2/mod_jk2.so: undefined symbol: ap_server_root 18-Mar-2004 10:01:58 org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 18-Mar-2004 10:01:58 org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=5/126 config=/usr/local/sites/tomcat/tomcat/conf/jk2.properties Allan, the problem lies with the link-edit while building the mod_jk2.so module. The Makefile produced in the some_path/native2/server/apache2/ is buggy. There is some important libraries missing in the list. Also, I believe the configure is not checking everything properly. All prereqs should be check at the configure step and flagged if not satisfied. You can refer to the following final discussion in the current mailing list: http://www.mail-archive.com/[EMAIL PROTECTED]/msg104016.html What is missing, is the proper JK_LDFLAGS definition which should be: JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt -lapr-0 -laprutil-0 -lgdbm -lexpat -ldb-4.0 -lpthread -ldl In my case, everything after -lcrypt was missing. And since we are building shared objects, symbols are resolved at runtime rather than at compile or link-edit time. -- === Daniel Savard === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 4 or 5?
Le sam 13/03/2004 à 18:55, Nic Werner a écrit : Through projects and self-interest I've been using Tomcat 4 a lot more. While I've looked at the differences, can someone explain to me what the big differences are in english? I'm under the impression that 4 and 5 are different paths, not just an upgrade of a previous version, is this true? Thanks, - Nic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] I think there was some performance improvements in Tomcat 5 as well. But you should look at the jakarta.apache.org web site for diffences between both versions... -- === Daniel Savard === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JNDI Datasource Reference in DD Not Necessary?
Doug, I really hope someone will shed some light on this, because I struggle to make my JNDI DataSource definition working properly with 5.0.19. And it seems the Resources still need to be defined in the server.xml even if the documentation for 5.0.19 is saying you should no longer put your Context definitions in the server.xml, but rather in the context.xml in the META-INF directory packaged with your application. It is supposed to make possible changes in the context without having to restart Tomcat. But, I was not able to make this working as documented... ;-( Since I am a newbie, I sticked as much as possible on the instructions. But, it seems not to work as documented. Le lun 08/03/2004 à 22:21, Parsons Technical Services a écrit : Harry, Take a look at this page: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/globalresources.html As noted on the page: This is equivalent to the inclusion of the following element in the web application deployment descriptor (/WEB-INF/web.xml): The question is: Is the fragment below inside a context for your application or is in the GlobalNamingResources section? I just swapped mine to Global and dropped the segment in the web.xml. I didn't try it while I had it in the context of the app. Doug www.parsonstechnical.com - Original Message - From: Harry Mantheakis [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, March 08, 2004 3:37 PM Subject: JNDI Datasource Reference in DD Not Necessary? Hello For some time now I have implemented the Tomcat 'JNDI DataSource' How-To on connection pooling, and everything has been fine. I define a resource in the context fragment: Resource name=jdbc/postgres auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/postgres ... /ResourceParams And a resource reference to it in the deployment descriptor: resource-ref descriptionDB Connection/description res-ref-namejdbc/postgres/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref And then do a JNDI lookup at runtime: return ( DataSource )new InitialContext(). lookup( java:comp/env/jdbc/postgres ); Magic. The other day I noticed that the resource reference in my deployment descriptor was actually broken - the name did not match that defined in the context - and yet my application was still working - perfectly. When I thought about it, it occurred to me that the resource reference in the deployment descriptor may not actually be necessary. So I deleted the resource reference from the web.xml file, and everything still works as expected. Can anyone enlighten me? Many thanks in anticipation. Harry Mantheakis London, UK - 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] -- === Daniel Savard Consultation Informatique Daniel Savard === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with tomcat shutdown on solaris
Le ven 05/03/2004 à 08:47, Shapira, Yoav a écrit : As I remember, tomcat (including this specific version) will often leave some sort of background thread running even when the shutdown script has been successfully executed. What are you talking about? You remember this from where? Tomcat doesn't leave any of its threads running when the shutdown script successfully executes. I am experiencing this kind of problem; background threads still running after the shutdown script has successfully exited. I just added a few lines in my own script to grep all those processes and signalled them. However, I must say I also have another server on which the shutdown is clean. I don't have time to investigate further this problem. On both servers I am using Tomcat 5.0.19. They are both Redhat Linux machines (but different kernel level and some other packages are not at the same level). -- === Daniel Savard === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ReRe: Need Help in Session Management !!!
Le lun 01/03/2004 à 08:58, Tim Kelly a écrit : There are missing parenthesis in the line: String user1=request.getUserPricipal.getName(); It should be String user1=request.getUserPricipal().getName(); Thats why you get the cannot resolve symbol :) Tim amit varshney wrote: it did not work. The following error message is displayed /usr/tomcat/webapps/intra/work/org/apache/jsp/accounts/jdbcmenu_jsp.java:61: cannot resolve symbol symbol: variable getUserPricipal location: interface javax.servlet.http.HttpServletRequest String user1=request.getUserPricipal.getName(); ^ . Quoting [EMAIL PROTECTED]: I think you can get the user name by getting the Principal object from request and then getting the name from it like String userName = request.getUserPrincipal().getName(); -Shanmugam- amit varshney wrote: I want to use tomcat user authentication in my application. for that i am using JDBCRealm.I have set the security constraint in the web.xml. So when a request for the restricted page comes a login page comes. But the problem is that it is submitting to the j_security_check and the textboxes are named j_username and j_password respectivley.I want session mangemant in my application. For that I need the login name of the person on my each page. How can I pass the username from login page to my page. is it possible to maintain session using tomcat user authentication or should i go for my own authentication and session management. Plz help me Thanks in advance Amit Varshney - Still single? Click here to find the perfect match. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?141 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Still single? Click here to find the perfect match. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?141 -- Tim Kelly, Director of Development Building Engines, Inc. Phone: 781-290-5300 Cell: 508-561-0985 www.buildingengines.com 275 Wyman Street Suite 11 Waltham MA 02451 Well, I think you also have a typo. It should be request.getUserPrincipal.getName(), not request.getUserPricipal.getName(). Notice the missing n in Principal. -- === Daniel Savard Consultation Informatique Daniel Savard 551, boul. Sir-Wilfrid-Laurier suite 105 Beloeil, (Québec) Canada J3G 4J1 Tél: (450) 467-8014 Internet: [EMAIL PROTECTED] === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]