tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donald Kwakkel (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (TOMEE-2458) Loading Beans causes ClassNotFoundException when using custom context classloader
Date Wed, 23 Jan 2019 21:39:00 GMT

    [ https://issues.apache.org/jira/browse/TOMEE-2458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16750449#comment-16750449
] 

Donald Kwakkel edited comment on TOMEE-2458 at 1/23/19 9:38 PM:
----------------------------------------------------------------

When adding above line to MyClassLoader  [^myclassloader.jar.withtccl] :
{code}
package test;

import java.net.URL;
import java.net.URLClassLoader;
import org.apache.catalina.loader.WebappClassLoader;

public class MyClassLoader extends WebappClassLoader {

	public MyClassLoader(ClassLoader parent) throws java.net.MalformedURLException {
		super(parent);

		addURL(java.nio.file.Paths.get(System.getProperty("catalina.home"), "myexception.jar").toUri().toURL());
		org.apache.openejb.loader.SystemInstance.get().setComponent(org.apache.openejb.core.ParentClassLoaderFinder.class,
fallback -> java.lang.Thread.currentThread().getContextClassLoader());
	}

	private static URL[] getURLss(){
		try {
			return new URL[]{new URL("file:///C:/Program%20Files/TomEE/myexception.jar")};
		}
		catch(Exception e) { throw new RuntimeException(e); }
	}
}
{code}
and adding a bean to the myexception.jar which is loaded through this classloader  [^myexception.jar.withbean]:
{code}
package test;

import static javax.ejb.TransactionAttributeType.SUPPORTS;

import java.util.function.Supplier;

import javax.ejb.LocalBean;
import javax.ejb.Singleton;
import javax.ejb.TransactionAttribute;
import javax.xml.ws.Provider;

@Singleton(name = "PlatformContextBean")
@LocalBean
public class PlatformContextBean<T extends Supplier<?>> implements Provider<T>
{
	@SuppressWarnings("unchecked")
	@Override
	@TransactionAttribute(SUPPORTS)
	public T invoke(T request) {
		Object result = request.get();
		return (T) (Supplier<?>) () -> result;
	}
}
{code}
I get the following exception from Micro Profile:
{code}
23-Jan-2019 22:23:41.696 INFO [main] org.apache.webbeans.config.BeansDeployer.validateInjectionPoints
All injection points were validated successfully.
23-Jan-2019 22:23:41.720 SEVERE [main] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication
CDI Beans module deployment failed
 org.apache.webbeans.exception.WebBeansDeploymentException: Error while sending SystemEvent
to a CDI Extension! org.apache.webbeans.portable.events.discovery.AfterDeploymentValidationImpl@4d964c9e
        at org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:731)
        at org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:495)
        at org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(BeanManagerImpl.java:490)
        at org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidationEvent(BeansDeployer.java:870)
        at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:344)
        at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
        at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:229)
        at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:963)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:756)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1308)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1130)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:134)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5007)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        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:703)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:772)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:426)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
        at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:241)
Caused by: org.apache.webbeans.exception.WebBeansException: java.lang.NullPointerException:
bean parameter may not be null
        at org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:371)
        at org.apache.webbeans.event.NotificationManager.invokeObserverMethod(NotificationManager.java:818)
        at org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:714)
        ... 57 more
Caused by: java.lang.NullPointerException: bean parameter may not be null
        at org.apache.webbeans.util.Asserts.assertNotNull(Asserts.java:52)
        at org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:727)
        at org.apache.webbeans.container.InjectableBeanManager.getReference(InjectableBeanManager.java:180)
        at org.apache.geronimo.microprofile.openapi.cdi.GeronimoOpenAPIExtension.afterValidation(GeronimoOpenAPIExtension.java:113)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.apache.webbeans.event.ObserverMethodImpl.invoke(ObserverMethodImpl.java:404)
        at org.apache.webbeans.event.ContainerEventObserverMethodImpl.invoke(ContainerEventObserverMethodImpl.java:85)
        at org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:365)
        ... 59 more
{code}
[~radcortez]: Any idea what goes wrong here? [^myclassloader.jar.withtccl]  [^myexception.jar.withbean]

ps: I am running with your latest 304 patch.


was (Author: dkwakkel):
When adding above line to MyClassLoader  [^myclassloader.jar.withtccl] :
{code}
package test;

import java.net.URL;
import java.net.URLClassLoader;
import org.apache.catalina.loader.WebappClassLoader;

