0

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 {
4
  • Jakarta EE 10 does not require Java 17. It has a minimum Java SE requirement of 11. Do you use Eclipse to package the application or something like Maven? Commented Jul 28 at 14:03
  • I've got it set to using 11. Using Eclipse; no Maven. Commented Jul 29 at 15:32
  • I'm not really an Eclipse expert, but you really shouldn't be adding Jakarta EE API's in the WEB-INF/lib directory. Those are already provided by the server. Commented Jul 30 at 14:42
  • I concur. It should use the runtime-provided. The problem, of course, is that if that's the only source Eclipse isn't recognizing it. I need precisely one copy, but my options are 0 or 2. Commented Aug 1 at 15:32

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.