سؤال

I am using Ant to build my project and deploy it to JBoss. Ant is building using jboss-home/server/default/lib jars. But during deployment it gives error:

java.lang.Error: Unresolved compilation problems: 
The import org.apache.commons.lang3 cannot be resolved
StringUtils cannot be resolved

I am using commons-lang3-3.1.jar for StringUtils class by following Ant entry:

<path id="classpath">
 <fileset dir="${lib.dir}" includes="**/*.jar">  
  <include name="{jboss.home}/server/default/lib/commons-lang3-3.1.jar" />
هل كانت مفيدة؟

المحلول

Well, for me it seems like compilation error, but still I can suggest a few things.

  1. Try to include 'missing' library into your aplication (for example, place it into web-inf/lib if it is war packaging or use descriptor - application.xml or jboss-app.xml) and see what will happen.
  2. Check if your jboss is actually using the lib: the fact, that jar is located inside jboss directory, does not mean that it will be actually loaded. I don't know what version of jboss you are using, but for jboss as7 it is possible to disable any jar from modules via module.xml or via specific server configuration file (like, standalone.xml).
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top