Skip to content
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

Since 4.23: FileNotFoundException for every xml opened #802

Closed
patric-r opened this issue Mar 21, 2022 · 11 comments
Closed

Since 4.23: FileNotFoundException for every xml opened #802

patric-r opened this issue Mar 21, 2022 · 11 comments

Comments

@patric-r
Copy link

After updating eclipse to 4.23 / 2022-03 we are getting the following exception for every xml opened within our project:

java.io.FileNotFoundException: /org/eclipse/persistence/jaxb/eclipselink_oxm_2_5.xsd
	at org.eclipse.osgi.storage.url.bundleentry.Handler.findBundleEntry(Handler.java:55)
	at org.eclipse.osgi.storage.url.BundleResourceHandler.openConnection(BundleResourceHandler.java:182)
	at java.base/java.net.URL.openConnection(URL.java:1051)
	at org.eclipse.core.internal.boot.PlatformURLConnection.connect(PlatformURLConnection.java:115)
	at org.eclipse.core.internal.boot.PlatformURLConnection.getURLAsLocal(PlatformURLConnection.java:240)
	at org.eclipse.core.internal.runtime.PlatformURLConverter.toFileURL(PlatformURLConverter.java:37)
	at org.eclipse.core.runtime.FileLocator.toFileURL(FileLocator.java:263)
	at org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLCatalogs.createURI(XMLCatalogs.java:139)
	at org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLCatalogs.lambda$3(XMLCatalogs.java:87)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
	at org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLCatalogs.getWTPExtensionCatalog(XMLCatalogs.java:65)
	at org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLCatalogs.getAllCatalogs(XMLCatalogs.java:52)
	at org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLPreferenceConstants.storePreferencesToLemminxOptions(XMLPreferenceConstants.java:90)
	at org.eclipse.wildwebdeveloper.xml.internal.XMLLanguageServer.mergeCustomInitializationOptions(XMLLanguageServer.java:163)
	at org.eclipse.wildwebdeveloper.xml.internal.XMLLanguageServer.getInitializationOptions(XMLLanguageServer.java:158)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$8(LanguageServerWrapper.java:353)
	at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1705)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
eclipse.buildId=4.23.0.I20220308-0310
java.version=11.0.2
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -data ../workspace
@andreas-wittig
Copy link

same issue here

@angelozerr
Copy link
Contributor

Indeed there is a problem with only http://www.eclipse.org/eclipselink/xsds/eclipselink_oxm_2_5.xsd. It's a problem with generated system-catalog.xml file (that you can see in the WWD / Catalogs preference page)

The generated file contains an uri with paltform:

<uri name="http://www.eclipse.org/eclipselink/xsds/eclipselink_oxm_2_5.xsd" uri="platform:/plugin/org.eclipse.persistence.moxy/org/eclipse/persistence/jaxb/eclipselink_oxm_2_5.xsd"/>

It seems that WWD cannot support plaform: URI:

image

@mickaelistria
Copy link
Contributor

It seems to me that FileLocator.toFileURL is supposed to properly turn this URI into a file URI...

angelozerr pushed a commit to angelozerr/wildwebdeveloper that referenced this issue Mar 29, 2022
@angelozerr
Copy link
Contributor

Indeed it works for all uri expect for /org/eclipse/persistence/jaxb/eclipselink_oxm_2_5.xsd.

The error message is not very help full to discover the problem:

java.io.FileNotFoundException: /org/eclipse/persistence/jaxb/eclipselink_oxm_2_5.xsd
	at org.eclipse.osgi.storage.url.bundleentry.Handler.findBundleEntry(Handler.java:55)
	at org.eclipse.osgi.storage.url.BundleResourceHandler.openConnection(BundleResourceHandler.java:182)

It misses information about the plugin and the original URI. That's why I created the PR #806 which add those information:

!MESSAGE Error while getting URI 'platform:/plugin/org.eclipse.persistence.moxy/org/eclipse/persistence/jaxb/eclipselink_oxm_2_5.xsd' from plugin 'org.eclipse.jpt.common.eclipselink.core' : /org/eclipse/persistence/jaxb/eclipselink_oxm_2_5.xsd
!STACK 0
java.io.FileNotFoundException: /org/eclipse/persistence/jaxb/eclipselink_oxm_2_5.xsd

