Midhun Ravikumar
Midhun Ravikumar

Reputation: 1

Failed to deploy a war file in jboss 7.0

I have deploy a war file mavenproject4-1.0-SNAPSHOT.war in jboss directory JBOSS-BASE-DIR\standalone\deployments

I use maven for building the war file

And i start the server by clicking standalone.bat in JBOSS-BASE-DIR/bin/standalone.bat

But I am getting following error.

#

Caused by: java.io.IOException: Could not index class org/hibernate/SQLQuery.cla ss in archive '"/C:/jboss-as-web-7.0.0.Final/jboss-as-web-7.0.0.Final/bin/conten t/mavenproject4-1.0-SNAPSHOT.war/WEB-INF/lib/hibernate-core-4.1.9.Final.jar"'

#

I have copy the war file in "C:/jboss-as-web-7.0.0.Final/jboss-as-web-7.0.0.Final\standalone\deployments" directory but they are trying to index org/hibernate/SQLQuery.class in /C:/jboss-as-web-7.0.0.Final/jboss-as-web-7.0.0.Final/bin/content/mavenproject4-1.0-SNAPSHOT.war/WEB-INF/lib/hibernate-core-4.1.9.Final.jar

Can anybody could explain me why this happens

Upvotes: 0

Views: 994

Answers (1)

eis
eis

Reputation: 53462

content folder is the internal JBoss folder. Unrelated to that, on every deployment, it is using Jandex tool to index your deployment. For some reason, it seems to be stumbling on Hibernate SQLQuery class. It would seem that either hibernate binary .jar is broken or jandex tool used internally by JBoss has a bug.

Hibernate 4 is provided by JBoss out of the box, so you can get around this by using JBoss-provided module and setting your hibernate dependency to provided scope in maven.

Upvotes: 1

Related Questions