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

Update jar version and load bundle throw exception #54

Closed
testforstephen opened this issue Sep 25, 2017 · 2 comments
Closed

Update jar version and load bundle throw exception #54

testforstephen opened this issue Sep 25, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@testforstephen
Copy link
Contributor

reproduce steps:

  1. Update the jar from 0.1.0-SNAPSHOT to 0.1.0, build new vsix
  2. Uninstall old vsix from vscode
  3. Install new vsix
  4. From the logs, it throws exception:
[Error - 7:16:53 PM] Sep 25, 2017 7:16:53 PM Failed to load extension bundles 
Load bundle list
org.eclipse.core.runtime.CoreException: Load bundle list
	at org.eclipse.jdt.ls.core.internal.handlers.BundleUtils.loadBundles(BundleUtils.java:76)
	at org.eclipse.jdt.ls.core.internal.handlers.InitHandler.initialize(InitHandler.java:90)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.initialize(JDTLanguageServer.java:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:51)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:105)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:210)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:146)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:149)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:77)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:84)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Contains: Install bundle failure C:\Users\jinbwan\.vscode-insiders\extensions\vscjava.vscode-java-debug-0.1.0\server\com.microsoft.java.debug.plugin-0.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Error reading bundle content.
	at org.eclipse.osgi.storage.Storage.install(Storage.java:501)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.installBundle(BundleContextImpl.java:146)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.installBundle(BundleContextImpl.java:139)
	at org.eclipse.jdt.ls.core.internal.handlers.BundleUtils.loadBundles(BundleUtils.java:65)
	at org.eclipse.jdt.ls.core.internal.handlers.InitHandler.initialize(InitHandler.java:90)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.initialize(JDTLanguageServer.java:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:51)
	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:105)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:210)
	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:146)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:149)
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:77)
	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:84)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.FileNotFoundException: C:\Users\jinbwan\.vscode-insiders\extensions\vscjava.vscode-java-debug-0.1.0\server\com.microsoft.java.debug.plugin-0.1.0-SNAPSHOT.jar
	at org.eclipse.osgi.storage.url.reference.ReferenceURLConnection.checkRead(ReferenceURLConnection.java:59)
	at org.eclipse.osgi.storage.url.reference.ReferenceURLConnection.connect(ReferenceURLConnection.java:51)
	at org.eclipse.osgi.storage.url.reference.ReferenceURLConnection.getInputStream(ReferenceURLConnection.java:93)
	at org.eclipse.osgi.storage.Storage.install(Storage.java:499)
	... 21 more

@akaroml akaroml added this to the 0.2.0 milestone Sep 26, 2017
@akaroml akaroml added the bug label Sep 26, 2017
@akaroml
Copy link
Member

akaroml commented Sep 26, 2017

We'll need to fix this in https://github.com/Microsoft/vscode-java-debug/milestone/2

microsoft/vscode#35006 opened for vscode to consider notifying the extension before uninstalling.

Another option is to make change at jdt.ls side to fail gracefully when a bundle is missing. At debugger side, we do an upgrade whenever a new version is installed.

@yaohaizh
Copy link
Contributor

This happens in two situations on the Windows platform:

  1. When uninstall the extension, the JDT language server and debug server are in running.
  2. After installed the VSIX, the issue will disappear after the first time exception.

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

No branches or pull requests

3 participants