WIth this PR we can know that org.eclipse.jpt.common.eclipselink.core declare a catalog entry wich references the 'platform:/plugin/org.eclipse.persistence.moxy/org/eclipse/persistence/jaxb/eclipselink_oxm_2_5.xsd' which means that org.eclipse.persistence.moxy should embeds org/eclipse/persistence/jaxb/eclipselink_oxm_2_5.xsd which is false. After unzipping my org.eclipse.persistence.moxy you can see the correct XSD should be eclipselink_oxm_2_6.xsd :

image

In other words to avoid this error, org.eclipse.jpt.common.eclipselink.core should fixes the XSD with eclipselink_oxm_2_6.xsd instead of eclipselink_oxm_2_5.xsd.

@mickaelistria
Copy link
Contributor

Thanks @angelozerr ! So we can close this issue as it's not a bug in LSP4E, but in EclipseLink, and the current error message gives a minor hint about it; and this will be even better with #806

@patric-r
Copy link
Author

Is there already an eclipselink issue for this error?

@angelozerr
Copy link
Contributor

angelozerr commented Mar 29, 2022

I think the issue comes from https://projects.eclipse.org/projects/webtools.dali but I fear that project is dead (or not very actice)

image

The error should be fixed here https://git.eclipse.org/c/dali/webtools.dali.git/tree/common/plugins/org.eclipse.jpt.common.eclipselink.core/plugin.xml#n111

mickaelistria pushed a commit that referenced this issue Mar 30, 2022
@patric-r
Copy link
Author

patric-r commented Apr 7, 2022

Any news regarding this? Is the dali team aware of this issue?
If not, how can we contact them - or alternatively, is there a possibility for a workaround in wildwebdeveloper?

@mickaelistria
Copy link
Contributor

See https://projects.eclipse.org/projects/webtools.dali/developer for a link to report a bug to Dali and https://projects.eclipse.org/projects/webtools.dali/contact for the mailing-list that can be used.

@ZephyrusMB
Copy link

Hi,

Importing an existing maven project eclipse crashed printing this error in the log which, i believe, is the same. How can i avoid the crash and open my maven project as a common user?

Thank you,

I attach the error

ENTRY org.eclipse.wildwebdeveloper.xml 4 0 2022-05-03 14:50:30.466
!MESSAGE /org/eclipse/persistence/jaxb/eclipselink_oxm_2_5.xsd
!STACK 0
java.io.FileNotFoundException: /org/eclipse/persistence/jaxb/eclipselink_oxm_2_5.xsd
at org.eclipse.osgi.storage.url.bundleentry.Handler.findBundleEntry(Handler.java:55)
at org.eclipse.osgi.storage.url.BundleResourceHandler.openConnection(BundleResourceHandler.java:182)
at java.base/java.net.URL.openConnection(URL.java:1094)
at org.eclipse.core.internal.boot.PlatformURLConnection.connect(PlatformURLConnection.java:115)
at org.eclipse.core.internal.boot.PlatformURLConnection.getURLAsLocal(PlatformURLConnection.java:240)
at org.eclipse.core.internal.runtime.PlatformURLConverter.toFileURL(PlatformURLConverter.java:37)
at org.eclipse.core.runtime.FileLocator.toFileURL(FileLocator.java:263)
at org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLCatalogs.createURI(XMLCatalogs.java:139)
at org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLCatalogs.lambda$3(XMLCatalogs.java:87)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLCatalogs.getWTPExtensionCatalog(XMLCatalogs.java:65)
at org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLCatalogs.getAllCatalogs(XMLCatalogs.java:52)
at org.eclipse.wildwebdeveloper.xml.internal.ui.preferences.XMLPreferenceConstants.storePreferencesToLemminxOptions(XMLPreferenceConstants.java:90)
at org.eclipse.wildwebdeveloper.xml.internal.XMLLanguageServer.mergeCustomInitializationOptions(XMLLanguageServer.java:163)
at org.eclipse.wildwebdeveloper.xml.internal.XMLLanguageServer.getInitializationOptions(XMLLanguageServer.java:158)
at org.eclipse.lsp4e.LanguageServerWrapper.lambda$8(LanguageServerWrapper.java:353)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

@GWCata
Copy link

GWCata commented Aug 19, 2022

I was having several problems relative to the M2E installation and tried something just on a whim. I am running Eclipse 2022-06 (4.24.0/build 20220609-1112). I tried uninstalling the M2E plugins via the marketplace and also via the installation details page but kept getting obscure errors preventing the completion of removal requests.
I finally decided to locate and remove all of the M2E jar files and see what would happen. And, WAHLA, all the errors magically disappeared and the valid versions of the M2E plugins were installed. The jars that I removed are contained in the tarball included in this post.
m2e-jars.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants