RE: setting the context path in tomcat5.5.9?
In an issue related to this and the documentation cited below, my attempts to create a Context in the META-INF/context.xml were not successful, that is, I could create the context.xml file but the attributes did not seem to take affect. I could set them in the $CATALINA_HOME/conf/[enginename]/[hostname]/ directory and it would work. As an example, if I defined the attributes antiJARLocking=true and antiResourceLocking=true in the application's META-INF/context.xml file, I would still have jar and resource locking issues. When I defined the same attributes in the $CATALINA_HOME/conf/[enginename]/[hostname] directory, jar and resource locking was not an issue. Stephen L. Faustino Senior Software Engineer SecureLogix Corporation 13750 San Pedro, Suite 230 San Antonio, TX 78232 Direct/Vmail (210) 402-9669 x949 http://www.securelogix.com SECURELOGIX CORPORATION EMAIL NOTICE - This transmission may be strictly confidential. If you are not the intended recipient of this message, you may not disclose, print, copy, or disseminate this information. If you have received this in error, please reply and notify the sender (only) and delete the message. Unauthorized interception of this e-mail is a violation of federal criminal law. This communication does not reflect an intention by the sender or the sender's principal to conduct a transaction or make any agreement by electronic means. Nothing contained in this message or in any attachment shall satisfy the requirements for a writing, and nothing contained herein shall constitute a contract or electronic signature under the Electronic Signatures in Global and National Commerce Act, any version of the Uniform Electronic Transactions Act, or any other statute governing electronic transactions. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 04, 2005 9:33 AM To: Tomcat Users List Subject: RE: setting the context path in tomcat5.5.9? From: Trung Nguyen [mailto:[EMAIL PROTECTED] Subject: RE: setting the context path in tomcat5.5.9? To add the context path, you need to edit the $TOMCAT_HOME/conf/server.xml file and these lines: This completely ignores the admonition in the Tomcat doc: Please note that for tomcat 5, unlike tomcat 4.x, it is NOT recommended to place Context elements directly in the server.xml file. I'd suggest that a careful reading of: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html is in order. - 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XInclude in faces-config file
I'm attempting to modularize one of the xml files by using XInclude under Tomcat 5.5.9. The application starts, but at the point in time when the beans should get instantiated I get a NullPointerException in the ManagedBeanFactory. In the example below, I'm trying to include file2.xml in file1.xml, but it appears that the include directive is being ignored. Note that if I insert the contents of file2.xml directly into file1.xml, everything works as expected. Can anyone offer any insight in what I'm doing wrong? file1.xml -- ?xml version=1.0 encoding=UTF-8? !DOCTYPE faces-config PUBLIC -//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN http://java.sun.com/dtd/web-facesconfig_1_0.dtd; faces-config xmlns:xi=http://www.w3.org/2001/XInclude; managed-bean managed-bean-namebean1/managed-bean-name ... /managed-bean ... xi:include href=file2.xml/ /faces-config file2.xml --- managed-bean managed-bean-namebean2/managed-bean-name ... /managed-bean stderr.log Sep 22, 2005 9:10:47 AM com.sun.faces.application.ApplicationAssociate createAndMaybeStoreManagedBeans SEVERE: Managedbean master could not be created Can't instantiate class: 'org.nowhere.myapp.beans.Master'.. class org.nowhere.myapp.beans.Master : java.lang.NullPointerException javax.faces.FacesException: Can't instantiate class: org.nowhere.myapp.beans.Master'.. class org.nowhere.myapp.beans.Master : java.lang.NullPointerException at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java: 209) at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBea ns(ApplicationAssociate.java:256) at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.j ava:78) at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125) at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:146) at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorIm pl.java:243) at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173) at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154) snip... Caused by: java.lang.ClassNotFoundException: class org.nowhere.myapp.beans.Master : java.lang.NullPointerException at java.beans.Beans.instantiate(Beans.java:208) at java.beans.Beans.instantiate(Beans.java:48) at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java: 203) ... 60 more Caused by: java.lang.NullPointerException at com.slc.webetm.beans.Master.init(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces sorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc torAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at java.beans.Beans.instantiate(Beans.java:204) ... 62 more Stephen L. Faustino Senior Software Engineer SecureLogix Corporation 13750 San Pedro, Suite 230 San Antonio, TX 78232 Direct/Vmail (210) 402-9669 x949 http://www.securelogix.com SECURELOGIX CORPORATION EMAIL NOTICE - This transmission may be strictly confidential. If you are not the intended recipient of this message, you may not disclose, print, copy, or disseminate this information. If you have received this in error, please reply and notify the sender (only) and delete the message. Unauthorized interception of this e-mail is a violation of federal criminal law. This communication does not reflect an intention by the sender or the sender's principal to conduct a transaction or make any agreement by electronic means. Nothing contained in this message or in any attachment shall satisfy the requirements for a writing, and nothing contained herein shall constitute a contract or electronic signature under the Electronic Signatures in Global and National Commerce Act, any version of the Uniform Electronic Transactions Act, or any other statute governing electronic transactions.
RE: XInclude in faces-config file
Thanks for the reply. At the risk of sounding obtuse, where exactly is the correct place to define this property? I tried to look for it in the Tomcat docs but couldn't find anywhere that talks about this. I tried setting it as a -D at tomcat startup, which doesn't seem like the correct place to set this, and it didn't work anyway. Do I put this in the web.xml of the web application as a context parameter? Stephen -Original Message- From: Stephen Faustino [mailto:[EMAIL PROTECTED] Sent: Thursday, September 22, 2005 9:38 AM To: tomcat-user@jakarta.apache.org Subject: XInclude in faces-config file I'm attempting to modularize one of the xml files by using XInclude under Tomcat 5.5.9. The application starts, but at the point in time when the beans should get instantiated I get a NullPointerException in the ManagedBeanFactory. In the example below, I'm trying to include file2.xml in file1.xml, but it appears that the include directive is being ignored. Note that if I insert the contents of file2.xml directly into file1.xml, everything works as expected. Can anyone offer any insight in what I'm doing wrong? file1.xml -- ?xml version=1.0 encoding=UTF-8? !DOCTYPE faces-config PUBLIC -//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN http://java.sun.com/dtd/web-facesconfig_1_0.dtd; faces-config xmlns:xi=http://www.w3.org/2001/XInclude; managed-bean managed-bean-namebean1/managed-bean-name ... /managed-bean ... xi:include href=file2.xml/ /faces-config file2.xml --- managed-bean managed-bean-namebean2/managed-bean-name ... /managed-bean stderr.log Sep 22, 2005 9:10:47 AM com.sun.faces.application.ApplicationAssociate createAndMaybeStoreManagedBeans SEVERE: Managedbean master could not be created Can't instantiate class: 'org.nowhere.myapp.beans.Master'.. class org.nowhere.myapp.beans.Master : java.lang.NullPointerException javax.faces.FacesException: Can't instantiate class: org.nowhere.myapp.beans.Master'.. class org.nowhere.myapp.beans.Master : java.lang.NullPointerException at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java: 209) at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBea ns(ApplicationAssociate.java:256) at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.j ava:78) at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125) at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:146) at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorIm pl.java:243) at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173) at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154) snip... Caused by: java.lang.ClassNotFoundException: class org.nowhere.myapp.beans.Master : java.lang.NullPointerException at java.beans.Beans.instantiate(Beans.java:208) at java.beans.Beans.instantiate(Beans.java:48) at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java: 203) ... 60 more Caused by: java.lang.NullPointerException at com.slc.webetm.beans.Master.init(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces sorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc torAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at java.beans.Beans.instantiate(Beans.java:204) ... 62 more Stephen L. Faustino Senior Software Engineer SecureLogix Corporation 13750 San Pedro, Suite 230 San Antonio, TX 78232 Direct/Vmail (210) 402-9669 x949 http://www.securelogix.com SECURELOGIX CORPORATION EMAIL NOTICE - This transmission may be strictly confidential. If you are not the intended recipient of this message, you may not disclose, print, copy, or disseminate this information. If you have received this in error, please reply and notify the sender (only) and delete the message. Unauthorized interception of this e-mail is a violation of federal criminal law. This communication does not reflect an intention by the sender or the sender's principal to conduct a transaction or make any agreement by electronic means. Nothing contained in this message or in any attachment shall satisfy the requirements for a writing, and nothing contained herein shall constitute a contract or electronic signature under the Electronic Signatures in Global and National Commerce Act, any version of the Uniform Electronic Transactions Act, or any other statute governing electronic transactions.
RE: Undeploy leaves residual files
I've got a similar problem with jsf-impl.jar that is deployed in the application's WEB-INF/lib directory using Tomcat 5.5.9. What's more, if I use the Tomcat 5.5.9 that is packaged with the Jetspeed-2 distribution, everything gets cleaned up as expected. Obviously, the portal guys fixed something in their version Tomcat 5.5.9 to get this and Jetspeed-2 to work correctly, but I can't find anything that documents what was fixed. Stephen L. Faustino Senior Software Engineer SecureLogix Corporation 13750 San Pedro, Suite 230 San Antonio, TX 78232 Direct/Vmail (210) 402-9669 x949 http://www.securelogix.com SECURELOGIX CORPORATION EMAIL NOTICE - This transmission may be strictly confidential. If you are not the intended recipient of this message, you may not disclose, print, copy, or disseminate this information. If you have received this in error, please reply and notify the sender (only) and delete the message. Unauthorized interception of this e-mail is a violation of federal criminal law. This communication does not reflect an intention by the sender or the sender's principal to conduct a transaction or make any agreement by electronic means. Nothing contained in this message or in any attachment shall satisfy the requirements for a writing, and nothing contained herein shall constitute a contract or electronic signature under the Electronic Signatures in Global and National Commerce Act, any version of the Uniform Electronic Transactions Act, or any other statute governing electronic transactions. Robert Taylor wrote: I had the same issues and it looks like we are using similar technologies. Struts1.2.7, Hibernate 3.0.5, Spring 1.2.3 The struts issue (I think) is caused by validator access the validator.dtd resource and no releasing it. Under WEB-INF/classes/org/apache/commons/validator/resources I added both validator_1_1_3.dtd and validator-rules_1_0.dtd. Fpr struts, I moved (added) struts-config_1_2.dtd, tiles-config_1_1.dtd, and web-app_2_3.dtd to WEB-INF/classes/org/apache/struts/resources. For ehcache.jar, I ended up moving it to the CATALINE_HOME/common/lib directory. After that, everything seems to be working okay. I only just moved the ehcache out of WEB-INF/lib yesterday so I'm still testing those waters, but for now, it appears to have solved the problem. I posted a question concerning the same issue earlier on this list but it was never answered (see ehacache prevents web app reload). I checked the Hibernate forum and found some postings but none that seemed to resolved this issue. Please let me know if you figure a way to leave ehcache under WEB-INF/lib. It really rubs me the wrong way to have to treat it special during deployment. HTH /robert Allistair Crossley wrote: Hi, I've noticed that undeploy of my web applications that the ROOT folder is left \ behind as follows; ROOT WEB-INF classes log4j.properties lib ehcache.jar struts.jar The web application has a ContextListener that calls LogManager shutdowns and \ Introspector.flushCaches and so fourth to attempt to release resources. Is this \ part of that kind of problem? Regards, Allistair. Stephen L. Faustino Senior Software Engineer SecureLogix Corporation 13750 San Pedro, Suite 230 San Antonio, TX 78232 Direct/Vmail (210) 402-9669 x949 http://www.securelogix.com SECURELOGIX CORPORATION EMAIL NOTICE - This transmission may be strictly confidential. If you are not the intended recipient of this message, you may not disclose, print, copy, or disseminate this information. If you have received this in error, please reply and notify the sender (only) and delete the message. Unauthorized interception of this e-mail is a violation of federal criminal law. This communication does not reflect an intention by the sender or the sender's principal to conduct a transaction or make any agreement by electronic means. Nothing contained in this message or in any attachment shall satisfy the requirements for a writing, and nothing contained herein shall constitute a contract or electronic signature under the Electronic Signatures in Global and National Commerce Act, any version of the Uniform Electronic Transactions Act, or any other statute governing electronic transactions.