Quantcast

logback.groovy :java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/callsite/CallSiteArray

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

logback.groovy :java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/callsite/CallSiteArray

CJ_007
Hi all,
I am getting below error even after the jars are in classpath i.e slf4j-api-1.6.0 and slf4j-simple-1.6.0 and logback jar are in class path - logback classic 0.9.22 and logback core and "logback.groovy"

Is it related to jars related to Groovy ?? If any has an idea pls let me know ??

---------
ERROR
---------
Failed to instantiate [ch.qos.logback.classic.LoggerContext]
Reported exception:
java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/callsite/CallSiteArray
        at ch.qos.logback.classic.gaffer.GafferConfigurator.$createCallSiteArray(GafferConfigurator.groovy)
        at ch.qos.logback.classic.gaffer.GafferConfigurator.$getCallSiteArray(GafferConfigurator.groovy)
        at ch.qos.logback.classic.gaffer.GafferConfigurator.<init>(GafferConfigurator.groovy)
        at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:64)
        at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:148)
        at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
        at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
        at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)
        at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
        at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:268)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:241)
        at org.apache.log4j.Category.<init>(Category.java:52)
        at org.apache.log4j.Logger.<init>(Logger.java:22)
        at org.apache.log4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:38)
        at org.apache.log4j.Category.getLogger(Category.java:56)
        at org.apache.log4j.Category.getLogger(Category.java:60)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: logback.groovy :java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/callsite/CallSiteArray

CJ_007
Hi I am able to resolve the below by adding the groovy jar in the classpath....
while running the below code:
import ch.qos.logback.classic.encoder.PatternLayoutEncoder
import ch.qos.logback.core.FileAppender

import static ch.qos.logback.classic.Level.DEBUG

appender("FILE", FileAppender) {
  file = "testFile.log"
  append = true
  encoder(PatternLayoutEncoder) {
    pattern = "%level %logger - %msg%n"
  }
}

root(DEBUG, ["FILE"])


error :
==========

instantiate [ch.qos.logback.classic.LoggerContext]
Reported exception:
groovy.lang.MissingMethodException: No signature of method: ch.qos.logback.core.FileAppender.hasProperty() is applicable for argument types: (java.lang.String) values: [encoder]
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:54)
        at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:48)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
        at ch.qos.logback.classic.gaffer.PropertyUtil.nestingType(PropertyUtil.groovy:31)
        at ch.qos.logback.classic.gaffer.PropertyUtil$nestingType.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
        at ch.qos.logback.classic.gaffer.ComponentDelegate.methodMissing(ComponentDelegate.groovy:39)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
        at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:825)
        at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1103)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1063)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:718)
        at ch.qos.logback.classic.gaffer.ComponentDelegate.invokeMethod(ComponentDelegate.groovy)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:407)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:348)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:142)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
        at Script1$_run_closure1.doCall(Script1.groovy:14)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
CJ_007 wrote
Hi all,
I am getting below error even after the jars are in classpath i.e slf4j-api-1.6.0 and slf4j-simple-1.6.0 and logback jar are in class path - logback classic 0.9.22 and logback core and "logback.groovy"

Is it related to jars related to Groovy ?? If any has an idea pls let me know ??

---------
ERROR
---------
Failed to instantiate [ch.qos.logback.classic.LoggerContext]
Reported exception:
java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/callsite/CallSiteArray
        at ch.qos.logback.classic.gaffer.GafferConfigurator.$createCallSiteArray(GafferConfigurator.groovy)
        at ch.qos.logback.classic.gaffer.GafferConfigurator.$getCallSiteArray(GafferConfigurator.groovy)
        at ch.qos.logback.classic.gaffer.GafferConfigurator.<init>(GafferConfigurator.groovy)
        at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:64)
        at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:148)
        at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
        at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
        at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)
        at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
        at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:268)
        at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:241)
        at org.apache.log4j.Category.<init>(Category.java:52)
        at org.apache.log4j.Logger.<init>(Logger.java:22)
        at org.apache.log4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:38)
        at org.apache.log4j.Category.getLogger(Category.java:56)
        at org.apache.log4j.Category.getLogger(Category.java:60)
Loading...