0
votes

I tried to deploy an example in weblogic 12c, it is a simple spring boot app, spring-boot-weblogic, you can find it on github:

https://github.com/DISID/disid-proofs/tree/master/spring-boot-weblogic

And I have strange error:

weblogic.application.ModuleException: java.lang.NoSuchFieldError: INSTANCE

These are the images:

enter image description here

The exception in log is:

weblogic.application.ModuleException: java.lang.NoSuchFieldError: INSTANCE
    at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:237)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:232)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.NoSuchFieldError: INSTANCE
    at org.springframework.boot.SpringApplication.asUnmodifiableOrderedSet(SpringApplication.java:1259)
    at org.springframework.boot.SpringApplication.getListeners(SpringApplication.java:1169)
    at org.springframework.boot.context.event.EventPublishingRunListener.<init>(EventPublishingRunListener.java:48)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    Truncated. see log file for complete stacktrace
This is pretty sure a dependency issue. Did you use in your classpath another version of Spring that the one oncluded in weblogic?Rouliboy
I checked the weblogic version of spring, and it is org.springframework_3.1.0.jar. I'm thiking the problem is just here. I m going to search if posible to override this version.Facundo Ferro
I solve problem, I need to include WEB-INF\weblogic.xml, with content <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>, this configuration indicates load to classloader jar of web-inf before that weblogic jar.Facundo Ferro