-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.NoSuchFieldError: sc #4770
Comments
There seems to be a classloading problem. The class a) this double existance needs to be resolved |
@per-erik Did you remove the web.xml file or is it somehow corrupted? It only searches for the web.xml file under You should be able to find some warning in the log before the above mentioned exception. There is some weird code in the faces ConfigurationScanner which tries to find a FacesServlet configured in the web.xml. And if it runs into an exception it assumes that it exists and thus triggers the FacesAnnotation scanning afterwards:
|
Thanks for the quick reply @svendiedrichsen. I've looked into possible problems with the web.xml but found none. Originally I used the web.xml from one of the fighterfish samples (fighterfish-sample-uas-simplejaxrs) but IntelliJ gave me warnings about that one even after I fixed some obvious xml-errors in it (like line-feeds in the xmlns:xsi attribute value) so I ended up with the following web.xml:
I also cannot see any warnings prior to the scanning. However, the stacktrace I sent earlier isn't the first one in the log. Instead of me guessing which parts of the log that could be interesting I'm attaching the entire log file, rotated just before deploying (so you don't get all the noise from server startup and previous attempts). The interesting parts probably starts at row 88 or so when it says that the total number of classes with faces annotations is 0 and then starts Soteria and later Mojarra. Then it says that the Faces Config uris is an empty list. Right after that is the first exception where it seems to have started a JSF scan anyway but fails since the field sc does not exist. Note that I'm somewhat new to jax-rs (and servlets overall) so my web.xml may very well be semantically wrong, but that shouldn't give SAXExceptions, IOExceptions or a ParserConfigurationException (assuming these are the "standard" exception classes). |
The Problem with the missing |
Yes, I realized that after I wrote my last comment. The missing sc member is, as you said, due to being wired to packages from jakarta-faces where the AnnotationProvider's field is called servletContext and not sc. After some debugging I think the reason the OSGiFacesAnnotationScanner is called at all is because a JSF config is created by I understand that my problem is somewhat unrelated to the reported bug so I'll stop commenting here. Is there anywhere I can ask questions about the scan, cause I'm not sure that it's a bug so I don't want to file a new issue for my root problem (the scanning). |
There is a Payara group at google which you could use https://groups.google.com/g/payara-forum?pli=1 |
Seems that there is nothing to report on this issue, so I'll proceed to close it. |
Description
While trying to convert our existing war to a wab, I run into a deployment issue. The wab contains a an ejb-file (along with some libraries) in the WEB-INF/lib folder. The wab also contains jax-rs resources.
When building the wab without the ejb-file, it gets deployed correctly and I can successfully call the jax-rs endpoints (except that most of them require the ejb-file to function but I've created an endpoint that has no dependencies).
When building the wab with the ejb-file included I get an exception during deployment (or really after deployment succeeds, while mojarra is scanning for jsf annotations). I've tried this on both Payara 5.194 and Payara 5.2020.2 with the same result.
We don't need or use JSF so I would not expect the scanning to happen to begin with.
I suspect this error is related to eclipse-ee4j/glassfish-fighterfish#29.
If there is anything I can do to prevent this scan from happening, that would be just as good as a fix of the issue.
Expected Outcome
No exception during deployment of a war file with OSGi metadata deployed with type "Other" checking the checkbox "OSGi Type" through the admin console, even if the war file contains ejb files in the WEB-INF/lib directory.
Current Outcome
Steps to reproduce (Only for bug reports)
Context (Optional)
I'm trying to build a wab so that we can use our existing non-javaee OSGi bundles from our web application.
Environment
The text was updated successfully, but these errors were encountered: