0

I have an ear file that is generated through Maven EAR plugin. The ear file has only one module which is the ejb module. I am able to deploy it to JBoss 4.2.1-GA inside Eclipse but when I tried running it an exception is encountered during startup. I've tried searching for a solution for two days now but unsuccessful.

The exception I encountered was

org.jboss.xb.binding.JBossXBException: Failed to parse source: Premature end of file. @ *unknown*[-1,-1]

The stack trace is here: stack trace

It might be worth noting that this is an existing project that I am trying to "mavenize" and was working properly before.

Jean-Rémy Revy
  • 5,607
  • 3
  • 39
  • 65
Bob Santos
  • 55
  • 1
  • 7

1 Answers1

0

This sounds as if within the jar file you try to deploy, osf-feed-ejbs.jar the deployment descriptor (ejb-jar.xml probably) is missing.

If it is within the META-INF folder and you are on Windows, make sure that META-INF is all caps!

You don't need ejb-jar.xml for EJB3 deployments. But if you have one, it needs to be wellformed at least.

Heiko Rupp
  • 30,426
  • 13
  • 82
  • 119
  • Thanks for the answer Heiko. Do I need to include ejb-jar.xml if I am using EJB 3? I'll try to include it though and let you know what happens. – Bob Santos May 03 '11 at 04:36
  • I checked the generated jar by maven ejb plugin and it generates an empty ejb-jar.xml which I think might be the cause of the parse exception. I'm searching a way for the plugin not to generate ejb-jar.xml with the jar. – Bob Santos May 03 '11 at 05:56
  • I finally saw that there is an ejb-jar.xml in the resources directory. Thanks for your time Heiko and sorry if the cause is somewhat stupid, this is an existing codebase that I am trying to mavenize. – Bob Santos May 03 '11 at 08:31