部署 Alfresco 6.2 WAR 包到 Tomcat 8。

huangapple go评论65阅读模式
英文:

deploy alfresco 6.2 war in tomcat 8

问题

I want to install alfresco 6.2 war in windows server 2012 R2

I use Postres 11.4 and apache-tomcat-8.5.50 and jdk 1.8

I try to follows the steps in this link :

https://docs.alfresco.com/6.0/tasks/alf-war-install.html

I download alfresco-content-services-community-distribution-6.2.0-ga.zip

I modify this file share.xml

<?xml version='1.0' encoding='utf-8'?>
<Context crossContext="true">
  <Resources>
    <PostResources base="C:\apache-tomcat-8.5.50\webapps\share\modules"
                   className="org.apache.catalina.webresources.DirResourceSet"
                   webAppMount="/WEB-INF/lib"/>
  </Resources>
</Context>

alfreco.xml

<?xml version='1.0' encoding='utf-8'?>
<Context crossContext="true">
  <Resources>
    <PostResources base="C:\apache-tomcat-8.5.50\webapps\share\modules\platform"
                   className="org.apache.catalina.webresources.DirResourceSet"
                   webAppMount="/WEB-INF/lib"/>
  </Resources>
</Context>

when I start alfresco I have this error :

03-Jan-2020 00:04:57.878 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [C:\apache-tomcat-8.5.50\conf\Catalina\localhost\alfresco.xml]
03-Jan-2020 00:04:58.659 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/alfresco]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:614)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1823)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.xml.parsers.FactoryConfigurationError: Provider for class javax.xml.parsers.SAXParserFactory cannot be created
at javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:311)
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:267)
at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:127)
at org.apache.tomcat.util.digester.Digester.getFactory(Digester.java:489)
at org.apache.tomcat.util.digester.Digester.getParser(Digester.java:669)
at org.apache.tomcat.util.descriptor.web.WebXmlParser.(WebXmlParser.java:62)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1105)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:776)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5063)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 10 more
Caused by: java.lang.RuntimeException: Provider for class javax.xml.parsers.SAXParserFactory cannot be created
at javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:308)
... 21 more
Caused by: java.util.ServiceConfigurationError: javax.xml.parsers.SAXParserFactory: Provider org.alfresco.xmlfactory.SAXParserFactoryXercesImpl could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:232)
at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at javax.xml.parsers.FactoryFinder$1.run(FactoryFinder.java:294)
at java.security.AccessController.doPrivileged(Native Method)
at javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:289)
... 21 more
Caused by: java.lang.UnsupportedClassVersionError: org/alfresco/util/log/log4j/SanitizingPatternLayout has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 (unable to load class [org.alfresco.util.log.log4j.SanitizingPatternLayout])
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2398)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:855)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1327)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.log4j.helpers.Loader.loadClass(Loader.java:198)
at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:327)
at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:124)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:797)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
at org.apache.log4j.LogManager.(LogManager.java:127)
at org.slf4j.impl.Log4jLoggerFactory.(Log4jLoggerFactory.java:66)
at org.slf4j

英文:

I want to install alfresco 6.2 war in windows server 2012 R2

I use Postres 11.4 and apache-tomcat-8.5.50 and jdk 1.8

I try to follows the steps in this link :

https://docs.alfresco.com/6.0/tasks/alf-war-install.html

I download alfresco-content-services-community-distribution-6.2.0-ga.zip

I modify this file share.xml

&lt;?xml version=&#39;1.0&#39; encoding=&#39;utf-8&#39;?&gt;
&lt;Context crossContext=&quot;true&quot;&gt;
  &lt;Resources&gt;
    &lt;PostResources base=&quot;C:\apache-tomcat-8.5.50\webapps\share\modules&quot;
                   className=&quot;org.apache.catalina.webresources.DirResourceSet&quot;
                   webAppMount=&quot;/WEB-INF/lib&quot;/&gt;
  &lt;/Resources&gt;
&lt;/Context&gt;

alfreco.xml

&lt;?xml version=&#39;1.0&#39; encoding=&#39;utf-8&#39;?&gt;
&lt;Context crossContext=&quot;true&quot;&gt;
  &lt;Resources&gt;
    &lt;PostResources base=&quot;C:\apache-tomcat-8.5.50\webapps\share\modules\platform&quot;
                   className=&quot;org.apache.catalina.webresources.DirResourceSet&quot;
                   webAppMount=&quot;/WEB-INF/lib&quot;/&gt;
  &lt;/Resources&gt;
&lt;/Context&gt;

when I start alfesco I have this error :

03-Jan-2020 00:04:57.878 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [C:\apache-tomcat-8.5.50\conf\Catalina\localhost\alfresco.xml]
03-Jan-2020 00:04:58.659 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
	org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/alfresco]]
		at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
		at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:614)
		at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1823)
		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at java.lang.Thread.run(Thread.java:748)
	Caused by: javax.xml.parsers.FactoryConfigurationError: Provider for class javax.xml.parsers.SAXParserFactory cannot be created
		at javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:311)
		at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:267)
		at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:127)
		at org.apache.tomcat.util.digester.Digester.getFactory(Digester.java:489)
		at org.apache.tomcat.util.digester.Digester.getParser(Digester.java:669)
		at org.apache.tomcat.util.descriptor.web.WebXmlParser.&lt;init&gt;(WebXmlParser.java:62)
		at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1105)
		at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:776)
		at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
		at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5063)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		... 10 more
	Caused by: java.lang.RuntimeException: Provider for class javax.xml.parsers.SAXParserFactory cannot be created
		at javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:308)
		... 21 more
	Caused by: java.util.ServiceConfigurationError: javax.xml.parsers.SAXParserFactory: Provider org.alfresco.xmlfactory.SAXParserFactoryXercesImpl could not be instantiated
		at java.util.ServiceLoader.fail(ServiceLoader.java:232)
		at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
		at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
		at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
		at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
		at javax.xml.parsers.FactoryFinder$1.run(FactoryFinder.java:294)
		at java.security.AccessController.doPrivileged(Native Method)
		at javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:289)
		... 21 more
	Caused by: java.lang.UnsupportedClassVersionError: org/alfresco/util/log/log4j/SanitizingPatternLayout has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 (unable to load class [org.alfresco.util.log.log4j.SanitizingPatternLayout])
		at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2398)
		at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:855)
		at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1327)
		at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)
		at java.lang.Class.forName0(Native Method)
		at java.lang.Class.forName(Class.java:264)
		at org.apache.log4j.helpers.Loader.loadClass(Loader.java:198)
		at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:327)
		at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:124)
		at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:797)
		at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
		at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
		at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
		at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
		at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
		at org.apache.log4j.LogManager.&lt;clinit&gt;(LogManager.java:127)
		at org.slf4j.impl.Log4jLoggerFactory.&lt;init&gt;(Log4jLoggerFactory.java:66)
		at org.slf4j.impl.StaticLoggerBinder.&lt;init&gt;(StaticLoggerBinder.java:72)
		at org.slf4j.impl.StaticLoggerBinder.&lt;clinit&gt;(StaticLoggerBinder.java:45)
		at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
		at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
		at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
		at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
		at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
		at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
		at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:655)
		at org.alfresco.xmlfactory.FactoryHelper.&lt;clinit&gt;(FactoryHelper.java:44)
		at org.alfresco.xmlfactory.SAXParserFactoryXercesImpl.&lt;clinit&gt;(SAXParserFactoryXercesImpl.java:31)
		at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
		at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
		at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
		at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
		at java.lang.Class.newInstance(Class.java:442)
		at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
		... 26 more
03-Jan-2020 00:04:58.691 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Error deploying deployment descriptor [C:\apache-tomcat-8.5.50\conf\Catalina\localhost\alfresco.xml]
	java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/alfresco]]
		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:747)
		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
		at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:614)
		at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1823)
		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at java.lang.Thread.run(Thread.java:748)

答案1

得分: 2

修改这些XML文件只有在你想启用简单的JAR模块时才是必要的。正如文档所说,这是一个可选步骤。

我强烈建议不要使用简单的JAR模块,而是认为你应该对所有内容使用AMPs。

所以尝试不修改这两个XML文件。

另外,你的日志表明你可能没有使用正确版本的JDK。确保你正在运行OpenJDK(或Oracle)11.0.1。

英文:

Modifying those XML files is only necessary if you want to enable simple JAR modules. As the doc says, this is an optional step.

I recommend strongly against using simple JAR modules and instead believe you should use AMPs for everything.

So try it without modifying those two XML files.

Also, your log indicates you might not be using the correct version of the JDK. Make sure you are running OpenJDK (or Oracle) 11.0.1.

huangapple
  • 本文由 发表于 2020年1月4日 01:50:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/59583101.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定