每次我在jboss上进行干净安装并启动我们的系统我得到一个“java.lang.ClassNotFoundException”,但之后如果我停止并再次启动它们就不会出现错误。有什么想法吗?
public <T> T compilaNoCache(String codigo, String fonteBase, String realPath) throws Exception {
// Compila o código..
String[] result = this.compilar(codigo, fonteBase, realPath);
String erro = result[0];
String nomeCls = result[1];
// Se existir algum erro lança uma RegraNegocioException
if (!erro.isEmpty()) {
throw new RegraNegocioException(erro);
}
// Cria uma instância do código, e armazena no Map
Object objInstancia = Class.forName(nomeCls).newInstance();
mapaCodigo.put(codigo.hashCode(), objInstancia);
return (T) objInstancia;
}
Stacktrace:
15:46:39,561 ERROR [stderr] (MSC service thread 1-7) java.lang.RuntimeException: java.lang.ClassNotFoundException: br.com.dataeasy.docflow4.web.code.classeDin0 from [Module "deployment.docflow4-web.war:main" from Service Module Loader]
15:46:39,574 ERROR [stderr] (MSC service thread 1-7) at br.com.dataeasy.docflow4.bus.negocio.impl.CampoValidadorBO.carregarValidadores(CampoValidadorBO.java:202)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at java.lang.reflect.Method.invoke(Method.java:606)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at com.sun.proxy.$Proxy397.carregarValidadores(Unknown Source)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at br.com.dataeasy.docflow4.web.DocflowLoadListener.contextInitialized(DocflowLoadListener.java:236)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at java.lang.Thread.run(Thread.java:745)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) Caused by: java.lang.ClassNotFoundException: br.com.dataeasy.docflow4.web.code.classeDin0 from [Module "deployment.docflow4-web.war:main" from Service Module Loader]
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at java.lang.Class.forName0(Native Method)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at java.lang.Class.forName(Class.java:190)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at br.com.dataeasy.acs.bus.ctr.negocio.impl.CodigoExecutarBO.compilaNoCache(CodigoExecutarBO.java:123)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) at br.com.dataeasy.docflow4.bus.negocio.impl.CampoValidadorBO.carregarValidadores(CampoValidadorBO.java:198)
15:46:39,575 ERROR [stderr] (MSC service thread 1-7) ... 20 more