I have successfully set up tomcat on my PC. I have downloaded the Eclipse Java EE and created a simple web application. Server run time environment is configured as apache tomcat8 which is installed on my system.
Now that I'm trying to run the web page it shows the error below and server does not start. Is this an issue with setting up the server runtime environment?
Server Tomcat v7.0 Server at localhost failed to start.
Console:
Jul 15, 2022 9:42:12 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException:
Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/FirstWeb]]
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/FirstWeb]]
Caused by: java.lang.NoClassDefFoundError: org/apache/tomcat/JarScanFilter
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.JarScanFilter
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
Caused by: org.apache.catalina.LifecycleException: Failed to start component
Related
I have resolved all issues of the Groovy on grails project but the project is not starting in my intellij idea.
This is the error I am stuck at for 3 days now.
The project runs fine with grails run-app command on port 8080
I am using grails 2.4.4, tomcat 7 because the project is an old project, java 1.7 because 2.4.4 grails works best with 1.7 jdk and sdkman to manage my java configurations over a macos 12.4
|Configuring classpath
.
|Environment set to development
.................................
|Packaging Grails application
....................................................... [copy] Copying 1 file to /Users/paradox/Developer/contractualprojects/yoska/kona-coach/target/work
..
|Running Grails application
Error |
2022-06-05 16:36:46,385 [Tomcat-startStop-1] ERROR core.ContainerBase - A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/kona-coach]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:816)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/kona-coach]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 6 more
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getClassLoader()Ljava/lang/ClassLoader;
at org.apache.catalina.startup.WebappServiceLoader.load(WebappServiceLoader.java:90)
at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1546)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1268)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
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:5378)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
Error |
Server failed to start: Failed to start component [StandardServer[-1]]
Process finished with exit code 1```
I am on localhost /manager and hit the start button on the war i want. The localhost.log is below.
Note:I try to run alfresco app/I use tomcat 9 and jdk 11
Error configuring application listener of class [org.springframework.web.context.ContextLoaderListener]
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:540)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:521)
at
...
org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at
...
java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
...
27-Feb-2020 19:44:28.225 SEVERE [http-nio-8081-exec-9] org.apache.catalina.core.StandardContext.listenerStart Skipped installing application listeners due to previous error(s)
...
27-Feb-2020 19:45:41.347 SEVERE [http-nio-8081-exec-5] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [org.springframework.web.context.ContextLoaderListener]
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
...
27-Feb-2020 20:08:26.996 SEVERE [http-nio-8081-exec-12] org.apache.catalina.core.StandardContext.listenerStart Skipped installing application listeners due to previous error(s)
I am deploying an ear file in web logic .
This ear file is a RMI client and uses some 3rd party jars .
These 3rd party jars need the following properties :
System.setProperty("java.naming.provider.url", "localhost:1099");
System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
The problem with these properties is that these mess up weblogic admin console.
The console no longer is accessible once the above two properties get fired .
when I try to access weblogic console after these properties are set I get the following exception :
<24/05/2019 5:23:34 PM EST> <Error> <Console> <BEA-240003> <Administration Console encountered the following error: java.io.IOException: Unable to create InitialContext: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
at weblogic.management.remote.wlx.ClientProvider.findRMIServer(ClientProvider.java:126)
at weblogic.management.remote.wlx.ClientProvider.newJMXConnector(ClientProvider.java:103)
at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:369)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:267)
at com.bea.console.utils.MBeanUtils.lookupMBeanServerConnection(MBeanUtils.java:3658)
at com.bea.console.utils.MBeanUtils.getDomainRuntimeMBeanServerConnection(MBeanUtils.java:1840)
at com.bea.console.utils.MBeanUtils.getDomainRuntimeServiceMBean(MBeanUtils.java:1916)
at com.bea.console.utils.MBeanUtilsInitializer.initMBeanUtils(MBeanUtilsInitializer.java:70)
at com.bea.console.utils.MBeanUtilsInitializer.access$000(MBeanUtilsInitializer.java:20)
at com.bea.console.utils.MBeanUtilsInitializer$1.run(MBeanUtilsInitializer.java:49)
at weblogic.work.ContextWrap.run(ContextWrap.java:40)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
at javax.naming.InitialContext.init(InitialContext.java:242)
at javax.naming.InitialContext.<init>(InitialContext.java:216)
at weblogic.management.remote.wlx.ClientProvider.findRMIServer(ClientProvider.java:124)
... 13 more
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:357)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:318)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:80)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:186)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:50)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:72)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:61)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:671)
... 17 more
>
<24/05/2019 5:23:34 PM EST> <Error> <Console> <BEA-240003> <Administration Console encountered the following error: Error when initilize JMX connection>
<24/05/2019 5:23:37 PM EST> <Error> <Console> <BEA-240003> <Administration Console encountered the following error: java.io.IOException: Unable to create InitialContext: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
at weblogic.management.remote.wlx.ClientProvider.findRMIServer(ClientProvider.java:126)
at weblogic.management.remote.wlx.ClientProvider.newJMXConnector(ClientProvider.java:103)
at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:369)
so clearly setting properties at System level is not a good idea and it is messing up web logic .
Since these properties are being used by 3rd party jars ( code which I cannot change ) how do I provide these properties to the jars without impacting web logic?
essentially these properties should be set specific to my application without interfering with web logic.
Using spring boot, war package on ubuntu tomcat. The credential file is packaged in resources/credentials/gmail, but my mail service throws this error:
"/var/lib/tomcat8/webapps/ROOT/WEB-INF/classes/credentials/gmail/StoredCredential (Permission denied)"
how can I fix this error?
I installed tomcat8 with apt-get, I do believe that it created a tomcat8 user and group...does it have to do with user permissions for the folder?
edit:
2015-11-08 12:12:33.245 ERROR 12664 --- [cat-startStop-1] org.apache.catalina.core.ContainerBase : A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
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: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 6 common frames omitted
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.addServlet(Ljava/lang/String;Ljavax/servlet/Servlet;)Ljavax/servlet/ServletRegistration$Dynamic;
at org.springframework.boot.context.embedded.ServletRegistrationBean.onStartup(ServletRegistrationBean.java:189)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.selfInitialize(EmbeddedWebApplicationContext.java:221)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.access$000(EmbeddedWebApplicationContext.java:84)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:205)
at org.springframework.boot.context.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:54)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5170)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 common frames omitted
with winscp, navigate to the credentials folder and apply (others) R W X permissions to folder + recursively. tomcat8 will now be able to access/edit the credentials file inside.
Neo4j server is getting failed to start with the below exception,
Oct 3, 2013 12:05:10 PM org.neo4j.server.logging.Logger log
SEVERE:
java.lang.RuntimeException: Starting neo server failed, see nested exception.
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:124)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:79)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:70)
at com.Neo4J.src.EmbeddedNeo4j.createDb(EmbeddedNeo4j.java:66)
at com.Neo4J.src.EmbeddedNeo4j.main(EmbeddedNeo4j.java:38)
Caused by: java.lang.ExceptionInInitializerError
at org.apache.commons.configuration.AbstractConfiguration.createInterpolator(AbstractConfiguration.java:319)
at org.apache.commons.configuration.AbstractConfiguration.getSubstitutor(AbstractConfiguration.java:283)
at org.apache.commons.configuration.PropertyConverter.interpolate(PropertyConverter.java:684)
at org.apache.commons.configuration.AbstractConfiguration.interpolate(AbstractConfiguration.java:432)
at org.apache.commons.configuration.AbstractConfiguration.interpolate(AbstractConfiguration.java:419)
at org.apache.commons.configuration.AbstractConfiguration.getString(AbstractConfiguration.java:1101)
at org.neo4j.server.AbstractNeoServer.getWebServerAddress(AbstractNeoServer.java:285)
at org.neo4j.server.AbstractNeoServer.configureWebServer(AbstractNeoServer.java:183)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:101)
... 4 more
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException) (Caused by org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.apache.commons.configuration.interpol.ConstantLookup.<init>(ConstantLookup.java:64)
at org.apache.commons.configuration.interpol.ConfigurationInterpolator.<clinit>(ConfigurationInterpolator.java:330)
... 13 more
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 18 more
Caused by: java.lang.NullPointerException
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:374)
... 19 more
Oct 3, 2013 12:05:10 PM org.neo4j.server.logging.Logger log
SEVERE: Failed to start Neo Server on port [7474]
Here i am trying to start the server through programme And the programme code is,
graphDb = new GraphDatabaseFactory()
.newEmbeddedDatabaseBuilder(DB_PATH)
.setConfig( config )
.newGraphDatabase();
Configurator configurator = new ServerConfigurator((GraphDatabaseAPI)graphDb);
configurator.configuration().setProperty(Configurator.WEBSERVER_ADDRESS_PROPERTY_KEY, "172.25.218.96");
configurator.configuration().setProperty(Configurator.WEBSERVER_PORT_PROPERTY_KEY, 7474);
WrappingNeoServerBootstrapper bootstrapper = new WrappingNeoServerBootstrapper((GraphDatabaseAPI)graphDb, configurator);
bootstrapper.start();
Can anybody help me with this.....
Thanks..
Make sure you have the same log library versions in your project as Neo4j Server. This seesm like a case where your current setup is pulling in some other versions of Apache Commons Logging.