Когда я развертываю свое приложение в Jboss, я получаю следующую ошибку:
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.subunit."test.ear"."hello.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."test.ear"."hello.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of subdeployment "hello.war" of deployment "test.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:172)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
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.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0024: Could not configure component HelloWorld
at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:106)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
... 5 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.jboss.classfilewriter.ClassFile.define(ClassFile.java:313)
at org.jboss.invocation.proxy.AbstractClassFactory.defineClass(AbstractClassFactory.java:160)
at org.jboss.invocation.proxy.AbstractProxyFactory.getCachedMethods(AbstractProxyFactory.java:146)
at org.jboss.as.ee.component.ViewDescription$DefaultConfigurator.configure(ViewDescription.java:196)
at org.jboss.as.ee.component.DefaultComponentViewConfigurator.configure(DefaultComponentViewConfigurator.java:67)
at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)
... 6 more
Caused by: java.lang.reflect.InvocationTargetException
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.jboss.classfilewriter.ClassFile.define(ClassFile.java:308)
... 11 more
Caused by: java.lang.VerifyError: class com.test.java.HelloWorldImpl$$$view1 overrides final method getDetails.(Ljava/lang/String;)Ljava/lang/Object;
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
... 16 more
Примечание: класс HelloWorldImpl не отменяет окончательный метод getDetails. он просто вызывает свой последний метод своего суперкласса getDetails.
Код:
class HelloWorldImpl extends Hello{
...
public void display() {
...
Foo fooObj = (Foo)getDetails("test");
...
}
}
class Hello{
public final Object getDetails(String id){
...
}
}