Re: NullPointerException at startup

Cesar Hernandez <[email protected]>
Newsgroups gmane.comp.java.openejb.user
Message-ID <CAFmYxhTONWfMvr4hWP7BbW+8Pv=RTMoWbpnF4Od1GZzxgBofVA@mail.gmail.com>
Hi Kevin,

The error you are getting seems to come from the ROOT application, a couple
of questions:

- how did you deploy your application?
- Is you application an a ear, jar or war file?
- You can attach the rest of the Catalina log to enable further
troubleshooting on the deployment issue you are having.

As a reference, the TomEE examples can serve as a good starting point to
know how to package and build your application(s):
You can download individual example code from here:
https://github.com/apache/tomee/tree/a5bd7f916eff5f6b942dc8bbf7fdcab194055949/examples
The Overall documentation for each example:
https://tomee.apache.org/tomee-8.0/examples/


[1]
directory [/opt/Apache/tomcat/apache-tomee-plus-8.0.14/webapps/ROOT]

El mié, 19 abr 2023 a las 13:03, Kevin Huntly (<[email protected]>)
escribió:

> Hi Everyone,
>
> I'm new to TomEE, I just downloaded and installed 8.0.14 (I know 9 is out,
> but I need to develop for a 1.8 JDK). I'm seeing this exception on start:
>
> 19-Apr-2023 14:56:35.080 SEVERE [main]
> sun.reflect.NativeMethodAccessorImpl.invoke Error deploying web application
> directory [/opt/Apache/tomcat/apache-tomee-plus-8.0.14/webapps/ROOT]
>         java.lang.IllegalStateException: Error starting child
>                 at
>
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)
>                 at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:698)
>                 at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:696)
>                 at
>
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1184)
>                 at
>
> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1932)
>                 at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>                 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>                 at
>
> org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
>                 at
>
> java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
>                 at
>
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1094)
>                 at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:476)
>                 at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1617)
>                 at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:318)
>                 at
>
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
>                 at
>
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
>                 at
> org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
>                 at
>
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)
>                 at
> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:835)
>                 at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>                 at
>
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
>                 at
>
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1383)
>                 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>                 at
>
> org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
>                 at
>
> java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
>                 at
>
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
>                 at
>
> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:265)
>                 at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>                 at
>
> org.apache.catalina.core.StandardService.startInternal(StandardService.java:430)
>                 at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>                 at
>
> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
>                 at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>                 at
> org.apache.catalina.startup.Catalina.start(Catalina.java:772)
>                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>                 at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>                 at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>                 at java.lang.reflect.Method.invoke(Method.java:498)
>                 at
> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:347)
>                 at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:478)
>         Caused by: org.apache.catalina.LifecycleException: Failed to start
> component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
>                 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:726)
>                 ... 37 more
>         Caused by: java.util.ServiceConfigurationError:
> org.eclipse.microprofile.config.spi.ConfigSource: Provider
> org.apache.tomee.microprofile.config.TomEEConfigSource 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 java.lang.Iterable.forEach(Iterable.java:74)
>                 at
>
> org.apache.geronimo.config.DefaultConfigBuilder.build(DefaultConfigBuilder.java:130)
>                 at
>
> org.apache.geronimo.config.DefaultConfigProvider.getConfig(DefaultConfigProvider.java:62)
>                 at
>
> org.apache.geronimo.config.DefaultConfigProvider.getConfig(DefaultConfigProvider.java:46)
>                 at
>
> org.eclipse.microprofile.config.ConfigProvider.getConfig(ConfigProvider.java:93)
>                 at
>
> org.apache.geronimo.microprofile.opentracing.config.OpenTracingConfigMpConfigImpl.<init>(OpenTracingConfigMpConfigImpl.java:29)
>                 at
>
> org.apache.geronimo.microprofile.opentracing.config.GeronimoOpenTracingConfig.create(GeronimoOpenTracingConfig.java:26)
>                 at
>
> org.apache.geronimo.microprofile.opentracing.microprofile.server.ServletTracingSetup.onStartup(ServletTracingSetup.java:32)
>                 at
>
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5211)
>                 at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>                 ... 38 more
>         Caused by: java.lang.NullPointerException
>                 at
> org.apache.openejb.util.AppFinder.findAppContextOrWeb(AppFinder.java:28)
>                 at
>
> org.apache.tomee.microprofile.config.TomEEConfigSource.<init>(TomEEConfigSource.java:35)
>                 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)
>                 ... 50 more
> ________________________________________________
>
> Kevin Huntly
> Email: [email protected]
> Cell: 716/424-3311
> ________________________________________________
>
> -----BEGIN GEEK CODE BLOCK-----
> Version: 1.0
> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
> G++ e(+) h--- r+++ y+++*
> ------END GEEK CODE BLOCK------
>


-- 
Atentamente:
César Hernández.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.