You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by paulhr <pa...@orthogroup.holdings> on 2016/05/13 00:23:29 UTC

Can a dnf install of tomcat be merged with TomEE plume?

Can a dnf install of tomcat be merged with TomEE plume?  I want to get all
the files/artifacts placed in the directories as done by dnf.  It is my
understanding that dnf uses the <a
href=&quot;http://www.pathname.com&lt;nabble_embed>/fhs/">Filesystem
Hierarchy Standard 2.3  . 
 
I tried the following.... 
 
================================================ 
#!/usr/bin/bash 
# Merge with a copy replace from TomEE plume to Tomcat.
# This preservers the proper distribution of files across directories
# that comes with a "dnf install tomcat"

# Without trailing slash 
SET FROM_DIR_CONF="/tmp/apache-tomee-plume-1.7.4/conf" 
SET FROM_DIR_JARS="/tmp/apache-tomee-plume-1.7.4/lib" 
SET FROM_DIR_WEBAPPS="/tmp/apache-tomee-plume-1.7.4/webapps" 
# Without trailing slash 
SET TO_DIR_CONF="/etc/tomcat" 
SET TO_DIR_JARS="/usr/share/java/tomcat" 
SET TO_DIR_WEBAPPS="/var/lib/tomcat/webapps" 
 
cp --force --copy-contents --recursive ${FROM_DIR_CONF} ${TO_DIR_CONF} 
cp --force --copy-contents --recursive ${FROM_DIR_JARS} ${TO_DIR_JARS} 
cp --force --copy-contents --recursive ${FROM_DIR_WEBAPPS} ${TO_DIR_WEBAPPS} 
================================================ 

But I am getting errors on startup. 
 
 
================================================ 
12-May-2016 19:43:30.030 WARNING [localhost-startStop-1]
org.apache.catalina.deploy.WebXml.setVersion Unknown version string [3.1].
Default version will be used.  
12-May-2016 19:43:30.139 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[/docs]] 
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153) 
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) 
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) 
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) 
	at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1259) 
	at
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1998) 
	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:1142) 
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
	at java.lang.Thread.run(Thread.java:745) 
Caused by: java.lang.NoClassDefFoundError: org/apache/tomcat/JarScanFilter 
	at
org.apache.catalina.core.StandardContext.getJarScanner(StandardContext.java:1161) 
	at
org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1903) 
	at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1272) 
	at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889) 
	at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386) 
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) 
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) 
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5472) 
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) 
	... 10 more 
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.JarScanFilter 
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381) 
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) 
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 
	... 19 more 




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Can-a-dnf-install-of-tomcat-be-merged-with-TomEE-plume-tp4678417.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Can a dnf install of tomcat be merged with TomEE plume?

Posted by paulhr <pa...@orthogroup.holdings>.
Yes.  In my bash script all files are copied from {uncompressed}/conf (with
recursion) to /etc/tomcat/conf  not just the server.xml file.  I double
checked the server.xml file.  The tomee-plume version of server.xml is in
the /etc/tomcat/conf directory.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Can-a-dnf-install-of-tomcat-be-merged-with-TomEE-plume-tp4678417p4678430.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Can a dnf install of tomcat be merged with TomEE plume?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
did you merge server.xml too? this is where tomee magic should happen
(ServerListener line)


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-05-13 19:35 GMT+02:00 paulhr <pa...@orthogroup.holdings>:

> That did not work either.  But it did give new errors.
>
> 13-May-2016 13:41:04.590 SEVERE [localhost-startStop-1]
> org.apache.catalina.core.StandardContext.listenerStart Exception send
> ing context initialized event to listener instance of class
> com.sun.faces.config.ConfigureListener
>  java.lang.RuntimeException: com.sun.faces.config.ConfigurationException:
> CONFIGURATION FAILED! standard context cannot be fo
> und
>         at
>
> com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:276)
>         at
>
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5066)
>         at
>
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
>         at
>
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
>         at
>
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1259)
>         at
>
> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1998)
>         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:1142)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION
> FAILED! standard context cannot be found
>         at
> com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:376)
>         at
>
> com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:216)
>         ... 13 more
> Caused by: java.lang.IllegalArgumentException: standard context cannot be
> found
>         at
>
> org.apache.tomee.mojarra.TomEEInjectionProvider.<init>(TomEEInjectionProvider.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
>
> com.sun.faces.spi.InjectionProviderFactory.getProviderInstance(InjectionProviderFactory.java:156)
>         at
>
> com.sun.faces.spi.InjectionProviderFactory.createInstance(InjectionProviderFactory.java:117)
>         at
> com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:335)
>         ... 14 more
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Can-a-dnf-install-of-tomcat-be-merged-with-TomEE-plume-tp4678417p4678428.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: Can a dnf install of tomcat be merged with TomEE plume?

