Hi Hans,
If i'm not mistaken you forgot to change the classpath for ecj library. See patch in attachment. Should i make a jira for this kind of fix ? Cheers, Gil Le vendredi 18 novembre 2011 à 03:06 +0000, [hidden email] a écrit : Author: hansbak Date: Fri Nov 18 03:06:17 2011 New Revision: 1203470 URL: http://svn.apache.org/viewvc?rev=1203470&view=rev Log: upgrade tomcat from 6 -> 7 more detail at: https://issues.apache.org/jira/browse/OFBIZ-4563 Added: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.annotations-api.jar (with props) ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.el-api.jar (with props) ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.jsp-api.jar (with props) ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.servlet-api.jar (with props) ofbiz/trunk/framework/catalina/lib/ecj-3.7.jar (with props) ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli-adapters.jar (with props) ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli.jar (with props) ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ant.jar (with props) ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ha.jar (with props) ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-tribes.jar (with props) ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina.jar (with props) ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper-el.jar (with props) ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper.jar (with props) ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-api.jar (with props) ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-coyote.jar (with props) ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-dbcp.jar (with props) ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-es.jar (with props) ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-fr.jar (with props) ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-ja.jar (with props) ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-util.jar (with props) Removed: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.33.annotations-api.jar ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.33.el-api.jar ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.33.jsp-api.jar ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.33.servlet-api.jar ofbiz/trunk/framework/catalina/lib/ecj-3.3.1.jar ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33-tomcat-juli-adapters.jar ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33-tomcat-juli.jar ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.catalina-ant.jar ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.catalina-ha.jar ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.catalina-tribes.jar ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.catalina.jar ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.jasper-el.jar ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.jasper.jar ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.tomcat-coyote.jar ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.tomcat-dbcp.jar ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.tomcat-i18n-es.jar ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.tomcat-i18n-fr.jar ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.tomcat-i18n-ja.jar Modified: ofbiz/trunk/.classpath ofbiz/trunk/framework/base/config/ofbiz-containers.xml ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java Modified: ofbiz/trunk/.classpath URL: http://svn.apache.org/viewvc/ofbiz/trunk/.classpath?rev=1203470&r1=1203469&r2=1203470&view=diff ============================================================================== --- ofbiz/trunk/.classpath (original) +++ ofbiz/trunk/.classpath Fri Nov 18 03:06:17 2011 @@ -90,10 +90,10 @@ <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-jta_1.1_spec-1.1.1.jar"/> <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-qname_1.1_spec-1.0.jar"/> <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-saaj_1.1_spec-1.0.jar"/> - <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-6.0.33.annotations-api.jar"/> - <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-6.0.33.el-api.jar"/> - <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-6.0.33.jsp-api.jar"/> - <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-6.0.33.servlet-api.jar"/> + <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.22.annotations-api.jar"/> + <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.22.el-api.jar"/> + <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.22.jsp-api.jar"/> + <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.22.servlet-api.jar"/> <classpathentry kind="lib" path="framework/base/lib/scripting/antlr-2.7.6.jar"/> <classpathentry kind="lib" path="framework/base/lib/scripting/asm-3.2.jar"/> <classpathentry kind="lib" path="framework/base/lib/scripting/asm-analysis-3.2.jar"/> @@ -124,16 +124,18 @@ <classpathentry kind="lib" path="framework/birt/lib/scriptapi.jar"/> <classpathentry kind="lib" path="framework/birt/lib/viewservlets.jar"/> <classpathentry kind="lib" path="framework/catalina/lib/ecj-3.3.1.jar"/> - <classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33-tomcat-juli-adapters.jar"/> - <classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33-tomcat-juli.jar"/> - <classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.catalina-ant.jar"/> - <classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.catalina-ha.jar"/> - <classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.catalina-tribes.jar"/> - <classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.catalina.jar"/> - <classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.jasper-el.jar"/> - <classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.jasper.jar"/> - <classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.tomcat-coyote.jar"/> - <classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.tomcat-dbcp.jar"/> + <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22-tomcat-juli-adapters.jar"/> + <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22-tomcat-juli.jar"/> + <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.catalina-ant.jar"/> + <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.catalina-ha.jar"/> + <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.catalina-tribes.jar"/> + <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.catalina.jar"/> + <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.jasper-el.jar"/> + <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.jasper.jar"/> + <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.tomcat-coyote.jar"/> + <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.tomcat-dbcp.jar"/> + <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.tomcat-api.jar"/> + <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.tomcat-util.jar"/> <classpathentry kind="lib" path="framework/entity/lib/commons-dbcp-1.3-20091113-r835956.jar"/> <classpathentry kind="lib" path="framework/entity/lib/ofbiz-minerva.jar"/> <classpathentry kind="lib" path="framework/geronimo/lib/geronimo-connector-2.1.1.jar"/> Modified: ofbiz/trunk/framework/base/config/ofbiz-containers.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/config/ofbiz-containers.xml?rev=1203470&r1=1203469&r2=1203470&view=diff ============================================================================== --- ofbiz/trunk/framework/base/config/ofbiz-containers.xml (original) +++ ofbiz/trunk/framework/base/config/ofbiz-containers.xml Fri Nov 18 03:06:17 2011 @@ -114,7 +114,6 @@ under the License. <property name="access-log-rotate" value="true"/> <property name="access-log-prefix" value="access_log."/> <property name="access-log-dir" value="runtime/logs"/> - <property name="enable-request-dump" value="false"/> <!-- uncomment for cluster support <property name="default-server-cluster" value="cluster"> <property name="rep-valve-filter"> Added: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.annotations-api.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.annotations-api.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.annotations-api.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.el-api.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.el-api.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.el-api.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.jsp-api.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.jsp-api.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.jsp-api.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.servlet-api.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.servlet-api.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.servlet-api.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/ecj-3.7.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/ecj-3.7.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/ecj-3.7.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli-adapters.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli-adapters.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli-adapters.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ant.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ant.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ant.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ha.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ha.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ha.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-tribes.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-tribes.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-tribes.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper-el.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper-el.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper-el.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-api.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-api.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-api.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-coyote.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-coyote.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-coyote.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-dbcp.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-dbcp.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-dbcp.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-es.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-es.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-es.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-fr.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-fr.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-fr.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-ja.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-ja.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-ja.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-util.jar URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-util.jar?rev=1203470&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-util.jar ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?rev=1203470&r1=1203469&r2=1203470&view=diff ============================================================================== --- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java (original) +++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java Fri Nov 18 03:06:17 2011 @@ -38,20 +38,26 @@ import javolution.util.FastList; import org.apache.catalina.Cluster; import org.apache.catalina.Context; import org.apache.catalina.Engine; +import org.apache.catalina.Globals; import org.apache.catalina.Host; import org.apache.catalina.LifecycleException; import org.apache.catalina.Manager; -import org.apache.catalina.ServerFactory; import org.apache.catalina.connector.Connector; import org.apache.catalina.core.StandardContext; import org.apache.catalina.core.StandardEngine; +import org.apache.catalina.core.StandardHost; import org.apache.catalina.core.StandardServer; import org.apache.catalina.core.StandardWrapper; +import org.apache.catalina.deploy.FilterDef; +import org.apache.catalina.deploy.FilterMap; +import org.apache.catalina.filters.RequestDumperFilter; import org.apache.catalina.ha.tcp.ReplicationValve; import org.apache.catalina.ha.tcp.SimpleTcpCluster; +import org.apache.catalina.loader.WebappLoader; import org.apache.catalina.realm.MemoryRealm; import org.apache.catalina.session.StandardManager; -import org.apache.catalina.startup.Embedded; +import org.apache.catalina.startup.ContextConfig; +import org.apache.catalina.startup.Tomcat; import org.apache.catalina.tribes.group.GroupChannel; import org.apache.catalina.tribes.membership.McastService; import org.apache.catalina.tribes.transport.MultiPointSender; @@ -59,9 +65,11 @@ import org.apache.catalina.tribes.transp import org.apache.catalina.tribes.transport.nio.NioReceiver; import org.apache.catalina.util.ServerInfo; import org.apache.catalina.valves.AccessLogValve; -import org.apache.catalina.valves.RequestDumperValve; import org.apache.coyote.ProtocolHandler; import org.apache.coyote.http11.Http11Protocol; +import org.apache.tomcat.JarScanner; +import org.apache.tomcat.util.IntrospectionUtils; +import org.apache.tomcat.util.scan.StandardJarScanner; import org.ofbiz.base.component.ComponentConfig; import org.ofbiz.base.concurrent.ExecutionPool; import org.ofbiz.base.container.ClassLoaderContainer; @@ -148,7 +156,7 @@ public class CatalinaContainer implement } protected Delegator delegator = null; - protected Embedded embedded = null; + protected Tomcat tomcat = null; protected Map<String, ContainerConfig.Container.Property> clusterConfig = new HashMap<String, ContainerConfig.Container.Property>(); protected Map<String, Engine> engines = new HashMap<String, Engine>(); protected Map<String, Host> hosts = new HashMap<String, Host>(); @@ -184,20 +192,25 @@ public class CatalinaContainer implement this.catalinaRuntimeHome = ContainerConfig.getPropertyValue(cc, "catalina-runtime-home", "runtime/catalina"); // set catalina_home - System.setProperty("catalina.home", System.getProperty("ofbiz.home") + "/" + this.catalinaRuntimeHome); + System.setProperty(Globals.CATALINA_HOME_PROP, System.getProperty("ofbiz.home") + "/" + this.catalinaRuntimeHome); + System.setProperty(Globals.CATALINA_BASE_PROP, System.getProperty(Globals.CATALINA_HOME_PROP)); + + // create the instance of embedded Tomcat + System.setProperty("catalina.useNaming", String.valueOf(useNaming)); + tomcat = new Tomcat(); + tomcat.setBaseDir(System.getProperty("ofbiz.home")); + if (useNaming) { + tomcat.enableNaming(); + } // configure JNDI in the StandardServer - StandardServer server = (StandardServer) ServerFactory.getServer(); + StandardServer server = (StandardServer) tomcat.getServer(); try { server.setGlobalNamingContext(new InitialContext()); } catch (NamingException e) { throw new ContainerException(e); } - // create the instance of Embedded - embedded = new Embedded(); - embedded.setUseNaming(useNaming); - // create the engines List<ContainerConfig.Container.Property> engineProps = cc.getPropertiesWithValue("engine"); if (UtilValidate.isEmpty(engineProps)) { @@ -215,18 +228,12 @@ public class CatalinaContainer implement for (ContainerConfig.Container.Property connectorProp: connectorProps) { createConnector(connectorProp); } - - try { - embedded.initialize(); - } catch (LifecycleException e) { - throw new ContainerException(e); - } } public boolean start() throws ContainerException { - // Start the embedded server + // Start the Tomcat server try { - embedded.start(); + tomcat.getServer().start(); } catch (LifecycleException e) { throw new ContainerException(e); } @@ -234,11 +241,11 @@ public class CatalinaContainer implement // load the web applications loadComponents(); - for (Connector con: embedded.findConnectors()) { + for (Connector con: tomcat.getService().findConnectors()) { ProtocolHandler ph = con.getProtocolHandler(); if (ph instanceof Http11Protocol) { Http11Protocol hph = (Http11Protocol) ph; - Debug.logInfo("Connector " + hph.getProtocols() + " @ " + hph.getPort() + " - " + + Debug.logInfo("Connector " + hph.getName() + " @ " + hph.getPort() + " - " + (hph.getSecure() ? "secure" : "not-secure") + " [" + con.getProtocolHandlerClassName() + "] started.", module); } else { Debug.logInfo("Connector " + con.getProtocol() + " @ " + con.getPort() + " - " + @@ -250,8 +257,8 @@ public class CatalinaContainer implement } protected Engine createEngine(ContainerConfig.Container.Property engineConfig) throws ContainerException { - if (embedded == null) { - throw new ContainerException("Cannot create Engine without Embedded instance!"); + if (tomcat == null) { + throw new ContainerException("Cannot create Engine without Tomcat instance!"); } ContainerConfig.Container.Property defaultHostProp = engineConfig.getProperty("default-host"); @@ -262,7 +269,7 @@ public class CatalinaContainer implement String engineName = engineConfig.name; String hostName = defaultHostProp.value; - StandardEngine engine = (StandardEngine) embedded.createEngine(); + StandardEngine engine = new StandardEngine(); engine.setName(engineName); engine.setDefaultHost(hostName); @@ -273,7 +280,7 @@ public class CatalinaContainer implement } // create the default realm -- TODO: make this configurable - String dbConfigPath = "catalina-users.xml"; + String dbConfigPath = new File(System.getProperty("catalina.home"), "catalina-users.xml").getAbsolutePath(); MemoryRealm realm = new MemoryRealm(); realm.setPathname(dbConfigPath); engine.setRealm(realm); @@ -297,13 +304,6 @@ public class CatalinaContainer implement clusterConfig.put(engineName, clusterProp); } - // request dumper valve - boolean enableRequestDump = ContainerConfig.getPropertyValue(engineConfig, "enable-request-dump", false); - if (enableRequestDump) { - RequestDumperValve rdv = new RequestDumperValve(); - engine.addValve(rdv); - } - // configure the CrossSubdomainSessionValve boolean enableSessionValve = ContainerConfig.getPropertyValue(engineConfig, "enable-cross-subdomain-sessions", false); if (enableSessionValve) { @@ -361,17 +361,19 @@ public class CatalinaContainer implement engine.addValve(al); } - embedded.addEngine(engine); + tomcat.getService().setContainer(engine); return engine; } protected Host createHost(Engine engine, String hostName) throws ContainerException { Debug.logInfo("createHost(" + engine + ", " + hostName + ")", module); - if (embedded == null) { - throw new ContainerException("Cannot create Host without Embedded instance!"); + if (tomcat == null) { + throw new ContainerException("Cannot create Host without Tomcat instance!"); } - Host host = embedded.createHost(hostName, CATALINA_HOSTS_HOME); + Host host = new StandardHost(); + host.setAppBase(CATALINA_HOSTS_HOME); + host.setName(hostName); host.setDeployOnStartup(false); host.setBackgroundProcessorDelay(5); host.setAutoDeploy(false); @@ -471,8 +473,8 @@ public class CatalinaContainer implement } protected Connector createConnector(ContainerConfig.Container.Property connectorProp) throws ContainerException { - if (embedded == null) { - throw new ContainerException("Cannot create Connector without Embedded instance!"); + if (tomcat == null) { + throw new ContainerException("Cannot create Connector without Tomcat instance!"); } // need some standard properties @@ -492,13 +494,56 @@ public class CatalinaContainer implement Connector connector = null; if (UtilValidate.isNotEmpty(connectorProp.properties)) { - connector = embedded.createConnector(address, port, protocol); + if (address != null) { + /* + * InetAddress.toString() returns a string of the form + * "<hostname>/<literal_IP>". Get the latter part, so that the + * address can be parsed (back) into an InetAddress using + * InetAddress.getByName(). + */ + int index = address.indexOf('/'); + if (index != -1) { + address = address.substring(index + 1); + } + } + + Debug.logInfo("Creating connector for address='" + + ((address == null) ? "ALL" : address) + + "' port='" + port + "' protocol='" + protocol + "'", module); + + try { + + if (protocol.equals("ajp")) { + connector = new Connector("org.apache.coyote.ajp.AjpProtocol"); + } else if (protocol.equals("memory")) { + connector = new Connector("org.apache.coyote.memory.MemoryProtocolHandler"); + } else if (protocol.equals("http")) { + connector = new Connector(); + } else if (protocol.equals("https")) { + connector = new Connector(); + connector.setScheme("https"); + connector.setSecure(true); + connector.setProperty("SSLEnabled","true"); + // FIXME !!!! SET SSL PROPERTIES + } else { + connector = new Connector(protocol); + } + + if (address != null) { + IntrospectionUtils.setProperty(connector, "address", "" + address); + } + IntrospectionUtils.setProperty(connector, "port", "" + port); + + } catch (Exception e) { + Debug.logError(e, "Couldn't create connector.", module); + } + try { for (ContainerConfig.Container.Property prop: connectorProp.properties.values()) { connector.setProperty(prop.name, prop.value); //connector.setAttribute(prop.name, prop.value); } - embedded.addConnector(connector); + tomcat.getService().addConnector(connector); } catch (Exception e) { throw new ContainerException(e); } @@ -537,6 +582,13 @@ public class CatalinaContainer implement hosts.put(engine.getName() + "." + hostName, host); } } + + if (host instanceof StandardHost) { + // set the catalina's work directory to the host + StandardHost standardHost = (StandardHost) host; + standardHost.setWorkDir(new File(System.getProperty(Globals.CATALINA_HOME_PROP) + , "work" + File.separator + engine.getName() + File.separator + host.getName()).getAbsolutePath()); + } return new Callable<Context>() { public Context call() throws ContainerException, LifecycleException { @@ -581,13 +633,27 @@ public class CatalinaContainer implement } // create the web application context - StandardContext context = (StandardContext) embedded.createContext(mount, location); + StandardContext context = new StandardContext(); + context.setParent(host); + context.setDocBase(location); + context.setPath(mount); + context.addLifecycleListener(new ContextConfig()); + + JarScanner jarScanner = context.getJarScanner(); + if (jarScanner instanceof StandardJarScanner) { + StandardJarScanner standardJarScanner = (StandardJarScanner) jarScanner; + standardJarScanner.setScanClassPath(false); + } + + Engine egn = (Engine) context.getParent().getParent(); + egn.setService(tomcat.getService()); + Debug.logInfo("host[" + host + "].addChild(" + context + ")", module); //context.setDeployOnStartup(false); //context.setBackgroundProcessorDelay(5); context.setJ2EEApplication(J2EE_APP); context.setJ2EEServer(J2EE_SERVER); - context.setLoader(embedded.createLoader(ClassLoaderContainer.getClassLoader())); + context.setLoader(new WebappLoader(ClassLoaderContainer.getClassLoader())); context.setCookies(appInfo.isSessionCookieAccepted()); context.addParameter("cookies", appInfo.isSessionCookieAccepted() ? "true" : "false"); @@ -604,8 +670,22 @@ public class CatalinaContainer implement context.getServletContext().setAttribute("_serverId", appInfo.server); context.getServletContext().setAttribute("componentName", appInfo.componentConfig.getComponentName()); + // request dumper filter + String enableRequestDump = initParameters.get("enableRequestDump"); + if ("true".equals(enableRequestDump)) { + // create the Requester Dumper Filter instance + FilterDef requestDumperFilterDef = new FilterDef(); + requestDumperFilterDef.setFilterClass(RequestDumperFilter.class.getName()); + requestDumperFilterDef.setFilterName("RequestDumper"); + FilterMap requestDumperFilterMap = new FilterMap(); + requestDumperFilterMap.setFilterName("RequestDumper"); + requestDumperFilterMap.addURLPattern("*"); + context.addFilterMap(requestDumperFilterMap); + } + // create the Default Servlet instance to mount StandardWrapper defaultServlet = new StandardWrapper(); + defaultServlet.setParent(context); defaultServlet.setServletClass("org.apache.catalina.servlets.DefaultServlet"); defaultServlet.setServletName("default"); defaultServlet.setLoadOnStartup(1); @@ -617,6 +697,7 @@ public class CatalinaContainer implement // create the Jasper Servlet instance to mount StandardWrapper jspServlet = new StandardWrapper(); + jspServlet.setParent(context); jspServlet.setServletClass("org.apache.jasper.servlet.JspServlet"); jspServlet.setServletName("jsp"); jspServlet.setLoadOnStartup(1); @@ -643,8 +724,8 @@ public class CatalinaContainer implement } protected void loadComponents() throws ContainerException { - if (embedded == null) { - throw new ContainerException("Cannot load web applications without Embedded instance!"); + if (tomcat == null) { + throw new ContainerException("Cannot load web applications without Tomcat instance!"); } // load the applications @@ -692,7 +773,7 @@ public class CatalinaContainer implement public void stop() throws ContainerException { try { - embedded.stop(); + tomcat.stop(); } catch (LifecycleException e) { // don't throw this; or it will kill the rest of the shutdown process Debug.logVerbose(e, module); // happens usually when running tests, disabled unless in verbose Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java?rev=1203470&r1=1203469&r2=1203470&view=diff ============================================================================== --- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java (original) +++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java Fri Nov 18 03:06:17 2011 @@ -23,9 +23,9 @@ import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.Cookie; -import org.apache.catalina.Globals; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; +import org.apache.catalina.core.ApplicationSessionCookieConfig; import org.apache.catalina.valves.ValveBase; import org.apache.tomcat.util.buf.MessageBytes; import org.apache.tomcat.util.http.MimeHeaders; @@ -48,11 +48,11 @@ public class CrossSubdomainSessionValve request.getSession(true); // replace any Tomcat-generated session cookies with our own - Cookie[] cookies = response.getCookies(); + Cookie[] cookies = request.getCookies(); if (cookies != null) { for (int i = 0; i < cookies.length; i++) { Cookie cookie = cookies[i]; - if (Globals.SESSION_COOKIE_NAME.equals(cookie.getName())) { + if (ApplicationSessionCookieConfig.getSessionCookieName(null).equals(cookie.getName())) { replaceCookie(request, response, cookie); } } @@ -107,7 +107,7 @@ public class CrossSubdomainSessionValve } // find the Set-Cookie header for the existing cookie and replace its value with new cookie - MimeHeaders mimeHeaders = response.getCoyoteResponse().getMimeHeaders(); + MimeHeaders mimeHeaders = request.getCoyoteRequest().getMimeHeaders(); for (int i = 0, size = mimeHeaders.size(); i < size; i++) { if (mimeHeaders.getName(i).equals("Set-Cookie")) { MessageBytes value = mimeHeaders.getValue(i); Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java?rev=1203470&r1=1203469&r2=1203470&view=diff ============================================================================== --- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java (original) +++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java Fri Nov 18 03:06:17 2011 @@ -44,7 +44,6 @@ public class OfbizStore extends StoreBas public static final String module = OfbizStore.class.getName(); public static final String entityName = "CatalinaSession"; - protected static String info = "OfbizStore/1.0"; protected static String storeName = "OfbizStore"; protected Delegator delegator = null; @@ -54,11 +53,6 @@ public class OfbizStore extends StoreBas } @Override - public String getInfo() { - return info; - } - - @Override public String getStoreName() { return storeName; } Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java?rev=1203470&r1=1203469&r2=1203470&view=diff ============================================================================== --- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java (original) +++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java Fri Nov 18 03:06:17 2011 @@ -25,11 +25,12 @@ import java.security.cert.X509Certificat import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; +import org.apache.tomcat.util.net.AbstractEndpoint; import org.apache.tomcat.util.net.ServerSocketFactory; -import org.apache.tomcat.util.net.jsse.JSSEFactory; import org.apache.tomcat.util.net.jsse.JSSEImplementation; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.SSLUtil; +import org.ofbiz.base.util.UtilValidate; /** * SSLImpl @@ -42,13 +43,15 @@ public class SSLImpl extends JSSEImpleme public SSLImpl() throws ClassNotFoundException { super(); - this.ssFactory = (new JSSEFactory()).getSocketFactory(); this.allow = new TrustManager[] { new AllowTrustManager() }; Debug.log("SSLImpl loaded; using custom ServerSocketFactory", module); } @Override - public ServerSocketFactory getServerSocketFactory() { + public ServerSocketFactory getServerSocketFactory(AbstractEndpoint endpoint) { + if (UtilValidate.isEmpty(this.ssFactory)) { + this.ssFactory = (new JSSEImplementation()).getServerSocketFactory(endpoint); + } return ssFactory; } classpath_ecj.patch (856 bytes) Download Attachment |
Thanks you Gil for reporting and the patch.
revision 1204917 Regards, Hans On 11/22/2011 05:07 PM, Gil PORTENSEIGNE wrote: > Hi Hans, > > If i'm not mistaken you forgot to change the classpath for ecj > library. See patch in attachment. > > Should i make a jira for this kind of fix ? > > Cheers, > > Gil > > > Le vendredi 18 novembre 2011 à 03:06 +0000, [hidden email] a écrit : >> Author: hansbak >> Date: Fri Nov 18 03:06:17 2011 >> New Revision: 1203470 >> >> URL:http://svn.apache.org/viewvc?rev=1203470&view=rev <http://svn.apache.org/viewvc?rev=1203470&view=rev> >> Log: >> upgrade tomcat from 6 -> 7 more detail at:https://issues.apache.org/jira/browse/OFBIZ-4563 >> >> Added: >> ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.annotations-api.jar (with props) >> ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.el-api.jar (with props) >> ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.jsp-api.jar (with props) >> ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.servlet-api.jar (with props) >> ofbiz/trunk/framework/catalina/lib/ecj-3.7.jar (with props) >> ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli-adapters.jar (with props) >> ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli.jar (with props) >> ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ant.jar (with props) >> ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ha.jar (with props) >> ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-tribes.jar (with props) >> ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina.jar (with props) >> ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper-el.jar (with props) >> ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper.jar (with props) >> ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-api.jar (with props) >> ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-coyote.jar (with props) >> ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-dbcp.jar (with props) >> ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-es.jar (with props) >> ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-fr.jar (with props) >> ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-ja.jar (with props) >> ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-util.jar (with props) >> Removed: >> ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.33.annotations-api.jar >> ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.33.el-api.jar >> ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.33.jsp-api.jar >> ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.33.servlet-api.jar >> ofbiz/trunk/framework/catalina/lib/ecj-3.3.1.jar >> ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33-tomcat-juli-adapters.jar >> ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33-tomcat-juli.jar >> ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.catalina-ant.jar >> ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.catalina-ha.jar >> ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.catalina-tribes.jar >> ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.catalina.jar >> ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.jasper-el.jar >> ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.jasper.jar >> ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.tomcat-coyote.jar >> ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.tomcat-dbcp.jar >> ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.tomcat-i18n-es.jar >> ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.tomcat-i18n-fr.jar >> ofbiz/trunk/framework/catalina/lib/tomcat-6.0.33.tomcat-i18n-ja.jar >> Modified: >> ofbiz/trunk/.classpath >> ofbiz/trunk/framework/base/config/ofbiz-containers.xml >> ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java >> ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java >> ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java >> ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java >> >> Modified: ofbiz/trunk/.classpath >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/.classpath?rev=1203470&r1=1203469&r2=1203470&view=diff <http://svn.apache.org/viewvc/ofbiz/trunk/.classpath?rev=1203470&r1=1203469&r2=1203470&view=diff> >> ============================================================================== >> --- ofbiz/trunk/.classpath (original) >> +++ ofbiz/trunk/.classpath Fri Nov 18 03:06:17 2011 >> @@ -90,10 +90,10 @@ >> <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-jta_1.1_spec-1.1.1.jar"/> >> <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-qname_1.1_spec-1.0.jar"/> >> <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-saaj_1.1_spec-1.0.jar"/> >> -<classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-6.0.33.annotations-api.jar"/> >> -<classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-6.0.33.el-api.jar"/> >> -<classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-6.0.33.jsp-api.jar"/> >> -<classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-6.0.33.servlet-api.jar"/> >> +<classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.22.annotations-api.jar"/> >> +<classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.22.el-api.jar"/> >> +<classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.22.jsp-api.jar"/> >> +<classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.22.servlet-api.jar"/> >> <classpathentry kind="lib" path="framework/base/lib/scripting/antlr-2.7.6.jar"/> >> <classpathentry kind="lib" path="framework/base/lib/scripting/asm-3.2.jar"/> >> <classpathentry kind="lib" path="framework/base/lib/scripting/asm-analysis-3.2.jar"/> >> @@ -124,16 +124,18 @@ >> <classpathentry kind="lib" path="framework/birt/lib/scriptapi.jar"/> >> <classpathentry kind="lib" path="framework/birt/lib/viewservlets.jar"/> >> <classpathentry kind="lib" path="framework/catalina/lib/ecj-3.3.1.jar"/> >> -<classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33-tomcat-juli-adapters.jar"/> >> -<classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33-tomcat-juli.jar"/> >> -<classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.catalina-ant.jar"/> >> -<classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.catalina-ha.jar"/> >> -<classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.catalina-tribes.jar"/> >> -<classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.catalina.jar"/> >> -<classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.jasper-el.jar"/> >> -<classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.jasper.jar"/> >> -<classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.tomcat-coyote.jar"/> >> -<classpathentry kind="lib" path="framework/catalina/lib/tomcat-6.0.33.tomcat-dbcp.jar"/> >> +<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22-tomcat-juli-adapters.jar"/> >> +<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22-tomcat-juli.jar"/> >> +<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.catalina-ant.jar"/> >> +<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.catalina-ha.jar"/> >> +<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.catalina-tribes.jar"/> >> +<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.catalina.jar"/> >> +<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.jasper-el.jar"/> >> +<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.jasper.jar"/> >> +<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.tomcat-coyote.jar"/> >> +<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.tomcat-dbcp.jar"/> >> +<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.tomcat-api.jar"/> >> +<classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.tomcat-util.jar"/> >> <classpathentry kind="lib" path="framework/entity/lib/commons-dbcp-1.3-20091113-r835956.jar"/> >> <classpathentry kind="lib" path="framework/entity/lib/ofbiz-minerva.jar"/> >> <classpathentry kind="lib" path="framework/geronimo/lib/geronimo-connector-2.1.1.jar"/> >> >> Modified: ofbiz/trunk/framework/base/config/ofbiz-containers.xml >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/config/ofbiz-containers.xml?rev=1203470&r1=1203469&r2=1203470&view=diff <http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/config/ofbiz-containers.xml?rev=1203470&r1=1203469&r2=1203470&view=diff> >> ============================================================================== >> --- ofbiz/trunk/framework/base/config/ofbiz-containers.xml (original) >> +++ ofbiz/trunk/framework/base/config/ofbiz-containers.xml Fri Nov 18 03:06:17 2011 >> @@ -114,7 +114,6 @@ under the License. >> <property name="access-log-rotate" value="true"/> >> <property name="access-log-prefix" value="access_log."/> >> <property name="access-log-dir" value="runtime/logs"/> >> -<property name="enable-request-dump" value="false"/> >> <!-- uncomment for cluster support >> <property name="default-server-cluster" value="cluster"> >> <property name="rep-valve-filter"> >> >> Added: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.annotations-api.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.annotations-api.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.annotations-api.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.annotations-api.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.el-api.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.el-api.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.el-api.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.el-api.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.jsp-api.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.jsp-api.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.jsp-api.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.jsp-api.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.servlet-api.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.servlet-api.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.servlet-api.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.22.servlet-api.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/ecj-3.7.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/ecj-3.7.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/ecj-3.7.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/ecj-3.7.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli-adapters.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli-adapters.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli-adapters.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli-adapters.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22-tomcat-juli.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ant.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ant.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ant.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ant.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ha.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ha.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ha.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-ha.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-tribes.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-tribes.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-tribes.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina-tribes.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.catalina.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper-el.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper-el.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper-el.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper-el.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.jasper.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-api.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-api.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-api.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-api.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-coyote.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-coyote.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-coyote.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-coyote.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-dbcp.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-dbcp.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-dbcp.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-dbcp.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-es.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-es.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-es.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-es.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-fr.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-fr.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-fr.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-fr.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-ja.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-ja.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-ja.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-i18n-ja.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Added: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-util.jar >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-util.jar?rev=1203470&view=auto <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-util.jar?rev=1203470&view=auto> >> ============================================================================== >> Binary file - no diff available. >> >> Propchange: ofbiz/trunk/framework/catalina/lib/tomcat-7.0.22.tomcat-util.jar >> ------------------------------------------------------------------------------ >> svn:mime-type = application/octet-stream >> >> Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?rev=1203470&r1=1203469&r2=1203470&view=diff <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java?rev=1203470&r1=1203469&r2=1203470&view=diff> >> ============================================================================== >> --- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java (original) >> +++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java Fri Nov 18 03:06:17 2011 >> @@ -38,20 +38,26 @@ import javolution.util.FastList; >> import org.apache.catalina.Cluster; >> import org.apache.catalina.Context; >> import org.apache.catalina.Engine; >> +import org.apache.catalina.Globals; >> import org.apache.catalina.Host; >> import org.apache.catalina.LifecycleException; >> import org.apache.catalina.Manager; >> -import org.apache.catalina.ServerFactory; >> import org.apache.catalina.connector.Connector; >> import org.apache.catalina.core.StandardContext; >> import org.apache.catalina.core.StandardEngine; >> +import org.apache.catalina.core.StandardHost; >> import org.apache.catalina.core.StandardServer; >> import org.apache.catalina.core.StandardWrapper; >> +import org.apache.catalina.deploy.FilterDef; >> +import org.apache.catalina.deploy.FilterMap; >> +import org.apache.catalina.filters.RequestDumperFilter; >> import org.apache.catalina.ha.tcp.ReplicationValve; >> import org.apache.catalina.ha.tcp.SimpleTcpCluster; >> +import org.apache.catalina.loader.WebappLoader; >> import org.apache.catalina.realm.MemoryRealm; >> import org.apache.catalina.session.StandardManager; >> -import org.apache.catalina.startup.Embedded; >> +import org.apache.catalina.startup.ContextConfig; >> +import org.apache.catalina.startup.Tomcat; >> import org.apache.catalina.tribes.group.GroupChannel; >> import org.apache.catalina.tribes.membership.McastService; >> import org.apache.catalina.tribes.transport.MultiPointSender; >> @@ -59,9 +65,11 @@ import org.apache.catalina.tribes.transp >> import org.apache.catalina.tribes.transport.nio.NioReceiver; >> import org.apache.catalina.util.ServerInfo; >> import org.apache.catalina.valves.AccessLogValve; >> -import org.apache.catalina.valves.RequestDumperValve; >> import org.apache.coyote.ProtocolHandler; >> import org.apache.coyote.http11.Http11Protocol; >> +import org.apache.tomcat.JarScanner; >> +import org.apache.tomcat.util.IntrospectionUtils; >> +import org.apache.tomcat.util.scan.StandardJarScanner; >> import org.ofbiz.base.component.ComponentConfig; >> import org.ofbiz.base.concurrent.ExecutionPool; >> import org.ofbiz.base.container.ClassLoaderContainer; >> @@ -148,7 +156,7 @@ public class CatalinaContainer implement >> } >> >> protected Delegator delegator = null; >> - protected Embedded embedded = null; >> + protected Tomcat tomcat = null; >> protected Map<String, ContainerConfig.Container.Property> clusterConfig = new HashMap<String, ContainerConfig.Container.Property>(); >> protected Map<String, Engine> engines = new HashMap<String, Engine>(); >> protected Map<String, Host> hosts = new HashMap<String, Host>(); >> @@ -184,20 +192,25 @@ public class CatalinaContainer implement >> this.catalinaRuntimeHome = ContainerConfig.getPropertyValue(cc, "catalina-runtime-home", "runtime/catalina"); >> >> // set catalina_home >> - System.setProperty("catalina.home", System.getProperty("ofbiz.home") + "/" + this.catalinaRuntimeHome); >> + System.setProperty(Globals.CATALINA_HOME_PROP, System.getProperty("ofbiz.home") + "/" + this.catalinaRuntimeHome); >> + System.setProperty(Globals.CATALINA_BASE_PROP, System.getProperty(Globals.CATALINA_HOME_PROP)); >> + >> + // create the instance of embedded Tomcat >> + System.setProperty("catalina.useNaming", String.valueOf(useNaming)); >> + tomcat = new Tomcat(); >> + tomcat.setBaseDir(System.getProperty("ofbiz.home")); >> + if (useNaming) { >> + tomcat.enableNaming(); >> + } >> >> // configure JNDI in the StandardServer >> - StandardServer server = (StandardServer) ServerFactory.getServer(); >> + StandardServer server = (StandardServer) tomcat.getServer(); >> try { >> server.setGlobalNamingContext(new InitialContext()); >> } catch (NamingException e) { >> throw new ContainerException(e); >> } >> >> - // create the instance of Embedded >> - embedded = new Embedded(); >> - embedded.setUseNaming(useNaming); >> - >> // create the engines >> List<ContainerConfig.Container.Property> engineProps = cc.getPropertiesWithValue("engine"); >> if (UtilValidate.isEmpty(engineProps)) { >> @@ -215,18 +228,12 @@ public class CatalinaContainer implement >> for (ContainerConfig.Container.Property connectorProp: connectorProps) { >> createConnector(connectorProp); >> } >> - >> - try { >> - embedded.initialize(); >> - } catch (LifecycleException e) { >> - throw new ContainerException(e); >> - } >> } >> >> public boolean start() throws ContainerException { >> - // Start the embedded server >> + // Start the Tomcat server >> try { >> - embedded.start(); >> + tomcat.getServer().start(); >> } catch (LifecycleException e) { >> throw new ContainerException(e); >> } >> @@ -234,11 +241,11 @@ public class CatalinaContainer implement >> // load the web applications >> loadComponents(); >> >> - for (Connector con: embedded.findConnectors()) { >> + for (Connector con: tomcat.getService().findConnectors()) { >> ProtocolHandler ph = con.getProtocolHandler(); >> if (ph instanceof Http11Protocol) { >> Http11Protocol hph = (Http11Protocol) ph; >> - Debug.logInfo("Connector " + hph.getProtocols() + " @ " + hph.getPort() + " - " + >> + Debug.logInfo("Connector " + hph.getName() + " @ " + hph.getPort() + " - " + >> (hph.getSecure() ? "secure" : "not-secure") + " [" + con.getProtocolHandlerClassName() + "] started.", module); >> } else { >> Debug.logInfo("Connector " + con.getProtocol() + " @ " + con.getPort() + " - " + >> @@ -250,8 +257,8 @@ public class CatalinaContainer implement >> } >> >> protected Engine createEngine(ContainerConfig.Container.Property engineConfig) throws ContainerException { >> - if (embedded == null) { >> - throw new ContainerException("Cannot create Engine without Embedded instance!"); >> + if (tomcat == null) { >> + throw new ContainerException("Cannot create Engine without Tomcat instance!"); >> } >> >> ContainerConfig.Container.Property defaultHostProp = engineConfig.getProperty("default-host"); >> @@ -262,7 +269,7 @@ public class CatalinaContainer implement >> String engineName = engineConfig.name; >> String hostName = defaultHostProp.value; >> >> - StandardEngine engine = (StandardEngine) embedded.createEngine(); >> + StandardEngine engine = new StandardEngine(); >> engine.setName(engineName); >> engine.setDefaultHost(hostName); >> >> @@ -273,7 +280,7 @@ public class CatalinaContainer implement >> } >> >> // create the default realm -- TODO: make this configurable >> - String dbConfigPath = "catalina-users.xml"; >> + String dbConfigPath = new File(System.getProperty("catalina.home"), "catalina-users.xml").getAbsolutePath(); >> MemoryRealm realm = new MemoryRealm(); >> realm.setPathname(dbConfigPath); >> engine.setRealm(realm); >> @@ -297,13 +304,6 @@ public class CatalinaContainer implement >> clusterConfig.put(engineName, clusterProp); >> } >> >> - // request dumper valve >> - boolean enableRequestDump = ContainerConfig.getPropertyValue(engineConfig, "enable-request-dump", false); >> - if (enableRequestDump) { >> - RequestDumperValve rdv = new RequestDumperValve(); >> - engine.addValve(rdv); >> - } >> - >> // configure the CrossSubdomainSessionValve >> boolean enableSessionValve = ContainerConfig.getPropertyValue(engineConfig, "enable-cross-subdomain-sessions", false); >> if (enableSessionValve) { >> @@ -361,17 +361,19 @@ public class CatalinaContainer implement >> engine.addValve(al); >> } >> >> - embedded.addEngine(engine); >> + tomcat.getService().setContainer(engine); >> return engine; >> } >> >> protected Host createHost(Engine engine, String hostName) throws ContainerException { >> Debug.logInfo("createHost(" + engine + ", " + hostName + ")", module); >> - if (embedded == null) { >> - throw new ContainerException("Cannot create Host without Embedded instance!"); >> + if (tomcat == null) { >> + throw new ContainerException("Cannot create Host without Tomcat instance!"); >> } >> >> - Host host = embedded.createHost(hostName, CATALINA_HOSTS_HOME); >> + Host host = new StandardHost(); >> + host.setAppBase(CATALINA_HOSTS_HOME); >> + host.setName(hostName); >> host.setDeployOnStartup(false); >> host.setBackgroundProcessorDelay(5); >> host.setAutoDeploy(false); >> @@ -471,8 +473,8 @@ public class CatalinaContainer implement >> } >> >> protected Connector createConnector(ContainerConfig.Container.Property connectorProp) throws ContainerException { >> - if (embedded == null) { >> - throw new ContainerException("Cannot create Connector without Embedded instance!"); >> + if (tomcat == null) { >> + throw new ContainerException("Cannot create Connector without Tomcat instance!"); >> } >> >> // need some standard properties >> @@ -492,13 +494,56 @@ public class CatalinaContainer implement >> >> Connector connector = null; >> if (UtilValidate.isNotEmpty(connectorProp.properties)) { >> - connector = embedded.createConnector(address, port, protocol); >> + if (address != null) { >> + /* >> + * InetAddress.toString() returns a string of the form >> + * "<hostname>/<literal_IP>". Get the latter part, so that the >> + * address can be parsed (back) into an InetAddress using >> + * InetAddress.getByName(). >> + */ >> + int index = address.indexOf('/'); >> + if (index != -1) { >> + address = address.substring(index + 1); >> + } >> + } >> + >> + Debug.logInfo("Creating connector for address='" + >> + ((address == null) ? "ALL" : address) + >> + "' port='" + port + "' protocol='" + protocol + "'", module); >> + >> + try { >> + >> + if (protocol.equals("ajp")) { >> + connector = new Connector("org.apache.coyote.ajp.AjpProtocol"); >> + } else if (protocol.equals("memory")) { >> + connector = new Connector("org.apache.coyote.memory.MemoryProtocolHandler"); >> + } else if (protocol.equals("http")) { >> + connector = new Connector(); >> + } else if (protocol.equals("https")) { >> + connector = new Connector(); >> + connector.setScheme("https"); >> + connector.setSecure(true); >> + connector.setProperty("SSLEnabled","true"); >> + // FIXME !!!! SET SSL PROPERTIES >> + } else { >> + connector = new Connector(protocol); >> + } >> + >> + if (address != null) { >> + IntrospectionUtils.setProperty(connector, "address", "" + address); >> + } >> + IntrospectionUtils.setProperty(connector, "port", "" + port); >> + >> + } catch (Exception e) { >> + Debug.logError(e, "Couldn't create connector.", module); >> + } >> + >> try { >> for (ContainerConfig.Container.Property prop: connectorProp.properties.values()) { >> connector.setProperty(prop.name, prop.value); >> //connector.setAttribute(prop.name, prop.value); >> } >> - embedded.addConnector(connector); >> + tomcat.getService().addConnector(connector); >> } catch (Exception e) { >> throw new ContainerException(e); >> } >> @@ -537,6 +582,13 @@ public class CatalinaContainer implement >> hosts.put(engine.getName() + "." + hostName, host); >> } >> } >> + >> + if (host instanceof StandardHost) { >> + // set the catalina's work directory to the host >> + StandardHost standardHost = (StandardHost) host; >> + standardHost.setWorkDir(new File(System.getProperty(Globals.CATALINA_HOME_PROP) >> + , "work" + File.separator + engine.getName() + File.separator + host.getName()).getAbsolutePath()); >> + } >> >> return new Callable<Context>() { >> public Context call() throws ContainerException, LifecycleException { >> @@ -581,13 +633,27 @@ public class CatalinaContainer implement >> } >> >> // create the web application context >> - StandardContext context = (StandardContext) embedded.createContext(mount, location); >> + StandardContext context = new StandardContext(); >> + context.setParent(host); >> + context.setDocBase(location); >> + context.setPath(mount); >> + context.addLifecycleListener(new ContextConfig()); >> + >> + JarScanner jarScanner = context.getJarScanner(); >> + if (jarScanner instanceof StandardJarScanner) { >> + StandardJarScanner standardJarScanner = (StandardJarScanner) jarScanner; >> + standardJarScanner.setScanClassPath(false); >> + } >> + >> + Engine egn = (Engine) context.getParent().getParent(); >> + egn.setService(tomcat.getService()); >> + >> Debug.logInfo("host[" + host + "].addChild(" + context + ")", module); >> //context.setDeployOnStartup(false); >> //context.setBackgroundProcessorDelay(5); >> context.setJ2EEApplication(J2EE_APP); >> context.setJ2EEServer(J2EE_SERVER); >> - context.setLoader(embedded.createLoader(ClassLoaderContainer.getClassLoader())); >> + context.setLoader(new WebappLoader(ClassLoaderContainer.getClassLoader())); >> >> context.setCookies(appInfo.isSessionCookieAccepted()); >> context.addParameter("cookies", appInfo.isSessionCookieAccepted() ? "true" : "false"); >> @@ -604,8 +670,22 @@ public class CatalinaContainer implement >> context.getServletContext().setAttribute("_serverId", appInfo.server); >> context.getServletContext().setAttribute("componentName", appInfo.componentConfig.getComponentName()); >> >> + // request dumper filter >> + String enableRequestDump = initParameters.get("enableRequestDump"); >> + if ("true".equals(enableRequestDump)) { >> + // create the Requester Dumper Filter instance >> + FilterDef requestDumperFilterDef = new FilterDef(); >> + requestDumperFilterDef.setFilterClass(RequestDumperFilter.class.getName()); >> + requestDumperFilterDef.setFilterName("RequestDumper"); >> + FilterMap requestDumperFilterMap = new FilterMap(); >> + requestDumperFilterMap.setFilterName("RequestDumper"); >> + requestDumperFilterMap.addURLPattern("*"); >> + context.addFilterMap(requestDumperFilterMap); >> + } >> + >> // create the Default Servlet instance to mount >> StandardWrapper defaultServlet = new StandardWrapper(); >> + defaultServlet.setParent(context); >> defaultServlet.setServletClass("org.apache.catalina.servlets.DefaultServlet"); >> defaultServlet.setServletName("default"); >> defaultServlet.setLoadOnStartup(1); >> @@ -617,6 +697,7 @@ public class CatalinaContainer implement >> >> // create the Jasper Servlet instance to mount >> StandardWrapper jspServlet = new StandardWrapper(); >> + jspServlet.setParent(context); >> jspServlet.setServletClass("org.apache.jasper.servlet.JspServlet"); >> jspServlet.setServletName("jsp"); >> jspServlet.setLoadOnStartup(1); >> @@ -643,8 +724,8 @@ public class CatalinaContainer implement >> } >> >> protected void loadComponents() throws ContainerException { >> - if (embedded == null) { >> - throw new ContainerException("Cannot load web applications without Embedded instance!"); >> + if (tomcat == null) { >> + throw new ContainerException("Cannot load web applications without Tomcat instance!"); >> } >> >> // load the applications >> @@ -692,7 +773,7 @@ public class CatalinaContainer implement >> >> public void stop() throws ContainerException { >> try { >> - embedded.stop(); >> + tomcat.stop(); >> } catch (LifecycleException e) { >> // don't throw this; or it will kill the rest of the shutdown process >> Debug.logVerbose(e, module); // happens usually when running tests, disabled unless in verbose >> >> Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java?rev=1203470&r1=1203469&r2=1203470&view=diff <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java?rev=1203470&r1=1203469&r2=1203470&view=diff> >> ============================================================================== >> --- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java (original) >> +++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CrossSubdomainSessionValve.java Fri Nov 18 03:06:17 2011 >> @@ -23,9 +23,9 @@ import java.io.IOException; >> import javax.servlet.ServletException; >> import javax.servlet.http.Cookie; >> >> -import org.apache.catalina.Globals; >> import org.apache.catalina.connector.Request; >> import org.apache.catalina.connector.Response; >> +import org.apache.catalina.core.ApplicationSessionCookieConfig; >> import org.apache.catalina.valves.ValveBase; >> import org.apache.tomcat.util.buf.MessageBytes; >> import org.apache.tomcat.util.http.MimeHeaders; >> @@ -48,11 +48,11 @@ public class CrossSubdomainSessionValve >> request.getSession(true); >> >> // replace any Tomcat-generated session cookies with our own >> - Cookie[] cookies = response.getCookies(); >> + Cookie[] cookies = request.getCookies(); >> if (cookies != null) { >> for (int i = 0; i< cookies.length; i++) { >> Cookie cookie = cookies[i]; >> - if (Globals.SESSION_COOKIE_NAME.equals(cookie.getName())) { >> + if (ApplicationSessionCookieConfig.getSessionCookieName(null).equals(cookie.getName())) { >> replaceCookie(request, response, cookie); >> } >> } >> @@ -107,7 +107,7 @@ public class CrossSubdomainSessionValve >> } >> >> // find the Set-Cookie header for the existing cookie and replace its value with new cookie >> - MimeHeaders mimeHeaders = response.getCoyoteResponse().getMimeHeaders(); >> + MimeHeaders mimeHeaders = request.getCoyoteRequest().getMimeHeaders(); >> for (int i = 0, size = mimeHeaders.size(); i< size; i++) { >> if (mimeHeaders.getName(i).equals("Set-Cookie")) { >> MessageBytes value = mimeHeaders.getValue(i); >> >> Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java?rev=1203470&r1=1203469&r2=1203470&view=diff <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java?rev=1203470&r1=1203469&r2=1203470&view=diff> >> ============================================================================== >> --- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java (original) >> +++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/OfbizStore.java Fri Nov 18 03:06:17 2011 >> @@ -44,7 +44,6 @@ public class OfbizStore extends StoreBas >> public static final String module = OfbizStore.class.getName(); >> public static final String entityName = "CatalinaSession"; >> >> - protected static String info = "OfbizStore/1.0"; >> protected static String storeName = "OfbizStore"; >> >> protected Delegator delegator = null; >> @@ -54,11 +53,6 @@ public class OfbizStore extends StoreBas >> } >> >> @Override >> - public String getInfo() { >> - return info; >> - } >> - >> - @Override >> public String getStoreName() { >> return storeName; >> } >> >> Modified: ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java >> URL:http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java?rev=1203470&r1=1203469&r2=1203470&view=diff <http://svn.apache.org/viewvc/ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java?rev=1203470&r1=1203469&r2=1203470&view=diff> >> ============================================================================== >> --- ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java (original) >> +++ ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/SSLImpl.java Fri Nov 18 03:06:17 2011 >> @@ -25,11 +25,12 @@ import java.security.cert.X509Certificat >> import javax.net.ssl.TrustManager; >> import javax.net.ssl.X509TrustManager; >> >> +import org.apache.tomcat.util.net.AbstractEndpoint; >> import org.apache.tomcat.util.net.ServerSocketFactory; >> -import org.apache.tomcat.util.net.jsse.JSSEFactory; >> import org.apache.tomcat.util.net.jsse.JSSEImplementation; >> import org.ofbiz.base.util.Debug; >> import org.ofbiz.base.util.SSLUtil; >> +import org.ofbiz.base.util.UtilValidate; >> >> /** >> * SSLImpl >> @@ -42,13 +43,15 @@ public class SSLImpl extends JSSEImpleme >> >> public SSLImpl() throws ClassNotFoundException { >> super(); >> - this.ssFactory = (new JSSEFactory()).getSocketFactory(); >> this.allow = new TrustManager[] { new AllowTrustManager() }; >> Debug.log("SSLImpl loaded; using custom ServerSocketFactory", module); >> } >> >> @Override >> - public ServerSocketFactory getServerSocketFactory() { >> + public ServerSocketFactory getServerSocketFactory(AbstractEndpoint endpoint) { >> + if (UtilValidate.isEmpty(this.ssFactory)) { >> + this.ssFactory = (new JSSEImplementation()).getServerSocketFactory(endpoint); >> + } >> return ssFactory; >> } >> >> >> > |
Free forum by Nabble | Edit this page |