0

I have acquired a Spring Boot application from my predecessor last September. A few months ago, one colleague found out that the last code checked in by my predecessor is not representing the last changes made to one of our customers. He got the class files from the customer site and asked me to incorporate these changes into my Java code. This is the first time I try to restore a file by decompilation.

The project has several restrictions. So, part of the code is written in Java 1.6. This causes another restriction: I cannot use a newer Maven than Maven 3.2.5! (At least, the newer code is written in Java 17.) Another restriction is that I cannot use a newer version than IntelliJ IDEA v2022.02.05. Unfortunately… :-( And as eclipse maked many problems, I had to switch to IntelliJ.

When decompiling, IntelliJ generates the following lines:

    @Configurable
    public class <CustomerName>SaveDmsServiceTask extends LoggingClass implements JavaDelegate, ConfigurableObject {
            […]
            public <CustomerName>SaveDmsServiceTask() {
                    JoinPoint var2 = Factory.makeJP(ajc$tjp_1, this, this);
                    JoinPoint var1 = Factory.makeJP(ajc$tjp_0, this, this);
                    if (this != null && this.getClass().isAnnotationPresent(Configurable.class) && AnnotationBeanConfigurerAspect.ajc$if$bb0((Configurable)this.getClass().getAnnotation(Configurable.class))) {
                        AnnotationBeanConfigurerAspect.aspectOf().ajc$before$org_springframework_beans_factory_aspectj_AbstractDependencyInjectionAspect$1$e854fa65(this);
                    }

                    if (this != null && this.getClass().isAnnotationPresent(Configurable.class) && (this == null ||
                        !this.getClass().isAnnotationPresent(Configurable.class) ||
                        !AnnotationBeanConfigurerAspect.ajc$if$bb0(this.getClass().getAnnotation(Configurable.class))) &&
                        AbstractDependencyInjectionAspect.ajc$if$6f1(var1)) {

                        AnnotationBeanConfigurerAspect.aspectOf().ajc$afterReturning$org_springframework_beans_factory_aspectj_AbstractDependencyInjectionAspect$2$1ea6722c(this);
                    }

                    this.sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
                    if (!AnnotationBeanConfigurerAspect.ajc$if$bb0((Configurable)this.getClass().getAnnotation(Configurable.class)) &&
                        AbstractDependencyInjectionAspect.ajc$if$6f1(var2)) {

                        AnnotationBeanConfigurerAspect.aspectOf().ajc$afterReturning$org_springframework_beans_factory_aspectj_AbstractDependencyInjectionAspect$2$1ea6722c(this);
                    }

                }

            }

            […]
            public void setAppctx(OflowAppContext appctx) {
                this.appctx = appctx;
            }

            static {
                ajc$preClinit();
            }

All the three decompilation variables seem to be known to IntelliJ when viewing the decompiled class file. Copying this code into the Java file results in three errors concerning the ajc$* variables.

I think that some library is missing and cannot be bound properly. What's your idea and how can I find the missing library so that these three variables stop making a problem? The MojoFailureException is not a Maven exception, but comes from a plugin.

As file attachements are not allowed here, you can have a look at the Maven output . I added a few lines from this file here:

[…]
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] D:\source\workflow\vertragsverwaltung\src\main\java\at\cps\oflow\archiv\interaction\<CustomerName>SaveDmsServiceTask.java:[82,40] error: cannot find symbol
[ERROR]   symbol:   variable ajc$tjp_0
  location: class <CustomerName>SaveDmsServiceTask
D:\source\workflow\vertragsverwaltung\src\main\java\at\cps\oflow\archiv\interaction\<CustomerName>SaveDmsServiceTask.java:[83,40] error: cannot find symbol
[ERROR]   symbol:   variable ajc$tjp_1
  location: class <CustomerName>SaveDmsServiceTask
D:\source\workflow\vertragsverwaltung\src\main\java\at\cps\oflow\archiv\interaction\<CustomerName>SaveDmsServiceTask.java:[355,2] error: cannot find symbol
[INFO] 3 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 38.596 s
[INFO] Finished at: 2025-04-07T09:50:15+02:00
[INFO] Final Memory: 19M/417M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project oflow: Compilation failure: Compilation failure:
[ERROR] D:\source\workflow\vertragsverwaltung\src\main\java\at\cps\oflow\archiv\interaction\<CustomerName>SaveDmsServiceTask.java:[82,40] error: cannot find symbol
[ERROR] symbol:   variable ajc$tjp_0
[ERROR] location: class <CustomerName>SaveDmsServiceTask
[ERROR] D:\source\workflow\vertragsverwaltung\src\main\java\at\cps\oflow\archiv\interaction\<CustomerName>SaveDmsServiceTask.java:[83,40] error: cannot find symbol
[ERROR] symbol:   variable ajc$tjp_1
[ERROR] location: class <CustomerName>SaveDmsServiceTask
[ERROR] D:\source\workflow\vertragsverwaltung\src\main\java\at\cps\oflow\archiv\interaction\<CustomerName>SaveDmsServiceTask.java:[355,2] error: cannot find symbol
[…]

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.