Re: ANT task for context.xml generation?
Mark Thomas wrote: Nikita Tovstoles wrote: Is there an ANT task for generating context.xml files? No. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Sounds like another reason to learn Maven/Xdoclet, although for now I will continue to code my context.xml files by hand. Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Curious memory usage under Windows Server 2000
When I run Tomcat under Windws Server 2000 the Windows Task Manager shows an increasing memory usage over time (let's say 2 weeks) despite that the manager jsp page (server/manager/html) always shows the same usage for Tomcat. Also the same Tomcat running under Linux has no memory creep. I can't rule out a memory leak 100% (I'm using Berkeley bdxml which requires explicit destruction of instantiations of certain classes), but I'm fairly sure I've taken care of this. Is the Window Task Manager reliable and if so are there applications I could use to track that usage better (eg better time resolution) Thanks Richard Toren - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Linux JNI ClassLoad
Hello, I use the SleepyCat dbxml which is also JNI and I have to do the following: export JAVA_OPTS='-Djava.library.path=/path/to/folder/with/so' then... sh catalina.sh .run I'd wager that you would have to do the same.. Richard Shannon Scott wrote: Greetings, I have been trying to use some Native C code in one of my applications. I have it working, but after it runs once it fails. The release-notes mention that: To avoid this problem, place classes that load native libraries outside of the web application, and ensure that the loadLibrary() call is executed only once during the lifetime of a particular JVM. From here: http://tomcat.apache.org/tomcat-5.0-doc/class-loader-howto.html I read: For classes and resources that must be shared across all web applications, place unpacked classes and resources under $CATALINA_BASE/shared/classes, or place JAR files containing those classes and resources under $CATALINA_BASE/shared/lib. When I place class files into my $CATALINA_BASE/shared/classes, I get the 'NoClassDefFoundError' error. I have also tried a package in $CATALINA_BASE/shared/lib. Has anyone successfully resolved this issue on the Linux platform? Where is the config that tells tomcat to load classes from $CATALINA_BASE/shared/classes? It seems like mine is not configured correctly because they don't seem to get loaded. Any pointers or advice is greatly appreciated. Take care. S - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat and xslt 2.0
Sorry, I've been too busy or scatter brained to check here. I use jdom and invoke this as: System.setProperty(javax.xml.transform.TransformerFactory, net.sf.saxon.TransformerFactoryImpl); trans = new XSLTransformer( new FileInputStream( mytransform )); I think that you have to request this before you request the TransformerFactory then cast the TransformerFactory to a SAXTransformerFactory before creating the Templates object. I sort of do this step out of force of habit and I'm not sure it is absolutely necessary (I think not). As to the NPE, when saxon does the initial parse of the xslt it reports errors, which is a good thing since I write most of my xslt in emacs. If the xslt doesn't compile you will get an NPE, but that doesn't mean that's your problem in this case. Make sure you are logging your exceptions. Wish I could be more helpful Richard Zohar Amir wrote: I've tried putting it right before TransformerFactory.newInstance() . now, when I invoke the transform method I get NPE at net.sf.saxon.Controller.transform(Controller.java:1319) Any help? - Original Message - From: Zohar Amir [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org; Richard Toren [EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 9:25 AM Subject: Re: tomcat and xslt 2.0 Thanks. Where do I put the System.setProperty(...)? - Original Message - From: Richard Toren [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, February 27, 2006 7:28 PM Subject: Re: tomcat and xslt 2.0 I think there are not that many xslt 2.0 engines out there to choose from. In any case saxon is xslt 2.0 and very fast. You have to include the jar (obvious, but) and before you instantiate a TransformerFactory set the System property: System.setProperty( javax.xml.transform.TransformerFactory, net.sf.saxon.TransformerFactoryImpl); You will get a warning if the xslt is 1.0, but it will still compile and function. Richard Toren Zohar Amir wrote: Correct me if I'm wrong here: as I understand it, tomcat uses Xalan as its XSLT engine. Xalan does not support XSLT 2.0 . Is there any other XSLT engine I can use with tomcat (I read something about Saxon)? If so, how do I do that? Thanks, Zohar. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat and xslt 2.0
I think there are not that many xslt 2.0 engines out there to choose from. In any case saxon is xslt 2.0 and very fast. You have to include the jar (obvious, but) and before you instantiate a TransformerFactory set the System property: System.setProperty( javax.xml.transform.TransformerFactory, net.sf.saxon.TransformerFactoryImpl); You will get a warning if the xslt is 1.0, but it will still compile and function. Richard Toren Zohar Amir wrote: Correct me if I'm wrong here: as I understand it, tomcat uses Xalan as its XSLT engine. Xalan does not support XSLT 2.0 . Is there any other XSLT engine I can use with tomcat (I read something about Saxon)? If so, how do I do that? Thanks, Zohar. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: correctly setting the java.library.path in tomcat under windows
Caldarale, Charles R wrote: From: Richard Toren [mailto:[EMAIL PROTECTED] Subject: Specifying java.library.path using Tomcat 5.5 as a Windows Service The question is how to do this when using Tomcat installed with the Windows installer? Use the Java tab of bin\tomcat5w.exe to set properties when running as a service. Watch out for access permission problems, since processes running as a service usually use a generic account, not the one you installed Tomcat (or 3rd-party libraries) with. - Chuck I find it hard to believe that access permissions are involved as all the library files are in the same location. Adding a java.library.path to the tomcat5w.exe only directs the inital load to the proper location and then I get the error from my first message. Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Specifying java.library.path using Tomcat 5.5 as a Windows Service
I want to move my webserver over to a Windows' service (it works great with linux, but the client is always insistent). The problem is that I use Berkeley DB XML which is used via JNI. When I start tomcat using startTomcat.bat I need to add a line set JAVA_OPTS=-Djava.library.path=path and then all works well. The question is how to do this when using Tomcat installed with the Windows installer? I can add a line for -Djava.library.path=;;; and it searches the path, but fails to initialize properly (log below). Since I can get the same installation to work by adding the .bat files it must be something is different in the way libraries are searched. It may have something to do with the System.loadLibrary() call I don't make, but I'm not sure how to proceed with it and I feel that I shouldn't have to make changes to my war files just to make my project compatible with Windows. Thanks in advance, Richard Toren java.lang.UnsatisfiedLinkError: C:\Program Files\Sleepycat Software\Berkeley DB XML 2.2.13\bin\libdb_java43.dll: Can't find dependent libraries at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at com.sleepycat.db.internal.db_javaJNI.clinit(db_javaJNI.java:34) at com.sleepycat.db.internal.DbEnv.init(DbEnv.java:200) at com.sleepycat.db.EnvironmentConfig.createEnvironment(EnvironmentConfig.java:738) at com.sleepycat.db.EnvironmentConfig.openEnvironment(EnvironmentConfig.java:691) at com.sleepycat.db.Environment.init(Environment.java:30) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]