public class MyClassLoader extends WebappClassLoader {

	public MyClassLoader(ClassLoader parent) throws java.net.MalformedURLException {
		super(parent);

		addURL(java.nio.file.Paths.get(System.getProperty("catalina.home"), "myexception.jar").toUri().toURL());
		org.apache.openejb.loader.SystemInstance.get().setComponent(org.apache.openejb.core.ParentClassLoaderFinder.class,
fallback -> java.lang.Thread.currentThread().getContextClassLoader());
	}

	private static URL[] getURLss(){
		try {
			return new URL[]{new URL("file:///C:/Program%20Files/TomEE/myexception.jar")};
		}
		catch(Exception e) { throw new RuntimeException(e); }
	}
}
{code}
and adding a bean to the myexception.jar which is loaded through this classloader  [^myexception.jar.withbean]:
{code}
package test;

import static javax.ejb.TransactionAttributeType.SUPPORTS;

import java.util.function.Supplier;

import javax.ejb.LocalBean;
import javax.ejb.Singleton;
import javax.ejb.TransactionAttribute;
import javax.xml.ws.Provider;

@Singleton(name = "PlatformContextBean")
@LocalBean
public class PlatformContextBean<T extends Supplier<?>> implements Provider<T>
{
	@SuppressWarnings("unchecked")
	@Override
	@TransactionAttribute(SUPPORTS)
	public T invoke(T request) {
		Object result = request.get();
		return (T) (Supplier<?>) () -> result;
	}
}
{code}
I get the following exception from Micro Profile:
{code}
23-Jan-2019 22:23:41.696 INFO [main] org.apache.webbeans.config.BeansDeployer.validateInjectionPoints
All injection points were validated successfully.
23-Jan-2019 22:23:41.720 SEVERE [main] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication
CDI Beans module deployment failed
 org.apache.webbeans.exception.WebBeansDeploymentException: Error while sending SystemEvent
to a CDI Extension! org.apache.webbeans.portable.events.discovery.AfterDeploymentValidationImpl@4d964c9e
        at org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:731)
        at org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:495)
        at org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(BeanManagerImpl.java:490)
        at org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidationEvent(BeansDeployer.java:870)
        at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:344)
        at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
        at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:229)
        at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:963)
        at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:756)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1308)
        at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1130)
        at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:134)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5007)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        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:703)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:772)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:426)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
        at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:241)
Caused by: org.apache.webbeans.exception.WebBeansException: java.lang.NullPointerException:
bean parameter may not be null
        at org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:371)
        at org.apache.webbeans.event.NotificationManager.invokeObserverMethod(NotificationManager.java:818)
        at org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:714)
        ... 57 more
Caused by: java.lang.NullPointerException: bean parameter may not be null
        at org.apache.webbeans.util.Asserts.assertNotNull(Asserts.java:52)
        at org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:727)
        at org.apache.webbeans.container.InjectableBeanManager.getReference(InjectableBeanManager.java:180)
        at org.apache.geronimo.microprofile.openapi.cdi.GeronimoOpenAPIExtension.afterValidation(GeronimoOpenAPIExtension.java:113)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.apache.webbeans.event.ObserverMethodImpl.invoke(ObserverMethodImpl.java:404)
        at org.apache.webbeans.event.ContainerEventObserverMethodImpl.invoke(ContainerEventObserverMethodImpl.java:85)
        at org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:365)
        ... 59 more
{code}
[~radcortez]: Any idea what goes wrong here? [^myclassloader.jar.withtccl]  [^myexception.jar.withbean]


> Loading Beans causes ClassNotFoundException when using custom context classloader
> ---------------------------------------------------------------------------------
>
>                 Key: TOMEE-2458
>                 URL: https://issues.apache.org/jira/browse/TOMEE-2458
>             Project: TomEE
>          Issue Type: Bug
>          Components: TomEE Core Server
>    Affects Versions: 8.0.0-M1
>            Reporter: Gerwin
>            Priority: Major
>         Attachments: myclassloader.jar, myclassloader.jar.withtccl, myexception.jar,
myexception.jar.withbean, repro.war
>
>
> h4. Steps to reproduce
> # Create a custom Exception and put it in {{CATALINA_HOME/myexception.jar}}
> {code:java}
> public class MyException extends Exception {
> }
> {code}
> # Create a custom ClassLoader and put it in {{CATALINA_HOME/myclassloader.jar}}
> {code:java}
> public class MyClassLoader extends WebappClassLoader {
> 	public MyClassLoader(ClassLoader parent)throws MalformedURLException {
> 		super(parent);
> 		addURL(Paths.get(System.getProperty("catalina.home"), "myexception.jar").toUri().toURL());
> 	}
> }
> {code}
> # Put the classloader on the classpath
> {code:none|title=CATALINA_HOME/conf/catalina.properties}
> common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar","${catalina.home}/myclassloader.jar"
> {code}
> # Use the classloader in the context
> {code:xml|title=CATALINA_HOME/webapps/repro/META-INF/context.xml}
> <Context>
>     <Loader loaderClass="test.MyClassLoader"/>
> </Context>
> {code}
> # Create a bean with the {{MyException}} in the method signature
> {code:java|title=CATALINA_HOME/webapps/repro/WEB-INF/classes/MyBean.class}
> @Stateless(name = "MyBeanEJB")
> public class MyBean {
> 	public String hello() throws MyException {
> 		return "hello";
> 	}
> }
> {code}
> # Use the bean
> {code:java|title=CATALINA_HOME/webapps/repro/index.jsp}
> <%@ page import="MyBean" %>
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <html>
>   <body>
>   <%
>     MyBean myBean = new MyBean();
>     out.println(myBean.hello());
>   %>
>   </body>
> </html>
> {code}
> h4. Actual result
> {code:none|title=CATALINA_HOME/logs/catalina.0.log}
> jan 23, 2019 4:37:17 PM sun.reflect.DelegatingMethodAccessorImpl invoke
> INFO: Starting Servlet Engine: Apache Tomcat (TomEE)/9.0.12 (8.0.0-SNAPSHOT)
> jan 23, 2019 4:37:17 PM sun.reflect.DelegatingMethodAccessorImpl invoke
> INFO: Deploying web application archive [C:\Program Files\TomEE\webapps\repro.war]
> jan 23, 2019 4:37:17 PM org.apache.tomee.catalina.TomcatWebAppBuilder init
> INFO: ------------------------- localhost -> /repro
> jan 23, 2019 4:37:17 PM org.apache.openejb.config.ConfigurationFactory configureApplication
> INFO: Configuring enterprise application: C:\Program Files\TomEE\webapps\repro
> jan 23, 2019 4:37:17 PM sun.reflect.NativeMethodAccessorImpl invoke
> SEVERE: ContainerBase.addChild: start: 
> org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/repro]]
> 	at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)
> 	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:703)
> 	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)
> 	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858)
> 	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.deployWARs(HostConfig.java:772)
> 	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:426)
> 	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)
> 	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
> 	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> 	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
> 	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
> 	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)
> 	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
> 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
> 	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:944)
> 	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> 	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> 	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
> 	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:497)
> 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
> Caused by: java.lang.NoClassDefFoundError: test/MyException
> 	at java.lang.Class.getDeclaredMethods0(Native Method)
> 	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
> 	at java.lang.Class.privateGetPublicMethods(Class.java:2902)
> 	at java.lang.Class.getMethods(Class.java:1615)
> 	at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.processApplicationExceptions(AnnotationDeployer.java:3058)
> 	at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:2566)
> 	at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:1991)
> 	at org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:384)
> 	at org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:420)
> 	at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:1037)
> 	at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1286)
> 	at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1130)
> 	at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:134)
> 	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> 	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5007)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> 	... 38 more
> Caused by: java.lang.ClassNotFoundException: test.MyException
> 	at org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:186)
> 	at org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:83)
> 	... 54 more
> jan 23, 2019 4:37:17 PM sun.reflect.NativeMethodAccessorImpl invoke
> SEVERE: Error deploying web application archive [C:\Program Files\TomEE\webapps\repro.war]
> java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException:
Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/repro]]
> 	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:703)
> 	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)
> 	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858)
> 	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.deployWARs(HostConfig.java:772)
> 	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:426)
> 	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)
> 	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
> 	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> 	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
> 	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
> 	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)
> 	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
> 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
> 	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:944)
> 	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> 	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> 	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
> 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
> 	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:497)
> 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
> jan 23, 2019 4:37:17 PM sun.reflect.DelegatingMethodAccessorImpl invoke
> INFO: Deployment of web application archive [C:\Program Files\TomEE\webapps\repro.war]
has finished in [469] ms
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message