Error while deploying war on JBoss Eap 7.3 server

169 views
Skip to first unread message

omkar phadtare

unread,
Jan 5, 2024, 11:45:19 AM1/5/24
to WildFly
Hi Community,

I am having trouble while deploying war file on JBoss EAP 7.3 server were I have used modules for runtime library to use,
So, Firstly i created Java (Dynamic Web Project) using eclipse to code then i created war file by export->war 
it creates war file containing
META-INF
    |  - MANIFEST.MF
resource
    | - Containing all js,css files
WEB-INF
     | - classess
              | - con
                      | - cosmos/crm/(*all directory with class files)
      | - lib (* Contains jar files)
      | - pages (* index.jsp)
      | - jboss-deployment-structure.xml
      | - spring-context.xml
      | - web.xml

jboss-deployment-structure.xml

<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="com.cosmos.configuration.crm"/>
<module name="com.appdev.apache" export="true"/>
<module name="com.appdev.springframework" export="true" meta-inf="export"/>
<module name="com.appdev.usracs" export="true"/>
</dependencies>
<exclusions>
<module name="org.apache.commons.logging"/>
<module name="org.apache.log4j"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.logging.jul-to-slf4j-stub"/>
<module name="org.jboss.logmanager"/>
<module name="org.jboss.logmanager.log4j"/>
<module name="org.slf4j"/>
<module name="org.slf4j.impl"/>
</exclusions>
</deployment>
</jboss-deployment-structure>


spring-context.xml


<!--  Annotation based auto-wiring and look up for components  -->
<mvc:annotation-driven/>
<context:component-scan base-package="com.cosmos.crm"/>
<!--  Handling static resources  -->
<mvc:resources mapping="/resources/**" location="/resources/"/>
<!--  View resolver bean  -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/pages/"/>
<property name="suffix" value=".jsp"/>
</bean>
<!--  File resolver  -->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="maxUploadSize" value="268435456"/>
</bean>
<!--  Beans  -->
<!--  Helper beans  -->
<bean id="pdfHelper" class="com.cosmos.crm.web.helpers.PDFHelper"/>
<bean id="fileHelper" class="com.cosmos.crm.web.helpers.KeyFinFileHelper"/>
<bean id="loginHelper" class="com.cosmos.crm.busn.helpers.LoginHelper"/>
<bean id="fundFlowHelper" class="com.cosmos.crm.busn.helpers.FundFlowHelper"/>
<bean id="mpbfHelper" class="com.cosmos.crm.busn.helpers.MPBFHelper"/>
<bean id="fileValidator" class="com.cosmos.crm.web.validators.KeyFinFileValidator"/>
<bean id="networthValidator" class="com.cosmos.crm.web.validators.NetworthValidator"/>
<bean id="liabilityValidator" class="com.cosmos.crm.web.validators.LiabilityValidator"/>
<bean id="assetValidator" class="com.cosmos.crm.web.validators.AssetValidator"/>
<bean id="profitLossValidator" class="com.cosmos.crm.web.validators.ProfitLossValidator"/>


Error Logs : 

17:57:12,380 ERROR [org.springframework.web.servlet.DispatcherServlet] (ServerService Thread Pool -- 82) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pdfHelper' defined in ServletContext resource [/WEB-INF/spring-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.cosmos.crm.web.helpers.PDFHelper]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import org.springframework cannot be resolved
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type
Autowired cannot be resolved to a type

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1232)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:702)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:668)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:716)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:591)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:530)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:170)
at javax.servlet.GenericServlet.init(GenericServlet.java:180)
at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)
at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:305)
at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:145)
at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:585)
at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:556)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:598)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:97)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:750)
at org.jboss.threads.JBossThread.run(JBossThread.java:485)



All required modules are set on JBoss EAP server 
At the time of Deployment I am having error : 
JbossError.png
 
     
Reply all
Reply to author
Forward
0 new messages