Posted by paulhr <pa...@orthogroup.holdings>.
That did not work either.  But it did give new errors.

13-May-2016 13:41:04.590 SEVERE [localhost-startStop-1]
org.apache.catalina.core.StandardContext.listenerStart Exception send
ing context initialized event to listener instance of class
com.sun.faces.config.ConfigureListener
 java.lang.RuntimeException: com.sun.faces.config.ConfigurationException:
CONFIGURATION FAILED! standard context cannot be fo
und
	at
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:276)
	at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5066)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
	at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1259)
	at
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1998)
	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:1142)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION
FAILED! standard context cannot be found
	at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:376)
	at
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:216)
	... 13 more
Caused by: java.lang.IllegalArgumentException: standard context cannot be
found
	at
org.apache.tomee.mojarra.TomEEInjectionProvider.<init>(TomEEInjectionProvider.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
com.sun.faces.spi.InjectionProviderFactory.getProviderInstance(InjectionProviderFactory.java:156)
	at
com.sun.faces.spi.InjectionProviderFactory.createInstance(InjectionProviderFactory.java:117)
	at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:335)
	... 14 more




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Can-a-dnf-install-of-tomcat-be-merged-with-TomEE-plume-tp4678417p4678428.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Can a dnf install of tomcat be merged with TomEE plume?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Note that tomee provides tomcat so you will likely need to "remove" (or
suffix with "_" for instance) all tomcat jars before copying tomee ones.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-05-13 2:23 GMT+02:00 paulhr <pa...@orthogroup.holdings>:

> Can a dnf install of tomcat be merged with TomEE plume?  I want to get all
> the files/artifacts placed in the directories as done by dnf.  It is my
> understanding that dnf uses the <a
> href=&quot;http://www.pathname.com&lt;nabble_embed>/fhs/">Filesystem
> Hierarchy Standard 2.3  .
>
> I tried the following....
>
> ================================================
> #!/usr/bin/bash
> # Merge with a copy replace from TomEE plume to Tomcat.
> # This preservers the proper distribution of files across directories
> # that comes with a "dnf install tomcat"
>
> # Without trailing slash
> SET FROM_DIR_CONF="/tmp/apache-tomee-plume-1.7.4/conf"
> SET FROM_DIR_JARS="/tmp/apache-tomee-plume-1.7.4/lib"
> SET FROM_DIR_WEBAPPS="/tmp/apache-tomee-plume-1.7.4/webapps"
> # Without trailing slash
> SET TO_DIR_CONF="/etc/tomcat"
> SET TO_DIR_JARS="/usr/share/java/tomcat"
> SET TO_DIR_WEBAPPS="/var/lib/tomcat/webapps"
>
> cp --force --copy-contents --recursive ${FROM_DIR_CONF} ${TO_DIR_CONF}
> cp --force --copy-contents --recursive ${FROM_DIR_JARS} ${TO_DIR_JARS}
> cp --force --copy-contents --recursive ${FROM_DIR_WEBAPPS}
> ${TO_DIR_WEBAPPS}
> ================================================
>
> But I am getting errors on startup.
>
>
> ================================================
> 12-May-2016 19:43:30.030 WARNING [localhost-startStop-1]
> org.apache.catalina.deploy.WebXml.setVersion Unknown version string [3.1].
> Default version will be used.
> 12-May-2016 19:43:30.139 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[/docs]]
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
>         at
>
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
>         at
>
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1259)
>         at
>
> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1998)
>         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:1142)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NoClassDefFoundError: org/apache/tomcat/JarScanFilter
>         at
>
> org.apache.catalina.core.StandardContext.getJarScanner(StandardContext.java:1161)
>         at
>
> org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1903)
>         at
>
> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1272)
>         at
>
> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889)
>         at
>
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
>         at
>
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
>         at
>
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at
>
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5472)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
>         ... 10 more
> Caused by: java.lang.ClassNotFoundException:
> org.apache.tomcat.JarScanFilter
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>         ... 19 more
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Can-a-dnf-install-of-tomcat-be-merged-with-TomEE-plume-tp4678417.html
> Sent from the TomEE Users mailing list archive at Nabble.com.