Getting rid of java.lang.ClassNotFoundException when deploying exploded ear

Been having trouble deploying an ear in Eclipse to a JBoss server.
Apparently, when you use the server connectors from the JBossAS Tools project, the server deploys the ear as exploded. This is different from the default JBoss server connector, which deploys the ear packed.

For some reason (which is not clear to me yet), the packed ear starts up fine in the server, while the exploded one doesn’t, yelling that it can’t find some class. This seemed weird since the packed ear works, and also since the exploded ear directory contains the jar which the file resides in.

After a few good hours of trial and error, I glanced at the application.xml file and saw that the file lists all the EJB/Web modules it uses. Strangely enough, it doesn’t list the regular jars – and that’s our culprit. After adding the jars as java modules to the xml file.

Joy 🙂

This entry was posted in Java. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s