DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context --- Additional Comments From [EMAIL PROTECTED] 2003-12-10 19:04 --- Greetings. It appears that a bug I had open has been marked as duplicate to this one which is marked as resolved/wontfix. My problem (and that of many others) is that if you define a JNDI resource in GlobalNamingResources or DefaultContext it is not available to web applications. If however you move the definition into a Context specific to the webapp it will work - however that breaks automatic deployment. Bug 23634 provides some more detail of the issue. What we need is a way to be able to deploy a web application using autodeploy and have a database JNDI configuration in the DefaultContext or the GlobalNamingResources. This was working just fine in 4.0.4, but it has not been working with the 4.1 versions that I have tested. I'm not actually sure if my bug is a duplicate of this one. I don't mind any resolution that means I can autodeploy again. PS : I have downloaded the code and spent a couple of hours trying to work this out myself, however I really need some some days to get the hang of the tomcat code to even really start to understand how everything hangs together. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context --- Additional Comments From [EMAIL PROTECTED] 2003-10-04 14:46 --- Please reopen this Bug. With the current implementation, a context scoped Realm makes no sense if it depends on a global resource. IMHO this a serious security issue because my user db for my context should NOT be globally visible. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context --- Additional Comments From [EMAIL PROTECTED] 2003-06-26 20:34 --- I too believe this should be re-opened and fixed. Our manifestation of the defect is a little different. Again, our webapps/appname.xml file defines both the JDBCRealm and our application datasource. Both authentication and application database access work initially - UNTIL things go inactive and the MySQL 8hr timeout occurs. The fix for this is supposed to be to add ?autoReconnect=true to the end of the JDBC URL - so we added this. However this does not fix the problem, the timeouts during authentication still occur. Moving the entire context (with both datasource and JDBCRealm within) to server.xml appears to fix the timeouts. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
Hello, You are receiving this message in follow-up to a report received by the EarthLink Abuse Department. You may have submitted this report to a number of addresses including but not limited to [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], or [EMAIL PROTECTED] Most reports of network abuse sent to this department fall into a few recognizable categories (spam, cracking, viruses, etc.). To increase efficiency, our filters scan incoming reports and attempt to determine the general type of issue being reported. We were not able to process your report because it does not appear to include the information needed for EarthLink Abuse to begin it's investigation. Evidence to Abuse should always include the IP address of the offending party and a valid timestamp, which includes time, date and timezone. To learn how to report spam so action is taken: http://spam.abuse.net/userhelp/howtocomplain.shtml To learn how to locate and interpret e-mail headers in your e-mail client: http://support.earthlink.net/support/TUTORIALS/email/mbx_interpret_headers.jsp Other useful lookup tools: http://samspade.org/ Once you have included the pertinent information needed, please resubmit your report, and include this autoresponse. Your report will then be reprocessed by our filters. However, you should expect to receive another auto-response after your resubmission is re-examined, but due to the large number of reports we receive, please understand that you may not receive a personal response. Our policies can be found at the following page: http://earthlink.net/about/policies/ Thanks, The EarthLink Abuse Staff DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context --- Additional Comments From [EMAIL PROTECTED] 2003-06-26 20:34 --- I too believe this should be re-opened and fixed. Our manifestation of the defect is a little different. Again, our webapps/appname.xml file defines both the JDBCRealm and our application datasource. Both authentication and application database access work initially - UNTIL things go inactive and the MySQL 8hr timeout occurs. The fix for this is supposed to be to add ?autoReconnect=true to the end of the JDBC URL - so we added this. However this does not fix the problem, the timeouts during authentication still occur. Moving the entire context (with both datasource and JDBCRealm within) to server.xml appears to fix the timeouts. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context [EMAIL PROTECTED] changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||WONTFIX --- Additional Comments From [EMAIL PROTECTED] 2003-06-12 08:00 --- It is an obvious nonsense that a realm (ie, an object scoped inside the container) depends on a webapp level object. I don't undestand how this could work, except by pure coincidence. With the data source realm (or any JNDI powered), you should use a global data source (and you can easily reuse it by linking to it from your contexts). Maybe it's not so easy to configure, but unfortunately I don't see any way to make it easier ... Please do not reopen this bug, it cannot be addressed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context --- Additional Comments From [EMAIL PROTECTED] 2003-06-12 13:27 --- I don't understand this WONTFIX status. You mean to tell me that two people running webapps on the same server can't use different databases for container managed security? Suppost Joe is running a shopping cart and I have a weblog. That doesn't mean we have the same users and therefore doesn't mean we should use the same JNDI to get a database connection. If you use the JDBCRealm you can specify all the parameters you want for container managed security, why can't you use an JNDI too? This makes no sense to me. p.s. How did I get it to run? Check out securityfilter.sourceforge.net, which allows pseudo-container managed security so the specification for the realm can be anywhere. securityfilter get's over some of the pitfalls of container managed security such as not being able to have a login on any page. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context --- Additional Comments From [EMAIL PROTECTED] 2003-06-12 14:01 --- There's nothing preventing you from defining more than one global datasource. I think you are not understanding the scoping of the JNDI context correctly, which is associated with the classloader context (if you're inside Catalina, you can access its internal JNDI context, containing the global resources; starting from the invocation of the Servlet wrapper, you access the per-webapp context, since you switched to the webapp classloading context). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context --- Additional Comments From [EMAIL PROTECTED] 2003-06-12 14:33 --- I also have to object to the dismissal of this issue. I understand the logic that a Realm can have wider scope (Host, Container) and therefore should not depend on an object of more narrow scope (Context) in those cases. But this does not mean that once a Realm is defined inside Context scope it shouldn't be allowed to access an object inside that same scope. I simply do not wish to expose that datasource to any other application than the one I need it for, and so I need to be able to define it inside the application Context. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context --- Additional Comments From [EMAIL PROTECTED] 2003-06-12 05:11 --- I would like to second this last suggestion. The bug became apparent to me when I was using securityfilter to complete container-like managed security. At first I thought the bug was in securityfilter, but after breaking it back down to container managed security, I still could not avoid an exception being thrown due to the JNDI context not being available. I could obtain a connection to the datasource using the test case in the realm docs for Tomcat, but not when trying to use container managed security. After copying DataSourceRealm to my own package, changing the lines recommended in the previous post and using the result, I could authenticate my user. This is clearly a huge bug rendering the DataSource realm impossible to use in a specified context. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context [EMAIL PROTECTED] changed: What|Removed |Added OS/Version|Windows NT/2K |All Platform|PC |All Version|4.1.18 |4.1.24 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context [EMAIL PROTECTED] changed: What|Removed |Added Status|CLOSED |REOPENED Resolution|FIXED | --- Additional Comments From [EMAIL PROTECTED] 2003-03-18 18:54 --- I've made my own realm which uses DataSource, based on the DataSourceRealm code, and dealt with the javax.naming.NameNotFoundException: Name java: is not bound in this Context problem. In addition to removing the connection check from the start method (as Glenn indicated), I also changed these lines in open(): StandardServer server = (StandardServer) ServerFactory.getServer(); Context context = server.getGlobalNamingContext(); to: Context context = new InitialContext(); I think this is what allowed me to put my realm and datasource within the context of my webapp, rather than in GlobalNamingResources. This seems like a worthwhile change to me. On the other hand, the InitialContext class is imported, but not used, in DataSourceRealm - so, maybe my way had problems in the past that were corrected with the getGlobalNamingContext() approach. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context [EMAIL PROTECTED] changed: What|Removed |Added Severity|Major |Normal --- Additional Comments From [EMAIL PROTECTED] 2003-02-04 12:43 --- Yes, it works now, but it's not good to have one DataSource for Realm authentication only, useless waste of resources I think, if users authentication occurs rarely, as in my case. I agree, this is a good workaround, but should I leave this bug REOPENED? (I think so.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context [EMAIL PROTECTED] changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2003-02-04 13:25 --- I have committed a patch to CVS which removes the validation of the db connection for the JNDI named DataSource from the start code for the realm so that the realm can start if the DataSource has not been setup yet. Bug fix will be available in the next Tomcat 4.1 release. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|CLOSED - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID | --- Additional Comments From [EMAIL PROTECTED] 2003-02-03 15:27 --- Sad but true, I've forced to reopen this bug. I tried all the possible variants in configuration files (config.xml , web.xml) with no luck. I have a servlet that looks up JNDI for DataSource object, and a DataSourceRealm relied on JNDI resource defined in config.xml . With one configuration, DataSource obtains successfully, but Realm doesn't work, throwing an exception; with another, DataSource throwing an exception, but database access works fine. How can I have it work both siumltaneuosly? Seems like nobody uses this technique for now because I asked similar questions several time in tomcat-dev list, and nobody helped to make it work both, but separately only. Exception is the same: javax.naming.NameNotFoundException: Name java:comp is not bound in this Context - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context --- Additional Comments From [EMAIL PROTECTED] 2003-02-03 15:30 --- Created an attachment (id=4686) Testcase: server.xml , web.xml , index.jsp test file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context --- Additional Comments From [EMAIL PROTECTED] 2003-02-03 22:05 --- Try configuring your JNDI Named DataSource which is used by the DataSourceRealm in the GlobalNamingResources section of your server.xml config. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context --- Additional Comments From [EMAIL PROTECTED] 2003-01-23 14:33 --- You are welcome to submit a patch to the documentation if you feel it could be improved. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 16316] - DataSourceRealm can not find JNDI name in context
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16316 DataSourceRealm can not find JNDI name in context --- Additional Comments From [EMAIL PROTECTED] 2003-01-22 09:19 --- Created an attachment (id=4510) Corresponding server.xml -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]