redhat-developer / redhat-developer/vscode-java
Cannot import Apache Iceberg project
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
Visual Studio fails to import the Apache Iceberg project correctly with classes not being referenced properly. Workspace logs show the following message:
!ENTRY org.eclipse.jdt.core 4 4 2024-09-23 15:23:43.332
!MESSAGE Invalid ZIP archive: /Users/laurent/.gradle/caches/modules-2/files-2.1/org.apache.curator/apache-curator/2.7.1/b223ec624c73f9cf9277287bb71d32cb9b1fcd3f/apache-curator-2.7.1.pom
!STACK 0
java.util.zip.ZipException: zip END header not found
at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1649)
at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1657)
at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1495)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1458)
at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:724)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:194)
at org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:3043)
at org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2977)
at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.getJar(JarPackageFragmentRoot.java:262)
at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.computeChildren(JarPackageFragmentRoot.java:130)
at org.eclipse.jdt.internal.core.JavaProjectElementInfo.initializePackageNames(JavaProjectElementInfo.java:276)
at org.eclipse.jdt.internal.core.JavaProjectElementInfo.getProjectCache(JavaProjectElementInfo.java:244)
at org.eclipse.jdt.internal.core.JavaProject.getProjectCache(JavaProject.java:2387)
at org.eclipse.jdt.internal.core.JavaProjectElementInfo.newNameLookup(JavaProjectElementInfo.java:332)
at org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2798)
at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(SearchableEnvironment.java:107)
at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(SearchableEnvironment.java:148)
at com.microsoft.java.builder.JavaNameEnvironment.<init>(JavaNameEnvironment.java:42)
at com.microsoft.java.builder.JavaProblemChecker.createNameEnvironment(JavaProblemChecker.java:51)
at com.microsoft.java.builder.jdtbuilder.JavaBuilder.initializeBuilder(JavaBuilder.java:653)
at com.microsoft.java.builder.jdtbuilder.JavaBuilder.build(JavaBuilder.java:192)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1077)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:296)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:352)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:441)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:444)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:555)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:503)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:585)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:207)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:300)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
The local file is not a zip file but an actual pom file (as hinted by the file extension)
Same project opens find in other editors like Intellij
Environment
- Operating System: MacOS
- JDK version: 21.0.4
- Visual Studio Code version: 1.93.1 (commit: 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40)
- Java extension version: 1.34.0
Steps To Reproduce
- Clone apache/iceberg project and import it in visual studio
- Use JDK 21 for
java.jdt.ls.java.homeandjava.import.gradle.java.homesettings, and reload
[Please attach a sample project reproducing the error]
Please attach logs
Current Result
Project is not imported correctly, some org.apache.iceberg classes are not discovered properly.
Expected Result
Project is imported successfully.
Additional Informations
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the import using the Apache Iceberg project, JDK 21, and the listed VS Code Java settings, then inspect the workspace logs around JavaModelManager, JavaBuilder, and the Gradle import path. Done means the project imports successfully without the invalid ZIP error and org.apache.iceberg classes are discovered correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100