Default Context in Tomcat 5.0.19
Hi, I am a bit confused about this one. I am able to run servlets using the invoker servlet by placing the classes in the ROOT/WEB-INF/classes directory. Yet, I don't see in server.xml any mention of the default context. Has this changed since 4.1.x version? I've looked into conf/Catalina/localhost/ directory and I don't see any context files there that would indicate that default context is being defined. As far as I remember I used to define the default context by: Context path= docBase=ROOT debug=0/ How is this done now and how do I turn off the default context going to ROOT? Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (ph) 301-838-6802 (fax) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat service doesn't start the server
Hi, I downloaded tomcat 4.1.29 for windows and installed it. A service was installed as part of the installation. However, the server doesn't appear to be running. Only after I click on Start Tomcat link does the server respond to requests. When I first installed it, I seem to remember that it was working. Then, I stopped the service, copied my custom server.xml file in the conf directory, put the .war file in the appropriate place and restarted the service. The server didn't appear to be responding to any requests. When I started it using the short-cut, it works fine. I restarted the machine and left the service on Automatic... still nothing... Any ideas as to how to fix this and make the service start the server? Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Auto reload war file
Hi, I have a war file that gets packages at the command line using ant. Tomcat uses that war for the application and I've set it up that it doesn't unpack it. I keep having to restart the server whenever I change anything, recompile and repackage. Does anyone know what and where in the server.xml file I have to specify so that Tomcat reloads the changes authomatically? Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Older versions of IE
Does anyone know where I can download older version of IE (5.x and 4.x)? Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to prevent direct access to login.jsp
Tomcat 5 is a stable release now? Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 5:10 AM To: Tomcat Users List Subject: Re: How to prevent direct access to login.jsp On 12/08/2003 11:59 PM Chaikin, Yaakov Y (US SSA) wrote: I realized that my user can mess himself by bookmarking the login page he is asked to log in. The login.jsp appears in the URL address in the browser... Does anyone know how to avoid this? How do I block that URL for the user and not for the server? Hi Yaakov, I think the best way to deal with this situation is to configure tomcat to catch the error status 403 or whatever it is and then serve up an error page with a calm, logical explanation of why they shouldn't do that. Or upgrade to tomcat 5. Adam - 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: How to prevent direct access to login.jsp
Tom, You are confusing programmatic security with declarative. Yes, it's a piece of cake with programmatic security since YOU are doing all the work. However, unless your application requires it for some special reason, there is no need to for programmatic security. Thanks for trying though. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: Tom Holmes Jr. [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 8:35 PM To: Tomcat Users List Subject: Re: How to prevent direct access to login.jsp I realize that you're asking if there is a Tomcat-configurable solution to this problem but that isn't the best way to handle this in the Java world. The Tomcat-configurable way might be to force a directory (or web-app) to force a new hit to the server instead of allowing the page to be cached in the browser. I'm not sure how you do this, but I am sure someone does. There is also a way to put a directive in the JSP page that forces it to refresh every time the page is hit ... there's a way to do it, but I've since forgotten yeah, I know, I am just so full of information. My personal best way to solve this is to use Servlets ... if my user goes to my login.jsp page, that's fine ... when they submit though it goes to a Login Servlet which does all the work and then re-directs to the login.jsp page with errors or failed validation. The Servlet uses a javabean to query the database, and if all is well, then the servlet redirects to the web-site itself. The Login Servlet also sets a user object in session ... so that if a user tries to bookmark a URL ... if the user object doesn't exist (because of timing out, or whatever), then I redirect them back to the login.jsp. I know a lot of people don't like that because they have server farms and the user has to be re-directed back to the same machine and objects in session take-up system memory. But, I don't put a lot into that object, it's very minimal, and I don't get many users for it to be an issue, and I bumped up the memory on that web-server anyway. Hope this helps. Thanks. Tom - Original Message - From: Chaikin, Yaakov Y (US SSA) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 08, 2003 5:59 PM Subject: How to prevent direct access to login.jsp Hi, I realized that my user can mess himself by bookmarking the login page he is asked to log in. The login.jsp appears in the URL address in the browser... Does anyone know how to avoid this? How do I block that URL for the user and not for the server? Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to get username
Hi, Does anyone know how to get back the username once the person logged in with declarative security? Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Lock on database file not being released...
Hi, I did as you said and adjusted those values for the odbc. Same result. The database file is still showing as locked. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: George Sexton [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:11 AM To: 'Tomcat Users List' Subject: RE: Lock on database file not being released... In the ODBC connection entry in the registry, or by using the ODBC Connection editor, change those two parameters. They are probably set for Yes and should be set to No. If you are not using an ODBC Connection entry, then you need to pass these as arguments in the connection string. -Original Message- From: Chaikin, Yaakov Y (US SSA) [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 11:07 PM To: Tomcat Users List Subject: RE: Lock on database file not being released... How do I do that in server.xml file? Is that what you are suggesting? Specifying other parameters for the connection pooling? Please elaborate on what you think I should do. Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: George Sexton [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 11:28 PM To: 'Tomcat Users List' Subject: RE: Lock on database file not being released... OK, I now think I know the issue. Try changing the entries for the ODBC connection. Specifically change: ImplicitCommitSync And UserCommitSync The docs are inconsistent on their usage, and I think the drivers vary depending upon the version of the Jet engine you are using. Anyhow, adjust these and see what happens. -Original Message- From: Chaikin, Yaakov Y (US SSA) [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 2:13 PM To: Tomcat Users List Subject: RE: Lock on database file not being released... However, I have used this driver before in a standalone app and when you close a connection, it certainly does release the lock on the database file. This makes me think, you didn't use pooling in this standalone app. Therefor check weather you close all your ResultSets and Statements. In standalone apps where no pooling is involved, they are caught by the garbage collector, but not in connection pooling. Trapped into this myself. Steffen, I tried what you said and closed the ResultSet and Statement before I close the Connection. Still same affect. Any other ideas anyone? I highly doubt it's the driver. I would bet that I am doing something wrong. I just can't figure out what it is. Thanks, Yaakov. - 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] - 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]
login page css not applied
Hi, I have a problem where the login page is not showing any images and not having the css applied to it. Here is my web.xml: --- web-app servlet servlet-nameController/servlet-name servlet-classcorej2ee.web.Controller/servlet-class init-param param-namecorej2ee.web.navigation.class/param-name param-valuecorej2ee.web.EnvEntryNavigator/param-value /init-param /servlet servlet-mapping servlet-nameController/servlet-name url-pattern/*.jsp/url-pattern /servlet-mapping welcome-file-list welcome-filewelcome.jsp/welcome-file welcome-fileindex.html/welcome-file /welcome-file-list resource-ref res-ref-namejdbc/afecWEBDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref security-constraint web-resource-collection web-resource-nameRegular and Power User/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint role-nameRegularUser/role-name role-namePowerUser/role-name role-nameAdministrator/role-name /auth-constraint user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint security-constraint web-resource-collection web-resource-nameAdministrator/web-resource-name url-pattern/admin/*/url-pattern /web-resource-collection auth-constraint role-nameAdministrator/role-name /auth-constraint user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/login.jsp/form-login-page form-error-page/loginError.html/form-error-page /form-login-config /login-config env-entry env-entry-nameroute/welcomePage/success/env-entry-name env-entry-value/welcome.jsp/env-entry-value env-entry-typejava.lang.String/env-entry-type /env-entry /web-app My images are under images folder in the root of the application and my css in under css folder in the root of my application. The webpage is referencing css, for example, like this: link href=css/background.css rel=stylesheet type=text/css I am know I am messing up security paths, but I can't figure out what to do about it. Any help would be greatly appreciated. Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: login page css not applied
Yes, you are right. However, when I changed the pattern to /*.jsp, the login page was skipped and the browser went straight to the protected page without any authentication. I am not sure what's going on. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: Rod Giffin [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:31 PM To: [EMAIL PROTECTED] Subject: Re: login page css not applied US SSA said: Hi, I have a problem where the login page is not showing any images and not having the css applied to it. But after the user has authenticated, it works right? I'm not 100% sure about the setup of your webapp and I've been spending so much time with other products I've forgotten a lot of stuff, but it appears to me on first glance that you've got a security constraint on /*, which would include images/ and css/ in that webapp before the user has authenticated, wouldn't it? If not, then I've forgotten more than I realized. Anyway, if so, the browser is requesting the css and image files before the user has enough authentication to get them. That's why it's working after the user is authenticated and a role assigned. Rod. [snip] security-constraint web-resource-collection web-resource-nameRegular and Power User/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint role-nameRegularUser/role-name role-namePowerUser/role-name role-nameAdministrator/role-name /auth-constraint user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint - 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: login page css not applied
Rod, I am sorry, but I am not 100% following you... Yes, you are right. I have the following situation: I am trying url: localhost/xxxWEB/ This gets forwared by the welcome-page to welcome.jsp, which I want to be protected. welcome.jsp page is in xxxWEB/ directory. Could you explain what you are suggesting again? Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: Rod Giffin [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:46 PM To: [EMAIL PROTECTED] Subject: RE: login page css not applied Ok, I've seen that before. Probably your protected page has the same name as one of the welcome-file page matches in web.xml, or they're both present. If index.html is your welcome page, use that in the welcome-file setting and not an existing .jsp file. I think that's the way it works. Rod. US SSA said: Yes, you are right. However, when I changed the pattern to /*.jsp, the login page was skipped and the browser went straight to the protected page without any authentication. I am not sure what's going on. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: Rod Giffin [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:31 PM To: [EMAIL PROTECTED] Subject: Re: login page css not applied US SSA said: Hi, I have a problem where the login page is not showing any images and not having the css applied to it. But after the user has authenticated, it works right? I'm not 100% sure about the setup of your webapp and I've been spending so much time with other products I've forgotten a lot of stuff, but it appears to me on first glance that you've got a security constraint on /*, which would include images/ and css/ in that webapp before the user has authenticated, wouldn't it? If not, then I've forgotten more than I realized. Anyway, if so, the browser is requesting the css and image files before the user has enough authentication to get them. That's why it's working after the user is authenticated and a role assigned. Rod. [snip] security-constraint web-resource-collection web-resource-nameRegular and Power User/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint role-nameRegularUser/role-name role-namePowerUser/role-name role-nameAdministrator/role-name /auth-constraint user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint - 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: Custom Realm deployment, was More sophisticated JDBCRealm Security
Basically, jar your package that you are using for your JDBCRealm and put the .jar file into common/lib directory. That will make your package visible to both your webapps and Tomcat server. Well, in your case, you only care about the server seeing this package. HTH. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: Frank Febbraro [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:10 PM To: Tomcat Users List Subject: Custom Realm deployment, was More sophisticated JDBCRealm Security Thanks Yoav, One more question to you or the group, When deploying a custom Realm implementation, I am defining the Realm inside the Context for my specific application. But on startup I get: java.lang.ClassNotFoundException: .util.CustomJDBCRealm Can I have the Realm class in my WAR file or do I have to put it on the tomcat classpath somewhere? Thanks again, Frank - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 2:52 PM Subject: RE: More sophisticated JDBCRealm Security Howdy, You can search the archives of this list for many examples. Yoav Shapira Millennium ChemInformatics -Original Message- From: Frank Febbraro [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 12:10 PM To: Tomcat Users List Subject: Re: More sophisticated JDBCRealm Security Well crap! Turns out we are using MySQL 4.0.x which does not have support for views. Can anyone point me in a direction that would help me in implementing my own Realm (either brand new or by extending another) Thank you very much, Frank - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 11:49 AM Subject: RE: More sophisticated JDBCRealm Security Howdy, Your other option is to extend JDBCRealm into your own custom realm implementation. Yoav Shapira Millennium ChemInformatics -Original Message- From: Frank Febbraro [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 11:41 AM To: Tomcat Users List Subject: Re: More sophisticated JDBCRealm Security What about the fact that the groupId column in User is called id in the Groups table, would it be a case of making another view to accomplish that translation too? Besides craeting views, which is easy, what are the other options here? - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 10:48 AM Subject: RE: More sophisticated JDBCRealm Security Howdy, The typical solution in many cases involving JDBCRealm is (if you don't want to customize the realm by coding) to create a view for use by the JDBC realm. In your case, you'd create a view on the user table where only active users are shown, and configure the JDBC realm to query this view rather than the user table. Yoav Shapira Millennium ChemInformatics -Original Message- From: Frank Febbraro [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 10:48 AM To: Tomcat Users List Subject: More sophisticated JDBCRealm Security In looking through the docs I am surpised that I dont see a way to do some more sophisticated JDBCRealm security. I may just be looking in the wrong place or misreading something so please let me know if I am. My DB tables are arranged as follows create table user ( id BIGINT NOT NULL AUTO_INCREMENT, email VARCHAR(100) not null unique, groupId BIGINT not null, password VARCHAR(20) not null, active BIT, primary key (id) ); create table groups ( id BIGINT NOT NULL AUTO_INCREMENT, role VARCHAR(255) not null, primary key (id) ); The email address is the user login, password is obvious. I would want something that would only let ACTIVE users log in (active = 1), and User.groupId maps to Groups.id field. Using the standard JDBCRealm I do not see how this is possible. Would I actually have to create my own custom Realm implementation in order to achieve these goals? Thanks for any input/advice, Frank - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.
RE: login page css not applied
Rod, Actually, I am pretty sure that the welcome-file has nothing to do with it. All that does is tell the server which URL to try to serve up if you were to leave off the file name from the url you are typing in. So, in my case typing localhost/xxxWEB/ is equivalent to localhost/xxxWEB/welcome.jsp. The real problem that I can't figure out is why when I specify that I am only securing *.jsp, it secures nothing. I'll have to research that one. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: Rod Giffin [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 2:34 PM To: [EMAIL PROTECTED] Subject: RE: login page css not applied US SSA said: Rod, I am sorry, but I am not 100% following you... Yes, you are right. I have the following situation: I am trying url: localhost/xxxWEB/ I think it would work if you set the welcome-file element to send the user by default to localhost/xxxWEB/login.html (or index.html or whatever) where the login form could reside. The welcome.jsp page should not be a default page if it is protected, or it will be served before the user is authenticated. Since login.html or whatnot is not a jsp page, it won't be protected by a security-constraint such as /*.jsp, and it will be able to be accessed. This gets forwared by the welcome-page to welcome.jsp, which I want to be protected. welcome.jsp page is in xxxWEB/ directory. Could you explain what you are suggesting again? - 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]
How to prevent direct access to login.jsp
Hi, I realized that my user can mess himself by bookmarking the login page he is asked to log in. The login.jsp appears in the URL address in the browser... Does anyone know how to avoid this? How do I block that URL for the user and not for the server? Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to prevent direct access to login.jsp
Put the file in something like WEB-INF/jsp/login.jsp. Then either configure form-based authentication for the path to that JSP I tried doing that, but when I specified /WEB-INF/jsp/login.html in login-config auth-methodFORM/auth-method form-login-config form-login-page/WEB-INF/jsp /login.html/form-login-page form-error-page/WEB-INF/jsp /loginError.html/form-error-page /form-login-config /login-config The server tried to actually put that into the URL of the browser! Am I doing something wrong? I can't really do your second option since I am not using struts. I am using a much simpler custom MVC package that doesn't support things like this very easily. Would you be able to explain to me what I am doing wrong or how to set up your first option? Thanks, Yaakov. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Database pool problem (new problem)
I understand that you do not have a choice, but please not that the JDBC-ODBC bridge is *not for production* [according to Sun], it is *solely* for development and evaluation. The bridge contains identified bugs that will not be addressed [i e support is EOLed]. So, you are using this at your own risk. Check out the bug parade of the bridge; you might have encountered a well-known, documented bug. It that case, there might be a published work-around. Yes, true. But this worked 100% for the Realm with that same driver. Someone already solved that problem. I need to a parameter username, not user. Now, I am having a different problem. My database connection is not being released even though I am closing it. Could someone help me out with this? (I am inlcluding my server.xml file just in case). When I start up the server, however, I get the following exceptions in the log file: 2003-12-07 04:24:21 StandardContext[/webdav]: Resources start failed: java.lang.IllegalArgumentException: Document base C:\jakarta-tomcat-4.1.24-LE-jdk14\webapps\webdav does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.jav a:193) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext. java:3344) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3474 ) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) 2003-12-07 04:24:21 StandardContext[/webdav]: Context startup failed due to previous errors 2003-12-07 04:24:21 StandardContext[/webdav]: Exception during cleanup after start failed LifecycleException: Container StandardContext[/webdav] has not been started at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3658) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3636 ) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) 2003-12-07 04:24:21 StandardContext[/tomcat-docs]: Resources start failed: java.lang.IllegalArgumentException: Document base C:\jakarta-tomcat-4.1.24-LE-jdk14\webapps\tomcat-docs does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.jav a:193) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext. java:3344) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3474 ) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:754) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at
Lock on database file not being released...
Hi, I am having a problem where the lock on the database is not being released. I am using database connection pooling and I am just running a test app and certainly DO close my connections. I double checked that the code that closes the connection is being called and it is. What other things can I check or might be doing wrong? I am using the M$ Access as the database and the odbc bridge driver to get to it. When I shut down the server I would expect that the database pooling releases all its connections. It does look like it though, since I still still the databaseName.ldb file in that directory (MS Access way of lock the database file). I know that Sun says that it is not production level driver. However, I have used this driver before in a standalone app and when you close a connection, it certainly does release the lock on the database file. This leads me to believe that it's NOT the driver problem, but my configuration problem. I am attaching the server.xml file just in case that would help in solving the problem. I would really appreciate any help. Thank you. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] ?xml version='1.0' encoding='utf-8'? Server className=org.apache.catalina.core.StandardServer debug=99 port=8005 shutdown=SHUTDOWN Logger className=org.apache.catalina.logger.FileLogger debug=0 directory=logs prefix=localhost_afecWEB_log. suffix=.txt timestamp=true verbosity=99/ Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0 jsr77Names=false/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ GlobalNamingResources Logger className=org.apache.catalina.logger.FileLogger debug=0 directory=logs prefix=resource_afecWEB_log. suffix=.txt timestamp=true verbosity=99/ Environment name=simpleValue override=true type=java.lang.Integer value=30/ Resource auth=Container description=User database that can be updated and saved name=UserDatabase scope=Shareable type=org.apache.catalina.UserDatabase/ ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams 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 !--*** BEGIN Physical AFEC database configuration **-- Resource name=afec/web/database auth=Container description=AFEC database; stores info about documents, login type=javax.sql.DataSource scope=Shareable/ ResourceParams name=afec/web/database parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxIdle/name value5/value /parameter parameter namemaxWait/name value1/value /parameter parameter namedriverClassName/name valuesun.jdbc.odbc.JdbcOdbcDriver/value /parameter parameter nameurl/name valuejdbc:odbc:afec/value /parameter parameter nameusername/name valuedefault/value /parameter parameter namepassword/name valueafecrelease2003/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter /ResourceParams /GlobalNamingResources Service className=org.apache.catalina.core.StandardService debug=0 name=Tomcat-Standalone Connector className=org.apache.coyote.tomcat4.CoyoteConnector acceptCount=100 bufferSize=2048 compression=off connectionLinger=-1 connectionTimeout=2 debug=0 disableUploadTimeout=true enableLookups=true maxKeepAliveRequests=100 maxProcessors=75 minProcessors=5 port=80 protocolHandlerClassName=org.apache.coyote.http11.Http11Protocol proxyPort=0 redirectPort=8443 scheme=http secure=false tcpNoDelay=true useURIValidationHack=false Factory className=org.apache.catalina.net.DefaultServerSocketFactory/ /Connector Connector className=org.apache.coyote.tomcat4.CoyoteConnector acceptCount=10 bufferSize=2048 compression=off connectionLinger=-1 connectionTimeout=0 debug=0 disableUploadTimeout=false enableLookups=true maxKeepAliveRequests=100 maxProcessors=75 minProcessors=5
RE: Lock on database file not being released...
However, I have used this driver before in a standalone app and when you close a connection, it certainly does release the lock on the database file. This makes me think, you didn't use pooling in this standalone app. Therefor check weather you close all your ResultSets and Statements. In standalone apps where no pooling is involved, they are caught by the garbage collector, but not in connection pooling. Trapped into this myself. Steffen, I tried what you said and closed the ResultSet and Statement before I close the Connection. Still same affect. Any other ideas anyone? I highly doubt it's the driver. I would bet that I am doing something wrong. I just can't figure out what it is. Thanks, Yaakov. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Lock on database file not being released...
One other question. What is the setting of AutoCommit? Are you setting it to TRUE? It's not touched, i.e., it's default, which is true. All I am doing in my jsp is doing a regular select * from tableName. Nothing fancy. Returns 2 rows that are in that table. I am just testing this out first and that's why it's so simple for now. So, no updates are being done. Nothing. Just one select. Yet, it still locked the database file after the server is shut down. I am shutting down the server with the shutdown script that came with the download. Ideas? Thanks, Yaakov. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Lock on database file not being released...
No, it's not doing any of that at all. I am attaching my welcome.jsp for reference. It's extremely simple code there. Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: Sean Utt [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 9:11 PM To: Tomcat Users List Subject: Re: Lock on database file not being released... Hi, Is your jsp/servlet forwarding or redirecting to another jsp/servlet/html page before close() is called on the connection? Dreamweaver will automagically create jsp pages that fall prey to this gotcha. If you have access to the log files, log the opening and closing of the connection, and see if what you think is happening is in fact happening. Sean - Original Message - From: George Sexton [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Sunday, December 07, 2003 1:15 PM Subject: RE: Lock on database file not being released... One other question. What is the setting of AutoCommit? Are you setting it to TRUE? -Original Message- From: Chaikin, Yaakov Y (US SSA) [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 2:13 PM To: Tomcat Users List Subject: RE: Lock on database file not being released... However, I have used this driver before in a standalone app and when you close a connection, it certainly does release the lock on the database file. This makes me think, you didn't use pooling in this standalone app. Therefor check weather you close all your ResultSets and Statements. In standalone apps where no pooling is involved, they are caught by the garbage collector, but not in connection pooling. Trapped into this myself. Steffen, I tried what you said and closed the ResultSet and Statement before I close the Connection. Still same affect. Any other ideas anyone? I highly doubt it's the driver. I would bet that I am doing something wrong. I just can't figure out what it is. Thanks, Yaakov. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Lock on database file not being released...
Sorry, but for some reason the welcome.jsp didn't get attached to the previous email. Trying again. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: Sean Utt [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 9:11 PM To: Tomcat Users List Subject: Re: Lock on database file not being released... Hi, Is your jsp/servlet forwarding or redirecting to another jsp/servlet/html page before close() is called on the connection? Dreamweaver will automagically create jsp pages that fall prey to this gotcha. If you have access to the log files, log the opening and closing of the connection, and see if what you think is happening is in fact happening. Sean - Original Message - From: George Sexton [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Sunday, December 07, 2003 1:15 PM Subject: RE: Lock on database file not being released... One other question. What is the setting of AutoCommit? Are you setting it to TRUE? -Original Message- From: Chaikin, Yaakov Y (US SSA) [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 2:13 PM To: Tomcat Users List Subject: RE: Lock on database file not being released... However, I have used this driver before in a standalone app and when you close a connection, it certainly does release the lock on the database file. This makes me think, you didn't use pooling in this standalone app. Therefor check weather you close all your ResultSets and Statements. In standalone apps where no pooling is involved, they are caught by the garbage collector, but not in connection pooling. Trapped into this myself. Steffen, I tried what you said and closed the ResultSet and Statement before I close the Connection. Still same affect. Any other ideas anyone? I highly doubt it's the driver. I would bet that I am doing something wrong. I just can't figure out what it is. Thanks, Yaakov. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Lock on database file not being released...
Ok, I don't know why, but it's not letting me attach it. I am pasting it here in this email: - %@ page import=javax.naming.* % %@ page import=javax.sql.* % %@ page import=java.sql.* % html body % try { Context ctx = new InitialContext(); if(ctx == null ) throw new Exception(Boom - No Context); DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/afecWEBDB); out.println(DataSource is: + ds); if (ds != null) { out.println(ds is NOT null); Connection conn = ds.getConnection(); out.println(); out.println(Connection is: + conn); if(conn != null) { out.println(Connection is not NULL); out.println(); Statement stmt = conn.createStatement(); out.println(Statement is: + stmt); ResultSet rst = stmt.executeQuery(select * from Users); while(rst.next()) { out.println(Record Found!); out.println(br/); out.println(rst.getString(1)); out.println(rst.getString(2)); out.println(br/); } log(THIS IS TEST! CONNECTION IS ABOUT TO BE CLOSED!***); rst.close(); stmt.close(); conn.close(); } } } catch(Exception e) { System.out.println(NO LUCK!); e.printStackTrace(); } % h1Hello THERE!/h1 /body /html --- Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: Sean Utt [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 9:11 PM To: Tomcat Users List Subject: Re: Lock on database file not being released... Hi, Is your jsp/servlet forwarding or redirecting to another jsp/servlet/html page before close() is called on the connection? Dreamweaver will automagically create jsp pages that fall prey to this gotcha. If you have access to the log files, log the opening and closing of the connection, and see if what you think is happening is in fact happening. Sean - Original Message - From: George Sexton [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Sunday, December 07, 2003 1:15 PM Subject: RE: Lock on database file not being released... One other question. What is the setting of AutoCommit? Are you setting it to TRUE? -Original Message- From: Chaikin, Yaakov Y (US SSA) [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 2:13 PM To: Tomcat Users List Subject: RE: Lock on database file not being released... However, I have used this driver before in a standalone app and when you close a connection, it certainly does release the lock on the database file. This makes me think, you didn't use pooling in this standalone app. Therefor check weather you close all your ResultSets and Statements. In standalone apps where no pooling is involved, they are caught by the garbage collector, but not in connection pooling. Trapped into this myself. Steffen, I tried what you said and closed the ResultSet and Statement before I close the Connection. Still same affect. Any other ideas anyone? I highly doubt it's the driver. I would bet that I am doing something wrong. I just can't figure out what it is. Thanks, Yaakov. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Lock on database file not being released...
Well, I've sent server.xml files over before and it went through. I am a bit confused about the attachment policy now. Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 9:53 PM To: Tomcat Users List Subject: Re: Lock on database file not being released... Chaikin, Yaakov Y (US SSA) wrote: Ok, I don't know why, but it's not letting me attach it. I think the list discards attachments . - 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: Lock on database file not being released...
How do I do that in server.xml file? Is that what you are suggesting? Specifying other parameters for the connection pooling? Please elaborate on what you think I should do. Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: George Sexton [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 11:28 PM To: 'Tomcat Users List' Subject: RE: Lock on database file not being released... OK, I now think I know the issue. Try changing the entries for the ODBC connection. Specifically change: ImplicitCommitSync And UserCommitSync The docs are inconsistent on their usage, and I think the drivers vary depending upon the version of the Jet engine you are using. Anyhow, adjust these and see what happens. -Original Message- From: Chaikin, Yaakov Y (US SSA) [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 2:13 PM To: Tomcat Users List Subject: RE: Lock on database file not being released... However, I have used this driver before in a standalone app and when you close a connection, it certainly does release the lock on the database file. This makes me think, you didn't use pooling in this standalone app. Therefor check weather you close all your ResultSets and Statements. In standalone apps where no pooling is involved, they are caught by the garbage collector, but not in connection pooling. Trapped into this myself. Steffen, I tried what you said and closed the ResultSet and Statement before I close the Connection. Still same affect. Any other ideas anyone? I highly doubt it's the driver. I would bet that I am doing something wrong. I just can't figure out what it is. Thanks, Yaakov. - 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]
Testing, please ignore
Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Database pool problem
Hi, I am having the following problem and how someone can point out to me what I am doing wrong. I am trying to configure Tomcat to have a database connection pool for my database, but when I try to access the database through a jsp, it gives me wrong password for the database... BUT it IS the right password. I am using MS Access as the database (not much choice right now) and have set up a System DNS. The weird part is that I am using the same values for a Realm I defined and I know that it DOES create a connection to the database and authentication works. The Realm that I have is this: Realm className=org.apache.catalina.realm.JDBCRealm connectionName=default connectionPassword=afecrelease2003 connectionURL=jdbc:odbc:afec debug=0 driverName=sun.jdbc.odbc.JdbcOdbcDriver roleNameCol=UserRole userCredCol=UserPassword userNameCol=UserName userRoleTable=TestUsers userTable=TestUsers validate=true/ My server.xml file has this context: !--*** BEGIN AFECWEB Context ***-- Context className=org.apache.catalina.core.StandardContext cachingAllowed=true charsetMapperClass=org.apache.catalina.util.CharsetMapper cookies=true crossContext=true debug=0 displayName=AFECWEB docBase=c:/corej2ee/stage/wls/afecWebApp/afecWEB.war mapperClass=org.apache.catalina.core.StandardContextMapper path=/afecWEB privileged=false reloadable=true swallowOutput=false useNaming=true wrapperClass=org.apache.catalina.core.StandardWrapper Logger className=org.apache.catalina.logger.FileLogger debug=0 directory=logs prefix=localhost_afecWEB_log. suffix=.txt timestamp=true verbosity=99/ Resource name=jdbc/afecWEBDB auth=Container description=AFEC database; stores info about documents, login type=javax.sql.DataSource scope=Shareable / ResourceParams name=jdbc/afecWEBDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value1/value /parameter parameter namemaxIdle/name value1/value /parameter parameter namemaxWait/name value1/value /parameter parameter namedriverClassName/name valuesun.jdbc.odbc.JdbcOdbcDriver/value /parameter parameter nameurl/name valuejdbc:odbc:afec/value /parameter parameter nameuser/name valuedefault/value /parameter parameter namepassword/name valueafecrelease2003/value /parameter parameter nameconnectionName/name valuedefault/value /parameter parameter nameconnectionPassword/name valueafecrelease2003/value /parameter parameter nameconnectionURL/name valuejdbc:odbc:afec/value /parameter parameter namedriverName/name valuesun.jdbc.odbc.JdbcOdbcDriver/value /parameter /ResourceParams /Context !--*** END AFECWEB Context ***-- Any help would be greatly appreciated. Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Database pool problem
Maybe M$ Access isn´t a good database to test. Could you use some real database? Like MySQL, PostgreeSQL, HypersonicSQL, Oracle and so on. I told you, it's not my choice at this point. I am not about to tell my clients to since they are using M Access I am going to develop. And yes, the second I have that chance I'll switch. However, the reality is that a lot of clients want Access for simple apps. Thanks, Yaakov. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Database pool problem
Could you show us how you make a simple connection to that M$ Acess database to compare? Well, I sort of already did. The realm is working 100% using that database. Here is my Realm tag: Realm className=org.apache.catalina.realm.JDBCRealm connectionName=default connectionPassword=afecrelease2003 connectionURL=jdbc:odbc:afec debug=0 driverName=sun.jdbc.odbc.JdbcOdbcDriver roleNameCol=UserRole userCredCol=UserPassword userNameCol=UserName userRoleTable=TestUsers userTable=TestUsers validate=true/ This works and it's the same attributes, just with different names to comply with Realm tag dtd. Any ideas? Thanks, Yaakov. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Database pool problem
That's correct. (I am not actually doing this, you understand. Tomcat is supposed to do this for me!) I took the password off the database and it works. It's good enough to keep going with jsp development, but I still need to know how to do this with the password. So, I do not understand what the problem with the password is. I know the password that I was supplying in server.xml was correct. So, if anyone has any ideas as to how to get it to work, go ahead. Thanks. Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: Edson Alves Pereira [mailto:[EMAIL PROTECTED] Sent: Friday, December 05, 2003 1:38 PM To: 'Tomcat Users List' Subject: RE: Database pool problem So, correct if i´m wrong. To connect to you database is: Class.forName( sun.jdbc.odbc.JdbcOdbcDriver ); Connection dbConn = DriverManager.getConnection( jdbc:odbc:afec, UserName, UserPassword ); -- De: Chaikin, Yaakov Y (US SSA)[SMTP:[EMAIL PROTECTED] Responder: Tomcat Users List Enviada:sexta-feira, 5 de dezembro de 2003 14:17 Para: Tomcat Users List Assunto:RE: Database pool problem Could you show us how you make a simple connection to that M$ Acess database to compare? Well, I sort of already did. The realm is working 100% using that database. Here is my Realm tag: Realm className=org.apache.catalina.realm.JDBCRealm connectionName=default connectionPassword=afecrelease2003 connectionURL=jdbc:odbc:afec debug=0 driverName=sun.jdbc.odbc.JdbcOdbcDriver roleNameCol=UserRole userCredCol=UserPassword userNameCol=UserName userRoleTable=TestUsers userTable=TestUsers validate=true/ This works and it's the same attributes, just with different names to comply with Realm tag dtd. Any ideas? Thanks, Yaakov. - 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: Database pool problem
parameter | nameuser/name ^ That worked! THANKS! Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: common dbcp question
Check out Preventing dB connection pool leaks at: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples -howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations HTH Yaakov Chaikin Software Engineer BAE SYSTEMS 301-838-6899 (phone) 301-838-6802 (fax) [EMAIL PROTECTED] -Original Message- From: Michal N Lusztig [mailto:[EMAIL PROTECTED] Sent: Friday, December 05, 2003 11:29 AM To: [EMAIL PROTECTED] Subject: common dbcp question I inherited a very badly writen Tomcat4.1 application, where the developer is not closing connections, relying rather on configuration parameters for the dbcp pool to take care of removing abandoned connections. Is such a strategy supposed to work ? If yes, what are the configuration parameters that would solve this problem ? Reading the documentation in DBCP dataSource, it looks like remove_abandoned is depracated ! Miki - 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]