java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log

Lets build a new spring 3 app from maven.

See the maven version is 3.x

set path=c:\mavan\bin
mvn --version

See what are the archetypes are available

E:\workspace>mvn archetype:generate

Now, let’s generate the project

E:\workspace>mvn archetype:generate -DarchetypeGroupId=org.fluttercode.knappsack -DarchetypeArtifactId=spring-mvc-jpa-demo-archetype -DarchetypeVersion=1.1 -DgroupId=com.mycoompany.springapp -DartifactId=my-spring-app -Dversion=1.0-SNAPSHOT -DinteractiveMode=false

Now you can see a new folder my-spring-app is created

E:\workspace>cd my-spring-app

Convert the project as a Eclipse project and take a coffee break

E:\workspace\my-spring-app>mvn eclipse:eclipse

To instruct Eclipse about mvn, do the following. e:\workspace is my Eclipse workspace

E:\workspace\my-spring-app>mvn -Declipse.workspace=e:\workspace eclipse:add-maven-repo

Import my-spring-app to eclipse and publish to Weblogic.


java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86

Sat Nov 29 15:17:14 SGT 2014
weblogic.application.ModuleException: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)

Solve this by replacing the sl4j version to the one compatible with weblogic. For me it is 1.6.1


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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s