CLOBs, Connection Pooling, Help!
Ok, I've searched and searched, but I cannot figure out the answer. I am using Tomcat container provided connection pooling; connecting to an Oracle XE server and I need to insert a CLOB. It would appear that doing this task is dependent upon which RDBMS vendor you're working with? Can anyone help me understand what I need to do? I've gotten this far: import javax.naming.*; import java.sql.*; import javax.sql.*; import oracle.jdbc.*; // try/catch stuff omitted for example. Context initContext = new InitialContext(); Context envContext = (Context) initContext.lookup(java:/env/); DataSource ds = (DataSource) envContext.lookup(jdbc/isms_messaging); Connection conn = ds.getConnection(); sqlString = insert into message_body (message_id,message_body) values (?,?); PreparedStatement insertMsgBodyRecord = conn.prepareStatement(sqlString); insertMsgBodyRecord.setString(1,message.getMessageId()); // This is where things fall apart (setStringForClob // is a Oracle PreparedStatement method) - which // is wrong, but still insertMsgBodyRecord.setStringForClob(2,message.toXML()); insertMsgBodyRecord.executeUpdate(); insertMsgBodyRecord.close(); conn.close(); thanks -- brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IE causes an ORA-00936 error, but not Firefox?
Ok, here is a weird one. I don't believe it is related to Tomcat specifically, but I'd like to tap the community and see if someone else has ever experienced this issue. I am troubleshooting an app, which was originally designed using Firefox. Now that we are testing with IE (IE 6 and 7), we are running into an unusual error (see below). I don't have access to the JSPs at the moment (I believe it is a model I application - JSP only) so I can't look at the code - just functional testing for now. But this error only occurs in IE (both 6 and 7) - I've tried googling, but without much luck. Has anyone ever experienced this issue? thanks -- brian [28 Mar 2008 12:58:39,522] ERROR TP-Processor7 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/csstest].[org.apache.jsp.splash_jsp] - Servlet.service() for servlet org.apache.jsp.splash_jsp threw exception java.sql.SQLException: ORA-00936: missing expression at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216) at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:810) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039) at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doEndTag(QueryTagSupport.java:215) at org.apache.jsp.splash_jsp._jspx_meth_sql_query_1(splash_jsp.java:654) at org.apache.jsp.splash_jsp._jspService(splash_jsp.java:104) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) 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 eis.doe.ghg.AuthFilter.doFilter(AuthFilter.java:38) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:201) 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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:595) - 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: IE causes an ORA-00936 error, but not Firefox?
On Fri, Mar 28, 2008 at 10:27 AM, Frank W. Zammetti [EMAIL PROTECTED] wrote: My first guess (and that's all it is, a guess!) is that you're trying to insert something coming from the client into a SQL query and for whatever reason it's being transmitted differently from IE than FF and is somehow Thanks Frank, Peter Those answers sound logical to me. Now if I can just get my hands on the source -- brian - 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: [OT] RE: IE causes an ORA-00936 error, but not Firefox?
[snip very helpful suggestions] Holy crap guys! This is awesome, I've never had this much response from the users@ (and be it an off-topic too!) Once I get the code in hand, that's when the fun will begin! thanks everyone -- brian - 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: Displaying jsp pages without specifying the port 8080
On Tue, Mar 18, 2008 at 9:45 AM, Murat Birben [EMAIL PROTECTED] wrote: My server OS is centos and I've apache 2.2 and tomcat6 installed on my machine. I can display my php pages as abc.xyz.com and display my jsp pages on LAN as abc.xyz.com:8080/asd but my jsp pages cannot be display from out of my LAN. What may be the problem? Well, if you are using CentOS, there could be a number of reasons. Are you running SELinux? Do you have aggressive firewall rules that are blocking 8080? If you can, go into a shell and type 'netstat -an | grep -i listen' and look for port 8080 - see if it is bound to localhost (127.0.0.1) or the LAN IP. - or post the results here. My second question is, I want to display my jsp pages as abc.xyz.com. How can I do that? Since you are already using Apache, using port 80, you will need to configure mod_proxy_ajp or mod_ajp. Lets solve the first issue first though. -- brian - 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: Displaying jsp pages without specifying the port 8080
On Tue, Mar 18, 2008 at 9:58 AM, Murat Birben [EMAIL PROTECTED] wrote: tcp0 0 :::8080 :::* LISTEN Ok, that's good, it can listen on all IPs Now, do you know if you are running SELinux or if your firewall is configured as Peter suggested? -- brian - 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: beginer question abt JSP with Tomcat
On 9/11/07, Hassan Schroeder [EMAIL PROTECTED] wrote: ?? On my Mac (OS X.4.10) $JAVA_HOME is: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0 Hi everyone. I don't mean to cloud the discussion with a possible non-issue, but for fun, I just tried defining my JAVA_HOME as you suggested, tried starting Tomcat and it showed the normal startup 'messages' canker:~ brian$ $CATALINA_HOME/bin/startup.sh Using CATALINA_BASE: /Users/brian/apache-tomcat-5.5.23 Using CATALINA_HOME: /Users/brian/apache-tomcat-5.5.23 Using CATALINA_TMPDIR: /Users/brian/apache-tomcat-5.5.23/temp Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0 But then if I do a ps -A | grep -i java (or a netstat), I don't see Tomcat running. If I do export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home (notice the Home on the end) Then when I start Tomcat, and do a ps -A or netstat, I do see it running. I believe the erroneous JAVA_HOME is causing this muted error. -- brian - 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: beginer question abt JSP with Tomcat
Oops, I stand corrected, as I see further along in the thread that JAVA_HOME is pointing to where I suggested. See I knew I shouldn't have jumped in here! :) -- brian On 9/13/07, Brian Munroe [EMAIL PROTECTED] wrote: On 9/11/07, Hassan Schroeder [EMAIL PROTECTED] wrote: ?? On my Mac (OS X.4.10) $JAVA_HOME is: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0 Hi everyone. I don't mean to cloud the discussion with a possible non-issue, but for fun, I just tried defining my JAVA_HOME as you suggested, tried starting Tomcat and it showed the normal startup 'messages' canker:~ brian$ $CATALINA_HOME/bin/startup.sh Using CATALINA_BASE: /Users/brian/apache-tomcat-5.5.23 Using CATALINA_HOME: /Users/brian/apache-tomcat-5.5.23 Using CATALINA_TMPDIR: /Users/brian/apache-tomcat-5.5.23/temp Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0 But then if I do a ps -A | grep -i java (or a netstat), I don't see Tomcat running. If I do export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home (notice the Home on the end) Then when I start Tomcat, and do a ps -A or netstat, I do see it running. I believe the erroneous JAVA_HOME is causing this muted error. -- brian - 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: [OT] context-param vs env-entry. Ready? Fight!
On 9/6/07, Christopher Schultz [EMAIL PROTECTED] wrote: Finally Martin Fowler said dependency injection, and nobody ever had to worry about programs making any kind of sense ever again. And it was Good (for hourly contractors!) That's it, I'm going back to Perl CGI application development! I don't see any IoC frameworks for that. :) Is it late enough to call it Friday? Its Friday for someone, somewhere on this list! -- brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Garbage Collection and Class unloading
Can someone explain a little bit about classloading really quick? Let me preface this with: I am maintaining an application which I did not develop. Looking at the WEB-INF/lib directory, it has around 76 different jar files, some actually used in the application, some (well, most) not. They either pertain to legacy features or are functionality duplicate (two different versions of Oracle driver libraries, for example) I am trying to tune Tomcat because it keeps running out PermGen space, so I am using jconsole to inspect the JVM. I suppose it isn't really a profiler, but it is a start. According to jconsole, after doing many application development cycles of remove-deployment of *.war to Tomcat (via manager), it looks like as many as 20k classes are loaded. I was under the impression that the garbage collector would unload classes as necessary. I tried to force a GC via jconsole, it reduced the heap memory like it should, and it unloaded a few classes pertaining to reflection, but nothing like what I was hoping for. I then leave it be for several hours, and all magic like, the GC unloads about 4k classes. First question. Anyone tell me why it doesn't unload classes when I am trying to force it? Is classloading/unloading not even the same as garbage collection? Second question. Is having 20k classes loaded normal for a middle sized application? I am assuming if I remove all the unnecessary jars from WEB-iNF/lib I can reduce that number? Would it benefit anything to place them in shared/lib? Third: If over 75% of the classes in the jars aren't being called anywhere in the application, even though they get loaded on the initial application deployment, shouldn't the GC unload them almost immediately, since there aren't any open resources using these classes. Fourth question: Do my JAVA_OPTS looks decent? JAVA_OPTS=-Xms512m -Xmx512m -server -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8114 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -verbose:gc -XX:+PrintClassHistogram -XX:+PrintGCDetails -XX:MaxPermSize=128m many thanks! -- brian ps. My platform looks like: Solaris 9 (SPARC), Tomcat 5.5.23, JDK 1.6.0_02 (32-bit) - 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: context-param vs env-entry. Ready? Fight!
On 9/6/07, Lionel Crine [EMAIL PROTECTED] wrote: Of course, you ll have to define the JNDI variable in a different way. But most important, you'll don't have to change your java classes because the JNDI tree will stay the same. Yep, that is what I am pushing for (JNDI) -- brian - 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: Garbage Collection and Class unloading
On 9/6/07, David Smith [EMAIL PROTECTED] wrote: I'd think your best bet is to clean out all the dead in-house code and then thin out the dependencies until it stops building. If nothing else, refactor your code to pair down the multiple versions of libraries. Oh, don't you worry, me and the original developer are gonna have a code audit come Monday! :) Even if it wasn't killing Tomcat, the amount of cruft in WEB-INF/lib is ridiculous! -- brian - 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: Please help...
On 9/1/07, Brian Munroe [EMAIL PROTECTED] wrote: On 9/1/07, Hassan Schroeder [EMAIL PROTECTED] wrote: If you're talking about TC6, there is no common/lib or shared/lib; $CATALINA_HOME/lib is correct... Oh crap, I was going off my 5.5 install! Hassan: Ok, lend me a hand here, besides the incorrect statement about common/lib, does everything else look fine? -- brian - 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: Please help...
Mike, just an FYI: This morning I tried my little 'hello, world' recipe on Tomcat 6; aside from having to place the driver jar file in $CATALINA/lib, everything else works the same. Hope it helps you -- brian - 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: Please help...
On 9/2/07, Hassan Schroeder [EMAIL PROTECTED] wrote: To be honest, I can't find any other documentation on that -- what alternative values might be, or their effect. And I just gave it a quick try with no setting and LambdaProbe's data sources page shows a blank for Auth -- but accessing that resource still works. Yea when I was originally struggling with getting connection pooling working, I was crafting my Resource and was googling like mad trying to find some reference to what that attribute meant. Intuition tells me that it is letting the tomcat container handle authorization to the resource? Since I ended up configuring the pool at the local application level, I assumed I didn't need to worry about it since no other apps could use the defined resource? That is my guess at least. Perhaps someone else can shed some light on this. But otherwise, your suggested config looks OK to me :-) Thanks for your help! I just posted about 1 minute previous to your email - it worked fine in Tomcat 6. -- brian - 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: Please help...
On 9/2/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: The auth attribute is the equivalent of res-auth element inside a web.xml resource-ref setting, as defined in the servlet spec. The valid values are Application or Container. Chuck: So I guess I should probably read the Realm Configuration HOW-TO and Security Manager HOW-TO on the Tomcat documentation page? -- brian - 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: Please help...
On 9/2/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: Not really. The Realm configuration documents how clients login to applications, not how Tomcat (or your app) login to external resources. The Security Manager describes how to place limits on what application code can do within Tomcat. Neither are relevant here. Ok, how about JNDI Resources HOW-TO, which then links to the Resource definition [1] ;) After digesting that, it seems like auth=Container is what should be used when doing connection pooling, since Tomcat will be managing the resources? Am I getting any warmer here? -- brian [1] - http://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Resource%20Definitions - 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: Please help...
On 9/2/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: Correct. It appears that Container is the default, but setting it explicitly certainly won't hurt. Gotcha, thanks. -- brian - 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: Please help...
On 8/31/07, Mike Cronin [EMAIL PROTECTED] wrote: I am having a problem setting up a connection-pool via JNDI on Tomcat 6.0.14 utilizing Oracle 10g. Currently I have a Resource for my DataSource referenced within a Context element within the server.xml file. The classes12.jar file which contains the Oracle Driver, exists within the $CATLINA-HOME/lib. I am able to successfully access my tables outside of the connection pool so I know that I am getting to the driver. Mike: First thing I can tell you, quoting directly from the Tomcat Docs: For Tomcat 6, unlike Tomcat 4.x, it is NOT recommended to place Context elements directly in the server.xml file. This is because it makes modifing the Context configuration more invasive since the main conf/server.xml file cannot be reloaded without restarting Tomcat. Now that I've said that, I'll admit I struggled with connection pooling about a month ago. My problem was that I was trying to place the driver jar file in either shared/lib or WEB-INF/lib. This was incorrect and it needed to be in $CATALINA_HOME/common/lib, where Tomcat could manage it. If you read the classloader section on tomcat.apache.org it will make sense why this is. You mention that it is located it $CATALINA_HOME/lib [sic] - which I'll assume is a typo, but it leads to ambiguity - did you mean common/lib or shared/lib? Definitely move it to common/lib. After trying to get my JDBC resources to work in GlobalNamingResource without much luck. I ended up placing my Resource definitions in META-INF/context.xml. I don't know if you are trying to define a global pool for all your applications or can live with a local app configuration, I made due with a local configuration. Regardless, here is my hello, world recipe: In META-INF/context.xml file: Resource name=jdbc/XEDB type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:ghg/ghg@//192.168.1.14:1521/XE maxActive=100 maxIdle=30 maxWait=1 removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true / I didn't mess around with setting username and password attributes, I just provided them within the connection URL. Finally, in a JSP, I have the following code: (mind you this is just a 'hello, world' - I'd never actually recommend this in real life) jsp:directive.page import=javax.naming.* / jsp:directive.page import=java.sql.* / jsp:directive.page import=javax.sql.* / % InitialContext ic = new InitialContext(); DataSource ds = (DataSource) ic.lookup(java:comp/env/jdbc/XEDB); Connection conn = ds.getConnection(); Statement s = conn.createStatement(); ResultSet rs = s.executeQuery(select * from hello); while(rs.next()) { out.println(rs.getString(1) + br/); } s.close(); conn.close(); % I deleted, for example, resource-ref's, and basically returned conf/server.xml and WEB-INF/web.xml back to stock, which I had mucked up from trying things googling had suggested I try. Hopefully this works for you too! BTW, classes12.jar is designed for JDK 1.2 and 1.3. From what you mentioned, it is working just fine with your non-pooling code, but you can download [1] a newer version (odbc14.jar comes with Oracle XE). -- brian [1] - http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html - 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: Please help...
On 9/1/07, Hassan Schroeder [EMAIL PROTECTED] wrote: If you're talking about TC6, there is no common/lib or shared/lib; $CATALINA_HOME/lib is correct... Oh crap, I was going off my 5.5 install! Thanks! -- brian - 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: context-param vs env-entry. Ready? Fight!
On 8/31/07, Tim Funk [EMAIL PROTECTED] wrote: Do you really want code that has nothing to do with the servlet api dependent on ServletContext? Plugging in a new jndi lookup for testing is much easier. Forgive my ignorance here, but do you mean, say, in a bean? That doesn't inherit the servlet's scope? I've never tried it because I always use JNDI :) -- brian - 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: Downloaded 4.1.36 but says version is 4.1.35?
On 8/31/07, tk-2506 [EMAIL PROTECTED] wrote: Any idea what's going on??? The developers forgot to bump the sub version number in build.properties? Do you really need to use the 4.x series?! -- brian - 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: Announce List?
On 8/30/07, Mark Thomas [EMAIL PROTECTED] wrote: [snip] Brian McArdle wrote: [snip] There is also Apache Announce? Granted it isn't Tomcat specific, but it is lower traffic then dev or users. http://www.apache.org/foundation/mailinglists.html -- brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
context-param vs env-entry. Ready? Fight!
I just started to help maintain an application that I didn't originally develop. It is using context-param elements and getInitParameter() to access application configuration items in web.xml. I have always used env-entry elements and JNDI to store and read these items, respectively. Refactoring the code to use env-entry's could be tedious, so I am looking for any advantages or disadvantages for using either method. One thing I did learn is that env-entry's can be modifed during runtime? Also, since they are using JNDI, if I needed to migrate the configuration items to a different datastore, reworking the code might be easier. Any suggestions or opinions very much appreciated. -- brian - 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 not starting properly.
On 8/29/07, David Smith [EMAIL PROTECTED] wrote: able to find the endorsed directory, you should probably get a new copy of the jars from your .tar.gz or .zip download and replace the jars. Who knows what else is wrong. My vote is for just get a fresh copy of Tomcat. -- brian - 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: Unable to get a basic install working...
On 8/28/07, Hristian [EMAIL PROTECTED] wrote: I'm having the same problem, none of these ports are busy. First I tried on it's Windows Server 2003 OS, it had this problem, then we deleted the Win Server and installed Windows XP. I have no idea... Are you still having the problem on XP? Win2k3 Server and WIndows XP can be miles apart with respect to security quirks. You have a JDK installed, right? Also, if you do a 'netstat -n' and none of the ports have been allocated by another application, there is probably something else wrong. Did you install Tomcat as a service? If so, open a command window and do a 'net start tomcat5' Does it start successfully or does it give an error? Have you tried looking at the catalina.out file in the TOMCAT_INSTALL_DIR/logs/ directory? Does that give you any clue? -- brian - 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: Unable to get a basic install working...
On 8/29/07, Hristian [EMAIL PROTECTED] wrote: How could this be if the port if shows as free on netstat? Misinterpretation of netstat output? Don't take that the wrong way, I'm just trying to be helpful. Can you send the output to the mailing list? I'd follow Sonal's suggestion, because even though netstat might not be showing it, the catalina.out log is telling you what is wrong. Before you change ports, I might trying 'telnet localhost 8005' from a commandline. If you get connected, issue the command 'SHUTDOWN' (minus the quotes, ALLCAPS). If you get connected, but SHUTDOWN doesn't seem to do anything, you really are using port 8005 for something else. -- brian - 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: [OT] CLASSPATH (was Tomcat not starting properly)
On 8/29/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: The biggest problem with CLASSPATH is that it tends to be set and then forgotten, causing classloading problems during subsequent Java executions. The resulting confusion (especially if it involves the wrong version of a class, rather than just a CNFE) can take ages to figure out. It's clearer for everyone involved to specify the exact path needed on the command line when starting a Java application. Tomcat is just one example of why CLASSPATH shouldn't be used: we've had numerous discussions on this list when noobs thought they were helping Tomcat by specifying all sorts of JAR files via the CLASSPATH variable - all of which resulted in disaster, of course. No kidding. I was always told that Tomcat ignored the CLASSPATH and not to use it. Maybe that is one of those white lies they tell newbies to alleviate problems? :) I am not totally new to the Java environment, but I am always looking for the 'best practice' or the 'industry standard' way of doing things. I haven't had many opportunities to write client side applications with it, so I never really had to muck with CLASSPATH too much. thanks for your time -- brian - 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: Unable to get a basic install working...
On 8/29/07, David Smith [EMAIL PROTECTED] wrote: One other thought and I don't know how possible this is but it's there for your consideration. Would you happen to have a connector defined with the same port number as the shutdown port def.? It wouldn't be bound until tomcat starts and then either the shudown port or the connector might bind first, denying the other. Oh that is wild edge case, but maybe! Do you ever feel like a blind man holding the tail of an elephant? -- brian - 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: [OT] CLASSPATH (was Tomcat not starting properly)
On 8/29/07, Christopher Schultz [EMAIL PROTECTED] wrote: The CLASSPATH environment variable is certainly not ignored by Tomcat. Here's part of the startup script from TC 5.5: # Add on extra jar files to CLASSPATH if [ -n $JSSE_HOME ]; then CLASSPATH=$CLASSPATH:$JSSE_HOME/lib/jcert.jar:$JSSE_HOME/lib/jnet.jar:$JSSE_HOME/lib/jsse.jar fi CLASSPATH=$CLASSPATH:$CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/commons-logging-api.jar Hum, yep, your right. Setting your own CLASSPATH environment variable is a recipe for disaster. Duly noted. Thanks Chris and Chuck. -- brian - 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 (javac)compilation arguments
On 8/27/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: I'm really curious about one thing: if the OP has a 64-bit environment, why is he being so stingy with heap space? In the OP, what I found interesting was that the default heap size wasn't enough to start Tomcat? According to SUN, the default is around 83 MB for 64-bit JVMs [1]. Does that make sense? Manivannan mentioned that Tomcat doesn't throw any exceptions, it just never starts. I wouldn't have thought that heap was the problem at that point. -- brian [1] - http://java.sun.com/docs/hotspot/HotSpotFAQ.html#64bit_heap_defaults - 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 (javac)compilation arguments
On 8/27/07, Manivannan Palanichamy [EMAIL PROTECTED] wrote: My problem is: I am trying to install java tomcat on a server (redhat linux, 64 bit), which runs on shared memory. I need to limit down java start up memory, by passing arguments like $javac -J -Xmx118m $java -Xmx118m so that the virtual machince starts, otherwise it is terminated. I understand. I think what you are looking for is CATALINA_OPTS and/or JAVA_OPTS. This link below is for Tomcat 4.0, but the concept is still valid. http://books.google.com/books?id=fYygS5Jf6g4Cpg=PA15lpg=PA15dq=catalina_optssource=webots=FKXI_AtgUlsig=kyodX_5z9g2CSLGk9AEvXcfor7E also see http://tomcat.apache.org/faq/memory.html These are both for the JVM, you will still have to pass javac command line arguments. One other thing. -In my environment, I run tomcat instances as separate users, via the 'su' command. When I first tried this technique, I was placing environment variables at the top of the startup script, but they were being ignored. I ended up having to place them in $HOME/.bashrc (for example), which now makes perfect sense. I doubt this is the case for you, but I just wanted to point it out, in case your variables weren't being picked up or something. -- brian - 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 (javac)compilation arguments
On 8/25/07, Manivannan Palanichamy [EMAIL PROTECTED] wrote: I need to pass javac (compilation) arguments to tomcat. Just as JAVA_OPTS is there for jvm arguments, is there any env var/ other ways to pass arguments to javac of tomcat? Hum, 'javac of tomcat' - Do you mean the JSP Compiler, or do you really mean javac, which is used when say, compiling Servlets? I am not aware of an environment variable ala JAVA_OPTS. However, if you are using Ant, you can add a compilearg as a nested element within the javac element. For example: javac srcdir=${src.home} destdir=${build.home}/WEB-INF/classes debug=${compile.debug} deprecation=${compile.deprecation} optimize=${compile.optimize} classpath refid=compile.classpath/ compilerarg value=-Xlint / /javac If this isn't what you were looking for, please advise. -- brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
org.apache.catalina.ant.ReloadTask and JSP caching
I am experiencing an annoying (but not show-stopping) issue while trying to use the Catalina ReloadTask Ant task. I am currently using Ant 1.7, JDK 1.5 (OS X) and Tomcat 5.5.23. Whenever I make a modification to a JSP, I usually do an 'ant reload' to push the changes to the build/ directory and force the container to reload the application. However, when I refresh the JSP in the browser, the changes don't take effect, even if I clear the browser cache, etc. I checked the content of the build/ directory, the modified file has been copied there. It is almost like the container isn't reloading the web app. I recently moved from JDK 1.4.2, Tomcat 5.0.17 and Ant 1.6.5. I didn't experience the problem with that configuration. Any ideas? I've included my build.xml file at the bottom for reference. thanks -- brian ?xml version=1.0 ? project name=Import Test default=compile basedir=. property file=${user.home}/build.properties / property name=app.name value=importtest/ property name=app.path value=/${app.name}/ property name=build.homevalue=${basedir}/build / property name=dist.home value=${basedir}/dist/ property name=web.home value=${basedir}/web / property name=src.home value=${basedir}/src / property name=lib.home value=${basedir}/src/lib / taskdef name=deploy classname=org.apache.catalina.ant.DeployTask / taskdef name=listclassname=org.apache.catalina.ant.ListTask / taskdef name=reload classname=org.apache.catalina.ant.ReloadTask / taskdef name=undeploy classname=org.apache.catalina.ant.UndeployTask / property name=compile.debug value=true / property name=compile.deprecation value=false / property name=compile.optimizevalue=true / path id=compile.classpath fileset dir=${catalina.home}/common/endorsed include name=*.jar/ /fileset fileset dir=${catalina.home}/common/lib include name=*.jar/ /fileset fileset dir=${catalina.home}/shared/lib include name=*.jar/ /fileset fileset dir=${basedir}/src/lib include name=*.jar/ /fileset /path target name=all depends=clean,compile / target name=list list url=${manager.url} username=${manager.username} password=${manager.password} / /target target name=clean delete dir=${build.home}/ delete dir=${dist.home}/ /target target name=install depends=compile deploy url=${manager.url} username=${manager.username} password=${manager.password} path=${app.path} localWar=file://${build.home} / /target target name=reload depends=prepare,compile reload url=${manager.url} username=${manager.username} password=${manager.password} path=${app.path}/ /target target name=remove undeploy url=${manager.url} username=${manager.username} password=${manager.password} path=${app.path}/ /target target name=dist depends=compile mkdir dir=${dist.home}/ jar jarfile=${dist.home}/${app.name}.war basedir=${build.home}/ /target target name=compile depends=prepare javac srcdir=${src.home} destdir=${build.home}/WEB-INF/classes debug=${compile.debug} deprecation=${compile.deprecation} optimize=${compile.optimize} classpath refid=compile.classpath/ /javac /target target name=prepare !-- Create build directories as needed -- mkdir dir=${build.home}/ mkdir dir=${build.home}/META-INF/ mkdir dir=${build.home}/WEB-INF/ mkdir dir=${build.home}/WEB-INF/lib/ mkdir dir=${build.home}/WEB-INF/classes/ !-- Copy static content of this web application -- copy todir=${build.home} fileset dir=${web.home} / /copy !-- Copy precompiled jarfiles to dest -- copy todir=${build.home}/WEB-INF/lib fileset dir=${lib.home}/ /copy /target /project - 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: org.apache.catalina.ant.ReloadTask and JSP caching
On 8/26/07, Brian Munroe [EMAIL PROTECTED] wrote: I am experiencing an annoying (but not show-stopping) issue while trying to use the Catalina ReloadTask Ant task. Ok, I think I've isolated the problem, and it has nothing to do with the ReloadTask. More in regards to the DeployTask, as explained below. It used to be while using my old environment [1], when I do an 'ant list' it would tell me that it is running the web app from my local build/ directory, for example '/Users/brian/Projects/importest/build/'. Now it appears that is actually 'deploys' the web application to the $CATALINA_HOME/webapps directory. So it seems that something has changed in the way localWar now functions? I've even tried changing from 'value' to the 'location' attribute when setting the build.home property, just in case. property name=app.name value=importtest / property name=app.pathvalue=/${app.name}/ property name=build.homelocation=${basedir}/build / deploy url=${manager.url} username=${manager.username} password=${manager.password} path=${app.path} localWar=file://${build.home} / Any advice? Thanks! -- brian [1] - Ant 1.6.5, Tomcat 5.0, and JDK 1.4.2 (OS X) - 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: Refresh JSP in Tomcat 5.5
On 8/26/07, hezjing [EMAIL PROTECTED] wrote: Hi! If I understood the comment in web.xml correctly, by default, the JspServlet is initialized with the following parameters development=true modificationTestInterval=4 Aren't this sufficient to reload the JSP after 4 seconds the JSP is updated? That is the way I read the comments too. What if you change modificationTestInterval back to 0? I have the following configuration (in the JSP Servlet element) and changes to my JSPs are picked up immediately: init-param param-namedevelopment/param-name param-valuetrue/param-value /init-param init-param param-namemodificationTestInterval/param-name param-value1/param-value /init-param init-param param-namecheckInterval/param-name param-value1/param-value /init-param Also, you are restarting the container after each web.xml modification, right :) -- brian - 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: Refresh JSP in Tomcat 5.5
BTW, with the configuration I showed below, the JSP does not get translated to a *.java file until I first access the page. On 8/26/07, Brian Munroe [EMAIL PROTECTED] wrote: On 8/26/07, hezjing [EMAIL PROTECTED] wrote: Hi! If I understood the comment in web.xml correctly, by default, the JspServlet is initialized with the following parameters development=true modificationTestInterval=4 Aren't this sufficient to reload the JSP after 4 seconds the JSP is updated? That is the way I read the comments too. What if you change modificationTestInterval back to 0? I have the following configuration (in the JSP Servlet element) and changes to my JSPs are picked up immediately: init-param param-namedevelopment/param-name param-valuetrue/param-value /init-param init-param param-namemodificationTestInterval/param-name param-value1/param-value /init-param init-param param-namecheckInterval/param-name param-value1/param-value /init-param Also, you are restarting the container after each web.xml modification, right :) -- brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AJP talking TLS or SSL
I am well aware after STW that the 2 best suggestions for securing traffic between Apache httpd and Tomcat over AJP (either using mod_jk_proxy or mod_jk), is: 1. Use either IPSec, stunnel, etc. 2. Don't use AJP and proxy https between Tomcat and Apache. Any other options? I'd really like to encrypt AJP traffic out of the box... thanks -- brian - 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: SSL on Windows Vista with Tomcat 5.0.28 not working
On 8/20/07, Mark Thomas [EMAIL PROTECTED] wrote: Looks like time to start looking at the network traffic to figure out what is going wrong. Either that, or my guess is Vista is being helpful and not allowing sites with self-signed or untrusted SSL certificates to pass through to the user. There might be some security settings you may need to tweak. What those are, I have no Idea. -- brian - 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: AJP talking TLS or SSL
On 8/20/07, Filip Hanik - Dev Lists [EMAIL PROTECTED] wrote: autossh, but that would fall under your tunneling category. I think those are only options, I can't think of anything else yep, unfortunately. Thanks anyways. I will probably just end up using IPSec. -- brian - 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: SSL on Windows Vista with Tomcat 5.0.28 not working
On 8/20/07, Brian Munroe [EMAIL PROTECTED] wrote: There might be some security settings you may need to tweak. What those are, I have no Idea. Or after a Google search, because I was curious, IE7 doesn't like SHA-1: http://blogs.atlassian.com/developer/2007/06/ie7_on_vista_and_ssl.html -- brian - 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: Has getParameterNames been updated to use Generics?
On 8/17/07, Bill Barker [EMAIL PROTECTED] wrote: This is on the list of things for the Servlet 3.0 spec (http://www.jcp.org/en/jsr/detail?id=315), but that means you will have to wait for Tomcat 7.0.x to get the fix. All of the Servlet 2.x specs specify a non-generic Enumeration for this method. Ok good to know. Thanks for the link to the details! -- brian - 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: Unable to get a basic install working...
On 8/17/07, Lizard Lizard [EMAIL PROTECTED] wrote: I am sure more information is needed to diagnose this problem, and I will happily provide it. Thank you for any support you can offer. 2 things to check. 1. Do the tomcat logs tell you anything? Located in Tomcat install directory/logs 2. From a command window, do a 'netstat -an' and look to see if there is anything listening on localhost port 8080. -- brian - 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: Unable to get a basic install working...
On 8/17/07, Lizard Lizard [EMAIL PROTECTED] wrote: SEVERE: StandardServer.await: create[8005]: java.net.BindException: Address already in use: JVM_Bind It claims the address is already in use, but netstat shows nothing on that address. Stopping the apache server itself did not change this. I am not sure what else might be running. The log shows the same error as before. How about 8005? I *think* that is what might be the problem. If you do a 'netstat -nb', it will also include which process is using which port. A default Tomcat install usually listens on 3 ports: 8005 - The shutdown port, which when sent the correct command (usually SHUTDOWN) kills the Tomcat process. 8009 - The AJP listener, which is used when integrating with Apache httpd. 8080 - The http listener, which is the built in web server if you are going to use AJP. You can change any of these by editing $CATALINA_HOME/conf/server.xml ($CATALINA_HOME = tomcat install directory) -- brian - 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: Off-Topic - Linux questions
On 8/17/07, Vigorito, Nicholas E. [EMAIL PROTECTED] wrote: - If the suid bit is set for the owner of a directory (looks like drws when shown via ls -l) what does that mean? I can find what it means for a file but not a directory. Here is a much better explanation then I would be able to give: http://en.wikipedia.org/wiki/Suid#setuid_on_directories - If the group for a directory has read/write privs but the files within the directory have the same group but the privs on the files is just read, can a user who is in that group remove the file from that directory? If the directory has group write access then a user could remove a file if they both have the same group membership, regardless of the group permissions set on the file. I would suggest some empirical testing to confirm this. -- brian - 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: Fixed! Re: Unable to get a basic install working
On 8/17/07, Lizard Lizard [EMAIL PROTECTED] wrote: I found the problem. Something else was listening on port 8005. I changed it to 8006 in the XML config file and all worked smoothly from then on. Thank you for your help; without netstat, I'd never have managed to puzzle this out. Ok, great to hear! Good troubleshooting. BTW, On Windows, it is a snap to integrate Apache [1] and Tomcat together. In your httpd.conf file, uncomment the LoadModule proxy_ajp_module modules/mod_proxy_ajp.so directive and add something similar to the bottom of httpd.conf (change the foxmarks to your webapp name): ProxyRequests Off Location /foxmarks/ ProxyPass ajp://localhost:8009/foxmarks/ ProxyPassReverse ajp://localhost:8009/foxmarks/ /Location -- brian [1] - Assuming you are using a binary release of Apache 2.2.4 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Has getParameterNames been updated to use Generics?
This is more of a Servlet API question, but pertains to Tomcat nonetheless. I am using Tomcat 5.5.23 with JDK 1.6. I am having a problem with Generics and request.getParameterNames(). I keep getting a unchecked cast warning (just a warning, but still). I was going to just use the @SuppressWarnings annotation, since I pretty much can guarantee that the method will always return an Enumeration of Strings, right? Just making sure I would be following the standard idiom until it gets fixed. thanks -- brian - 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: Embedding XML documents as children of the context-param element
On 8/16/07, Robert Segal [EMAIL PROTECTED] wrote: So as an alternative I know the second method will work but was curious if anyone has tried the first method. I doubt the 1st method is valid, since you are basically inventing new deployment descriptor elements, and I know for sure that Eclipse would go crazy with error messages. In the 2nd method you are basically serializing the XML into a string.. I suppose that is Ok, but I think you have to have also have an env-entry-typejava.lang.String/env-entry-type element to consider web.xml well formed. Is there any reason why you couldn't store your *.xml file in WEB-INF/ and call it with something like: ServletContext sc = getServletConfig().getServletContext(); String myXMLFIlePath = sc.getRealPath(/WEB-INF/myXMLFIle.xml); ... Document document = parser.parse(new File(myXMLFilePath)); -- brian - 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: Embedding XML documents as children of the context-param element
On 8/16/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: The ServletContext.getRealPath() call will fail if the webapp is in an unexpanded .war or running on a platform without a normal file system (e.g., a mobile phone). Better to use ServletContext.getResourceAsStream(), which will function properly in all cases. Ok, good to know. I am fixing my code as we speak. thanks! -- brian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Classloading Question
I am connecting my application to a Oracle XE database and I am having a weird issue with classloading. According to the classloading documentation [1] I should be placing the Oracle JDBC jar file ojdbc14.jar in $CATALINA_HOME/shared/lib, but when I do that, my application throws a Cannot load JDBC driver class 'oracle.jdbc.OracleDriver' exception. This also happens if I move the jar file to WEB-INF/lib too. The only way I can get it to work is to place it in $CATALINA_HOME/common/lib Any ideas? I've attached my test case and it's the application level context.xml file thanks -- brian [1] - http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html = index.jsp (well, the important parts) = InitialContext ic = new InitialContext(); DataSource ds = (DataSource) ic.lookup(java:comp/env/jdbc/XEDB); Connection conn = ds.getConnection(); = context.xml = ?xml version=1.0 encoding=UTF-8? Context Resource name=jdbc/XEDB type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:brian/password@//localhost:1521/XE maxActive=8 / /Context - 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: Classloading Question
On 7/31/07, Propes, Barry L [EMAIL PROTECTED] wrote: What version of TC are you using? I wouldn't put the jar file there, no! I am using 5.5.23. Wouldn't put it where? shared/lib? Try in %TC HOME%\common\lib, whereever that is. I did, and it works, but from my understanding of the classloading documentation, you should technically place application level jars in $CATALINA_HOME/shared/lib, in which it does not work. -- brian - 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: Classloading Question
On 7/31/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: Look here for details: http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.h tml Heh, II was wondering about that. I just gleamed that and found this gem: Drivers for older Oracle versions may be distributed as *.zip files rather than *.jar files. Tomcat will only use *.jar files installed in $CATALINA_HOME/common/lib. Therefore classes111.zip or classes12.zip will need to be renamed with a .jar extension. Since jarfiles are zipfiles, there is no need to unzip and jar these files - a simple rename will suffice. Bam, right there in front of me! thanks! -- brian - 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: Apache to Tomcat via JK on different machines --- 503 / socket errno=60
On 7/20/06, Blah2006 [EMAIL PROTECTED] wrote: MACHINE 2: - Microsoft Windows XP Professional, Version 2002, Service Pack 2 [Tue Jul 18 16:33:33 2006] [info] jk_open_socket::jk_connect.c (444): connect to 1.2.3.4:8009 failed with errno=60 I think erno=60 is a timeout error code. Are you sure MACHINE 2 isn't running a firewall blocking port 8009? -- brian - 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: Increase Heapsize
On 7/19/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: No Vignette why? are you in a similar situation? if so how did you go about increasing heapsize and what appserver are you using Well, luckily our system isn't heavily loaded, we bumped it to -Xms1024 -Xmx1024 and everything is working smoothly. Using Tomcat 5.0.28 + JDK 1.4.2 I am having a timeout problem regarding an import applet talking with Tomcat (via jk) - but I don't want to go into details cause I will be hijacking the thread. Was just wondering if you were using Documentum and I'd try and pick your brain... As far as getting some JVM performance metrics, the newer Tomcats have a JMX proxy servlet that accepts JMX queries, you might be able to look there for some answers...but I dunno about 4.06. That is the latest version Vignette supports? And I thought Documentum was bad with the 5.0.x series! -- brian - 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: Alias' and the like
On 7/12/06, Martin Gainty [EMAIL PROTECTED] wrote: This solution works if you're front-ending with Apache- I have seen CGI/Perl do this to specifically route incoming requests to CGI/Perl site 1 to their folder (and consequent access to site2 to Tomcat) Do you have any configuration file examples? I can't get it to work. Here is my test Alias /admin1 /usr/local/tomcat/dev/webapps/bmtest/admin Alias /service /usr/local/tomcat/dev/webapps/bmtest/service JkMount /admin1* dev JkMount /service* dev Inside of my bmtest/admin and bmtest/service directories I have very basic JSP files. I get a Tomcat level 404 I am still not convinced that JkMount respects the Alias directive. -- brian ps. While we continue to beat this dead horse, I think Mladen Turk came up with a vaild solution. - 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: Alias' and the like
On 7/12/06, Martin Gainty [EMAIL PROTECTED] wrote: I'm about done with this thread, but I just gotta send one more e.g. httpd.conf VirtualHost * ServerName /usr/local/tomcat/dev/webapps/bmtest/admin ServerAlias admin1 ... /VirtualHost ServerAlias is for setting an alternative host name for name-baeed virtual hosts. It has nothing to do with what David (or myself at one point in time) is trying to accomplish. -- brian - 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: mod_jk 1.2.16 release candidate: ready to test
On 7/3/06, Rainer Jung [EMAIL PROTECTED] wrote: version 1.2.16 of the Apache Tomcat mod_jk web server connector has been tagged. This version contains numerous bug fixes and some new improvements over our last release 1.2.15. Please test and share your experience. If no critical bugs will be found, we will have a formal release vote starting at Friday, July 7th. So, July 7th was last week, would you say mod_jk 1.2.16 is ready for a formal release? The reason why I ask is because I'm in the process of building a new development + production environment and might as well run with the latest and greatest. I downloaded it and it compiled cleanly on Solaris 9 (I think I used to have to do some trickery) - I haven't run in to any bugs with the light testing I've done. -- brian - 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: mod_jk 1.2.16 release candidate: ready to test
On 7/11/06, Richard Mixon [EMAIL PROTECTED] wrote: Thanks to all those who replied with respect to the orginal thread. Please do not hijack and existing thread. Start a new thread. You have thoroughly mucked up this thread on mod_jk 1.2.16 rele4ase candidate: ready to test. Richard, I was just about to go all Mark Thomas on it! :) When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. To many of the list archiving services and mail clients used by list subscribers this makes your new message appear as part of the old thread. This makes it harder for other users to find relevant information when searching the lists. This is known as thread hijacking and is behaviour that is frowned upon on this list. Frequent offenders will be removed from the list. It should also be noted that many list subscribers automatically ignore any messages that hijack another thread. The correct procedure is to create a new message with a new subject. This will start a new thread. - 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 manager URL configuration for 2 tomcat instances, Apache + mod_jk
I'm still scheming up a way to handle this. One idea was to try and copy the manager web application from server/webapps and place it in to the regular webapps directory as manager-5028/ I don't know if this is any kind of security risk, but I'll worry about that after I get things working. Anyway, I also copied all the *.jar from server/lib and placed them in webapps/manager-5028/lib since I don't necessarily want to put them in shared/lib or common/lib in case I clobber something. It doesn't seem to work, I am getting a classNoFound Error stack trace, anyone got any ideas? java.lang.ClassNotFoundException: org.apache.catalina.manager.HTMLManagerServlet org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:854) org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:721) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300) org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374) org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743) org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) java.lang.Thread.run(Thread.java:534) thanks -- brian On 7/8/06, Brian Munroe [EMAIL PROTECTED] wrote: I am trying to set up an environment that has both a Tomcat 5.5.17 and a Tomcat 5.0.28 instance running, accessed via Apache 2.0.58 + mod_jk. Can anyone recommend a URL layout to access the different Tomcat managers? My current configuration looks like this In httpd.conf - JkMount /manager/html* tc5028 In workers.properties worker.tc5028.type=ajp13 worker.tc5028.host=localhost worker.tc5028.port=8093 ... Which works great to access the 5.0.x manager, but how can set up a JkMount to hit the 5.5.x manager? thanks -- brian - 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 manager URL configuration for 2 tomcat instances, Apache + mod_jk
On 7/10/06, David Smith [EMAIL PROTECTED] wrote: No, that won't work. Copying jar files from server/lib will cause classloader problems. There is a simpler way: 1. Rename manager.xml in conf/Catalina/localhost to manager-5028.xml 2. Change the path attribute in manager-5028.xml to manager-5028 3. Restart tomcat (or start if it's already stopped). 4. Change JkMount in httpd.conf to JkMount /manager-5028/html* tc5028 5. Do apachectl graceful to make httpd read the new config. When done, the manager for 5.0.28 will be http://localhost/manager-5028/html Nice, works like a champ. Thank you very much for your help! -- brian - 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: problem accessing the webpages using specific hostname
On 7/10/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Yes, I could ping xyz.ab.edu from my pc, but not xyz.ab.edu:8181 (8181 is the port number on which tomcat is receiving requests). If I use telnet localhost 8181 from xyz.ab.edu, it lets me in... but telnet xyz.ab.edu 8181 doesnt work. Are you running a firewall? What OS are you using? -- brian - 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: problem accessing the webpages using specific hostname
On 7/10/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am using Suse Linux 9.0 and I might be behind a firewall. I will try to see if I can open up this port. Also if you do a 'netstat -a | grep -i listen' as root, it may show you what is running on which ports. If you see anything like: tcp0 0 localhost.localdom:4700 *:* LISTEN Then it is bound to localhost only, whereas something like tcp 0 0 *:www *:* Is bound to any interface. You might try checking that too, but I'm willing to bet you are being blocked a local OS firewall or something. -- brian - 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: ApacheConfig returns ClassCastException for mod_jk
On 7/9/06, Mr Alireza Fattahi [EMAIL PROTECTED] wrote: Hi, We want to configure tomcat 5.5.17 with mod_jk and change server.xml as below: Engine name=Catalina defaultHost=localhost className=org.apache.jk.config.ApacheConfig The above was mentioned at http://tomcat.apache.org/connectors-doc/howto/apache.html; to create a mod_jk.conf-auto file. Alireza, I just read the page you referred to and it said: Engine ... Listener className=org.apache.jk.config.ApacheConfig modJk=/path/to/mod_jk.so / /Engine So you need to add a Listener / element and not add it as an attribute to Engine Also, did you modify your httpd.conf file? Include $TOMCAT_HOME/conf/jk/mod_jk.conf-auto -- brian - 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 manager URL configuration for 2 tomcat instances, Apache + mod_jk
I am trying to set up an environment that has both a Tomcat 5.5.17 and a Tomcat 5.0.28 instance running, accessed via Apache 2.0.58 + mod_jk. Can anyone recommend a URL layout to access the different Tomcat managers? My current configuration looks like this In httpd.conf - JkMount /manager/html* tc5028 In workers.properties worker.tc5028.type=ajp13 worker.tc5028.host=localhost worker.tc5028.port=8093 ... Which works great to access the 5.0.x manager, but how can set up a JkMount to hit the 5.5.x manager? thanks -- brian - 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: Executing Manager Commands With Ant and SSL
On 3/1/06, ash ag [EMAIL PROTECTED] wrote: BUILD FAILED /opt/Ant/apache-ant-1.6.1/build.xml:47: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException : No trusted certificate found Total time: 0 seconds How can i configure the certificate in this case. Are you using a self-signed SSL cert? Looks to be the case. If so, you have two options: 1) Buy a commercially signed SSL certificate. 2) Import the self-signed root CA into the $JAVA_HOME/jre/lib/security/cacerts file I never bothered to figure out how to do number 2, but this[1] may be helpful. -- brian [1] - http://www.davtar.org/~david/makekeys.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat make error
On Oct 31, 2005, at 7:19 AM, Goverts IV, Paul wrote: I am having problems compiling connector for Tomcat 5.5.12 and apache2 on Solaris 10. I am compiling using gcc 3.4.3 (supplied with solaris 10) and I am building the connector for the apache2 that is supplied with solaris 10. Here is the output I am getting, any ideas would be appreciated, I am new to Tomcat: Paul, I had trouble getting mod_jk to compile for Solaris 9, and ended up going with a binary from blastwave.org: http://www.blastwave.org/packages.php/ap2_mod_jk HTH, -- brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]