IntelliJ 15 "bad enclosing method attribute for class" compilation problem

Since we moved to IntelliJ 15 we have serious complication problem.

The error message is:

Error:java: cannot access wf.core.base.prm.data_properties.ExplicitDataPropertyItem$1
  bad class file: F:\views2\BoazMainRMA18_p\Qsnap\Qrelease\iclass-Q+A\production\Core\wf\core\base\prm\data_properties\ExplicitDataPropertyItem$1.class
    bad enclosing method attribute for class wf.core.base.prm.data_properties.ExplicitDataPropertyItem$1
    Please remove or make sure it appears in the correct subdirectory of the classpath.

If we go and delete the relevant .class fiile it will be re-generated and compilations passes
But soon the same problem will appear again.

The relevant code is:

 
return keyW.createUnknownWrapperDelagatee(() -> {
    T result = logic.get(context, new DependenciesHandler() {
        @Override
        public
<TD> void addDependency(final RODataProperty<TD> dataProperty) {
            registerOnExternalItem(context, dataProperty);
        }

        @Override
        public
<TD> void addDependency(TKey<TD> key) {
            registerOnExternalItem(context, key);
        }
    });
    //logic.releaseDependenciesHandler();
    return
result;
});



It might be related to the fact  that anonymous is created in lambda - but I'm not sure.

Thx
Boaz

0
Avatar
Permanently deleted user

Hi Boaz,

What version of javac is used for compilation?

Do you have to delete the synthetic class that corresponds to the lambda expression or the anonymous class derived from DependenciesHandler from your example ?

0
Avatar
Permanently deleted user

Please ignore my last question, this part seems to be clear.

0
Avatar
Permanently deleted user

It looks like the class corresponding to the anonymous
class created inside a lambda-body is not deleted for some reason when containing file gets recompiled. So far I cannot reproduce this. If you are able to find a scenario when the problem is repeatable for you, could you please set "debug" logging for the root category in the build process log configuration file and send me the resulting logs when this happens again.

The log file is located under the directory

<ide-system-directory>/log/build-log

There both

build-log.log
and
build-log.properties
files can be found. The
build-log.properties
is a log4j configuration file, where the log level and desired logging categories can be adjusted.
.
0

Hi.

Sorry for the late reply - from some reason I dont get email notifications

I was not able to to isolate the problem - So I just trun on the 'debug'. Soon it will happen again, then I will send you the  logs.

Thank again
Boaz

0

Hi.

Here it happens agains, attached (according to your instructions) build.log.(compressed due to its size)
Thanks

Information:Using javac 1.8.0 to compile java sources

Information:java: Errors occurred while compiling module 'Core'

Information:12/3/2015 10:12 AM - Compilation completed with 1 error and 9 warnings in 2m 2s 154ms

Error:java: cannot access wf.core.base.prm.data_properties.ExplicitDataPropertyItem$1

  bad class file: C:\views\AlonH_v83_p\Qsnap\Qrelease\iclass-Q+A\production\Core\wf\core\base\prm\data_properties\ExplicitDataPropertyItem$1.class

    bad enclosing method attribute for class wf.core.base.prm.data_properties.ExplicitDataPropertyItem$1

    Please remove or make sure it appears in the correct subdirectory of the classpath.

C:\Views\AlonH_v83_p\Q\src\Base\Core\wf\core\base\context\ActorCollector.java

    Warning:Warning:line (6)java: wf.core.base.backend.Actor in wf.core.base.backend has been deprecated

C:\Views\AlonH_v83_p\Q\src\Base\Core\wf\core\util\corba_util\jlogger\JLoggerFactoryImpl.java

    Warning:Warning:line (8)java: wf.core.util.corba_util.GlobalCorbaHelper in wf.core.util.corba_util has been deprecated

C:\Views\AlonH_v83_p\Q\src\Base\Core\wf\core\util\corba_util\jlogger\JLoggerCorba2JavaHandler.java

    Warning:Warning:line (7)java: wf.core.util.corba_util.GlobalCorbaHelper in wf.core.util.corba_util has been deprecated

C:\Views\AlonH_v83_p\Q\src\Base\Core\wf\core\util\corba_util\jlogger\TestJLogger.java

    Warning:Warning:line (5)java: wf.core.util.corba_util.GlobalCorbaHelper in wf.core.util.corba_util has been deprecated

C:\Views\AlonH_v83_p\Q\src\Base\Core\wf\core\base\prm\corba_impl\PrmServiceImpl.java

    Warning:Warning:line (12)java: wf.core.util.corba_util.GlobalCorbaHelper in wf.core.util.corba_util has been deprecated

C:\Views\AlonH_v83_p\Q\src\Base\Core\wf\core\util\java\Assert.java

    Warning:Warning:line (3)java: wf.core.base.AutoTestingMode in wf.core.base has been deprecated

C:\Views\AlonH_v83_p\Q\src\Base\Core\wf\core\util\corba_util\task_monitor\TaskMonitorServiceImpl.java

    Warning:Warning:line (8)java: wf.core.util.corba_util.GlobalCorbaHelper in wf.core.util.corba_util has been deprecated

C:\Views\AlonH_v83_p\Q\src\Base\Core\wf\core\util\corba_util\example\TestServant.java

    Warning:Warning:line (4)java: wf.core.util.corba_util.GlobalCorbaHelper in wf.core.util.corba_util has been deprecated

C:\Views\AlonH_v83_p\Q\src\Base\Core\wf\core\base\context\ContextHelper.java

    Warning:Warning:line (9)java: wf.core.base.backend.Actor in wf.core.base.backend has been deprecated



Attachment(s):
build.zip
0

请先登录再写评论。