Re: Clicking helloworld link got java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation

2017-09-06 Thread Christoph Nenning
> > I tried > export > CLASSPATH=$JAVA_HOME/lib:$HOME/Struts2/struts-2.5.12/lib: > $CATALINA_HOME/lib:$CLASSPATH:. > > but the helloworld link in index.jsp still did not see the > /home/alkao/Struts2/struts-2.5.12/lib/commons-lang3-3.6.jar. > > > my_tomcat.log did not have this line any more >

Re: Clicking helloworld link got java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation

2017-09-05 Thread Yasser Zamani
But it's impossible! Your my_tomcat.log must have at least one load occurrence for MethodUtils class. Maybe the app has been failed to start at all, elsewhere I think you get NoClassDefFoundError (not NoSuchMethodError). On 9/5/2017 3:51 PM, albert kao wrote: > I tried > export >

Re: Clicking helloworld link got java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation

2017-09-05 Thread albert kao
I tried export CLASSPATH=$JAVA_HOME/lib:$HOME/Struts2/struts-2.5.12/lib:$CATALINA_HOME/lib:$CLASSPATH:. but the helloworld link in index.jsp still did not see the /home/alkao/Struts2/struts-2.5.12/lib/commons-lang3-3.6.jar. my_tomcat.log did not have this line any more [Loaded

Re: Clicking helloworld link got java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation

2017-09-04 Thread Yasser Zamani
>> Although I had done the following: >> export >> CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$HOME/Struts2/struts-2.5.12/lib:$CATALINA_HOME/lib:. If you would like to solve it like above, I think you may try below instead ($CLASSPATH at end): export

Re: Clicking helloworld link got java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation

2017-09-04 Thread Yasser Zamani
So as I guessed at first, you have `commons-lang3-3.5.jar` in your tomee lib directory (/home/alkao/tomee/apache-tomee-plus-7.0.3/lib/) which has precedence to be loaded before jars in your app's lib folder! i.e. you will have commons-lang3-3.5 loaded rather than 3.6. Unfortunately, with some

Re: Clicking helloworld link got java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation

2017-09-04 Thread albert kao
As per your instruction, modify catalina.sh: JAVA_OPTS="$JAVA_OPTS -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -XX:+TraceClassLoading -XX:+TraceClassUnloading" $ catalina.sh run > my_tomcat.log 2>&1 my_tomcat.log: [Loaded org.apache.commons.lang3.reflect.MethodUtils from

Re: Clicking helloworld link got java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation

2017-09-02 Thread Yasser Zamani
I did as you said and did not get any exception! Could you please add following line to catalina.bat: set "JAVA_OPTS=-XX:+TraceClassLoading -XX:+TraceClassUnloading" then: catalina.bat run > my_tomcat.log 2>&1 then finally search my_tomcat.log for MethodUtils? I would like to see from where

Re: Clicking helloworld link got java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation

2017-09-02 Thread albert kao
My hello-world.war has the commons lang3 3.6: hello-world/WEB-INF/lib hello-world/WEB-INF/lib/commons-fileupload-1.3.3.jar hello-world/WEB-INF/lib/ognl-3.1.12.jar hello-world/WEB-INF/lib/struts2-core-2.5.12.jar hello-world/WEB-INF/lib/freemarker-2.3.23.jar

Re: Clicking helloworld link got java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation

2017-08-26 Thread Yasser Zamani
I checked it's codes and seems ok. It has a dependency to struts 2.5.12 which has (not optional) dependency to commons lang3 3.6. So you should have commons lang3 3.6 in your war lib. Do you? Or maybe you have lower version of commons lang3 jar in your tomcat lib? Please check both. albert kao

Clicking helloworld link got java.lang.NoSuchMethodError: org.apache.commons.lang3.reflect.MethodUtils.getAnnotation

2017-08-26 Thread albert kao
I downloaded struts-examples-master.zip from https://github.com/apache/struts-examples. Unzip it and run mvn. # mvn -version Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T11:41:47-05:00) Maven home: /home/alkao/maven/apache-maven-3.3.9 Java version: 1.8.0_131, vendor: