I am working on a dynamic web project (StudentManagement.war) which relies on an EJB (StudentManagementEJB.jar) for database interfacing. The EJB project has been added to the web project's class path. On deployment, however, the following exceptions are thrown:
22:23:21,275 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."StudentManagement.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."StudentManagement.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "StudentManagement.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_45]
Caused by: java.lang.RuntimeException: Error getting reflective information for class student.management.ManageStudentServlet with ClassLoader ModuleClassLoader for Module "deployment.StudentManagement.war:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: java.lang.NoClassDefFoundError: Lstudent/management/ManageStudentSessionBeanLocal;
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_45]
at java.lang.Class.privateGetDeclaredFields(Unknown Source) [rt.jar:1.7.0_45]
at java.lang.Class.getDeclaredFields(Unknown Source) [rt.jar:1.7.0_45]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 10 more
Caused by: java.lang.ClassNotFoundException: student.management.ManageStudentSessionBeanLocal from [Module "deployment.StudentManagement.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 15 more
This shows that the web module cannot find classes defined within the bean. I've changed my default: %JBOSS_HOME%\standalone\deployments\StudentManagement.war\META-INF\MANIFEST.MF to:
Manifest-Version: 1.0
Class-Path: file:/C:/Utils/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final/standalone/deployments/StudentManagementEJB.jar
In spite of this the exception persists. There are two spaces between Class-Path: and the URI and a space after the end of the URI(../standalone) followed by a new line character.
Is there something wrong in my syntax?
I am using java ee 7, jboss-as-7.1.1.Final and Win 7 x64.
It turns out that the StudentManagementEJB.jar file is not copied into the /lib directory upon deployment. Aside from adding it to the Class-Path, it must also be copied to
%JBOSS_HOME%\standalone\deployments\<ProjectName>.war\WEB-INF\lib
directory(if the project is deployed as .war). In this case ProjectName is StudentManagement.
Do not reference to the deployments-folder (standalone/deployments). The deployed applications are not really deployed there, but copied from there to the data-directory, or they are not even in the deployments-folder, if you use other forms of deployment, e.g. jboss-cli.bat
There are some ways you can solve this.
1) Don't package the EJB separately, but include it into the WAR (the easiest).
2) Create an EAR and package the WAR and EJB-JAR together into the EAR (the classic).
3) Create a module from the interface-classes and reference from EJB.jar and WAR to the module. See e.g. "Dependencies:" in https://docs.jboss.org/author/display/AS71/Class+Loading+in+AS7
4) Reference in the WARs MANIFEST to the EJB-deployment like:
Dependencies:deployment.StudentManagementEJB.jar
From https://docs.jboss.org/author/display/AS71/Class+Loading+in+AS7:
Module names for top level deployments follow the format
deployment.myarchive.war while sub deployments are named like
deployment.myear.ear.mywar.war.
This means that it is possible for a deployment to import classes from
another deployment using the other deployments module name, the
details of how to add an explicit module dependency are explained
below.
Related
I'm trying to deploy an EAR to Wildfly 10 via Eclipse Neon with the latest JBoss Tools. This is my first attempt with EARs, so I documented myself and this is the structure I came up with:
Maven modules:
api (type jar, no deps): contains the interfaces MyService and Person.
ejb (type ejb, depends on api): contains a #Stateless implementation of MyService and an #Entity implementation of Person.
war (type war, depends on api): contains a JAX-RS resource which uses MyService.
ear (type ear, depends on ejb and war): the EAR module.
(See here for the full source: https://github.com/heruan/maven-ear-example)
The problem is when I deploy this to Wildfly, I get:
java.lang.NoClassDefFoundError: Failed to link ejb/MyServiceImpl: api/MyService
Full stack trace:
INFO [org.jboss.weld.deployer] (MSC service thread 1-6) WFLYWELD0003: Processing weld deployment ear-1.0.0.ear
WARN [org.jboss.modules] (MSC service thread 1-6) Failed to define class ejb.MyServiceImpl in Module "deployment.ear-1.0.0.ear.ejb-1.0.0.jar:main" from Service Module Loader: java.lang.NoClassDefFoundError: Failed to link ejb/MyServiceImpl (Module "deployment.ear-1.0.0.ear.ejb-1.0.0.jar:main" from Service Module Loader): api/MyService
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.__newInstance(DelegatingConstructorAccessorImpl.java:45)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:446)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:274)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:78)
at org.jboss.modules.Module.loadModuleClass(Module.java:606)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:21)
at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:14)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:84)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
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)
What am I missing? My goal is to have the most basic EAR with a common JPA Persistence Unit shared by its modules.
I found out what the problem was: duplicate .class files. Seems like the Maven EAR plugin isn't clever enough to avoid duplicate dependencies, so you need to explicitly set them as provided.
For example, the solution in the example project is to set the api module as provided in the war's pom.xml:
<dependency>
<groupId>com.example</groupId>
<artifactId>api</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
I am trying to integrate wmq.jmsra.jar version 8.0.0, into JBOSS 6.1EAP.
I get a parsing error when I deploy this jar, with older version of wmq.jmsra.jar it works. I don't understand, can you help me?
StackTrace :
11:50:36,808 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."wmq.jmsra.rar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."wmq.jmsra.rar".PARSE: JBAS018733: Failed to process phase PARSE of deployment "wmq.jmsra.rar"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS010443: Failed to parse service xml ["/C:/jboss-eap-6.2/bin/content/wmq.jmsra.rar/META-INF/ra.xml"]
at org.jboss.as.connector.deployers.ra.processors.RaDeploymentParsingProcessor.process(RaDeploymentParsingProcessor.java:124)
at org.jboss.as.connector.deployers.ra.processors.RaDeploymentParsingProcessor.deploy(RaDeploymentParsingProcessor.java:92)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
... 5 more
Caused by: org.jboss.jca.common.metadata.ParserException: IJ010061: Unexpected element: resourceadapter-version
at org.jboss.jca.common.metadata.ra.RaParser.parseConnector10(RaParser.java:278)
at org.jboss.jca.common.metadata.ra.RaParser.parse(RaParser.java:165)
at org.jboss.jca.common.metadata.ra.RaParser.parse(RaParser.java:107)
at org.jboss.as.connector.deployers.ra.processors.RaDeploymentParsingProcessor.process(RaDeploymentParsingProcessor.java:115)
... 7 more
The WebSphere MQ Resource Adapter v8.0.0.0 is targetted at JavaEE7 (because it's a JMS2.0 compliant) adapter. JBOSS 6.1 won't be able to support it so please use WMQ 7.5 resource Adapter
I'm trying to deploy three different ear files to the same Jboss server...
One of them doesn't have a context root, and the other two have it, but it's different. I mean, let's take the three ears as one.ear, two.ear and three.ear:
one.ear has:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<context-root>/</context-root>
</jboss-web>
two.ear has:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<context-root>/two</context-root>
</jboss-web>
three.ear has none.
When I try to star Jboss (7 AS), I got this:
16:01:31,962 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.subunit."one-ear.ear"."one.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."one-ear.ear"."one.war".INSTALL: Failed to process phase INSTALL of subdeployment "one.war" of deployment "one-ear.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_45]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_45]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018027: Failed to add JBoss Web deployment service
at org.jboss.as.web.deployment.WarDeploymentProcessor.processDeployment(WarDeploymentProcessor.java:320)
at org.jboss.as.web.deployment.WarDeploymentProcessor.deploy(WarDeploymentProcessor.java:114)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.web.deployment.default-host./.realm is already registered
at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:154) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:227) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:560) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2228) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2228) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.as.web.deployment.WarDeploymentProcessor.processDeployment(WarDeploymentProcessor.java:269)
... 7 more
I have read that this error could be thrown when two apps in the same server have the same context root, but this is not the case... what is happening?
Generally the containers such as Jboss have a context root of
<context-root>/</context-root>
to intercept all the incoming requests and pass on to the application server. In your I suspect the conflicting app is JBoss AppServer root itself, you can disable that using the following (enable-welcome-root="false")
<subsystem xmlns="urn:jboss:domain:web:1.0">
<connector name="http" protocol="HTTP/1.1" socket-binding="http" scheme="http"/>
<virtual-server name="localhost" enable-welcome-root="false">
<alias name="example.com"/>
</virtual-server>
</subsystem>
Try to remove .war archive from web server, then deploy again. You can do this through jboss management console. It also could be that you have deployed another application with same value of <context-root> element in jboss-web.xml.
Check which --server-config file is used to start the server. In my case that was standalone-ha.xml instead of the expected standalone.xml.
As of to me, restarting the JBoss Server was enough.
No idea why.
this solved my problem - go to your standalone.xml - the one which is being reffered by JBoss
In the standalone.xml - you will find the deployment section
<deployments>
<deployment name="YOUR_APP.ear" runtime-name="YOUR_APP-version-SNAPSHOT.ear">
<fs-archive path="C:\YOUR_APP-version-SNAPSHOT.ear"/>
</deployment>
</deployments>
if you are trying to deploy the newer versions or different version of your ear - the it will give such error.
Remove this part from the deployments section and keep it empty
<deployments>
<!-- remove the deployment from here -->
</deployments>
then just restart your server - it will deploy the YOUR_APP.ear again
and now it will show it with - NEW version
<deployments>
<deployment name="YOUR_APP.ear" runtime-name="YOUR_APP-NEW_version-SNAPSHOT.ear">
<fs-archive path="C:\YOUR_APP-_NEW_version-SNAPSHOT.ear"/>
</deployment>
</deployments>
I've been tasked with trying to migrate some existing apps from jboss5 to jboss7.
I don't know much about EJBs or Hibernate so this is an interesting challenge for me.
Currently this is where i'm stuck on:
...
14:42:12,727 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.subunit."Authorization.ear"."AuthorizationClient-7.0-SNAPSHOT.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."Authorization.ear"."AuthorizationClient-7.0-SNAPSHOT.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "AuthorizationClient-7.0-SNAPSHOT.jar" of deployment "Authorization.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_35]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_35]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_35]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011058: Failed to install component PermissionManager
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:102)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
... 5 more
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014544: No EJB found with interface of type 'org.calgb.authorization.client.permission.IPermissionCache' for binding org.calgb.authorization.client.permission.PermissionManager/permissionCache
at org.jboss.as.ejb3.deployment.processors.EjbInjectionSource.getResourceValue(EjbInjectionSource.java:88)
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.processBindings(ComponentInstallProcessor.java:252)
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.access$000(ComponentInstallProcessor.java:76)
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor$1.handle(ComponentInstallProcessor.java:206)
at org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:54)
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deployComponent(ComponentInstallProcessor.java:202)
at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:95)
... 6 more
Any help is appreciated. Let me know what else you'd like me to post.
check your application.xml + jboss-deployment-structure.xml if it points to required war/jar files
I have the following situation:
I have a java application with three projects:
Java Project
EJB Module
Web Project
using net beans, I build the three projects and upload them on the server.
The Java Project deploy successfully but the EJB Module which depends on the Java Project gives the following error:
12:35:00,811 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."MyApp.jar".POST_MODULE: org.jboss.msc.service$
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_20]
at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0_20]
Caused by: java.lang.RuntimeException: Error getting reflective information for class gss.myapp.sessions.CardValidatorBean with ClassLoader ModuleClassLoader for Module "deplo$
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: java.lang.NoClassDefFoundError: gss/commons/exceptions/BusinessEntityFindException
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.6.0_20]
at java.lang.Class.privateGetDeclaredFields(Class.java:2308) [rt.jar:1.6.0_20]
at java.lang.Class.getDeclaredFields(Class.java:1760) [rt.jar:1.6.0_20]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 10 more
Caused by: java.lang.ClassNotFoundException: gss.commons.exceptions.BusinessEntityFindException from [Module "deployment.MyApp.jar:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 15 more
The exception clearly states that it could not find the class
gss.commons.exceptions.BusinessEntityFindException
Your ejb jar file MANIFEST.MF should contain the classpath it needs
e.g
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.1
Created-By: 1.6.0_25-b06 (Sun Microsystems Inc.)
Class-Path: your-java-project.jar
and make sure you include your your-java-project.jar in your server classpath.
You need add gss.commons.exceptions.BusinessEntityFindException class to JBoss:
I'll call YOUR_JAR.jar to the jar that contains gss/commons/exceptions/BusinessEntityFindException
1: Add a Module to JBoss
Stop your JBoss Server
Find YOUR_JAR.jar on your directory
Make the next directory on your JBoss: JBOSS_HOME/modules/org/gss/main
Put YOUR_JAR.jar on this directory
Make a file called module.xml and add:
<
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="org.gss">
<resources>
<resource-root path="YOUR_JAR.jar"/>
</resources>
</module>
*
2: Call your new module from your project:
On your web project make a file WEB-INF/jboss-deployment-structure.xml
add:
<
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="org.gss" meta-inf="export">
<imports>
<include path="META-INF" />
</imports>
</module>
</dependencies>
</deployment>
</jboss-deployment-structure>
start your Jboss Server