Java Upgrade exception from 1.6 to 1.8
<p>I am trying to upgrade my project from Java 1.6 to Java 1.8, While doing Gradle build am getting JIBX binding compilation Error.If I run using Java 1.6 it works fine.</p>

<p>I am using JIBX version 1.2.5, Gradle 2.9 version.JAVA 1.8.0_71, Groovy 2.4.4.</p>

<p>Attachning my jibx.gradle below</p>

<pre><code>configurations {
    jibx
}

dependencies {
    jibx group: 'org.jibx', name: 'jibx-tools', version: '1.2.6'
    jibx group: 'org.jibx', name: 'jibx-bind', version: '1.2.6'
    jibx group :'org.jibx', name: 'jibx-extras', version:'1.2.6'
}


task generate() {
    ant.java(classname: 'org.jibx.binding.Compile', fork: true, classpath: "${configurations.jibx.asPath}") {
        arg(line: "-p 'com.cigna.ccmi'")
        arg(line: "-t 'src/main/java'")
    }
}

def compileJibx() {
    ant {
        taskdef(name: 'bind',
            classname: 'org.jibx.binding.ant.CompileTask',
            classpath: configurations.jibx.asPath)

        **bind(binding: "${projectDir}/src/main/resources/jibx/common-config-JibX.xml", verbose: 'false')** {
            classpath {
                pathelement(path: "${projectDir}/build/classes/main")
            }
        }
    }   
}

compileJava.dependsOn generate
compileJava.doLast {
    compileJibx()
}
</code></pre>

<p>I am getting error while executing the bind method</p>

<p>Attaching JIBX plugin that i am using in pom </p>

<pre><code>&lt;plugins&gt;
    &lt;plugin&gt;
        &lt;groupId&gt;org.jibx&lt;/groupId&gt;
        &lt;artifactId&gt;jibx-maven-plugin&lt;/artifactId&gt;
        &lt;version&gt;1.2.6&lt;/version&gt;
        &lt;configuration&gt;
            &lt;schemaBindingDirectory&gt;src/main/resources/jibx&lt;/schemaBindingDirectory&gt;
            &lt;includeSchemaBindings&gt;
                &lt;includeSchemaBindings&gt;common-config-JibX.xml&lt;/includeSchemaBindings&gt;
            &lt;/includeSchemaBindings&gt;
            &lt;verbose&gt;true&lt;/verbose&gt;
        &lt;/configuration&gt;
        &lt;dependencies&gt;
            &lt;!-- Workaround to avoid error compiling with JDK 1.8 --&gt;
            &lt;dependency&gt;
                &lt;groupId&gt;org.apache.bcel&lt;/groupId&gt;
                &lt;artifactId&gt;bcel&lt;/artifactId&gt;
                &lt;version&gt;6.0-SNAPSHOT&lt;/version&gt;
            &lt;/dependency&gt;
        &lt;/dependencies&gt;
        &lt;executions&gt;
            &lt;execution&gt;
                &lt;goals&gt;
                    &lt;goal&gt;bind&lt;/goal&gt;
                &lt;/goals&gt;
            &lt;/execution&gt;
        &lt;/executions&gt;
    &lt;/plugin&gt;
</code></pre>

<p>attaching the error</p>

<pre><code>* What went wrong:
Execution failed for task ':war:compileJava'.
&gt; JiBXException in JiBX binding compilation

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':war:com
pileJava'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteActions(ExecuteActionsTaskExecuter.java:69)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecute(ExecuteActionsTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExec
uter.execute(PostExecutionAnalysisTaskExecuter.java:35)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.exec
ute(SkipUpToDateTaskExecuter.java:64)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execut
e(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecu
ter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter
.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execut
e(SkipOnlyIfTaskExecuter.java:53)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter
.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTa
skWorker.execute(DefaultTaskGraphExecuter.java:203)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTa
skWorker.execute(DefaultTaskGraphExecuter.java:185)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
orker.processTask(AbstractTaskPlanExecutor.java:66)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
orker.run(AbstractTaskPlanExecutor.java:50)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(Defaul
tTaskPlanExecutor.java:25)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(Defau
ltTaskGraphExecuter.java:110)
        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTask
ExecutionAction.java:37)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:37)
        at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExec
uter.java:23)
        at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecu
ter.java:43)
        at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildEx
ecutionAction.java:32)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:37)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:30)
        at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLa
uncher.java:154)
        at org.gradle.internal.Factories$1.create(Factories.java:22)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul
