VishalDevgire
VishalDevgire

Reputation: 4278

Linkage Error while starting WildFly

I have a dependency JAR that i copy into APP-INF/lib directory which is listed in application.xml file as <library-directory>APP-INF/lib</library-directory>

When ever i try to start the server i get following error enter image description here

Can anybody please help me solve this problem.

Upvotes: 0

Views: 308

Answers (1)

sprockets
sprockets

Reputation: 1019

Have a look at: https://docs.jboss.org/author/display/WFLY8/Class+Loading+in+WildFly

Our deployment structure looks essentially like this:

my.ear
  + lib/ <-- dependencies for multi-submodule deployment
  + META-INF/ <-- application.xml defines submodule(s) e.g. web.war, 
              <-- also jboss-deployment-structure.xml to include/export wildfly core modules for your EAR
  + web.war <-- our core deployment

I think in your case, you could just deploy your JARs to EAR/lib and they should be found across all submodules. From the Wildfly docs "Sub deployments (wars and ejb-jars) always have a dependency on the parent module, which gives them access to classes in EAR/lib"

Upvotes: 1

Related Questions