Re: javax.naming.NamingException: Cannot create resource instance
No mate that was the full stack trace. Thanks On Wed, Oct 1, 2008 at 7:02 PM, David Smith [EMAIL PROTECTED] wrote: Seems like such a generic error would have a root cause. Was there anything more to the stack trace? --David Ziggy O wrote: Hi, I am trying to connect to an oracle database but cant seem to get the jdbc connection to work. I am developing the application on a Windows desktop and transferring it onto a Unix box. When i test it on the Windows environmnet it does manage to connect but if i test it on unix then i get an error. My gut feeling is that the installation on the unix environment is missing a library but i cant figure out what it is. Here is how i am trying to get the jndi connection. [code] String fullname; if (jndiPrefix != null jndiPrefix.length() 0) fullname = jndiPrefix + datasource; else fullname = datasource; // JNDI Context ctx = null; DataSource ds = null; Connection conn = null; try { ctx = new InitialContext(); Context envContext = (Context)ctx.lookup(java:/comp/env); if (ctx != null) { ds = (DataSource)envContext.lookup(fullname); if (ds != null) { conn = ds.getConnection(); } } } [/code] And here is the Configuration. Context.xml (User and password modified) [code] Resource name=jdbc/theDb auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@localhost:1521:webdev username=webuser password=webuser maxActive=20 maxIdle=10 maxWait=-1/ [/code] web.xml [code] resource-ref descriptionOracle Datasource/description res-ref-namejdbc/theDb/res-ref-name res-typeoracle.jdbc.pool.OracleDataSource/res-type res-authContainer/res-auth /resource-ref [/code] And here is the stack trace of the error [code] javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:143) at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source) at org.apache.naming.NamingContext.lookup(NamingContext.java:793) at org.apache.naming.NamingContext.lookup(NamingContext.java:140) at org.apache.naming.NamingContext.lookup(NamingContext.java:781) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at com.bt.ccs21.util.DbConnection.getJNDIConnection(DbConnection.java:334) at com.bt.ccs21.util.DbConnection.getJNDIConnection(DbConnection.java:256) at com.bt.ccs21.util.DbConnection.getJRunConnection(DbConnection.java:286) at com.bt.ccs21.presentation.events.admin.LogonActionPost.preAction(LogonActionPost.java:118) at com.bt.ccs21.presentation.events.CCS21EventAction.execute(CCS21EventAction.java:29) at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58) at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at
Re: tomcat6 + proxy issues
Gabe Wong wrote: Jeff try: ProxyPass /app1 http://localhost:8080/app1 ProxyPassReverse /app1 http://localhost:8080/app1 and better yet if your have mod_proxy_ajp: ProxyPass /app1 ajp://localhost:8009/app1 ProxyPassReverse /app1 ajp://localhost:8009/app1 Actually, mod_proxy_http is usually a better choice than mod_proxy_ajp Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Servlet Bouncy Castle Problem
Hello Friends! I have a debugging problem here that I hope the gurus here can help me figure out. I'm trying to do RSA public key encryption in a servlet that I'm developing inside Netbeans 6.1. I'm using the Bouncy Castle (BC) crypto package. When I build the servlet, there are no errors. Then I run it, and Netbeans invokes the Tomcat 6.0.16 container in it and waits for a client to conect. But when I connect to the servlet from a client, it crashes when it executes this line in my code: private RSAPrivateCrtKeyParameters RSAprivKey = null; with this message in the Tomcat log output: SEVERE: Allocate exception for servlet Fortune java.lang.NoClassDefFoundError: Lorg/bouncycastle/crypto/params/RSAPrivateCrtKeyParameters; and prints this stack trace: at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2291) at java.lang.Class.getDeclaredFields(Class.java:1743) at org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(DefaultAnnotationProcessor.java:131) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1108) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:806) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Interestngly, the same RSA public encryption code with Bouncy Castle library works flawlessly when I develop it in Netbeans IDE and run it as a java application (not servlet). In servlet environment, it fails. Yes, I added cldc_classes.zip class library file from Bouncy Castle to compile the code. Oh, and the client reports the following error when trying to connect to the servlet: The server encountered and internal error that prevented it from fulfilling this request. ServletException: Error instantiating servlet class fortune.Fortune. What am I not doing right? Has anyone else seen something similar and what's the getaround/workaround? Thanks, Jeng Yu - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Servlet Bouncy Castle Problem
Jeng Yu wrote: Interestngly, the same RSA public encryption code with Bouncy Castle library works flawlessly when I develop it in Netbeans IDE and run it as a java application (not servlet). In servlet environment, it fails. Yes, I added cldc_classes.zip class library file from Bouncy Castle to compile the code. Tomcat only loads '.jar' files. '.zip' files will be ignored. Rename cldc_classes.zip to cdlc_classes.jar and you should be good to go. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat6 + proxy issues
Mark Thomas: Actually, mod_proxy_http is usually a better choice than mod_proxy_ajp Could you please explain a little further? Since at one site I'm using mod_proxy_ajp I'm interested in what the advantage of switching to mod_proxy_http might be. Regards mks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat6 + proxy issues
Markus Schönhaber wrote: Mark Thomas: Actually, mod_proxy_http is usually a better choice than mod_proxy_ajp Could you please explain a little further? Since at one site I'm using mod_proxy_ajp I'm interested in what the advantage of switching to mod_proxy_http might be. Generally, and YMMV, mod_proxy_http is more stable. This is only a generalisation though. I have used mod_proxy_ajp in the past without any problems. Other reasons include: - you can use https for encryption - it is easier (at least I find it easier) to read http in wireshark than ajp Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK and IIS - troubles?
Hi Rainer, Rainer Jung-3 wrote: Yes it does limit it that way. But when a timeout fires in mod_jk, Tomcat is not aware of it and will still proceed working on the request. Your web server though receives new rquests and forwards them, so Tomcat could run out of memory. If there was a way to set the maximum request processing time on Tomcat.. you can do it in ASP.. :-) Rainer Jung-3 wrote: Are you saying, that you can't get any content from IIS, even not content, that does not involve Tomcat to be returned? Exactly, the whole site hangs. Everything stops working, with no exceptions. Local static and dynamic content, all remote Tomcat workers, other remote stuff in php we have, everything. No error in the event log, the IIS processes just stay there idle. Rainer Jung-3 wrote: If so, what is your connection pool size? The default is 250, which is quite high. I did not go too far, it was the default, after some time I set it to 300 but this did not change anything. Rainer Jung-3 wrote: Thread Dumps only halt the JVM for a couple of milliseconds. No need to be afraid of them, even in serious production. Don't mix the notions of thread dump and memory dump though. The latter takes quite long, but is not what you need here. Yes, but I am just afraid of my site hanging as I was explaining above. :-) Thank you, br1. -- View this message in context: http://www.nabble.com/JK-and-IIS---troubles--tp19750760p19775890.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat getting insufficient POST data
Hello, Yes - I'll package 6.0.18 this afternoon and test it this evening. Initial tests look positive - will do more extensive tests this morning. Thanks very much for the suggestion. S. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat6 + proxy issues
Mark Thomas: Generally, and YMMV, mod_proxy_http is more stable. This is only a generalisation though. I have used mod_proxy_ajp in the past without any problems. Ah, OK. Since the mod_proxy_ajp setup I use is extremely simple and for a low-volume site, I don't expect any problems. Other reasons include: - you can use https for encryption - it is easier (at least I find it easier) to read http in wireshark than ajp Good points. Something to keep in mind. Thanks mks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK and IIS - troubles?
br1 wrote: Rainer Jung-3 wrote: If so, what is your connection pool size? The default is 250, which is quite high. I did not go too far, it was the default, after some time I set it to 300 but this did not change anything. That might be the reason for trouble. If things start to get slow, the web server gets filled by all thenew requests still coming in without answering fast enough the existing ones. People often try to work around this by increasing the number of threads available for processing the requests, but if the backend is stuck or too slow, this will not help and instead also trash the frontend. You should measure how many connections you need during peak hours without performance problems, and then add some percentage depending on your growth rate etc. Finally you need to make sure, that your web server itself uses at least as many threads, as you configured as the pool size. For Apache with mod_jk we can automatically detect the number of threads and by default size our pool to the same number. For IIS you have to size the pool yourself (or live with the big default of 250). Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Fwd: CFP open for ApacheCon Europe 2009]
The Call for Papers for ApacheCon Europe 2009, to be held in Amsterdam, from 23rd to 27th March, is now open! Submit your proposals at http://eu.apachecon.com/c/aceu2009/cfp/ before 24th October. Remember that early bird prices for ApacheCon US 2008, to be held in New Orleans, from 3rd to 7th November, will go up this Friday, at midnight Eastern time! Sponsorship opportunities for ApacheCon US 2008 and ApacheCon EU 2009 are still available. If you or your company are interested in becoming a sponsor, please contact Delia Frees at [EMAIL PROTECTED] for details. *** If you want all the details: ApacheCon Europe 2009 - Leading the Wave of Open Source Amsterdam, The Netherlands 23rd to 27th March, 2009 Call for Papers Opens for ApacheCon Europe 2009 The Apache Software Foundation (ASF) invites submissions to its official conference, ApacheCon Europe 2009. To be held 23rd to 27th March, 2009 at the Mövenpick Hotel Amsterdam City Centre, ApacheCon serves as a forum for showcasing the ASF's latest developments, including its projects, membership, and community. ApacheCon offers unparalleled educational opportunities, with dedicated presentations, hands-on trainings, and sessions that address core technology, development, business/marketing, and licensing issues in Open Source. ApacheCon's wide range of activities are designed to promote the exchange of ideas amongst ASF Members, innovators, developers, vendors, and users interested in the future of Open Source technology. The conference program includes competitively selected presentations, trainings/workshops, and a small number of invited speakers. All sessions undergo a peer review process by the ApacheCon Conference Planning team. The following information provides presentation category descriptions, and information about how to submit your proposal. Conference Themes and Topics APACHECON 2009 - LEADING THE WAVE OF OPEN SOURCE Building on the success of the last two years, we are excited to return to Amsterdam in 2009. We'll be continuing to offer our very popular two-day trainings, including certifications of completion for those who fulfill all the requirements of these trainings. The ASF comprises some of the most active and recognized developers in the Open Source community. By bringing together the pioneers, developers, and users of flagship Open Source technologies, ApacheCon provides an influential platform for dialogue, between the speaker and the audience, between project contributors and the community at large, traversing a wide range of ideas, expertise, and personalities. ApacheCon welcomes submissions from like-minded delegates across many fields, geographic locations, and areas of development. The breadth and loosely-structured nature of the Apache community lends itself to conference content that is also somewhat loosely-structured. Common themes of interest address groundbreaking technologies and emerging trends, successful practices (from development to deployment), and lessons learned (tips, tools, and tricks). In addition to technical content, ApacheCon invites Business Track submissions that address Open Source business, marketing, and legal/licensing issues. Topics appropriate for submission to this conference are manifold, and may include but are not restricted to: - Apache HTTP server topics such as installation, configuration, and migration - ASF-wide projects such as Lucene, SpamAssassin, Jackrabbit, and Maven - Scripting languages and dynamic content such as Java, Perl, Python, Ruby, XSL, and PHP - Security and e-commerce - Performance tuning, load balancing and high availability - New technologies and broader initiatives such as Web Services and Web 2.0 - ASF-Incubated projects such as Sling, UIMA, and Shindig Submission Guidelines Submissions must include - Title - Speaker name, with affiliation and email address - Speaker bio (100 words or less) - Short description (50 words or less) - Full description including abstract and objectives (200 words or less) - Expertise level (beginner to advanced) - Format and duration (trainings vs. general presentation; half-, full- or two-day workshop, etc.) - Intended audience and maximum number of participants (trainings only) - Background knowledge expected of the participants (trainings only) Types of Presentations - Trainings/Workshops - General Sessions - Case Studies/Industry Profiles - Invited Keynotes/Panels/Speakers - Corporate Showcases Demonstrations BoF sessions and Fast Feather Track talks will be selected separately Pre Conference Trainings/Workshops Held on the first and second day of the conference – 2008-03-23 and 2008-03-24, Trainings require a registration fee beyond the regular conference fee. Proposals may be submitted for half-day (3 hours), full-day (6 hours), or two-day (12 hours) training sessions, aimed at providing in-depth, hands-on development experience or related continuing education. Training submissions are welcome at beginner,
Re: AW: [TOMCAT] Internal Tomcat Server error (HTTP Status 500): NoClassDefFound
Hi Steffen and all, thanks for the suggestion. 1. How do I do that? 2. Why does it work for other projects without the synchronization? Thanks. Regards, JON HAITZ Steffen Heil escribió: Hi The method yielding the problem is the following one: private static PageLifecycleFactory getDefaultInstance() { if (defaultInstance == null) { defaultInstance = new DefaultStrutsPageLifecycleFactory(); } return defaultInstance; } Make that function *synchronized* ! Regards, Steffen -- Jon Haitz Legarreta Gorroño Laguntzaile zientifikoa / Colaborador científico / Scientific collaborator VICOMTech - Visual Interaction and Communication Technologies Center Mikeletegi Pasealekua, 57 - Parque Tecnológico E-20009 Donostia - San Sebastián, Spain Tel: +[34] 943 30 92 30 Fax: +[34] 943 30 93 93 e-mail: [EMAIL PROTECTED] http://www.vicomtech.org *** member of INI-GraphicsNet http://www.inigraphics.net *** member of IK4 Research Alliance http://www.ik4.es - VICOMTech is an ISO 9001:2000 certified institute - - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: application deployment issue, Tomcat 5.5
Considering my own occasional sniping at Chuck here, it kills me to have to say this, but I don't want anyone to look falsely in the wrong direction maybe. One particularity of this Tomcat 5.5 on platform B, compared to the others, is that it was set up via the standard Linux Debian package mechanism, which kinda puts links all over the place. The error below seems to indicate an error even opening the WAR file though, so I don't know if that can cause the problem we see. java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.init(ZipFile.java:203) I'm not Chuck, and i'm not a tomcat expert, but according to your server configuration and as far as i understand these 3 lines from your log, java is looking to some native code to unzip the WAR file, which is huffman's compressed (yes, war files can be unzipped). I had recently to configure a Debian (etch) production server and i had to manually install the zip and unzip debian package (only gunzip was installed out of the box). (But anyway i choosed to install tomcat from the official apache tomcat server, instead of the Debian package - no time to check and compare their modifications to the 100% original binary distribution.) Regards, -- Albrecht ANDRZEJEWSKI Créateur - Incubateur Technologique SITE-EERIE - Parc scientifique G. Besse -- http://haveacafe.wordpress.com Ce message a ete envoye par le serveur IMP de l'EMA. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat outputs php to stderr
I recall seeing a config value in php that lets you dump the output to the console instead of the rendered page. not sure if this is valid if you run php under tomcat :P -Original Message- From: Serge Fonville Sent: 30/09/2008 19:08:21 To: Tomcat Users List Subject: Re: Tomcat outputs php to stderr Thank you so far, I will definitely look into Quercus. Still, I would like to understand why output is sent to stderr and if it can be solved (I recall running PHP and tomcat in the past) without problems On Tue, Sep 30, 2008 at 12:04 AM, Johnny Kewl [EMAIL PROTECTED] wrote: - Original Message - From: Serge Fonville [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Monday, September 29, 2008 6:00 PM Subject: Tomcat outputs php to stderr Hi, I am developing a ticket system which should use servlets to connect to the various resources. Currently I am a php developer and busy to learn JSP/TLD/Servlets I installed Tomcat 6.0.18 with PHP 5.2.6 on Windows Vista Business (the production server will be running either Gentoo or CentOS). Installation went fine, no errors. just one thing I couldn't resolve. All output generated by php goes directly to the stderr log file instead of the browser (JSP and servlets work fine) I used http://blog.taragana.com/index.php/archive/running-php-5x-on-windows-using-tomcat-4x-or-5x/ and http://wiki.apache.org/tomcat/UsingPhp to configure the two. I started reading about listeners, log4j and servlet mappings. This seemed over the top to me, so I decided to just ask the question here. Any help is greatly appreciated Dont do it this way... run PHP on Apache httpd... its the PHP container... and do your servlet stuff in TC... its a good servlet container. Then put Apache httpd in front of TC... read up on the JK connector... and then to the browser its *one system* Thats how they do it ;) If you insist on wanting the Java PHP layer... Resin is probably the best... they not calling into a PHP engine, they rewrote it in Java... whether they up to date with all modules is the question? Anyway... just trying to show you that you dont have to change a thing... join em ;) Have fun.. --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Book project on SF.net
Hello all, Does anyone know about the current status of the Tomcat Book project on SF.net ? http://tomcatbook.sourceforge.net/en/index.shtml It looks stone dead forever and that's a shame since firstly, I discovered it today :-) but, moreover because it's a very good addition to the official doc on Tomcat website. Could anyone please comment about its quality : are there a lot of errors and so on ? Cheers, Pierre
Re: javax.naming.NamingException: Cannot create resource instance
Ok... 1) I don't see a tomcat version, could you post that? 2) Are you sure the tomcat version on the production environment the same as your dev system? 3) This is probably not causing the immediate problem, but res-type ... /res-type in your web.xml should be javax.sql.Datasource, not oracle.jdbc.pool.OracleDataSource. --David Ziggy O wrote: No mate that was the full stack trace. Thanks On Wed, Oct 1, 2008 at 7:02 PM, David Smith [EMAIL PROTECTED] wrote: Seems like such a generic error would have a root cause. Was there anything more to the stack trace? --David Ziggy O wrote: Hi, I am trying to connect to an oracle database but cant seem to get the jdbc connection to work. I am developing the application on a Windows desktop and transferring it onto a Unix box. When i test it on the Windows environmnet it does manage to connect but if i test it on unix then i get an error. My gut feeling is that the installation on the unix environment is missing a library but i cant figure out what it is. Here is how i am trying to get the jndi connection. [code] String fullname; if (jndiPrefix != null jndiPrefix.length() 0) fullname = jndiPrefix + datasource; else fullname = datasource; // JNDI Context ctx = null; DataSource ds = null; Connection conn = null; try { ctx = new InitialContext(); Context envContext = (Context)ctx.lookup(java:/comp/env); if (ctx != null) { ds = (DataSource)envContext.lookup(fullname); if (ds != null) { conn = ds.getConnection(); } } } [/code] And here is the Configuration. Context.xml (User and password modified) [code] Resource name=jdbc/theDb auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@localhost:1521:webdev username=webuser password=webuser maxActive=20 maxIdle=10 maxWait=-1/ [/code] web.xml [code] resource-ref descriptionOracle Datasource/description res-ref-namejdbc/theDb/res-ref-name res-typeoracle.jdbc.pool.OracleDataSource/res-type res-authContainer/res-auth /resource-ref [/code] And here is the stack trace of the error [code] javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:143) at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source) at org.apache.naming.NamingContext.lookup(NamingContext.java:793) at org.apache.naming.NamingContext.lookup(NamingContext.java:140) at org.apache.naming.NamingContext.lookup(NamingContext.java:781) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at com.bt.ccs21.util.DbConnection.getJNDIConnection(DbConnection.java:334) at com.bt.ccs21.util.DbConnection.getJNDIConnection(DbConnection.java:256) at com.bt.ccs21.util.DbConnection.getJRunConnection(DbConnection.java:286) at com.bt.ccs21.presentation.events.admin.LogonActionPost.preAction(LogonActionPost.java:118) at com.bt.ccs21.presentation.events.CCS21EventAction.execute(CCS21EventAction.java:29) at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58) at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at
Re: javax.naming.NamingException: Cannot create resource instance
Hi, The tomcat version on my Desktop is 5.5.27 and the Tomcat version on the Unix environment is 5.5.23. Could the above minor version difference cause it? One thing i have noticed is that if i take the /META-INF/Context.xml file and copy it into $CATALINA_HOME/conf/Catalina/localhost/testapp.xml it does work. i.e. why does it require the context file in that directory and why does it have to be renamed to my applications context. On the Windows environment i dont have to rename and copy the context file to $CATALINA_HOME/conf/Catalina/localhost Thanks On Thu, Oct 2, 2008 at 12:55 PM, David Smith [EMAIL PROTECTED] wrote: Ok... 1) I don't see a tomcat version, could you post that? 2) Are you sure the tomcat version on the production environment the same as your dev system? 3) This is probably not causing the immediate problem, but res-type ... /res-type in your web.xml should be javax.sql.Datasource, not oracle.jdbc.pool.OracleDataSource. --David Ziggy O wrote: No mate that was the full stack trace. Thanks On Wed, Oct 1, 2008 at 7:02 PM, David Smith [EMAIL PROTECTED] wrote: Seems like such a generic error would have a root cause. Was there anything more to the stack trace? --David Ziggy O wrote: Hi, I am trying to connect to an oracle database but cant seem to get the jdbc connection to work. I am developing the application on a Windows desktop and transferring it onto a Unix box. When i test it on the Windows environmnet it does manage to connect but if i test it on unix then i get an error. My gut feeling is that the installation on the unix environment is missing a library but i cant figure out what it is. Here is how i am trying to get the jndi connection. [code] String fullname; if (jndiPrefix != null jndiPrefix.length() 0) fullname = jndiPrefix + datasource; else fullname = datasource; // JNDI Context ctx = null; DataSource ds = null; Connection conn = null; try { ctx = new InitialContext(); Context envContext = (Context)ctx.lookup(java:/comp/env); if (ctx != null) { ds = (DataSource)envContext.lookup(fullname); if (ds != null) { conn = ds.getConnection(); } } } [/code] And here is the Configuration. Context.xml (User and password modified) [code] Resource name=jdbc/theDb auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@localhost:1521:webdev username=webuser password=webuser maxActive=20 maxIdle=10 maxWait=-1/ [/code] web.xml [code] resource-ref descriptionOracle Datasource/description res-ref-namejdbc/theDb/res-ref-name res-typeoracle.jdbc.pool.OracleDataSource/res-type res-authContainer/res-auth /resource-ref [/code] And here is the stack trace of the error [code] javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:143) at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source) at org.apache.naming.NamingContext.lookup(NamingContext.java:793) at org.apache.naming.NamingContext.lookup(NamingContext.java:140) at org.apache.naming.NamingContext.lookup(NamingContext.java:781) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at com.bt.ccs21.util.DbConnection.getJNDIConnection(DbConnection.java:334) at com.bt.ccs21.util.DbConnection.getJNDIConnection(DbConnection.java:256) at com.bt.ccs21.util.DbConnection.getJRunConnection(DbConnection.java:286) at com.bt.ccs21.presentation.events.admin.LogonActionPost.preAction(LogonActionPost.java:118) at com.bt.ccs21.presentation.events.CCS21EventAction.execute(CCS21EventAction.java:29) at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58) at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at
Re: application deployment issue, Tomcat 5.5
albrecht andrzejewski wrote: [...] Thanks for the various answers. But apparently the problem was that this was missing : grant codeBase file:${catalina.home}/bin/tomcat-juli.jar { [ .. parts omitted ..] permission java.io.FilePermission ${catalina.base}${file.separator}webapps${file.separator}/webapps/miramanager${file.separator}WEB-INF${file.separator}classes${file.separator}logging.properties, read; }; which, had I looked better at the following logfile messages, I guess I could have found out by myself. I am still a bit puzzled by the sequence of events below though. First it writes that the WAR file is invalid or unreadable, then 10 seconds later it mentions a logging properties permission problem. We did restart Tomcat a couple of times trying to find out more, but it seems improbable that we did this just in that 10-second interval. Another funny bit is that it mentions the permissions problem with a file WEB-INF/classes/logging.properties, which in fact is not in the WAR file. Oh well, it seems to work now, so I'll leave it at that. (Note : below I did cut off parts of some verbous loglines, but I did not remove any message). 01-Oct-2008 14:09:17 org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Invalid or unreadable WAR file : error in opening zip file at org.apache.naming.resources.WARDirContext.setDocBase(WARDirContext.java:134) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3848) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4019) [... portion removed ...] 01-Oct-2008 14:09:17 org.apache.catalina.core.StandardContext start SEVERE: Error in resourceStart() 01-Oct-2008 14:09:17 org.apache.catalina.core.StandardContext start SEVERE: Error getConfigured 01-Oct-2008 14:09:17 org.apache.catalina.core.StandardContext start SEVERE: Context [/miramanager] startup failed due to previous errors 01-Oct-2008 14:09:17 org.apache.catalina.core.StandardContext stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/miramanager] has not been started 01-Oct-2008 14:09:27 org.apache.catalina.startup.HostConfig checkResources INFO: Undeploying context [/miramanager] 01-Oct-2008 14:09:27 org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive miramanager.war 01-Oct-2008 14:09:28 org.apache.catalina.startup.HostConfig deployWAR SEVERE: Error deploying web application archive miramanager.war org.apache.commons.logging.LogConfigurationException: java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5.5/webapps/miramanager/WEB-INF/classes/logging.properties read) (Caused by java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5.5/webapps/miramanager/WEB-INF/classes/logging.properties read)) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:538) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235) at [... portion removed ...] Caused by: java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5.5/webapps/miramanager/WEB-INF/classes/logging.properties read) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264) at [.. more stuff removed ...] org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529) ... 21 more - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Seek help for javax.servlet.ServletException: Java heap space
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Subject: RE: Seek help for javax.servlet.ServletException: Java heap space Why is it usually better to set -Xms and -Xmx to the same value ? It avoids the overhead of expansion and contraction of the heap, including the associated bookkeeping. In this age of inexpensive RAM, there's no point in trying to be conservative. Also there are some weird problems in running tomcat 6.0.18 with Jconsole remotely . Only due to firewalls blocking the secondary JMX port. You can run JConsole locally on the target machine and tunnel the output to your display if using Linux. (For Windows, use Terminal Services to run JConsole locally.) There's some overhead incurred on the target machine, but when analyzing heap issues that's not a problem. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with JNDI Resources JavaMail Sessions
Hey Team, I have some problems with the example of JNDI Resources JavaMail Sessions. I get the error: The constructor MimeMessage(Session) is undefined A extract from the HOW-TO page: Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); Session session = (Session) envCtx.lookup(mail/Session); Message message = new MimeMessage(session); message.setFrom(new InternetAddress(request.getParameter(from)); InternetAddress to[] = new InternetAddress[1]; to[0] = new InternetAddress(request.getParameter(to)); message.setRecipients(Message.RecipientType.TO, to); message.setSubject(request.getParameter(subject)); message.setContent(request.getParameter(content), text/plain); Transport.send(message); I develop with Eclipse / Tomcat 6.0 and created a new Web Application. At first I modify my web descriptor (/WebContent/WEB-INF/web.xml) and include the resource description. In the next step I downloaded the JavaMail API, included to the Tomcat-Library and configure the resource factory (Tomcat/lib/context.xml). Eclipse find the JavaMail API but it doesn't find the constructor in this API. I hope you can help me. This is a new section for me. Best regards, Sebastian
Re: javax.naming.NamingException: Cannot create resource instance
A bit more info which i think might be relevant. When i run it on my desktop i ran it directly from within Netbeans but when i run it on the Unix server i export the project as a war file (within netbeans) and copy it into the webapps directory on the Unix environment. Is it possible that netbeans is including some libraries that are not available on the Unix environment when i run it on the desktop? On Thu, Oct 2, 2008 at 1:48 PM, Ziggy O [EMAIL PROTECTED] wrote: Hi, The tomcat version on my Desktop is 5.5.27 and the Tomcat version on the Unix environment is 5.5.23. Could the above minor version difference cause it? One thing i have noticed is that if i take the /META-INF/Context.xml file and copy it into $CATALINA_HOME/conf/Catalina/localhost/testapp.xml it does work. i.e. why does it require the context file in that directory and why does it have to be renamed to my applications context. On the Windows environment i dont have to rename and copy the context file to $CATALINA_HOME/conf/Catalina/localhost Thanks On Thu, Oct 2, 2008 at 12:55 PM, David Smith [EMAIL PROTECTED] wrote: Ok... 1) I don't see a tomcat version, could you post that? 2) Are you sure the tomcat version on the production environment the same as your dev system? 3) This is probably not causing the immediate problem, but res-type ... /res-type in your web.xml should be javax.sql.Datasource, not oracle.jdbc.pool.OracleDataSource. --David Ziggy O wrote: No mate that was the full stack trace. Thanks On Wed, Oct 1, 2008 at 7:02 PM, David Smith [EMAIL PROTECTED] wrote: Seems like such a generic error would have a root cause. Was there anything more to the stack trace? --David Ziggy O wrote: Hi, I am trying to connect to an oracle database but cant seem to get the jdbc connection to work. I am developing the application on a Windows desktop and transferring it onto a Unix box. When i test it on the Windows environmnet it does manage to connect but if i test it on unix then i get an error. My gut feeling is that the installation on the unix environment is missing a library but i cant figure out what it is. Here is how i am trying to get the jndi connection. [code] String fullname; if (jndiPrefix != null jndiPrefix.length() 0) fullname = jndiPrefix + datasource; else fullname = datasource; // JNDI Context ctx = null; DataSource ds = null; Connection conn = null; try { ctx = new InitialContext(); Context envContext = (Context)ctx.lookup(java:/comp/env); if (ctx != null) { ds = (DataSource)envContext.lookup(fullname); if (ds != null) { conn = ds.getConnection(); } } } [/code] And here is the Configuration. Context.xml (User and password modified) [code] Resource name=jdbc/theDb auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@localhost:1521:webdev username=webuser password=webuser maxActive=20 maxIdle=10 maxWait=-1/ [/code] web.xml [code] resource-ref descriptionOracle Datasource/description res-ref-namejdbc/theDb/res-ref-name res-typeoracle.jdbc.pool.OracleDataSource/res-type res-authContainer/res-auth /resource-ref [/code] And here is the stack trace of the error [code] javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:143) at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source) at org.apache.naming.NamingContext.lookup(NamingContext.java:793) at org.apache.naming.NamingContext.lookup(NamingContext.java:140) at org.apache.naming.NamingContext.lookup(NamingContext.java:781) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at com.bt.ccs21.util.DbConnection.getJNDIConnection(DbConnection.java:334) at com.bt.ccs21.util.DbConnection.getJNDIConnection(DbConnection.java:256) at com.bt.ccs21.util.DbConnection.getJRunConnection(DbConnection.java:286) at com.bt.ccs21.presentation.events.admin.LogonActionPost.preAction(LogonActionPost.java:118) at com.bt.ccs21.presentation.events.CCS21EventAction.execute(CCS21EventAction.java:29) at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58) at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at
URL and mod_jk
Hi guys, in my project, I very often use absolute url. They have a form like: http://domain/foo/bar/resources/org.apache.wicket.Application//path/to/my/file.png I recently installed Apache and mod_jk. Are this kind of url valid to be served through mod_jk? Because it explicitly reference wicket (web framwork), and I've guesssed that the request will be forwarded from mod_jk to tomcat, and then to wicket... How can I see what is being served by mod_jk and what by tomcat? Any mod_jk log somewhere? thank you - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: application deployment issue, Tomcat 5.5
From: albrecht andrzejewski [mailto:[EMAIL PROTECTED] Subject: Re: application deployment issue, Tomcat 5.5 java is looking to some native code to unzip the WAR file, which is huffman's compressed (yes, war files can be unzipped). The native code being used to do the unzipping is packaged with the JRE in libzip.so or zip.dll (it's actually a slightly out of date version of zlib); it's used for every jar/war/ear/rar, etc., file, as well as .zip files. The stack trace shows the code being exercised, not being looked for. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: application deployment issue, Tomcat 5.5
From: André Warnier [mailto:[EMAIL PROTECTED] Subject: Re: application deployment issue, Tomcat 5.5 I am still a bit puzzled by the sequence of events below though. First it writes that the WAR file is invalid or unreadable, then 10 seconds later it mentions a logging properties permission problem. Obviously, Tomcat is running at faster-than-light speed, so cause and effect are no longer ordered... Seriously, I've never figured out why log entries sometimes seem to be displayed non-sequentially and occasionally with significant time gaps between ones that must have occurred nearly simultaneously. Another funny bit is that it mentions the permissions problem with a file WEB-INF/classes/logging.properties, which in fact is not in the WAR file. Even if it's not there, JULI has to check for it, in case it contains settings that override the global ones. Good catch on finding the real cause. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: javax.naming.NamingException: Cannot create resource instance
From: Ziggy O [mailto:[EMAIL PROTECTED] Subject: Re: javax.naming.NamingException: Cannot create resource instance One thing i have noticed is that if i take the /META-INF/Context.xml file and copy it into $CATALINA_HOME/conf/Catalina/localhost/testapp.xml it does work. If the file is really named Context.xml it won't work; it must be context.xml (case matters). Also, if you already have a conf/Catalina/localhost/testapp.xml file lying around from a previous deployment, that will override anything in the webapp's META-INF/context.xml file. A proper undeployment of a webapp will delete its entry in the conf/Catalina/[host] directory. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Servlet Bouncy Castle Problem
- Original Message - From: Jeng Yu [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Thursday, October 02, 2008 10:19 AM Subject: Tomcat Servlet Bouncy Castle Problem Hello Friends! I have a debugging problem here that I hope the gurus here can help me figure out. I'm trying to do RSA public key encryption in a servlet that I'm developing inside Netbeans 6.1. I'm using the Bouncy Castle (BC) crypto package. When I build the servlet, there are no errors. Then I run it, and Netbeans invokes the Tomcat 6.0.16 container in it and waits for a client to conect. But when I connect to the servlet from a client, it crashes when it executes this line in my code: private RSAPrivateCrtKeyParameters RSAprivKey = null; with this message in the Tomcat log output: SEVERE: Allocate exception for servlet Fortune java.lang.NoClassDefFoundError: Lorg/bouncycastle/crypto/params/RSAPrivateCrtKeyParameters; Interestngly, the same RSA public encryption code with Bouncy Castle library works flawlessly when I develop it in Netbeans IDE and run it as a java application (not servlet). In servlet environment, it fails. Yes, I added cldc_classes.zip class library file from Bouncy Castle to compile the code. Oh, and the client reports the following error when trying to connect to the servlet: The server encountered and internal error that prevented it from fulfilling this request. ServletException: Error instantiating servlet class fortune.Fortune. What am I not doing right? Has anyone else seen something similar and what's the getaround/workaround? Thanks, Jeng Yu Jeng we use BC in servlets and have no problems, but its a long time since I was into it... I think you need to get into their mailing lists or what ever they have I cant remember using the cldc_classes.zip isnt that for JavaME only? ... because it doesnt have BIGINT or something... make sure you not screwing Java now. If your BC is in the class path, take it out of there and try get it going in your test apps... If in doubt... use the source code for BC... so A you can remove the huge amount of stuff you wont need... and B if I remember correctly we spent a lot of time making it independent of JCE which seems to change every java version... Only place those libs must be is in your web app... Anyway its not TC... bouncy castle is one complex piece of code with a million options and forks ... make sure its not in the classpath... Good luck --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Problem with JNDI Resources JavaMail Sessions
Hey guys, I found the solution. I had import the wrong Session-class. So long, Sebastian Hey Team, I have some problems with the example of JNDI Resources JavaMail Sessions. I get the error: The constructor MimeMessage(Session) is undefined A extract from the HOW-TO page: Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); Session session = (Session) envCtx.lookup(mail/Session); Message message = new MimeMessage(session); message.setFrom(new InternetAddress(request.getParameter(from)); InternetAddress to[] = new InternetAddress[1]; to[0] = new InternetAddress(request.getParameter(to)); message.setRecipients(Message.RecipientType.TO, to); message.setSubject(request.getParameter(subject)); message.setContent(request.getParameter(content), text/plain); Transport.send(message); I develop with Eclipse / Tomcat 6.0 and created a new Web Application. At first I modify my web descriptor (/WebContent/WEB-INF/web.xml) and include the resource description. In the next step I downloaded the JavaMail API, included to the Tomcat-Library and configure the resource factory (Tomcat/lib/context.xml). Eclipse find the JavaMail API but it doesn't find the constructor in this API. I hope you can help me. This is a new section for me. Best regards, Sebastian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL and mod_jk
Piller Sébastien wrote: Hi guys, in my project, I very often use absolute url. They have a form like: http://domain/foo/bar/resources/org.apache.wicket.Application//path/to/my/file.png I recently installed Apache and mod_jk. Are this kind of url valid to be served through mod_jk? Because it explicitly reference wicket (web framwork), and I've guesssed that the request will be forwarded from mod_jk to tomcat, and then to wicket... How can I see what is being served by mod_jk and what by tomcat? Any mod_jk log somewhere? See: JkLogFile Just to see what serves what: configure an access log for httpd and for Tomcat. If you want to get all the details on a test system: JkLogLevel debug. Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat6 + proxy issues
I would seldom dare to differ with Mark with regards to Tomcat issues but in this case, I prefer mod_AJP for its more predictive behavior compared to mod_HTTP. Tomcat AJP's connector simulates almost the same behavior as Tomcat's HTTP connector. So the all important request headers will look the same. Some of the differences in behavior when you use Tomcat HTTP as a proxy instead of AJP: 1)remoteAddr resolves to whatever host Apache connects from to Tomcat. So you have to retrieve the actual remote address from the raw headers. 2)scheme will always be HTTP 3)serverPort will always be the Tomcat HTTP port (so you would need to edit server.xml and add the proxyport value) 4)many applications construct links from the above headers mentioned and you can see the problems the inconsistent behavior creates. Unless mod_proxy_ajp is far inferior to mod_proxy_http in terms of stability (which has not been noticeable from my experience), I would choose mod_proxy_ajp for the consistent behavior it provides. Mark Thomas wrote: Markus Schönhaber wrote: Mark Thomas: Actually, mod_proxy_http is usually a better choice than mod_proxy_ajp Could you please explain a little further? Since at one site I'm using mod_proxy_ajp I'm interested in what the advantage of switching to mod_proxy_http might be. Generally, and YMMV, mod_proxy_http is more stable. This is only a generalisation though. I have used mod_proxy_ajp in the past without any problems. Other reasons include: - you can use https for encryption - it is easier (at least I find it easier) to read http in wireshark than ajp Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Regards Gabe Wong NGASI AppServer Manager JAVA AUTOMATION and SaaS Enablement for Cloud Computing http://www.ngasi.com NEW! FREE Developer account for Hosted version on Amazon EC2 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.x - Logging Issues
Hi, We use a proprietary application in work with Tomcat. The webapp is basically a frontend to a process that runs in the background separate to Tomcat. It uses log4j to produce its own log files, which are stored in it's own directory again separate of Tomcat. This setup worked ok in Tomcat 4.1.x, but I decided to upgrade to a newer version (with support for JDK 1.4.2). Anyway, the problem comes when I try to log in to the webapp, I get an Exception with the root cause being: java.lang.NoClassDefFoundError: org/apache/log4j/Priority The webapp includes the log4j.jar file in its WEB-INF/lib directory, however it seems Tomcat isn't loading it (it does not have a log4j.properties or log4j.xml file). After some googling, I found quite a lot of information on how Tomcat 5.5 moved to a different logging structure. So I attempted to follow guides which tell me to put log4j.jar and commons-logging.jar in my common/lib directory. The problem persisted. Then I tried placing the log4j.jar file in common/endorsed and the error went away. I was able to log in. However now Tomcat is using log4j as its form of logging which isn't something I wanted. Is there an easier solution to getting it to behave like it did on Tomcat 4.1.x? Admittedly I am a complete noobie when it comes to Tomcat (and Java logging) so please excuse my ignorance if I'm making a glaring mistake. Thanks, -- View this message in context: http://www.nabble.com/Tomcat-5.5.x---Logging-Issues-tp19783258p19783258.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: javax.naming.NamingException: Cannot create resource instance
We have a winner! The Windows file system is one of the few (the only one I can think of) that's not case sensitive. Unix, linux, bsd, macos, etc. , ... are all case sensitive. You should change the file name 'Context.xml' to 'context.xml' and check to be sure it stays that way as you build your .war file. After that you won't need to have testapp.xml in conf/Catalina/localhost. Also you might want to check all the places in your webapp that references a file and be sure the names match in case to what's on disk. --David Ziggy O wrote: Hi, The tomcat version on my Desktop is 5.5.27 and the Tomcat version on the Unix environment is 5.5.23. Could the above minor version difference cause it? One thing i have noticed is that if i take the /META-INF/Context.xml file and copy it into $CATALINA_HOME/conf/Catalina/localhost/testapp.xml it does work. i.e. why does it require the context file in that directory and why does it have to be renamed to my applications context. On the Windows environment i dont have to rename and copy the context file to $CATALINA_HOME/conf/Catalina/localhost Thanks On Thu, Oct 2, 2008 at 12:55 PM, David Smith [EMAIL PROTECTED] wrote: Ok... 1) I don't see a tomcat version, could you post that? 2) Are you sure the tomcat version on the production environment the same as your dev system? 3) This is probably not causing the immediate problem, but res-type ... /res-type in your web.xml should be javax.sql.Datasource, not oracle.jdbc.pool.OracleDataSource. --David Ziggy O wrote: No mate that was the full stack trace. Thanks On Wed, Oct 1, 2008 at 7:02 PM, David Smith [EMAIL PROTECTED] wrote: Seems like such a generic error would have a root cause. Was there anything more to the stack trace? --David Ziggy O wrote: Hi, I am trying to connect to an oracle database but cant seem to get the jdbc connection to work. I am developing the application on a Windows desktop and transferring it onto a Unix box. When i test it on the Windows environmnet it does manage to connect but if i test it on unix then i get an error. My gut feeling is that the installation on the unix environment is missing a library but i cant figure out what it is. Here is how i am trying to get the jndi connection. [code] String fullname; if (jndiPrefix != null jndiPrefix.length() 0) fullname = jndiPrefix + datasource; else fullname = datasource; // JNDI Context ctx = null; DataSource ds = null; Connection conn = null; try { ctx = new InitialContext(); Context envContext = (Context)ctx.lookup(java:/comp/env); if (ctx != null) { ds = (DataSource)envContext.lookup(fullname); if (ds != null) { conn = ds.getConnection(); } } } [/code] And here is the Configuration. Context.xml (User and password modified) [code] Resource name=jdbc/theDb auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@localhost:1521:webdev username=webuser password=webuser maxActive=20 maxIdle=10 maxWait=-1/ [/code] web.xml [code] resource-ref descriptionOracle Datasource/description res-ref-namejdbc/theDb/res-ref-name res-typeoracle.jdbc.pool.OracleDataSource/res-type res-authContainer/res-auth /resource-ref [/code] And here is the stack trace of the error [code] javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:143) at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source) at org.apache.naming.NamingContext.lookup(NamingContext.java:793) at org.apache.naming.NamingContext.lookup(NamingContext.java:140) at org.apache.naming.NamingContext.lookup(NamingContext.java:781) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at com.bt.ccs21.util.DbConnection.getJNDIConnection(DbConnection.java:334) at com.bt.ccs21.util.DbConnection.getJNDIConnection(DbConnection.java:256) at com.bt.ccs21.util.DbConnection.getJRunConnection(DbConnection.java:286) at com.bt.ccs21.presentation.events.admin.LogonActionPost.preAction(LogonActionPost.java:118) at com.bt.ccs21.presentation.events.CCS21EventAction.execute(CCS21EventAction.java:29) at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58) at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at
Re: javax.naming.NamingException: Cannot create resource instance
Yes it looks like that fact it is named with uppercase C was the problem. I renamed it to context.xml and it finally worked. Thank you all for your help. On Thu, Oct 2, 2008 at 5:59 PM, David Smith [EMAIL PROTECTED] wrote: We have a winner! The Windows file system is one of the few (the only one I can think of) that's not case sensitive. Unix, linux, bsd, macos, etc. , ... are all case sensitive. You should change the file name 'Context.xml' to 'context.xml' and check to be sure it stays that way as you build your .war file. After that you won't need to have testapp.xml in conf/Catalina/localhost. Also you might want to check all the places in your webapp that references a file and be sure the names match in case to what's on disk. --David Ziggy O wrote: Hi, The tomcat version on my Desktop is 5.5.27 and the Tomcat version on the Unix environment is 5.5.23. Could the above minor version difference cause it? One thing i have noticed is that if i take the /META-INF/Context.xml file and copy it into $CATALINA_HOME/conf/Catalina/localhost/testapp.xml it does work. i.e. why does it require the context file in that directory and why does it have to be renamed to my applications context. On the Windows environment i dont have to rename and copy the context file to $CATALINA_HOME/conf/Catalina/localhost Thanks On Thu, Oct 2, 2008 at 12:55 PM, David Smith [EMAIL PROTECTED] wrote: Ok... 1) I don't see a tomcat version, could you post that? 2) Are you sure the tomcat version on the production environment the same as your dev system? 3) This is probably not causing the immediate problem, but res-type ... /res-type in your web.xml should be javax.sql.Datasource, not oracle.jdbc.pool.OracleDataSource. --David Ziggy O wrote: No mate that was the full stack trace. Thanks On Wed, Oct 1, 2008 at 7:02 PM, David Smith [EMAIL PROTECTED] wrote: Seems like such a generic error would have a root cause. Was there anything more to the stack trace? --David Ziggy O wrote: Hi, I am trying to connect to an oracle database but cant seem to get the jdbc connection to work. I am developing the application on a Windows desktop and transferring it onto a Unix box. When i test it on the Windows environmnet it does manage to connect but if i test it on unix then i get an error. My gut feeling is that the installation on the unix environment is missing a library but i cant figure out what it is. Here is how i am trying to get the jndi connection. [code] String fullname; if (jndiPrefix != null jndiPrefix.length() 0) fullname = jndiPrefix + datasource; else fullname = datasource; // JNDI Context ctx = null; DataSource ds = null; Connection conn = null; try { ctx = new InitialContext(); Context envContext = (Context)ctx.lookup(java:/comp/env); if (ctx != null) { ds = (DataSource)envContext.lookup(fullname); if (ds != null) { conn = ds.getConnection(); } } } [/code] And here is the Configuration. Context.xml (User and password modified) [code] Resource name=jdbc/theDb auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@localhost:1521:webdev username=webuser password=webuser maxActive=20 maxIdle=10 maxWait=-1/ [/code] web.xml [code] resource-ref descriptionOracle Datasource/description res-ref-namejdbc/theDb/res-ref-name res-typeoracle.jdbc.pool.OracleDataSource/res-type res-authContainer/res-auth /resource-ref [/code] And here is the stack trace of the error [code] javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:143) at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source) at org.apache.naming.NamingContext.lookup(NamingContext.java:793) at org.apache.naming.NamingContext.lookup(NamingContext.java:140) at org.apache.naming.NamingContext.lookup(NamingContext.java:781) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at com.bt.ccs21.util.DbConnection.getJNDIConnection(DbConnection.java:334) at com.bt.ccs21.util.DbConnection.getJNDIConnection(DbConnection.java:256) at com.bt.ccs21.util.DbConnection.getJRunConnection(DbConnection.java:286) at com.bt.ccs21.presentation.events.admin.LogonActionPost.preAction(LogonActionPost.java:118) at com.bt.ccs21.presentation.events.CCS21EventAction.execute(CCS21EventAction.java:29) at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58) at
Re: problem in running Jconsole remotely --Connection refused
Dear Subhrajyoti, I am facing problem in running Jconsole remotely . In my machine from where I am running Jconsole I have jdk1.6...I am trying to connect to TOmcat6.0.18 running on a windows 2003 server machine(with JDK 1,5) ...I have a batch file with the following contents : When I execute the batch file Tomcat is starting okay. But when I am trying to run Jconsole to connect to the Tomcat , I am always getting a connection refused error. I think I have set up the parameters correctly here ? Apart from this all the .bat files that comses bundled with Tomcat6.0.18 are kept same. I can ping the server from my machine without any problem . JConsole remotely is a problem. Recently I have started work on an on- line monitoring tool that allows you to monitor memory and threads without any firewall trickery. If you register at http://java-monitor.com, you can download a small WAR file (~35kB) that will collect the memory stats. Read more on http://java-monitor.com/install.html Oh, it also does thread deadlock detection, but that's just a freebie. ;-) -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 The secret of success lies in the stability of the goal. -- Benjamin Disraeli - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat JVM not releasing deleted files (lsof show delete inodes taking up disk space)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chad, Chad Kellerman wrote: To get a better understanding... the application indexes uploaded files, the indexing process creates the temporary files then removes them. Can you share the code that actually does this? The javadoc for File.createTempFile states: To arrange for a file created by this method to be deleted automatically, use the deleteOnExit() method. If your engineers followed this advice, this may be your problem: the JVM is waiting until JVM shutdown to actually delete the files. Even if the code does an explicit File.delete(), the JVM is probably still hanging onto a reference to the file's directory entry in order to delete it on exit. That seems like a plausible explanation for why the files are marked as deleted in lsof, but are still being kept alive by the JVM. The solution here would be to simply not use File.deleteOnExit; instead, use File.delete explicitly. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkjlEpIACgkQ9CaO5/Lv0PBo0wCfRhUitB/6/pxDQiGtbdo0Ctwk qj4AnjuQwMY3yduWoAN5/InlbZnX1CW6 =i6Uc -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Another confused person trying to get jconsole to monitor tomcat.
Dear Mark, I got bitten by this recently. I am working on a LifecycleListener (that can be configured in server.xml) that fixes both ports that are used by jconsole. This makes it much easier to configure firewalls, tunnel through PuTTY etc. If I get it finished in time, it will be in 6.0.19+. If not, a later version. Keep an eye on the change log and/or the dev list. Since you are knowledgeable in the sources for Tomcat, are you aware of any programmatic way to register the Catalina mbeans? I'd like to do so from code, without specifying any command line options. For JBoss I found a special JMXserver class that I can load using reflection. Is there such a thing for Tomcat? -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 The secret of success lies in the stability of the goal. -- Benjamin Disraeli - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you have your dev environment setup?
Dear All, I've been doing a lot of webapp development on tomcat, but currently my process is all manual. I write the code in Eclipse, and then copy the appropriate files over to tomcat. I'd like to automate and standardize my process. So would y'all mind explaining how your dev environment is configured? I'd appreciate the insight. TIA. I develop in Eclipse and rsync the files over to my test box. Passwordless ssh and a little script. -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 Rule 1 for being in a hole: stop digging. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Native library issue on RHEL5
Hello, I am running Apache-tomcat 6.0.1.14 on Redhat Enterprise 5.2, and I am having trouble getting Catalina.sh to use the Apache Tomcat Native Library. I have run configure, make, and make install on the Native (tomcat-native-1.1.10-src) and it has installed libraries in /usr/local/apr/lib: [EMAIL PROTECTED] ~]# ll /usr/local/apr/lib total 2360 -rw-r--r-- 1 root root 1518062 Oct 2 11:21 libtcnative-1.a -rwxr-xr-x 1 root root 893 Oct 2 11:21 libtcnative-1.la lrwxrwxrwx 1 root root 23 Oct 2 11:21 libtcnative-1.so - libtcnative-1.so .0.1.10 lrwxrwxrwx 1 root root 23 Oct 2 11:21 libtcnative-1.so.0 - libtcnative-1. so.0.1.10 -rwxr-xr-x 1 root root 853799 Oct 2 11:21 libtcnative-1.so.0.1.10 drwxr-xr-x 2 root root4096 Oct 2 11:21 pkgconfig I have added this path to $CATALINA_HOME/Catalina.sh: JAVA_OPTS=-Djava.library.path=/usr/local/apr/lib/ When I run “Catalina.sh start” to startup the Tomcat server, it still is not detecting these libraries, per Catalina.out: INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/apr/lib/ Oct 2, 2008 12:59:40 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Oct 2, 2008 12:59:40 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 529 ms Am I missing something here? Any help is greatly appreciated. Thank you.
Re: Native library issue on RHEL5
John Ozarchuk schrieb: Hello, I am running Apache-tomcat 6.0.1.14 on Redhat Enterprise 5.2, and I am having trouble getting Catalina.sh to use the Apache Tomcat Native Library. I have run configure, make, and make install on the Native (tomcat-native-1.1.10-src) and it has installed libraries in /usr/local/apr/lib: [EMAIL PROTECTED] ~]# ll /usr/local/apr/lib total 2360 -rw-r--r-- 1 root root 1518062 Oct 2 11:21 libtcnative-1.a -rwxr-xr-x 1 root root 893 Oct 2 11:21 libtcnative-1.la lrwxrwxrwx 1 root root 23 Oct 2 11:21 libtcnative-1.so - libtcnative-1.so .0.1.10 lrwxrwxrwx 1 root root 23 Oct 2 11:21 libtcnative-1.so.0 - libtcnative-1. so.0.1.10 -rwxr-xr-x 1 root root 853799 Oct 2 11:21 libtcnative-1.so.0.1.10 drwxr-xr-x 2 root root4096 Oct 2 11:21 pkgconfig I have added this path to $CATALINA_HOME/Catalina.sh: JAVA_OPTS=-Djava.library.path=/usr/local/apr/lib/ When I run “Catalina.sh start” to startup the Tomcat server, it still is not detecting these libraries, per Catalina.out: INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/apr/lib/ Oct 2, 2008 12:59:40 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Oct 2, 2008 12:59:40 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 529 ms Am I missing something here? Any help is greatly appreciated. Thank you. libtcnative needs he apr libraries too. Use ldd /usr/local/apr/lib/libtcnative-1.so to check, whether the apr libraries can be found and where they are. You might need to add their path to the java.library.path too. BTW: Consider updating to Tomcat 6.0.18 and tcnative 1.1.15. Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Another confused person trying to get jconsole to monitor tomcat.
http://www.jdocs.com/tomcat/6.0.14/org/apache/catalina/ServerFactory.html ServerFactory.getServer() will return org.apache.catalina.ServerFactory concerning LifecycleListener take a look at http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/LifecycleListener.html the events that the LifecycleListener reponds to are listed at http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/Lifecycle.html a brief synopsis of the Lifecycle events described here would be static java.lang.String AFTER_START_EVENT The LifecycleEvent type for the component after start event. static java.lang.String AFTER_STOP_EVENT The LifecycleEvent type for the component after stop event. static java.lang.String BEFORE_START_EVENT The LifecycleEvent type for the component before start event. static java.lang.String BEFORE_STOP_EVENT The LifecycleEvent type for the component before stop event. static java.lang.String DESTROY_EVENT The LifecycleEvent type for the component destroy event. static java.lang.String INIT_EVENT The LifecycleEvent type for the component init event. static java.lang.String PERIODIC_EVENT The LifecycleEvent type for the periodic event. static java.lang.String START_EVENT The LifecycleEvent type for the component start event. static java.lang.String STOP_EVENT The LifecycleEvent type for the component stop event. for these derived components AccessLogValve, AuthenticatorBase, Connector, ContainerBase, DeltaManager, Embedded, ExtendedAccessLogValve, FastCommonAccessLogValve, JDBCAccessLogValve, JvmRouteBinderValve, PersistentManagerBase, RealmBase, SemaphoreValve, SimpleTcpCluster, SingleSignOn, StandardManager, StandardPipeline, StandardServer, StandardService, StoreBase, WebappClassLoader, WebappLoaderthe derived component StandardServer contains documentation located at http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/core/StandardServer.html and supports the following attributes protected java.lang.String domain protected javax.management.MBeanServer mserver protected javax.management.ObjectName oname protected java.lang.String suffix protected java.beans.PropertyChangeSupport support The property change support for this component. protected java.lang.String type which implements the interface you are interested in (javax.management.MBeanRegistration) JavaDoc listed at http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanRegistration.html and registers the MBeanServer located at http://java.sun.com/j2se/1.5.0/docs/api/javax/management/MBeanServer.html you will want to configure your security requirements to ensure accessing each attribute is permittable such as what is described in catalina.policy here grant codeBase file:${catalina.home}/- { ... permission java.util.PropertyPermission javax.management.MBeanServer, read,write; permission javax.management.MBeanServerPermission *; permission javax.management.MBeanPermission *, *; permission javax.management.MBeanTrustPermission register; ... }; Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: Another confused person trying to get jconsole to monitor tomcat. Date: Thu, 2 Oct 2008 20:26:16 +0200 Dear Mark, I got bitten by this recently. I am working on a LifecycleListener (that can be configured in server.xml) that fixes both ports that are used by jconsole. This makes it much easier to configure firewalls, tunnel through PuTTY etc. If I get it finished in time, it will be in 6.0.19+. If not, a later version. Keep an eye on the change log and/or the dev list. Since you are knowledgeable in the sources for Tomcat, are you aware of any programmatic way to register the Catalina mbeans? I'd like to do so from code, without specifying any command line options. For JBoss I found a special JMXserver class that I can load using reflection. Is there such a thing for Tomcat? -- Kees Jan http://java-monitor.com/forum/ [EMAIL PROTECTED] 06-51838192 The secret of success lies in the stability of the goal. -- Benjamin Disraeli - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
Re: Native library issue on RHEL5
Here is the output of ldd libtcnative-1.so libssl.so.6 = /lib64/libssl.so.6 (0x2ace1000) libcrypto.so.6 = /lib64/libcrypto.so.6 (0x2af2a000) libapr-1.so.0 = /usr/lib64/libapr-1.so.0 (0x2b272000) libpthread.so.0 = /lib64/libpthread.so.0 (0x2b49a000) libdl.so.2 = /lib64/libdl.so.2 (0x2b6b4000) libc.so.6 = /lib64/libc.so.6 (0x2b8b8000) libgssapi_krb5.so.2 = /usr/lib64/libgssapi_krb5.so.2 (0x2bc09000) libkrb5.so.3 = /usr/lib64/libkrb5.so.3 (0x2be37000) libcom_err.so.2 = /lib64/libcom_err.so.2 (0x2c0c9000) libk5crypto.so.3 = /usr/lib64/libk5crypto.so.3 (0x2c2cc000) libz.so.1 = /usr/lib64/libz.so.1 (0x2c4f1000) libuuid.so.1 = /lib64/libuuid.so.1 (0x2c705000) libcrypt.so.1 = /lib64/libcrypt.so.1 (0x2c909000) /lib64/ld-linux-x86-64.so.2 (0x4000) libkrb5support.so.0 = /usr/lib64/libkrb5support.so.0 (0x2cb3d000) libkeyutils.so.1 = /lib64/libkeyutils.so.1 (0x2cd45000) libresolv.so.2 = /lib64/libresolv.so.2 (0x2cf48000) libselinux.so.1 = /lib64/libselinux.so.1 (0x2d15d000) libsepol.so.1 = /lib64/libsepol.so.1 (0x2d376000) I'm not sure how I would go about making sure the APR libraries are there? - Original Message From: Rainer Jung [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, October 2, 2008 3:27:02 PM Subject: Re: Native library issue on RHEL5 John Ozarchuk schrieb: Hello, I am running Apache-tomcat 6.0.1.14 on Redhat Enterprise 5.2, and I am having trouble getting Catalina.sh to use the Apache Tomcat Native Library. I have run configure, make, and make install on the Native (tomcat-native-1.1.10-src) and it has installed libraries in /usr/local/apr/lib: [EMAIL PROTECTED] ~]# ll /usr/local/apr/lib total 2360 -rw-r--r-- 1 root root 1518062 Oct 2 11:21 libtcnative-1.a -rwxr-xr-x 1 root root 893 Oct 2 11:21 libtcnative-1.la lrwxrwxrwx 1 root root 23 Oct 2 11:21 libtcnative-1.so - libtcnative-1.so .0.1.10 lrwxrwxrwx 1 root root 23 Oct 2 11:21 libtcnative-1.so.0 - libtcnative-1. so.0.1.10 -rwxr-xr-x 1 root root 853799 Oct 2 11:21 libtcnative-1.so.0.1.10 drwxr-xr-x 2 root root4096 Oct 2 11:21 pkgconfig I have added this path to $CATALINA_HOME/Catalina.sh: JAVA_OPTS=-Djava.library.path=/usr/local/apr/lib/ When I run “Catalina.sh start” to startup the Tomcat server, it still is not detecting these libraries, per Catalina.out: INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/apr/lib/ Oct 2, 2008 12:59:40 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Oct 2, 2008 12:59:40 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 529 ms Am I missing something here? Any help is greatly appreciated. Thank you. libtcnative needs he apr libraries too. Use ldd /usr/local/apr/lib/libtcnative-1.so to check, whether the apr libraries can be found and where they are. You might need to add their path to the java.library.path too. BTW: Consider updating to Tomcat 6.0.18 and tcnative 1.1.15. Regards, Rainer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: application deployment issue, Tomcat 5.5
Caldarale, Charles R wrote: [...] Obviously, Tomcat is running at faster-than-light speed, so cause and effect are no longer ordered... You should take a patent on that one. So, if regarding Tomcat there is no direct causality anymore, does it mean also that we can all just sit here and wait for you to answer the questions we have not yet asked ? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK and IIS - troubles?
Rainer, Rainer Jung-3 wrote: That might be the reason for trouble. If things start to get slow, the web server gets filled by all thenew requests still coming in without answering fast enough the existing ones. This starts to make sense now. I have a few suggestions inline, I would like to contribute to document a case like this, if possible. Rainer Jung-3 wrote: People often try to work around this by increasing the number of threads available for processing the requests, Yes, some of us might still be used to old JK connectors defaulting to 10 connections. More likely to cause confusion is the Tomcat message increase the threads, while it might help more if it was fine tune the threads instead. Rainer Jung-3 wrote: but if the backend is stuck or too slow, this will not help and instead also trash the frontend. So perhaps.. upgrading from older JKs the default changed from 10 connections to 250. With a lot of workers (for instance, 40) the total number of maximum threads went from 400 to 1. I will have to fix this and check what happens. Though I understand the perfect default value can vary depending on the site load etc., to me 10 is too low and 250 is far too high.. maybe a 50 would fit for most installations and be a better default number in this case. :-) Rainer Jung-3 wrote: You should measure how many connections you need during peak hours without performance problems, and then add some percentage depending on your growth rate etc. Finally you need to make sure, that your web server itself uses at least as many threads, as you configured as the pool size. This has been measured already. Same as above, when the problem were too few connections, too many seemed not to be a problem. :-) I would suggest to add your above sentence right after We recommend adjusting this value for IIS and the Sun Web Server at http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html and maybe also in http://tomcat.apache.org/connectors-doc/reference/workers.html (And maybe *strongly* recommend it ) Rainer Jung-3 wrote: For Apache with mod_jk we can automatically detect the number of threads and by default size our pool to the same number. For IIS you have to size the pool yourself (or live with the big default of 250). It seems we are dying with the big default. :-) I have read somewhere that the number of threads is not likely to cause these problems on modern multiple cpu with multiple cores servers. I wonder if there is some kind of formula to know what total should not be exceeded in this particular case, of if the good old document by Mladen Turk is still valid fixing this number to 2000 (http://people.apache.org/~mturk/docs/article/ftwai.html) Thanks a lot for your help, br1. -- View this message in context: http://www.nabble.com/JK-and-IIS---troubles--tp19750760p19787259.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.x - Logging Issues
piercey wrote: Is there an easier solution to getting it to behave like it did on Tomcat 4.1.x? I second the motion. Admittedly I am a complete noobie when it comes to Tomcat (and Java logging) so please excuse my ignorance if I'm making a glaring mistake. That one too. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Servlet Bouncy Castle Problem
you'll want to make sure bcprov-ext-jdk15-140.jar is in WEB-INF=lib from http://www.bouncycastle.org/latest_releases.html feel free to ping me offline for implementation specific issues cheers, Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. From: [EMAIL PROTECTED] To: users@tomcat.apache.org Subject: Re: Tomcat Servlet Bouncy Castle Problem Date: Thu, 2 Oct 2008 16:53:46 +0200 - Original Message - From: Jeng Yu [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Thursday, October 02, 2008 10:19 AM Subject: Tomcat Servlet Bouncy Castle Problem Hello Friends! I have a debugging problem here that I hope the gurus here can help me figure out. I'm trying to do RSA public key encryption in a servlet that I'm developing inside Netbeans 6.1. I'm using the Bouncy Castle (BC) crypto package. When I build the servlet, there are no errors. Then I run it, and Netbeans invokes the Tomcat 6.0.16 container in it and waits for a client to conect. But when I connect to the servlet from a client, it crashes when it executes this line in my code: private RSAPrivateCrtKeyParameters RSAprivKey = null; with this message in the Tomcat log output: SEVERE: Allocate exception for servlet Fortune java.lang.NoClassDefFoundError: Lorg/bouncycastle/crypto/params/RSAPrivateCrtKeyParameters; Interestngly, the same RSA public encryption code with Bouncy Castle library works flawlessly when I develop it in Netbeans IDE and run it as a java application (not servlet). In servlet environment, it fails. Yes, I added cldc_classes.zip class library file from Bouncy Castle to compile the code. Oh, and the client reports the following error when trying to connect to the servlet: The server encountered and internal error that prevented it from fulfilling this request. ServletException: Error instantiating servlet class fortune.Fortune. What am I not doing right? Has anyone else seen something similar and what's the getaround/workaround? Thanks, Jeng Yu Jeng we use BC in servlets and have no problems, but its a long time since I was into it... I think you need to get into their mailing lists or what ever they have I cant remember using the cldc_classes.zip isnt that for JavaME only? ... because it doesnt have BIGINT or something... make sure you not screwing Java now. If your BC is in the class path, take it out of there and try get it going in your test apps... If in doubt... use the source code for BC... so A you can remove the huge amount of stuff you wont need... and B if I remember correctly we spent a lot of time making it independent of JCE which seems to change every java version... Only place those libs must be is in your web app... Anyway its not TC... bouncy castle is one complex piece of code with a million options and forks ... make sure its not in the classpath... Good luck --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ See how Windows connects the people, information, and fun that are part of your life. http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/
Support
Good afternoon, my question is this: That version of JDK should I use for the Tomcat 6? Thank you very much. Angélica Ardila
Re: Support
which version ? On Fri, Oct 3, 2008 at 3:50 AM, Angelica Ardila [EMAIL PROTECTED]wrote: Good afternoon, my question is this: That version of JDK should I use for the Tomcat 6? Thank you very much. Angélica Ardila -- Regards Partha Goswami President Global Web-Tech Solution www.globalwebtechsolution.com
Re: Support
The Apache Tomcat version 6 2008/10/2, Partha Goswami [EMAIL PROTECTED]: which version ? On Fri, Oct 3, 2008 at 3:50 AM, Angelica Ardila [EMAIL PROTECTED]wrote: Good afternoon, my question is this: That version of JDK should I use for the Tomcat 6? Thank you very much. Angélica Ardila -- Regards Partha Goswami President Global Web-Tech Solution www.globalwebtechsolution.com -- Cordialmente, Angélica Ardila
Re: Support
I asked which version of JDK ? On Fri, Oct 3, 2008 at 3:56 AM, Angelica Ardila [EMAIL PROTECTED]wrote: The Apache Tomcat version 6 2008/10/2, Partha Goswami [EMAIL PROTECTED]: which version ? On Fri, Oct 3, 2008 at 3:50 AM, Angelica Ardila [EMAIL PROTECTED]wrote: Good afternoon, my question is this: That version of JDK should I use for the Tomcat 6? Thank you very much. Angélica Ardila -- Regards Partha Goswami President Global Web-Tech Solution www.globalwebtechsolution.com -- Cordialmente, Angélica Ardila -- Regards Partha Goswami President Global Web-Tech Solution www.globalwebtechsolution.com
RE: Support
On Fri, Oct 3, 2008 at 3:50 AM, Angelica Ardila [EMAIL PROTECTED]wrote: That version of JDK should I use for the Tomcat 6? Read the release notes: http://tomcat.apache.org/tomcat-6.0-doc/RELEASE-NOTES.txt Tomcat 6.0 is designed to run on JSE 5.0 and later. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Support
Angelica Ardila wrote: Good afternoon, my question is this: That version of JDK should I use for the Tomcat 6? Thank you very much. Angélica Ardila Whichever one you like, dear. ;-) Seriously now : JDK 6 would probably be best, and JDK 5 should work also. But if it is only to run Tomcat, the JRE 6 should be enough also. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Support
ah, JDK 6.0 has some issue, in WIndows after installing JDK 6.0 Tomcat 6.0 u need to put msvci70.dll from Jdk folder to bin folder of tomcat , that's why i was asking. JDK 5 has no issue, On Fri, Oct 3, 2008 at 3:59 AM, André Warnier [EMAIL PROTECTED] wrote: Angelica Ardila wrote: Good afternoon, my question is this: That version of JDK should I use for the Tomcat 6? Thank you very much. Angélica Ardila Whichever one you like, dear. ;-) Seriously now : JDK 6 would probably be best, and JDK 5 should work also. But if it is only to run Tomcat, the JRE 6 should be enough also. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Regards Partha Goswami President Global Web-Tech Solution www.globalwebtechsolution.com
RE: Support
Good afternoon, my question is this: That version of JDK should I use for the Tomcat 6? Thank you very much. Angélica Ardila Whichever one you like, dear. ;-) i'll wait for christopher schultz response to this answer - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ See how Windows Mobile brings your life together—at home, work, or on the go. http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/
Re: Support
Martin Gainty wrote: Good afternoon, my question is this: That version of JDK should I use for the Tomcat 6? Thank you very much. Angélica Ardila Whichever one you like, dear. ;-) i'll wait for christopher schultz response to this answer You are already a few off-list exchanges too late for that. ;-) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Support
- Original Message - From: Angelica Ardila [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Friday, October 03, 2008 12:20 AM Subject: Support Good afternoon, my question is this: That version of JDK should I use for the Tomcat 6? Thank you very much. Angélica Ardila --- We using TC5/6 with JDK1.5 all the way to JDK 6 beta (10)... no problems. If you starting out http://java.sun.com/javase/downloads/index.jsp 2nd item from the top (JDK 6 Update 7)... and the documentation... (Java SE 6 Documentation) If you need a dev IDE... its better to go here... http://download.netbeans.org/netbeans/6.1/final/ and get the one you want... than use the JDK option with NETBEANS Because NB is getting huge... What I do is dowload the PHP version... and then install the TC plugins from NB... its quicker than the whole GlassFish thing... If you not developing and the JRE (SE) 5 or 6 is on the machine already... TC is all you need... You have to have the JDK for the IDE however... If you on windows, install the JDK to a non standard folder... else it gets updated auto... and you dont want that in a dev environment... ... enjoy TC is cool ;) --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Support
And by her innocent question, Angelica has brought out the inherent personality of a number of people on this list.. Any more takers ? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Support
- Original Message - From: André Warnier [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Friday, October 03, 2008 12:29 AM Subject: Re: Support Angelica Ardila wrote: Good afternoon, my question is this: That version of JDK should I use for the Tomcat 6? Thank you very much. Angélica Ardila Whichever one you like, dear. ;-) Oh Andre... I think we have a Casanova here ;)... you devil you Seriously now : JDK 6 would probably be best, and JDK 5 should work also. But if it is only to run Tomcat, the JRE 6 should be enough also. Normally I always recomment lagging a JRE version as well... avoid bleeding edge... but these Profiling tools that came in at JDK 6 rc 6 are so good, you just have to have it ;) You devil --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache DirectoryIndex and mod_jk ForwardDirectories not playing nicely
I'm trying to configure mod_jk 1.2.16.with Apache 1.3.26 and tomcat 5.0.28 on Solaris 9. I compiled the mod_jk from source for the Apache version. Unfortunately, I'm stuck with this environment. Behavior with mod_jk ForwardDirectories: When index.shtml exists * GOOD http://www.domain.com/EDS/index.shtml - Loads as desired * GOOD http://www.domain.com/EDS/index.page - Loads as desired * FAIL http://www.domain.com/EDS - Pulls index.page from Tomcat, ignoring Apache DirectoryIndex * FAIL http://www.domain.com/EDS/ - Pulls index.page from Tomcat, ignoring Apache DirectoryIndex * FAIL http://www.domain.com/ - Displays Tomcat site chooser, ignoring Apache DirectoryIndex (which would display EDS/index.shtml) And now when index.shtml does not exist * GOOD http://www.domain.com/EDS - Pulls index.page from Tomcat, ignoring Apache DirectoryIndex * GOOD http://www.domain.com/EDS/ - Pulls index.page from Tomcat, ignoring Apache DirectoryIndex * GOOD http://www.domain.com/ - Displays Tomcat site chooser, ignoring Apache DirectoryIndex (which would display EDS/index.shtml) Behavior without mod_jk ForwardDirectories option: When index.shtml exists * GOOD http://www.domain.com/EDS/index.shtml - Loads as desired * GOOD http://www.domain.com/EDS/index.page - Loads as desired * GOOD http://www.domain.com/EDS - Pulls index.shtml from Apache DirectoryIndex * GOOD http://www.domain.com/EDS/ - Pulls index.shtml from Apache DirectoryIndex * GOOD http://www.domain.com/ - Displays /EDS/index.shtml And now when index.shtml does not exist * FAIL http://www.domain.com/EDS - Apache Access Denied error (does not send request for directory EDS to Tomcat) * FAIL http://www.domain.com/EDS/ - Apache Access Denied error (does not send request for directory EDS to Tomcat) * FAIL http://www.domain.com/ - Apache Access Denied error (does not send request for directory EDS to Tomcat) Relevant apache configuration: LoadModule jk_module libexec/mod_jk.so.0.0.0 JkWorkersFile /cust/IBMHttpServer/conf/jk/worker.properties JkShmFile /cust/IBMHttpServer/logs/mod_jk.shm JkLogFile/cust/IBMHttpServer/logs/mod_jk.log JkLogLevel debug JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkMount /*.page ajp13 JkOptions +ForwardDirectories VirtualHost 10.10.10.10:80 DocumentRoot /cust/IBMHttpServer/htdocs/data ServerName www.domain.com ScriptAlias /cgi-bin /cust/IBMHttpServer/cgi-bin DirectoryIndex /EDS/index.shtml CheckSpelling off RewriteEngine on RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] JkMount /*.page ajp13 /VirtualHost mod_jk.log log entries for a request '/EDS/' when 'index.shtml' should be displayed from the Apache DocumentRoot: [Thu Oct 02 17:05:37 2008] [24767:0] [debug] map_uri_to_worker::jk_uri_worker_map.c (682): Attempting to map URI '/EDS/' from 1 maps [Thu Oct 02 17:05:37 2008] [24767:0] [debug] find_match::jk_uri_worker_map.c (503): Attempting to map context URI '/*.page=ajp13' source 'JkMount' [Thu Oct 02 17:05:37 2008] [24767:0] [debug] jk_translate::mod_jk.c (2868): no match for /EDS/ found [Thu Oct 02 17:05:37 2008] [24767:0] [debug] map_uri_to_worker::jk_uri_worker_map.c (682): Attempting to map URI '/EDS/index.shtml' from 1 maps [Thu Oct 02 17:05:37 2008] [24767:0] [debug] find_match::jk_uri_worker_map.c (503): Attempting to map context URI '/*.page=ajp13' source 'JkMount' [Thu Oct 02 17:05:37 2008] [24767:0] [debug] jk_translate::mod_jk.c (2868): no match for /EDS/index.shtml found [Thu Oct 02 17:05:37 2008] [24767:0] [debug] jk_fixups::mod_jk.c (2947): ForwardDirectories on: /EDS/ [Thu Oct 02 17:05:37 2008] [24767:0] [debug] map_uri_to_worker::jk_uri_worker_map.c (682): Attempting to map URI '/EDS/' from 1 maps [Thu Oct 02 17:05:37 2008] [24767:0] [debug] find_match::jk_uri_worker_map.c (503): Attempting to map context URI '/*.page=ajp13' source 'JkMount' [Thu Oct 02 17:05:37 2008] [24767:0] [debug] jk_translate::mod_jk.c (2772): Manual configuration for /EDS/ ajp13 [Thu Oct 02 17:05:37 2008] [24767:0] [debug] wc_get_worker_for_name::jk_worker.c (115): found a worker ajp13 [Thu Oct 02 17:05:37 2008] [24767:0] [debug] wc_maintain::jk_worker.c (323): Maintaining worker ajp13 [Thu Oct 02 17:05:37 2008] [24767:0] [debug] wc_get_name_for_type::jk_worker.c (292): Found worker type 'ajp13' [Thu Oct 02 17:05:37 2008] [24767:0] [debug] init_ws_service::mod_jk.c (865): Service protocol=HTTP/1.1 method=GET host=(null) addr=71.245.103.180 n ame=www.domain.com port=80 auth=(null) user=(null) laddr=10.5.128.143 raddr=10.20.20.20 uri=/EDS/ [Thu Oct 02 17:05:37 2008] [24767:0] [debug] ajp_get_endpoint::jk_ajp_common.c (2579): acquired connection pool slot=0 [Thu Oct 02 17:05:37 2008] [24767:0] [debug] ajp_marshal_into_msgb::jk_ajp_common.c
RE: Support
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Partha Goswami Subject: Re: Support ah, JDK 6.0 has some issue, in WIndows after installing JDK 6.0 Tomcat 6.0 u need to put msvci70.dll from Jdk folder to bin folder of tomcat , that's why i was asking. JDK 5 has no issue, The msvcr71.dll file (not msvci70.dll, whatever that is) is required to run the Tomcat service launcher, but not needed when Tomcat is run via scripts. The reason it didn't show up on JRE/JDK 5 is because installation of that JVM version slams a copy of the DLL into C:\windows\system32, regardless of what impact that might have on the system. JRE/JDK 6 installation follows the rules published by Microsoft, and keeps the DLL in the JVM's bin directory. Tomcat should be distributing the DLL (or otherwise insuring its availability) during installation or setup of the Windows service; however, no one's been able to convince the committers of that yet. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Support
From: Johnny Kewl [mailto:[EMAIL PROTECTED] Subject: Re: Support Normally I always recomment lagging a JRE version as well... avoid bleeding edge... JRE/JDK 6 has been around for almost two years now, so I don't think the 1.6.0_07 download is at all risky. On the other hand, the 1.6.0_10 release really is bleeding edge. Sun's current versioning scheme does border on the incomprehensible... - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK and IIS - troubles?
br1 wrote: Rainer, So perhaps.. upgrading from older JKs the default changed from 10 connections to 250. With a lot of workers (for instance, 40) the total number of maximum threads went from 400 to 1. I will have to fix this and check what happens. Though I understand the perfect default value can vary depending on the site load etc., to me 10 is too low and 250 is far too high.. maybe a 50 would fit for most installations and be a better default number in this case. :-) Nope, it won't. The reason is that you are using IIS6+ that has worker processes, and ISAPI API provides no way of knowing what that number is. The entire calculation is up to you, because depending on both the IIS version and how you setup the worker processes and their number the connection_pool_size is either MaxClients or ThreadsPerChild (from httpd) There is no magic wand for every possible use case. Like with anything you'll need to switch on the brain and do some tuning by hand (setting the workers connection_pool_size is all you need to do) that will match your topology. Regards -- ^(TM) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
useSendFile=true skips compression
Could someone explain to me why the NIO Connector will ignore the compression settings for large files if useSendFile is enabled (it is by default)? It seems to me that if compression is enabled you would specifically want to use it when sendFile is enabled, but that might just be because I don't really understand what sendFile means/does :) It looks like my solution is to simply disable this option, but I was curious about why this is the case. I am trying to deploy a large GWT app, and I want to ensure that my massive JavaScript files get compressed before being sent to the client.