I’ve been handed a pile of legacy code that needs to get updated. Currently runs on JBoss 7.2; needs to run on 8. It’s built on Java 8, so it needs to go to 11, which in turn necessitates upgrading the javax components to Jakarta components, which is where the problem comes in: The type jakarta.el.ELException cannot be resolved. It is indirectly referenced from required type jakarta.faces.application.Application
The project was not built since its build path is incomplete. Cannot find the class file for jakarta.el.ELException. Fix the build path then try building this project
All right, so Eclipse can’t see the API, I just need to drop the jakarta.el-api into WEB-INF/lib and it should be fine, right? Well, I do that and:
The package jakarta.el is accessible from more than one module: , jakarta.el
Searching shows the apparent duplicate embedded in the JBoss runtime: ...\jakarta\el\api\main\jboss-el-api_5.0_spec-4.0.1.Final-redhat-00001.jar
The general solution I’ve seen is to remove the redundant dependency. But, when I go into Module Dependencies in Eclipse, I don’t see the JBoss-embedded API; only the one I dropped in.
Removing the dependency for the drop-in API doesn’t work, of course. Eclipse informs me that only system modules can be removed via this method and that I should remove the API from the module path. This is obvious, but I tried in the hope that since Eclipse recognizes the duplicate, maybe if I go and remove the API I’ve dropped in from the dependencies it will continue to recognize the runtime-embedded API. I’ve also tried removing the drop-in via deleting it, and Eclipse just goes back to the cannot be resolved error.
Ideally, I just want it to use the version already in the JBoss runtime, but I don’t see how to get it to do that. Eclipse says it can’t find ELException at all if there’s just the JBoss API and complains about a duplicate if I drop in the Jakarta API.
Error appears at the package declaration, and none of the imports show up as having an error associated:
package maintenance.jsf.custom.scopes;
import java.beans.FeatureDescriptor;
import java.util.Collections;
import java.util.Iterator;
import java.util.Map;
import java.util.logging.Logger;
import jakarta.el.ELContext;
import jakarta.el.ELResolver;
import jakarta.el.PropertyNotFoundException;
import jakarta.faces.context.FacesContext;
public class CustomScopeELResolver extends ELResolver {
WEB-INF/libdirectory. Those are already provided by the server.