tBuildOperationExecutor.java:90)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul
tBuildOperationExecutor.java:52)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default
GradleLauncher.java:151)
        at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGra
dleLauncher.java:32)
        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradl
eLauncher.java:99)
        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradl
eLauncher.java:93)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul
tBuildOperationExecutor.java:90)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul
tBuildOperationExecutor.java:62)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle
Launcher.java:93)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun
cher.java:82)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildCon
troller.run(InProcessBuildActionExecuter.java:94)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(Exe
cuteBuildActionRunner.java:28)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildA
ctionRunner.java:35)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
ssBuildActionExecuter.java:43)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
ssBuildActionExecuter.java:28)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(Contin
uousBuildActionExecuter.java:77)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(Contin
uousBuildActionExecuter.java:47)
        at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.exe
cute(DaemonUsageSuggestingBuildActionExecuter.java:51)
        at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.exe
cute(DaemonUsageSuggestingBuildActionExecuter.java:28)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.jav
a:170)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
execute(CommandLineActionFactory.java:237)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
execute(CommandLineActionFactory.java:210)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti
meValidationAction.java:35)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti
meValidationAction.java:24)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
CommandLineActionFactory.java:206)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
CommandLineActionFactory.java:169)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep
ortingAction.java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep
ortingAction.java:22)
        at org.gradle.launcher.Main.doAction(Main.java:33)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBoots
trap.java:54)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.j
ava:35)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
Caused by: : JiBXException in JiBX binding compilation
        at org.jibx.binding.ant.CompileTask.execute(CompileTask.java:252)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
        at org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(Bas
icAntBuilder.java:78)
        at org.gradle.api.internal.project.ant.BasicAntBuilder.doInvokeMethod(Ba
sicAntBuilder.java:93)
        at jibx_50hfomxu8u1392vt31qdevxoj$_compileJibx_closure5.doCall(C:\sandee
p\JavaUpgrade\DI-services\war\jibx.gradle:32)
        at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedActi
on.java:67)
        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:130)
        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:91)
        at org.gradle.api.internal.project.AbstractProject.ant(AbstractProject.j
ava:816)
        at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMeth
od(BeanDynamicObject.java:235)
        at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObj
ect.java:130)
        at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(Composite
DynamicObject.java:150)
        at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:
79)
        at jibx_50hfomxu8u1392vt31qdevxoj.compileJibx(C:\sandeep\JavaUpgrade\DI-
services\war\jibx.gradle:27)
        at jibx_50hfomxu8u1392vt31qdevxoj$_run_closure4.doCall(C:\sandeep\JavaUp
grade\DI-services\war\jibx.gradle:42)
        at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(Abstra
ctTask.java:554)
        at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(Abstra
ctTask.java:535)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteAction(ExecuteActionsTaskExecuter.java:80)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteActions(ExecuteActionsTaskExecuter.java:61)
        ... 57 more
Caused by: org.jibx.runtime.JiBXException: Error running binding compiler
        at org.jibx.binding.Compile.compile(Compile.java:318)
        at org.jibx.binding.ant.CompileTask.execute(CompileTask.java:248)
        ... 76 more
Caused by: java.lang.IllegalStateException: Error loading class java.lang.CharSe
quence: Error reading path java/lang/CharSequence.class for class java.lang.Char
Sequence
        at org.jibx.binding.classes.ClassCache$ClassCacheLocator.getClassInfo(Cl
assCache.java:291)
        at org.jibx.binding.model.ClassHierarchyContext.accumulateInterfaces(Cla
ssHierarchyContext.java:95)
        at org.jibx.binding.model.ClassHierarchyContext.addTypedComponent(ClassH
ierarchyContext.java:121)
        at org.jibx.binding.model.DefinitionContext.addFormat(DefinitionContext.
java:527)
        at org.jibx.binding.model.BindingElement.defineBaseFormat(BindingElement
.java:843)
        at org.jibx.binding.model.BindingElement.runValidation(BindingElement.ja
va:865)
        at org.jibx.binding.model.BindingElement.runValidation(BindingElement.ja
va:899)
        at org.jibx.binding.model.BindingElement.validateBinding(BindingElement.
java:969)
        at org.jibx.binding.Utility.validateBinding(Utility.java:226)
        at org.jibx.binding.Utility.loadBinding(Utility.java:269)
        at org.jibx.binding.Utility.loadFileBinding(Utility.java:420)
        at org.jibx.binding.Compile.compile(Compile.java:217)
        ... 77 more


BUILD FAILED
</code></pre>