java - Error deploying ear to Glassfish -


We have an EAR with 3 EJB modules. I'm trying to deploy on a glassfish, but I'm killing an error that I have not understood or can not figure out how to best identify.

  [# | 2010-08-03T14: 39: 15.570 + 0100 | Information | Glassfish 3.0.1 | Javax.enterprise.system.tools.deployment.org.glassfish.deployment.common | _ThreadID = 28; _ThreadName = Thread-1; | [Autodiport] For file / export / home / map / app / domain selection /myapp/autodeploy/App-ear.ear for autodeployment. # # [# | 2010-08-03T14: 39: 18.654 + 0100 | Warning | Glassfish 3.0.1 | Javax.enterprise.system.tools.deployment.org.glassfish.deployment.common | _ThreadID = 28; _ThreadName = Thread-1 ;; Error in annotation processing: java.lang.NoClassDefFoundError: com / company / app / controller / IMSGPProcessor. #] [# | 2010-08-03T14: 39: 20.470 + 0100 | Saver | Glassfish 3.0.1 | Global | _ThreadID = 28; _ThreadName = Thread-1 ;; Class [LOOMM / company / app / jms / iJmscense factor; ] did not get. Error while loading [class com.company.app.eventprocessor.provider.EventProvider] [#]  

I have examined the classes described in the class notfound exception and they are definitely There are no compilation problems in Ears and I have no compilation problem in Eclipse / Maven.

  D: \ Repository \ app \ appie app-ears \ target \ app-ear.ear \ coreJms-1.0-SNAPSHOT.jar \ com \ company \ app \ controller \ IMessagingProcessor.class D : \ Repository \ app \ apa \ App-ear \ target \ App-ear.ear \ EventProcessor-ejb-1.0-SNAPSHOT.jar \ com \ company \ app \ eventprocessor \ P>   < / P> 

Itemprop = "text">

Actually, you can not find the classiconfound exposure , you are getting a NoClassDefFoundError and I suspect That some dependencies are missing, as suggested by:

  class [LOOMM / vm Minister / app / Jems / Aijems Satrfatr; ] did not get. [Class com.company.app.eventprocessor.provider.EventProvider  

The error of loading is that com.company.app.jms.IJmsSessionFactory ?


I have now cut the ear for a single ezabi module and I'm getting a knockless def for the Lorg / Apache / Lodge 4J / logger though the Lodge 4J Jar Cannes Is also in It seems that I should remember something fundamental?

Where is log4j.jar exactly? In / lib ? Can you really show the structure of your ear? And please also show your EJB-Jar's MANIFEST.MF .

In the case of the bus, there is a relevant quote from here:

Packaging EJB-JAR

...

EJB-Jar file should include interface and bean class. It may also include an assistant class. Alternatively, supportive sections can be packed into EAR file in a separate JAR file. You have two options:

  • Helper class with jar can be packed into the EABR file Lib directory. Using this approach, the pack class will automatically be visible to all modules in the ER module.
  • If you want to limit the visibility of only one specific EJB-Jar or war module, you can create an entry. Module's manifest.mf file containing the class-path attribute in the jar file.

Now when you know the structure of EJB-Jar and how to package it, see the element of ejb-jar.xml .


Based on your comments, I think I understand your problem. It will appear that I am not packaging the ear properly, I do not think Maven dependencies have been correctly referenced. If I just create my own jar, then it does not depend on any jar. Am I specifying some jar in pom to include Ijjar jar? I have the plugin & lt; ArtifactId & gt; Maven-ejb-plugin & lt; / ArtifactId> and packaging & lt; Packaging & gt; Ejb & lt; / Packaging & gt; is set. Dependencies are not supported in bundling in an EJB-JAR (see) mostly because Jar-in-Jar (and may not be supported by all EJB containers) and does not comply in general. is.

So when you can ignore this rule (or see), EJB-JAR and all JAR in standard way depends on EAR. This is my recommendation and I think this post can help.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -