We are blocked with this issue, I will try to put it in words below.
Please have a look at the image first or keep it opened in parallel.
Project is an old Ant based project. Using Spring 4.2.4 currently. Configuration is XML-based.
Class XYZProjectSample
is present inside XYZ.jar
and a non-Spring class file present inside ABC.war
, say ABCWarSample.java
like below:
//non -spring outer class
class ABCWarSample {
//spring-based inner class
@Configurable
class InnerBean {
@Autowired
XYZProjectSample xyzProjectSampleInstance;
}
private XYZProjectSample getService() {
return new InnerBean().xyzProjectSampleInstance;
}
}
For combining these two classes from different modules, load time weaving is used.
Inside ABC.war
project's spring-context.xml
file they have used load time weaving via
<context:load-time-weaver aspectj-weaving="on"/>
Now this above line is giving error with Jboss EAP 7.2 as mentioned here.
They mentioned upgrade to Spring 5, we did it but encountered page loading issue. like half content coming without and JS and header.
They have used
requestDispatcher.include()
method to combine two responses. However we see only one and one is lost and there is no visible able error in the logs.Now point two if we keep the Spring version 4, server doesn't start and gives the same issue, see here.
We tried some fixes given on internet but nothing has worked so far.
All I am looking for as of now is an alternative of this load time weaving for resolving this dependency. I thought about using compile time weaving, but that requires aspectj-maven plugin and we are using ant scripts.
I am really stuck here. Any advice or alternative solution can be really really helpful.
Please feel free to revert in case of any confusions or if you need more information.