Re: Query on Tomcat Server.xml
Thanks for your suggestion, I wanted only some part of tomcat to be customized.So it would be risky and time consuming if i override the whole part. I have reached some extent. i m using spring-DM running on tomcat. Spring-DM is able to inject the object my business class. I wanted to add https port(Http11NioProtocol connector element) to this through coding. can u suggest me what is best way to do that. thanks, Bhuvan On Tue, Sep 1, 2009 at 8:42 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Bhuvan, > > On 8/31/2009 11:46 PM, Bhuvanesh Pattanashetti wrote: > > Hi, Even i have similar problem.. > > I wanted to create the element. At the time of tomcat start > up > > using Tomcat's existing bootstrap classes rather than loading them using > > sever.xml. > > I wanted to create a https connector. using Http11NioProtocol for the > > connector. > > > > Please let me know if any documentation is available on that? or any body > > who has implemented the similar ones... > > http://www.google.com/search?q=how+to+embed+tomcat > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkqdOcsACgkQ9CaO5/Lv0PBpuQCcC6S3Oa0CSJl/U+RQAAqviy75 > 1ocAn0JaLFPyJre9jgK+oy6Dj3mg3s6s > =6SKq > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Unable to access files outside Webapp directory in tomcat
Hi, I have my Web application installed in C:\Tomcat\webapp\ROOT. Now, through the Web page of this application, the user uploads an image which the application saves in C:\files folder using ImageIO class of JAVA. Now as soon as the file is uploaded, there should be a download button enabled for this uploaded image. If the user hits download, he should be able to download the file he uploaded. I'm done with saving the file to C:\files but I don't know how to make it downloadable when the download button is clicked because the files folder is outside the webapp directory. I hope this explains my issue. Thanks Akash. Christopher Schultz-2 wrote: > > > Are you trying to read a file off the disk using something like > FileInputStream, or are you trying to access a file from the server > using a URL from a browser? > > These are very basic questions whose answers will certainly help solve > your problem. > > -- View this message in context: http://www.nabble.com/Unable-to-access-files-outside-Webapp-directory-in-tomcat-tp25213157p25251880.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: redirect paramter in the jk_workers file
Hi Chris, I have below mention tag in my jk workers file. orker.tomcat.type=lb worker.tomcat.socket_keepalive=1 worker.tomcat.socket_timeout=300 worker.tomcat.connection_pool_size=50 worker.tomcat.connection_pool_timeout=600 worker.tomcat.balance_workers=tomcatnode1,tomcatnode2 worker.tomcat.sticky_session=true worker.tomcatnode1.port=9732 worker.tomcatnode1.host=10.18.25.160 worker.tomcatnode1.type=ajp13 worker.tomcatnode1.socket_keepalive=True worker.tomcatnode1.socket_timeout=300 worker.tomcatnode1.connection_pool_timeout=600 worker.tomcatnode1.connect_timeout=600 worker.tomcatnode1.redirect=tomcatnode2 worker.tomcatnode2.port=9733 worker.tomcatnode2.host=10.18.25.107 worker.tomcatnode2.type=ajp13 worker.tomcatnode2.socket_keepalive=True worker.tomcatnode2.socket_timeout=300 worker.tomcatnode2.connection_pool_timeout=600 worker.tomcatnode2.redirect=tomcatnode1 I am not 100% sure how this works and is it really usefull for the failover. Thanks and Regards, Dhiraj V Rajput Associate System Admin Hosting Services Group Premier Technology Group Nagpur Phone: - USA- 1-626-698-1099 India Office: 91-712-2446734 ext 30 cell no : 91-9370315811 -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, September 01, 2009 11:22 PM To: Tomcat Users List Subject: Re: redirect paramter in the jk_workers file -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dhiraj, On 8/27/2009 8:26 AM, Dhiraj Rajput wrote: > I have issue on the redirect tag in jk workers file. What is "redirect tag"? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqdX0cACgkQ9CaO5/Lv0PDhPgCeLHCBugeuHTXZxPSLoP6gp236 /gkAn2ydLL6Y8j95Zpb6f802THfOZMUT =eedS -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AJP connections just stop working
Hi, How did the results of your monitoring go ? Were you connection/keepalive timeouts helping ? Are they still set at 10mins ? Please outline the steps you made if the problem has indeed been resolved. Thanks Kris Guy Cube wrote: > > Here are my updates : > > Interesting finding is whatever AJP connectors stuck in Keepalive mode for > long time are for requests coming from remote clients. All connections for > requests coming from local (internal network) clients were changed to > CLOSE_WAIT after some time. > > Today I tried with keepAliveTimeout and connectionTimeout setting at > server.xml > > >emptySessionPath="true" enableLookups="false" redirectPort="8443" > connectionTimeout="30" keepAliveTimeout="30" /> > > I monitored from both JBoss JMX console and netstat. Connectors at JMX > console stayed at stage 6 (STAGE_KEEPALIVE) for 5 minutes and changed to > stage 7 (STAGE_ENDED ) after keep alive timeout (5 minutes). But in > netstat it is still shown up as follows: > > netstat -aonp | grep 8009 > > tcp0 0 0.0.0.0:8009 0.0.0.0:* > LISTEN 5229/java off (0.00/0/0) > tcp0 0 xx.xx.xx.xxx:8009yy.yy.yyy.yyy:49771 > ESTABLISHED 25229/java off (0.00/0/0) > tcp0 0 xx.xx.xx.xxx:8009yy.yy.yyy.yyy:49768 > ESTABLISHED 25229/java off (0.00/0/0) > tcp0 0 xx.xx.xx.xxx:8009yy.yy.yyy.yyy:49767 > ESTABLISHED 25229/java off (0.00/0/0) > tcp0 0 xx.xx.xx.xxx:8009yy.yy.yyy.yyy:49766 > ESTABLISHED 25229/java off (0.00/0/0) > tcp0 0 xx.xx.xx.xxx:8009yy.yy.yyy.yyy:49765 > ESTABLISHED 25229/java off (0.00/0/0) > > pid 25229 is process id of JBoss. I am running JBoss on CentOS 5.2, Kernel > 2.6.18-. > > I will be monitoring the outcomes tonight. > > Regards, > GC > > > > > kvancamp wrote: >> >> >> Guy Cube wrote: >>> >>> Hello, >>> >>> We are also haveing exact same issue in our environment. We are using >>> JBoss 4.2.3, Apache 2.2.11 with mod_proxy_ajp using ajp to connect >>> between Apache and JBoss. It happens intermittently and when i happnes >>> all AJP's TCP connections are stayed in ESTABLISHED state on JBoss >>> machine. In thread dump, all AJP threads are in waiting state. >>> >>> Anyone found solution or work around for this issue? >>> >>> Thanks, >>> GC >>> >> >> For now I have set the connectionTimeout to 10 minutes on my AJP >> connection, e.g. >> >> > protocol="AJP/1.3" >> emptySessionPath="true" enableLookups="false" >> redirectPort="8443" >> connectionTimeout="60" >> /> >> >> I am monitoring results, it is too soon to tell if this alone will solve >> the problem or if I also have to delve into my firewall (I was incorrect >> in my original response above - there IS a firewall between my IIS proxy >> and my JBoss server, and it has a 1 hour idle tcp session timeout), or my >> IIS proxy (which is configured with a 5-minute socket timeout). >> >> Ken >> > > -- View this message in context: http://www.nabble.com/AJP-connections-just-stop-working-tp1118618p25251096.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 4.1.31 problem
Hi Chris, Thanks for your patience with me. :-) >>What is your "appBase" for your >> in server.xml? Please re-post the definition that does >>work, and the one that does not work (no need to re-post the >>within the ). 1. "appBase" > 2. working ---> *C:\\ProcurementProject\\WebContent *is where my application (source code etc.) located. 3. not-working ---> *procurement* is the War file I deployed to webapps under Tomcat. This is the only difference I have for the working and not-working context configuration. The rest of context configuration is the same. >>1. If this is a legacy application, how much "development" is really >>occurring? Not much development to do. Just some minor changes need to be implemented. >>Why not run the same environment in both dev and prod? I guess we don't have Windows version of WAS server. Not really sure. Maybe Tomcat is faster? >> Why can't you run under JDK 1.5 or 1.6? Why not Tomcat 6.0? This project was developed since 2002 and has a lot obsolete methods even under JDK 1.4. It won't be able to compile under higer version of JDK. Thanks, Jamez.
Re: tomcat 4.1.31 problem
Hi Chuck, Good to know that. I will definitely try the Tomcat 5 with JDK 1.4. Thanks, Jamez. On Wed, Sep 2, 2009 at 1:18 AM, Caldarale, Charles R < chuck.caldar...@unisys.com> wrote: > > From: jamez smith [mailto:jamez...@gmail.com] > > Subject: Re: tomcat 4.1.31 problem > > > > This application has to run on JDK 1.4. > > Why are you tying both hands behind your back and wearing a blindfold while > crossing a room full of booby-traps? 1.4 has been a dead end for quite some > time. > > > My colleague told me we have to use Tomcat 4, as Tomcat 5 > > requires JDK 1.5. Is that true? > > No, but you must install the JDK 1.4 Compatibility Package to run Tomcat > 5.5 under a 1.4 JVM. It's on the same download page as the Tomcat download. > > - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
How do I remove 'S' from HTTPS - JAAS configured on tomcat, JSF webapp
How do I remove HTTPS after login in ? I have read other posts. I still need this thread as it has to do with JAAS on tomcat. Please read on. For the hasty, jump to 9 onwards. My UI stack is as follows : * JSF 1.2, Facelets, Richfaces 3.2.1 * JAAS * Tomcat 6 0. Relevant web.xml entries User Login Page Login Resource /pages/secure/* GET POST User CONFIDENTIAL ... ... FORM projx /pages/login/login.jsf /pages/login/loginerror.jsf 0.1 Login page : Login Panel User Id Password 1. SSL Enabled Login page 2. Rest are non SSL-pages 3. JAAS Configured with some page requiring login (therefore fwd to SSL) 4. Homepage has 'Login' hyperlink -- which points to -->/pages/secure/Userhomepage.jsf Simple Login Usercase 5. User clicks on 'Login' hyperlink 6. Tomcat CMA intercepts and takes user to /pages/login/login.jsf but URL shows https://localhost:8443/abc/pages/secure/Userhomepage.jsf 7. User keys in credentials and login is successful 8. Userhomepage.jsf http response is generated and shown on browser BUT URL is still https://localhost:8443/abc/pages/secure/Userhomepage.jsf Problem - 9. HTTPS should not be show from 8 onwards. How do I remove it ? Questions 10. I know that HTTPS has to be programattically removed. But between 7 and 8, How do I do it ? a) Where do I put a URL rewrite filter code ? It won't even be invoked.. b) How can I do it programmatically when the redirection is being done by Tomcat ? On a side note (question on JAAS configured on Tomcat ) --- 11. Why do I have to declare '/pages/secure/*' with User ? 12. Why isn't there a way to just forward to login.jsf which forwards to j_security_check ? 13. Is there a way to make Tomcat container aware of a JAASubject What I would really like is a Richfaces modal panel for a login ? Such a simple use case has become really complicated. Instead of flexibility, across presentation layers, it's ties you down to a one mechanism. Very frustrating. Thank you ! -- View this message in context: http://www.nabble.com/How-do-I-remove-%27S%27-from-HTTPS---JAAS-configured-on-tomcat%2C-JSF-webapp-tp25250419p25250419.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Using multiple DataSource's for fail-over.
Tomcat 6.0.20 using DBCP DataSource Java 1.6.0_16 Oracle 10g with RAC. I've got two Oracle RAC nodes, mirroring each other. My current fail-over method if the primary node fails is to shut down the web servers, reconfigure them to use the secondary node and restart the web servers. Not pleasant. I'm thinking I can make a "FailOverDataSource" that implements DataSource and wraps around DataSource's for each of the two nodes. Its getConnection() method would try to use the getConnection() from the primary node, and if that fails, it would try the secondary node. Repeat logic for other DataSource methods. Instant automagic fail-over. I've actually written it, and it seems to get a hold of both DataSource's fine. I can't kill the primary on an active busy system to do a "real" test though. I'm thinking I can't be the first person to think of this. Are there any obvious problems with this idea? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Is resource-ref really needed?
the fellow who wrote it was writing code for at least 2 other projects it may have been a case of where he accomplished 75% of what was needed then some other task got moved to his front burner still it is *unusual* that web.xml resource-ref is'nt read Martin Gainty __ Note de déni et de confidentialité Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Wed, 2 Sep 2009 01:11:41 +0200 > Subject: Re: Is resource-ref really needed? > From: robert.wh...@gmail.com > To: mgai...@hotmail.com; users@tomcat.apache.org > > On Tue, Sep 1, 2009 at 5:07 AM, Martin Gainty wrote: > > both the entries and web.xml reference > > ContextResource > > > > //WebAnnotationSet.java > > protected static void addResource(Context context, Resource annotation) > > { > > > > //if the annotation is > > DataSource,ConnectionFactory,QueueConnectionFactory,TopicConnectionFactory,Session,URL > > // then reference from applicationContext > > if > > (annotation.type().getCanonicalName().equals("javax.sql.DataSource") || > > > > annotation.type().getCanonicalName().equals("javax.jms.ConnectionFactory") > > || > > annotation.type().getCanonicalName() > > .equals("javax.jms.QueueConnectionFactory") || > > annotation.type().getCanonicalName() > > .equals("javax.jms.TopicConnectionFactory") || > > > > annotation.type().getCanonicalName().equals("javax.mail.Session") || > > annotation.type().getCanonicalName().equals("java.net.URL") > > || > > annotation.type().getCanonicalName() > > .equals("javax.resource.cci.ConnectionFactory") || > > > > annotation.type().getCanonicalName().equals("org.omg.CORBA_2_3.ORB") || > > > > annotation.type().getCanonicalName().endsWith("ConnectionFactory")) { > > > > //Construct from annotation input > > ContextResource resource = new ContextResource(); > > > > /*The input annotation is used to populate the > > parameters */ > > > > resource.setName(annotation.name()); > > resource.setType(annotation.type().getCanonicalName()); > > > > if (annotation.authenticationType() > > == Resource.AuthenticationType.CONTAINER) { > > resource.setAuth("Container"); > > } > > else if (annotation.authenticationType() > > == Resource.AuthenticationType.APPLICATION) { > > resource.setAuth("Application"); > > } > > resource.setScope(annotation.shareable() ? "Shareable" : > > "Unshareable"); > > resource.setProperty("mappedName", annotation.mappedName()); > > resource.setDescription(annotation.description()); > > > > //finally add it to ApplicationContext.xml here > > context.getNamingResources().addResource(resource); > > > > ///web.xml > > /// > > web.xml is created here on config init() > > called in ContextConfiguration init() > > protected void init() { > > // Called from StandardContext.init() > > > > if (webDigester == null){ > > webDigester = createWebDigester(); > > webDigester.getParser(); > > } > > > > if (contextDigester == null){ > > contextDigester = createContextDigester(); > > contextDigester.getParser(); > > } > > > > if (log.isDebugEnabled()) > > log.debug(sm.getString("contextConfig.init")); > > context.setConfigured(false); > > ok = true; > > > > contextConfig(); > > > > try { > > fixDocBase(); > > } catch (IOException e) { > > log.error(sm.getString("contextConfig.fixDocBase"), e); > > } > > > > } > > > > Digester.java calls CreateContextDigester > > /** > > * Create (if necessary) and return a Digester configured to process the > > * context configuration descriptor for an application. > > */ > > protected Digester createContextDigester() { > > Digester digester = new Digester(); > > digester.setValidating(false); > > RuleSet contextRuleSet = new ContextRuleSet("", false); > > digester.addRuleSet(contextRuleSet); > > RuleSet namingRuleSet = new NamingRuleSet("Context/"); > > digester.addRuleSet(namingRuleSet); > > return digester;
Re: Is resource-ref really needed?
On Tue, Sep 1, 2009 at 5:07 AM, Martin Gainty wrote: > both the entries and web.xml reference > ContextResource > > //WebAnnotationSet.java > protected static void addResource(Context context, Resource annotation) > { > > //if the annotation is > DataSource,ConnectionFactory,QueueConnectionFactory,TopicConnectionFactory,Session,URL > // then reference from applicationContext > if > (annotation.type().getCanonicalName().equals("javax.sql.DataSource") || > > annotation.type().getCanonicalName().equals("javax.jms.ConnectionFactory") > || > annotation.type().getCanonicalName() > .equals("javax.jms.QueueConnectionFactory") || > annotation.type().getCanonicalName() > .equals("javax.jms.TopicConnectionFactory") || > > annotation.type().getCanonicalName().equals("javax.mail.Session") || > annotation.type().getCanonicalName().equals("java.net.URL") > || > annotation.type().getCanonicalName() > .equals("javax.resource.cci.ConnectionFactory") || > > annotation.type().getCanonicalName().equals("org.omg.CORBA_2_3.ORB") || > > annotation.type().getCanonicalName().endsWith("ConnectionFactory")) { > > //Construct from annotation input > ContextResource resource = new ContextResource(); > > /*The input annotation is used to populate the > parameters */ > > resource.setName(annotation.name()); > resource.setType(annotation.type().getCanonicalName()); > > if (annotation.authenticationType() > == Resource.AuthenticationType.CONTAINER) { > resource.setAuth("Container"); > } > else if (annotation.authenticationType() > == Resource.AuthenticationType.APPLICATION) { > resource.setAuth("Application"); > } > resource.setScope(annotation.shareable() ? "Shareable" : > "Unshareable"); > resource.setProperty("mappedName", annotation.mappedName()); > resource.setDescription(annotation.description()); > > //finally add it to ApplicationContext.xml here > context.getNamingResources().addResource(resource); > > ///web.xml > /// > web.xml is created here on config init() > called in ContextConfiguration init() > protected void init() { > // Called from StandardContext.init() > > if (webDigester == null){ > webDigester = createWebDigester(); > webDigester.getParser(); > } > > if (contextDigester == null){ > contextDigester = createContextDigester(); > contextDigester.getParser(); > } > > if (log.isDebugEnabled()) > log.debug(sm.getString("contextConfig.init")); > context.setConfigured(false); > ok = true; > > contextConfig(); > > try { > fixDocBase(); > } catch (IOException e) { > log.error(sm.getString("contextConfig.fixDocBase"), e); > } > > } > > Digester.java calls CreateContextDigester > /** > * Create (if necessary) and return a Digester configured to process the > * context configuration descriptor for an application. > */ > protected Digester createContextDigester() { > Digester digester = new Digester(); > digester.setValidating(false); > RuleSet contextRuleSet = new ContextRuleSet("", false); > digester.addRuleSet(contextRuleSet); > RuleSet namingRuleSet = new NamingRuleSet("Context/"); > digester.addRuleSet(namingRuleSet); > return digester; > } > > called in Digester calls addRuleSet > public void addRuleSet(RuleSet ruleSet) { > > String oldNamespaceURI = getRuleNamespaceURI(); > String newNamespaceURI = ruleSet.getNamespaceURI(); > if (log.isDebugEnabled()) { > if (newNamespaceURI == null) { > log.debug("addRuleSet() with no namespace URI"); > } else { > log.debug("addRuleSet() with namespace URI " + > newNamespaceURI); > } > } > setRuleNamespaceURI(newNamespaceURI); > ruleSet.addRuleInstances(this); > setRuleNamespaceURI(oldNamespaceURI); > } > > org.apache.catalina.startup.WebRuleSet.java > public void addRuleInstances(Digester digester) { > > digester.addObjectCreate(prefix + "web-app/resource-ref", > > "org.apache.catalina.deploy.ContextResource"); > digester.addRule(prefix + "web-app/resource-ref", > new SetNextNamingRule("addResource", > "org.apache.catalina.deploy.ContextResource")); > > digester.addCallMethod(prefix + "web-app/resource-ref/description", > "setDescription", 0); >
Re: Is resource-ref really needed?
On Tue, Sep 1, 2009 at 5:41 PM, Christopher Schultz wrote: >On 8/31/2009 6:19 PM, Robert Whane wrote: >> Okay, it's optional, so I don't HAVE to use, but if I DO use it, what >> possible advantage does it have? > > Adherence to the Servlet Specification? Which is what I indeed suspected what might be a possible function, but as Martin Gainty has found in Tomcat's source, Tomcat absolutely does not look at the resource-ref element. There's a digester rule defined for it, but that's it. So even if you make a typo in any of the data provided in the resource-ref element, Tomcat won't warn you about it. Maybe the documentation should very clearly state this, i.e. "Note: the resource-ref element is totally ignored by Tomcat. You can provide this element to be compatible with other servlet containers that adhere strictly to the Servlet spec(*) Also note that because Tomcat totally and utterly ignores the element, any faulty data provided by you won't be detected by Tomcat. In other words, your application may run perfectly on Tomcat, but fail on this other servlet container since the errors you made were never detected by Tomcat". - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat manager
Hi, in tomcat manager, it has a line: Bytes sent: 123.12MB under http-8080. if under webapps, a symbolic link was created which in turn contains a list of files like pdf, jpeg, is the rendering of those static contents included in the 'bytes sent:123.12mb' ? Thanks, Angelo -- View this message in context: http://www.nabble.com/tomcat-manager-tp25248488p25248488.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Can catalina-cluster from Tomcat 5.5 be used in Tomcat 6?
Hi, I would like to know if it possible to use the legacy clustering module from Tomcat 5.5 in Tomcat 6. I remember seeing a separate project for this exact purpose but cannot find it anymore, does anyone know about this? To preempt any question as to why would I not use cluster-ha and cluster-tribes, all I can say is that it's not an option in my case. Thanks, Florian -- View this message in context: http://www.nabble.com/Can-catalina-cluster-from-Tomcat-5.5-be-used-in-Tomcat-6--tp25244120p25244120.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to access files outside Webapp directory in tomcat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Akash, On 9/1/2009 1:36 PM, asingla4 wrote: > Initially, I was accessing the files using the absolute path Accessing the files with what? A fork and knife? > but this way > I'm unable to download the files through my web Page (the download image on > the page would require a relative path as src.) Are you trying to read a file off the disk using something like FileInputStream, or are you trying to access a file from the server using a URL from a browser? These are very basic questions whose answers will certainly help solve your problem. > So, eventually, I haven't been able to try anything. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqdYrgACgkQ9CaO5/Lv0PD7WQCfTSxFJk3ZEDTaHcxGvzYBF+Qi eKkAn2KnfKydHyLHxASNw/qx5N4NoZKJ =OmST -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 4.1.31 problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jamez, On 9/1/2009 1:10 PM, jamez smith wrote: >> Sorry I didn't make this clear. The DOS Window where I type >> "startup.bat" is not closed and showed below, but the DOS Window it opened >> is closed itself. >> C:\Tomcat 4.1\bin>startup.bat >> Using CATALINA_BASE: .. >> Using CATALINA_HOME: .. >> Using CATALINA_TMPDIR: ..\temp >> Using JAVA_HOME: C:\j2sdk1.4.2_15 You mean the command completed, not that the DOS window closed, right? When you run "catalina.bat run", all the stdout output should go into the CMD.EXE window where you ran it. >> After I run both "startup.bat" or "catalina run", the procurement_log.txt >> showed the exception: (in the server.xml, myApp = procurement, I used myApp >> to represent the real project name, hope it won't confuse you.) > >> 2009-09-02 00:25:51 StandardContext[/procurement]: Starting >> 2009-09-02 00:25:51 StandardContext[/procurement]: Processing start(), >> current available=false >> 2009-09-02 00:25:51 StandardContext[/procurement]: Configuring default >> Resources >> 2009-09-02 00:25:51 StandardContext[/procurement]: Resources start failed: >> java.lang.IllegalArgumentException: Document base ..\webapps\procurement >> does not exist or is not a readable directory This sounds like a good place to start. What is your "appBase" for your in server.xml? Please re-post the definition that does work, and the one that does not work (no need to re-post the within the ). >> I am rechecking and rechecking [the JNDI configuration]. I found >> in common/lib directory there are one db2java.jar and one COM >> folder, basically it is the unzipped version of that db2java.jar. >> Not sure why the COM folder is there. But I try to remove the COM >> folder, the error is still there. The COM folder will be igonred; only .jar files will be used from within that directory. Forget about the database driver: I think that was a distraction from the real error (shown above). >> Yes, IBM driver really starts with COM all in caps. Ok. >> I just so confused why I set >> docBase as local, Tomcat is working? Can you explain further what you mean when you say "set docBase as local" versus whatever else you set it to? Again, post the working AND non-working configurations. >>> Finally, I wonder if upgrading to a newer level of Tomcat is an option. >> >> This application has to run on JDK 1.4. Ugh. Why? >> My colleague told me we have to use >> Tomcat 4, as Tomcat 5 requires JDK 1.5. Is that true? As Chuck says, Tomcat 5.5 can run on JDK 1.4 if you install the compatibility package (which is easy). >> I am more than happy >> to switch to higher version of Tomcat. Basically I only use Tomcat on local >> for development, and we are using Websphere application server in >> production. That raises a few other questions: 1. If this is a legacy application, how much "development" is really occurring? 2. Why not run the same environment in both dev and prod? 3. Why can't you run under JDK 1.5 or 1.6? Why not Tomcat 6.0? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqdYiUACgkQ9CaO5/Lv0PB1WwCgmTE94U3JOZD8Jfw+LyyMW63y oegAn0ZOtl7SS5nqiVgb7QcfBeq2NyLp =zG88 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: redirect paramter in the jk_workers file
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dhiraj, On 8/27/2009 8:26 AM, Dhiraj Rajput wrote: > I have issue on the redirect tag in jk workers file. What is "redirect tag"? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqdX0cACgkQ9CaO5/Lv0PDhPgCeLHCBugeuHTXZxPSLoP6gp236 /gkAn2ydLL6Y8j95Zpb6f802THfOZMUT =eedS -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Unable to access files outside Webapp directory in tomcat
Hi, Initially, I was accessing the files using the absolute path, but this way I'm unable to download the files through my web Page (the download image on the page would require a relative path as src.) So, eventually, I haven't been able to try anything. Akash Christopher Schultz-2 wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Akash, > > On 8/30/2009 12:34 PM, asingla4 wrote: >> I have kept all the documents and images outside the root directory >> of the application. How can I access these files in my >> application[?] > > What have you already tried? > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEUEARECAAYFAkqb848ACgkQ9CaO5/Lv0PDYKQCVFFj6UJlSTTEFn0qemuv5J3R0 > 3gCggNJlZP3lGSIgZ+syit2FrKcV/88= > =yW0Z > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- View this message in context: http://www.nabble.com/Unable-to-access-files-outside-Webapp-directory-in-tomcat-tp25213157p25244051.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: filter mapping in Tomcat6
> From: r9973 [mailto:r9...@yahoo.com] > Subject: filter mapping in Tomcat6 > > Instead of passing through the filter once, it calls it for every > single include on the page i.e. every single tile Turn on Tomcat's AccessLogValve or monitor the traffic between the browser and Tomcat with Wireshark or equivalent. I suspect you'll see the browser generating a separate request for each tile. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat 4.1.31 problem
> From: jamez smith [mailto:jamez...@gmail.com] > Subject: Re: tomcat 4.1.31 problem > > This application has to run on JDK 1.4. Why are you tying both hands behind your back and wearing a blindfold while crossing a room full of booby-traps? 1.4 has been a dead end for quite some time. > My colleague told me we have to use Tomcat 4, as Tomcat 5 > requires JDK 1.5. Is that true? No, but you must install the JDK 1.4 Compatibility Package to run Tomcat 5.5 under a 1.4 JVM. It's on the same download page as the Tomcat download. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 4.1.31 problem
On Tue, Sep 1, 2009 at 11:26 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Jamez, > > On 8/31/2009 10:27 PM, jamez smith wrote: > > >>Really? When you run startup.bat from the command-line, is EXITS > >>CMD.EXE? That is very surprising. > Sorry I didn't make this clear. The DOS Window where I type "startup.bat" is not closed and showed below, but the DOS Window it opened is closed itself. C:\Tomcat 4.1\bin>startup.bat Using CATALINA_BASE: .. Using CATALINA_HOME: .. Using CATALINA_TMPDIR: ..\temp Using JAVA_HOME: C:\j2sdk1.4.2_15 > > > >>Try looking in the file logs/procurement_log.[datestamp].txt > After I run both "startup.bat" or "catalina run", the procurement_log.txt showed the exception: (in the server.xml, myApp = procurement, I used myApp to represent the real project name, hope it won't confuse you.) 2009-09-02 00:25:51 StandardContext[/procurement]: Starting 2009-09-02 00:25:51 StandardContext[/procurement]: Processing start(), current available=false 2009-09-02 00:25:51 StandardContext[/procurement]: Configuring default Resources 2009-09-02 00:25:51 StandardContext[/procurement]: Resources start failed: java.lang.IllegalArgumentException: Document base ..\webapps\procurement does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:146) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3285) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3415) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141) at org.apache.catalina.core.StandardHost.start(StandardHost.java:707) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143) at org.apache.catalina.startup.Catalina.start(Catalina.java:463) at org.apache.catalina.startup.Catalina.execute(Catalina.java:350) at org.apache.catalina.startup.Catalina.process(Catalina.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156) 2009-09-02 00:25:51 StandardContext[/procurement]: Configuring non-privileged default Loader 2009-09-02 00:25:51 StandardContext[/procurement]: Configuring default Manager 2009-09-02 00:25:51 StandardContext[/procurement]: Processing standard container startup 2009-09-02 00:25:51 StandardContext[/procurement]: Context startup failed due to previous errors 2009-09-02 00:25:51 StandardContext[/procurement]: Exception during cleanup after start failed LifecycleException: Container StandardContext[/procurement] has not been started at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3600) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3573) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141) at org.apache.catalina.core.StandardHost.start(StandardHost.java:707) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143) at org.apache.catalina.startup.Catalina.start(Catalina.java:463) at org.apache.catalina.startup.Catalina.execute(Catalina.java:350) at org.apache.catalina.startup.Catalina.process(Catalina.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156) > > > org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of > > class '' for connect URL 'null', cause: > > java.lang.NullPointerException > > at COM.ibm.db2.jdbc.app.DB2Driver.acceptsURL(Unknown Source) > > at java.sql.DriverManager.getDriver(DriverManager.java:232) > > at > > > org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743) > > >>Amusingly enough, there's a thread occurring concurrently with this one > >>on the list on this exact issue. Basically: check and re-check all your > >> parameters, make sure your datasource name is consistent, and >
filter mapping in Tomcat6
I created a filter and its mapping in my applications web.xml. This is running in Tomcat6. My application is using the Tiles framework. filtername org.springframework.web.filter.DelegatingFil terProxy filtername /* REQUEST Instead of passing through the filter once, it calls it for every single include on the page i.e. every single tile even though I have only request in my dispatcher property and not include or forward. Any ideas why this is happening? -- View this message in context: http://www.nabble.com/filter-mapping-in-Tomcat6-tp25244035p25244035.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
filter mapping in Tomcat6
I created a filter and its mapping in my applications web.xml. This is running in Tomcat6. My application is using the Tiles framework. filtername org.springframework.web.filter.DelegatingFil terProxy filtername /* REQUEST Instead of passing through the filter once, it calls it for every single include on the page i.e. every single tile even though I have only request in my dispatcher property and not include or forward. Any ideas why this is happening? -- View this message in context: http://www.nabble.com/filter-mapping-in-Tomcat6-tp25244034p25244034.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 6.0.20 different instances with diff ips but same port no 80
Caldarale, Charles R schrieb: I would probably deploy the app, grab the extracted second_world.xml, put it under version control Why not just start out with the element under version control? No need to even have it in the .war file if you're always going to override it. Right. I just imagined being a Tomcat admin receiving an alien WAR without source, but with its particular context.xml - and having to deal with it, and possible successor versions. beta gamma The elements aren't needed. If you just have a single - which must be the defaultHost for the - all requests go there regardless. It's only when you have multiple elements that the name attribute and any elements come into play. That makes sense. Thanks! -- Michael Ludwig - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat 6.0.20 different instances with diff ips but same port no 80
> From: Michael Ludwig [mailto:m...@as-guides.com] > Subject: Re: tomcat 6.0.20 different instances with diff ips but same > port no 80 > > I would probably deploy the app, grab the extracted second_world.xml, > put it under version control Why not just start out with the element under version control? No need to even have it in the .war file if you're always going to override it. > Just to be sure, would I do that by using: > >beta >gamma The elements aren't needed. If you just have a single - which must be the defaultHost for the - all requests go there regardless. It's only when you have multiple elements that the name attribute and any elements come into play. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 6.0.20 different instances with diff ips but same port no 80
Caldarale, Charles R schrieb: From: Michael Ludwig [mailto:m...@as-guides.com] A server may have mulitple elements. Don't ask me why you'd want more than one elements [2] - because that's what I'd like to ask the experts. Anyone? Seemed like a good idea at the time? If you look inside Tomcat, you'll see that it's a set of nested containers, with being the top one, and the next layer. You might want to use multiple elements if you want to run a single JVM with independent servlet engines inside (think embedded controller, where the number of processes is limited). Thanks, that sufficiently clarifies it. (3) By some other means? By placing a second_world.xml file in each of the conf/Catalina/[host] directories, with the element therein having a docBase attribute pointing to the actual location of the .war file. This is pretty much equivalent to #2, except you can tailor the element for each , if needed. A detail that adds flexibility and makes a difference. In practice, I would probably deploy the app, grab the extracted second_world.xml, put it under version control (I know admins don't use that, but I would), make my changes, commit them, and then place a copy in each of the aforementioned directories so it prevents the original from the WAR to be extracted and used. Does that sound like solid operating procedure? :-) Regardless, your webapp will be deployed once for each . If you don't want that, just use a single , and let it field requests for all of alpha, beta, and gamma. Just to be sure, would I do that by using: beta gamma -- Michael Ludwig - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: redirect paramter in the jk_workers file
Hi All, Any idia on below mail Could anyone help me on the same. Thanks and Regards, -Original Message- From: Dhiraj Rajput [mailto:draj...@premiertechnologygroup.com] Sent: Thursday, August 27, 2009 5:56 PM To: users@tomcat.apache.org Subject: redirect paramter in the jk_workers file Hi All, I have issue on the redirect tag in jk workers file. Currently I am having mod jk 1.2.27 on my server. I am using two tomcat instances in the cluster. My problem is 1) Is mod Jk 1.2.27 support redirect tag. 2) How the mod redirect works. Can anyone please help me on this. Thank you, - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Is resource-ref really needed?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert, On 8/31/2009 6:19 PM, Robert Whane wrote: > Okay, it's optional, so I don't HAVE to use, but if I DO use it, what > possible advantage does it have? Adherence to the Servlet Specification? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqdQLAACgkQ9CaO5/Lv0PBPPwCdEa4oLk+mOOpbhDUS6h+/L+EI sT8An0PJastgfArpxoqTP6leVGVf/TbY =TnHf -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 100% usage and hanging on startup of Spring/Hibernate app in Tomcat 5.5 on Ubuntu 7
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter, On 9/1/2009 11:18 AM, Peter Crowther wrote: > 2009/9/1 Christopher Schultz > >> Hmm. Do you trust your hardware? >> [...] > > How much physical memory does your machine have? How much swap space? >> Try running badblocks on your swap partition. Try running memtest86+ on >> your hardware (if it's x86... you didn't say). >> > > The OP stated this was in a virtual machine. Some, but not all, of this > advice is appropriate in such an environment :-). Whoops! In that case, run vmemtest86+ ha ha ha :) Seriously, I would check the VM status. There is usually some way to observe which soft/hard limits the VM has exceeded. For instance, in Virtuozzo-based VMs, you can check /proc/user_beancounters. Other techniques must exist for other virtualization technologies (except maybe host/guest types like VMWare player, workstation, etc., since they work differently). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqdPx8ACgkQ9CaO5/Lv0PB4MwCdEUmO88r4qZCXCmim1aKwZReV HcAAn1P4kXpBIlSt1jjmgXbjayRGyB2b =vetW -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat 6.0.20 different instances with diff ips but same port no 80
> From: Michael Ludwig [mailto:m...@as-guides.com] > Subject: Re: tomcat 6.0.20 different instances with diff ips but same > port no 80 > > A server may have mulitple elements. Don't ask me why you'd > want more than one elements [2] - because that's what I'd > like to ask the experts. Anyone? Seemed like a good idea at the time? If you look inside Tomcat, you'll see that it's a set of nested containers, with being the top one, and the next layer. You might want to use multiple elements if you want to run a single JVM with independent servlet engines inside (think embedded controller, where the number of processes is limited). > (1) By dropping a copy in each of the different Host/@appBase? This is probably the best, since it allows independent updating of the .war file for each . > (2) By having all three Host/@appBase point to the same location > (and then of course put the WAR there)? This appears to work, but each will be monitoring the same locations for changes (assuming autoDeploy is true), and there might be some timing issues. > (3) By some other means? By placing a second_world.xml file in each of the conf/Catalina/[host] directories, with the element therein having a docBase attribute pointing to the actual location of the .war file. This is pretty much equivalent to #2, except you can tailor the element for each , if needed. Regardless, your webapp will be deployed once for each . If you don't want that, just use a single , and let it field requests for all of alpha, beta, and gamma. - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 4.1.31 problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jamez, On 8/31/2009 10:27 PM, jamez smith wrote: > I have tried to type "startup.bat" in DOS under $CATALINA_HOME/bin, the > window quickly closed itself again. Really? When you run startup.bat from the command-line, is EXITS CMD.EXE? That is very surprising. > I also tried to type "catalina run", > and saw the exception, but it does not look helpful too. If it's this exception, then it is helpful: > Catalina.start: LifecycleException: Context startup failed due to previous > errors If there's anything before that in catalina.out, then it will be helpful to see it. From what you posted, it looks like the error will be shown in a different log file: one for a particular webapp. > I am running it immediately starting up my PC. How do we know what the > previous error is? I did remember I had such exception before, but I just > can never trigger the same error again. Try looking in the file logs/procurement_log.[datestamp].txt > org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of > class '' for connect URL 'null', cause: > java.lang.NullPointerException > at COM.ibm.db2.jdbc.app.DB2Driver.acceptsURL(Unknown Source) > at java.sql.DriverManager.getDriver(DriverManager.java:232) > at > org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743) Amusingly enough, there's a thread occurring concurrently with this one on the list on this exact issue. Basically: check and re-check all your parameters, make sure your datasource name is consistent, and only put your MySQL driver JAR file in one place: in the server's library directory (common/lib on TC 4.1 IIRC). > I post the datasource configuration in the server.xml again: > > >prefix="procurement_log." suffix=".txt" timestamp="true"/> It wouldn't hurt to turn up debug to something like "99". I've never seen good documentation on what that attribute is supposed to do, unfortunately. > type="javax.sql.DataSource"/> > > > > driverClassName >COM.ibm.db2.jdbc.app.DB2Driver > > > > >url >jdbc:db2:oscahe > > The two above parameters are the ones you ought to double- and triple-check: does the IBM driver really start with COM all in caps? I suspect that it should be "com.ibm.db2.jabc.app.DB2Driver" instead of that you have. Case does matter. Also, is the URL you have above the correct URL for DB2? Does anything need to be set up in a separate file to resolve "oscahe" (and is that spelled right? "oscache", maybe?)? I remember Oracle's non-type-IV JDBC drivers needed a separate file to configure the driver. The last thing I'd ask about your webapp is what the code looks like that is trying to grab a connection from the connection pool. Is it your own code? If so, post that. If you are using something like Hibernate, an O-R mapper, or some other DB framework, post the configuration for /that/ so we can see what the expected DataSource JNDI name is. Finally, I wonder if upgrading to a newer level of Tomcat is an option. I see it's a legacy application, but the servlet API hasn't changed that dramatically over the years (other than adding features and tightening-down the specification of older ones). You might find that your webapp runs perfectly fine on Tomcat 6.0, and will receive better support from just about everyone. TC 4.1 just got its last update ever, and it's basically dead. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqdPScACgkQ9CaO5/Lv0PDSqgCeL5A1lOEn1+MQtxwz1kXYfrzl IfEAn2Aq9tS22XgOgvxqiwkRujlWXnn8 =X00F -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 100% usage and hanging on startup of Spring/Hibernate app in Tomcat 5.5 on Ubuntu 7
2009/9/1 Christopher Schultz > Hmm. Do you trust your hardware? > [...] How much physical memory does your machine have? How much swap space? > Try running badblocks on your swap partition. Try running memtest86+ on > your hardware (if it's x86... you didn't say). > The OP stated this was in a virtual machine. Some, but not all, of this advice is appropriate in such an environment :-). - Peter
Re: Query on Tomcat Server.xml
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bhuvan, On 8/31/2009 11:46 PM, Bhuvanesh Pattanashetti wrote: > Hi, Even i have similar problem.. > I wanted to create the element. At the time of tomcat start up > using Tomcat's existing bootstrap classes rather than loading them using > sever.xml. > I wanted to create a https connector. using Http11NioProtocol for the > connector. > > Please let me know if any documentation is available on that? or any body > who has implemented the similar ones... http://www.google.com/search?q=how+to+embed+tomcat - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqdOcsACgkQ9CaO5/Lv0PBpuQCcC6S3Oa0CSJl/U+RQAAqviy75 1ocAn0JaLFPyJre9jgK+oy6Dj3mg3s6s =6SKq -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 6.0.20 different instances with diff ips but same port no 80
John Smith schrieb: Is it possible by using tomcat 6.0.20 with different instances with diff ips but same port no 80 on one system ??? Only one process can bind to any given IP/port combination. I ran instance a on port 80 (it ran), but when I tried to run another instance b on port 80 ( I got java.net.BindException: Address already in use Because that port is already taken for the IP number in question. My question is I need to run three applications on port 80 on same machine but different IPs, what is the best way and how ? Mark provided a link on how to configure different connectors. I made an effort of grokking all this server.xml configuration and have come up with two questions of my own. Please read on. You can use the following XSLT to strip your server.xml of all the helpful comments so you see that it's less frightening than it appears. http://www.w3.org/1999/XSL/Transform";> So you have a [1]. It has a couple of elements and . A server may have mulitple elements. Don't ask me why you'd want more than one elements [2] - because that's what I'd like to ask the experts. Anyone? Anyway, as you can see from [2], a "represents the combination of one or more Connector components that share a single Engine component for processing incoming requests." Define all the connectors [3] you want for your different IP numbers and ports. They'll all be processed by the single [4], which supports virtual hosting and dispatches incoming requests (based on the HTTP Host header) to a matching virtual host, or, failing that, the default host, which is mandatory both as Engine/@defaultHost and Engine/Host/@name. As a configuration artefact, the [5] is decoupled from the IP numbers and only associated with DNS names or aliases. IP numbers and ports are the job of the . Now you could nest elements defining your applications inside elements - but in Tomcat 6 this is not recommended. Now each has its place where to look for applications, which is configured in Host/@appBase. That's where you put your WAR files. Here's my second question: Say I have various bindings set up receiving requests and dispatching them to my single , which has three hosts alpha, beta and gamma. What would be the best way to associate my shiny new second-world.war with all of alpha, beta and gamma? (1) By dropping a copy in each of the different Host/@appBase? (2) By having all three Host/@appBase point to the same location (and then of course put the WAR there)? (3) By some other means? -- Michael Ludwig [1] http://tomcat.apache.org/tomcat-6.0-doc/config/server.html [2] http://tomcat.apache.org/tomcat-6.0-doc/config/service.html [3] http://tomcat.apache.org/tomcat-6.0-doc/config/http.html [4] http://tomcat.apache.org/tomcat-6.0-doc/config/engine.html [5] http://tomcat.apache.org/tomcat-6.0-doc/config/host.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 100% usage and hanging on startup of Spring/Hibernate app in Tomcat 5.5 on Ubuntu 7
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bradley, On 8/31/2009 5:27 PM, Bradley Wagner wrote: > The three thread dumps were from three different occurrences of the same > problem and three consecutive startup attempts. > > With each occurrence, the startup process hangs in the middle of > initialization. I took 2-3 jstack dumps that were identical each time. After > that, I killed the process (kill -9 ) and started it again. > > So, while it's not hanging in the same place every time, it's definitely > hanging every time. And because it's the main initialization thread that is > hanging, once it hangs, it never gets any further. Hmm. Do you trust your hardware? If you've tried several JVM versions and client vs. server (which are essentially different JVMs) and they are all having problems, then the JVM itself is probably not to blame (although using JPDA gets you off the hook? weird: try running in interpreted mode... run with -Xint just for giggles). How much physical memory does your machine have? How much swap space? Try running badblocks on your swap partition. Try running memtest86+ on your hardware (if it's x86... you didn't say). Are you running the latest kernel version available? We use 2.6.30-gentoo-r4 on one of our development boxes, 2.6.26-2-openvz-686 (from Debian) on another development box (it's an openvz VM), 2.6.18-6-686 (Debian, again) in production, and 2.4.27-2-686-smp (also Debian... 2.4? Yikes?!) in demo. All of these seem to have no problem running our applications for months and months. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqdNiQACgkQ9CaO5/Lv0PDOMgCgsxCDcoOnQA8eKfVDumfER1I7 eQkAn1JrCr0k7mWJyTusbcnU6Tf4Raj2 =35B0 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: maling list archives and bug tracker dumps for academic research evaluation
Dear Mark, thanks regards Aftab Iqbal -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Tue 9/1/2009 2:08 PM To: Tomcat Users List Subject: Re: maling list archives and bug tracker dumps for academic research evaluation Iqbal, Aftab wrote: > Dear Mark, > > thanks for your response and cooperation. For the evaluation of our research > work, we would like to run experiments on the last 12 months activity on > Tomcat project. > > I would like to have the tomcat-dev archives of last 12 months (Aug2008 - Aug > 2009). It would be even nicer if i can have 1 compressed file for one month > instead of 1 compressed file for all 12 months, if it is possible. > > regarding the bugzilla database, it is OK to get the whole dump. It would be > great if you upload it somewhere and let me download it from their. > > thanks for your cooperation and looking forward for your kind response. OK. Give me a couple of days and I'll get that sorted for you. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: maling list archives and bug tracker dumps for academic research evaluation
Iqbal, Aftab wrote: > Dear Mark, > > thanks for your response and cooperation. For the evaluation of our research > work, we would like to run experiments on the last 12 months activity on > Tomcat project. > > I would like to have the tomcat-dev archives of last 12 months (Aug2008 - Aug > 2009). It would be even nicer if i can have 1 compressed file for one month > instead of 1 compressed file for all 12 months, if it is possible. > > regarding the bugzilla database, it is OK to get the whole dump. It would be > great if you upload it somewhere and let me download it from their. > > thanks for your cooperation and looking forward for your kind response. OK. Give me a couple of days and I'll get that sorted for you. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: maling list archives and bug tracker dumps for academic research evaluation
Dear Mark, thanks for your response and cooperation. For the evaluation of our research work, we would like to run experiments on the last 12 months activity on Tomcat project. I would like to have the tomcat-dev archives of last 12 months (Aug2008 - Aug 2009). It would be even nicer if i can have 1 compressed file for one month instead of 1 compressed file for all 12 months, if it is possible. regarding the bugzilla database, it is OK to get the whole dump. It would be great if you upload it somewhere and let me download it from their. thanks for your cooperation and looking forward for your kind response. regards Aftab Iqbal -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Mon 8/31/2009 8:50 PM To: Tomcat Users List Subject: Re: maling list archives and bug tracker dumps for academic research evaluation Iqbal, Aftab wrote: > Hi, > > I am a PhD student at DERI (http://www.deri.ie), Galway, Ireland. We are > working here on a research to address some issues in > software development processes and how can make software development and > specially its management efficient[1]. For the > evaluation of our research, we are looking for data from mailing list > archives, bug trackers, source code, subversion logs of an open source, live > long project such as Apache Tomcat. > > Although, we have Web access to the subversion repository of Apache Tomcat > but we require dumps of the bug tracker of Apache Tomcat development and > mailing list archives to do our evaluation. > > Your help will be highly appreciated and we will be very happy to share the > results of our evaluation with you. > > If this mailing list is not intended for this email then please guide me to > whom i can contact for it. The Apache Infrastructure Team usually handles requests like this but since I am also a member of that team as well as a Tomcat committer I should be able to get this for you. Could you provide a time frame for the data you are interested in? To give you an idea of the volumes involved, in compressed form the complete dev archive is 121MB, the users archive 233MB and the announce archive 15KB. For the bugs it will be easier to give you a complete dump of the Bugzilla database. That was about 300MB (compressed) the last time I took a copy. The easiest thing for me to do is to put this somewhere under http://people.apache.org/~markt and let you download it. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat 6.0.20 different instances with diff ips but same port no 80
John Smith wrote: > I really appreciate some one give me some hint (as I can do same think in > ISS server) http://tomcat.apache.org/tomcat-6.0-doc/config/http.html Look for the address attribute Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
tomcat 6.0.20 different instances with diff ips but same port no 80
Hi Guys, Is it possible by using tomcat 6.0.20 with different instances with diff ips but same port no 80 on one system ??? I have three instances running on one machine named *a,b and c with each has different IPS (192.168.205.10/11/12). * I ran instance a on port 80 (it ran), but when I tried to run another instance b on port 80 ( I got LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use:80)..*.because port 80 is already used * My question is I need to run three applications on port 80 on same machine but different IPs, what is the best way and how ? I really appreciate some one give me some hint (as I can do same think in ISS server) Regards John
Re: Not compiling JSP's
Mark, Thanks for your reply. I checked the modification times and they are all yesterday while the system date/time on the server is today (although it was one hour off.) I am presently bringing Netbeans up on the test server in an attempt to see what is happening. If you have any other suggestions, I am all ears. Carl - Original Message - From: "Mark Thomas" To: "Tomcat Users List" Sent: Tuesday, September 01, 2009 3:14 AM Subject: Re: Not compiling JSP's Carl wrote: Odd that some JSP's get compiled and some won't. Note that it is always the same JSP's that will not compile. File modification times in the future on the JSPs? One way to find out what is going on is to use remote debugging and your favourite IDE to step through the JSP compilation process and see why it isn't working. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: java heap space error
Thanks a lot it seems I also need to do the same. Regards, Ningappa Koneri mLifestyle | www.comviva.com -Original Message- From: Suleyman Akpinar [mailto:suleyman.akpi...@hititcs.com] Sent: Tuesday, September 01, 2009 1:49 PM To: Özkan Dülger; Serdar Gür Subject: Re: java heap space error Many thanks Pid, Your solution seems very reasonable. I will fulfill your advice. Best Regards, Suleyman Pid wrote: > On 01/09/2009 08:58, Suleyman Akpinar wrote: >> Hi all, >> >> I have a java web application running on tomcat and I get java heap >> space not enough error temporarily. Each time I am increasing the JMV >> heap option by modifying the system variable CATALINA_OPTS. However, >> this solves the problem temporarily. I get the same error when I work >> for some more weeks on the development of the application. >> >> Can anybody help me solve the problem? > > You probably have a memory leak in your application. > > The first thing to check thoroughly, and I do mean thoroughly, is that > you are properly closing all database connections and related objects. > Don't assume that you have done so - check every location in the code > carefully. > > Depending on which OS & JVM version you have, (you didn't say - so we > have to guess), there are tools you can use to examine the > application's state and memory consumption. > > Google "memory leak", "jmap" and "thread dump" > > p > > > > >> Thanks in advance. >> Suleyman >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org This e-mail and all material transmitted with it are for the use of the intended recipient(s) ONLY and contains confidential and/or privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken pursuant to the contents of the present e-mail is strictly prohibited and is unlawful. The recipient acknowledges that Comviva Technologies Limited or its management or directors, are unable to exercise control or ensure the integrity over /of the contents of the information contained in e-mail. Any views expressed herein are those of the individual sender only and no binding nature of the contents shall be implied or assumed unless the sender does so expressly with due authority of Comviva Technologies Limited. E-mail and any contents transmitted with it are prone to viruses and related defects despite all efforts to avoid such by Comviva Technologies Limited. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Strange problem with data source Tomcat 6.0.18
Schalk, glad you solved it. Michael Ludwig schrieb: Then I suspect a typo in your resource definition. I once had Resource/@url instead of Resource/@uri with the MySQL driver. The error was just: For posterity, I got this the wrong way around: Resource/@url is correct, Resource/@uri is incorrect. At least for that version of the driver - 5.1.7, I believe. -- Michael Ludwig - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java heap space error
Many thanks Pid, Your solution seems very reasonable. I will fulfill your advice. Best Regards, Suleyman Pid wrote: On 01/09/2009 08:58, Suleyman Akpinar wrote: Hi all, I have a java web application running on tomcat and I get java heap space not enough error temporarily. Each time I am increasing the JMV heap option by modifying the system variable CATALINA_OPTS. However, this solves the problem temporarily. I get the same error when I work for some more weeks on the development of the application. Can anybody help me solve the problem? You probably have a memory leak in your application. The first thing to check thoroughly, and I do mean thoroughly, is that you are properly closing all database connections and related objects. Don't assume that you have done so - check every location in the code carefully. Depending on which OS & JVM version you have, (you didn't say - so we have to guess), there are tools you can use to examine the application's state and memory consumption. Google "memory leak", "jmap" and "thread dump" p Thanks in advance. Suleyman - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Not compiling JSP's
Carl wrote: > Odd that some JSP's get compiled and some won't. Note that it is always > the same JSP's that will not compile. File modification times in the future on the JSPs? One way to find out what is going on is to use remote debugging and your favourite IDE to step through the JSP compilation process and see why it isn't working. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: java heap space error
On 01/09/2009 08:58, Suleyman Akpinar wrote: Hi all, I have a java web application running on tomcat and I get java heap space not enough error temporarily. Each time I am increasing the JMV heap option by modifying the system variable CATALINA_OPTS. However, this solves the problem temporarily. I get the same error when I work for some more weeks on the development of the application. Can anybody help me solve the problem? You probably have a memory leak in your application. The first thing to check thoroughly, and I do mean thoroughly, is that you are properly closing all database connections and related objects. Don't assume that you have done so - check every location in the code carefully. Depending on which OS & JVM version you have, (you didn't say - so we have to guess), there are tools you can use to examine the application's state and memory consumption. Google "memory leak", "jmap" and "thread dump" p Thanks in advance. Suleyman - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
java heap space error
Hi all, I have a java web application running on tomcat and I get java heap space not enough error temporarily. Each time I am increasing the JMV heap option by modifying the system variable CATALINA_OPTS. However, this solves the problem temporarily. I get the same error when I work for some more weeks on the development of the application. Can anybody help me solve the problem? Thanks in advance. Suleyman - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org