[
https://issues.jboss.org/browse/JBIDE-17530?page=com.atlassian.jira.plugi...
]
Fred Bricon resolved JBIDE-17530.
---------------------------------
Resolution: Done
So the problem was not that the file was empty, but we picked up files being downloaded by
previous request. Incomplete files are not valid zips obviously.
Fix ensures current d/l isn't picked up by discovery registry (temp file is moved to
final valid file at the end of the download).
I also added a few checks preventing errors on disposed controls, when closing/reopening
central very fast.
when urls fails to download we end up with 0 size content
---------------------------------------------------------
Key: JBIDE-17530
URL:
https://issues.jboss.org/browse/JBIDE-17530
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: central, common/jst/core, project-examples
Reporter: Max Rydahl Andersen
Assignee: Fred Bricon
Fix For: 4.2.0.Beta3
Attachments: central-tests.ogv
due to a crash files end up being 0 sized resulting in this stack trace:
STACK 0
18:14 java.util.zip.ZipException: zip file is empty
18:14 at java.util.zip.ZipFile.open(Native Method)
18:14 at java.util.zip.ZipFile.<init>(ZipFile.java:215)
18:14 at java.util.zip.ZipFile.<init>(ZipFile.java:145)
18:14 at java.util.jar.JarFile.<init>(JarFile.java:153)
18:14 at java.util.jar.JarFile.<init>(JarFile.java:117)
18:14 at
org.jboss.tools.project.examples.internal.discovery.xpl.DiscoveryRegistryStrategy.processBundle(DiscoveryRegistryStrategy.java:137)
18:14 at
org.jboss.tools.project.examples.internal.discovery.xpl.DiscoveryRegistryStrategy.processBundles(DiscoveryRegistryStrategy.java:126)
18:14 at
org.jboss.tools.project.examples.internal.discovery.xpl.DiscoveryRegistryStrategy.onStart(DiscoveryRegistryStrategy.java:78)
18:14 at
org.eclipse.core.internal.registry.ExtensionRegistry.<init>(ExtensionRegistry.java:725)
18:14 at
org.jboss.tools.project.examples.internal.discovery.xpl.ExternalBundleDiscoveryStrategy.performDiscovery(ExternalBundleDiscoveryStrategy.java:125)
files shoulnd't be put into cache before completely downloaded.
{code}!ENTRY org.eclipse.mylyn.discovery.core 4 0 2014-06-04 15:03:08.894
!MESSAGE Cannot load bundle
org.jboss.tools.central.discovery_4.2.0.Beta3_v20140601_2325_B2769.jar_6387042895189249876.jar
from url
/home/eskimo/Projects/jbdevstudio/4.2.x/fork/runtime-EclipseApplication-temp/.metadata/.plugins/org.jboss.tools.central/proxyWizards/1401919388047/org.jboss.tools.central.discovery_4.2.0.Beta3_v20140601_2325_B2769.jar_6387042895189249876.jar:
error in opening zip file
!STACK 0
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:215)
at java.util.zip.ZipFile.<init>(ZipFile.java:145)
at java.util.jar.JarFile.<init>(JarFile.java:153)
at java.util.jar.JarFile.<init>(JarFile.java:117)
at
org.jboss.tools.project.examples.internal.discovery.xpl.DiscoveryRegistryStrategy.processBundle(DiscoveryRegistryStrategy.java:137)
at
org.jboss.tools.project.examples.internal.discovery.xpl.DiscoveryRegistryStrategy.processBundles(DiscoveryRegistryStrategy.java:126)
at
org.jboss.tools.project.examples.internal.discovery.xpl.DiscoveryRegistryStrategy.onStart(DiscoveryRegistryStrategy.java:78)
at
org.eclipse.core.internal.registry.ExtensionRegistry.<init>(ExtensionRegistry.java:725)
at
org.jboss.tools.project.examples.internal.discovery.xpl.ExternalBundleDiscoveryStrategy.performDiscovery(ExternalBundleDiscoveryStrategy.java:125)
at
org.jboss.tools.project.examples.internal.discovery.ChainedDiscoveryStrategy.performDiscovery(ChainedDiscoveryStrategy.java:62)
at
org.eclipse.mylyn.internal.discovery.core.model.ConnectorDiscovery.performDiscovery(ConnectorDiscovery.java:114)
at
org.jboss.tools.central.internal.discovery.wizards.ProxyWizardManager.loadWizards(ProxyWizardManager.java:101)
at
org.jboss.tools.central.internal.discovery.wizards.ProxyWizardManager.getProxyWizards(ProxyWizardManager.java:121)
at
org.jboss.tools.central.editors.GettingStartedPage.getProxyWizards(GettingStartedPage.java:563)
at
org.jboss.tools.central.editors.GettingStartedPage.access$11(GettingStartedPage.java:561)
at
org.jboss.tools.central.editors.GettingStartedPage$5.run(GettingStartedPage.java:515)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
!ENTRY org.eclipse.mylyn.discovery.core 4 0 2014-06-04 15:14:14.190
!MESSAGE Cannot load bundle
org.jboss.tools.central.discovery_4.2.0.Beta3_v20140601_2325_B2769.jar_3281606466638696010.jar
from url
/home/eskimo/Projects/jbdevstudio/4.2.x/fork/runtime-EclipseApplication-temp/.metadata/.plugins/org.jboss.tools.central/proxyWizards/1401920053564/org.jboss.tools.central.discovery_4.2.0.Beta3_v20140601_2325_B2769.jar_3281606466638696010.jar:
error in opening zip file
!STACK 0
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:215)
at java.util.zip.ZipFile.<init>(ZipFile.java:145)
at java.util.jar.JarFile.<init>(JarFile.java:153)
at java.util.jar.JarFile.<init>(JarFile.java:117)
at
org.jboss.tools.project.examples.internal.discovery.xpl.DiscoveryRegistryStrategy.processBundle(DiscoveryRegistryStrategy.java:137)
at
org.jboss.tools.project.examples.internal.discovery.xpl.DiscoveryRegistryStrategy.processBundles(DiscoveryRegistryStrategy.java:126)
at
org.jboss.tools.project.examples.internal.discovery.xpl.DiscoveryRegistryStrategy.onStart(DiscoveryRegistryStrategy.java:78)
at
org.eclipse.core.internal.registry.ExtensionRegistry.<init>(ExtensionRegistry.java:725)
at
org.jboss.tools.project.examples.internal.discovery.xpl.ExternalBundleDiscoveryStrategy.performDiscovery(ExternalBundleDiscoveryStrategy.java:125)
at
org.jboss.tools.project.examples.internal.discovery.ChainedDiscoveryStrategy.performDiscovery(ChainedDiscoveryStrategy.java:62)
at
org.eclipse.mylyn.internal.discovery.core.model.ConnectorDiscovery.performDiscovery(ConnectorDiscovery.java:114)
at
org.jboss.tools.central.internal.discovery.wizards.ProxyWizardManager.loadWizards(ProxyWizardManager.java:101)
at
org.jboss.tools.central.internal.discovery.wizards.ProxyWizardManager.getProxyWizards(ProxyWizardManager.java:121)
at
org.jboss.tools.central.editors.GettingStartedPage.getProxyWizards(GettingStartedPage.java:563)
at
org.jboss.tools.central.editors.GettingStartedPage.access$11(GettingStartedPage.java:561)
at
org.jboss.tools.central.editors.GettingStartedPage$5.run(GettingStartedPage.java:515)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
!ENTRY org.eclipse.mylyn.discovery.core 4 0 2014-06-04 15:14:16.303
!MESSAGE Cannot load bundle
org.jboss.tools.central.discovery_4.2.0.Beta3_v20140601_2325_B2769.jar_6092819873576841520.jar
from url
/home/eskimo/Projects/jbdevstudio/4.2.x/fork/runtime-EclipseApplication-temp/.metadata/.plugins/org.jboss.tools.central/proxyWizards/1401920055231/org.jboss.tools.central.discovery_4.2.0.Beta3_v20140601_2325_B2769.jar_6092819873576841520.jar:
error in opening zip file
!STACK 0
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:215)
at java.util.zip.ZipFile.<init>(ZipFile.java:145)
at java.util.jar.JarFile.<init>(JarFile.java:153)
at java.util.jar.JarFile.<init>(JarFile.java:117)
at
org.jboss.tools.project.examples.internal.discovery.xpl.DiscoveryRegistryStrategy.processBundle(DiscoveryRegistryStrategy.java:137)
at
org.jboss.tools.project.examples.internal.discovery.xpl.DiscoveryRegistryStrategy.processBundles(DiscoveryRegistryStrategy.java:126)
at
org.jboss.tools.project.examples.internal.discovery.xpl.DiscoveryRegistryStrategy.onStart(DiscoveryRegistryStrategy.java:78)
at
org.eclipse.core.internal.registry.ExtensionRegistry.<init>(ExtensionRegistry.java:725)
at
org.jboss.tools.project.examples.internal.discovery.xpl.ExternalBundleDiscoveryStrategy.performDiscovery(ExternalBundleDiscoveryStrategy.java:125)
at
org.jboss.tools.project.examples.internal.discovery.ChainedDiscoveryStrategy.performDiscovery(ChainedDiscoveryStrategy.java:62)
at
org.eclipse.mylyn.internal.discovery.core.model.ConnectorDiscovery.performDiscovery(ConnectorDiscovery.java:114)
at
org.jboss.tools.central.internal.discovery.wizards.ProxyWizardManager.loadWizards(ProxyWizardManager.java:101)
at
org.jboss.tools.central.internal.discovery.wizards.ProxyWizardManager.getProxyWizards(ProxyWizardManager.java:121)
at
org.jboss.tools.central.editors.GettingStartedPage.getProxyWizards(GettingStartedPage.java:563)
at
org.jboss.tools.central.editors.GettingStartedPage.access$11(GettingStartedPage.java:561)
at
org.jboss.tools.central.editors.GettingStartedPage$5.run(GettingStartedPage.java:515)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
!ENTRY org.eclipse.mylyn.discovery.core 4 0 2014-06-04 15:14:18.392
!MESSAGE Cannot load bundle
org.jboss.tools.central.discovery_4.2.0.Beta3_v20140601_2325_B2769.jar_5797717969376990600.jar
from url
/home/eskimo/Projects/jbdevstudio/4.2.x/fork/runtime-EclipseApplication-temp/.metadata/.plugins/org.jboss.tools.central/proxyWizards/1401920057185/org.jboss.tools.central.discovery_4.2.0.Beta3_v20140601_2325_B2769.jar_5797717969376990600.jar:
error in opening zip file
!STACK 0
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:215)
at java.util.zip.ZipFile.<init>(ZipFile.java:145)
at java.util.jar.JarFile.<init>(JarFile.java:153)
at java.util.jar.JarFile.<init>(JarFile.java:117)
at
org.jboss.tools.project.examples.internal.discovery.xpl.DiscoveryRegistryStrategy.processBundle(DiscoveryRegistryStrategy.java:137)
at
org.jboss.tools.project.examples.internal.discovery.xpl.DiscoveryRegistryStrategy.processBundles(DiscoveryRegistryStrategy.java:126)
at
org.jboss.tools.project.examples.internal.discovery.xpl.DiscoveryRegistryStrategy.onStart(DiscoveryRegistryStrategy.java:78)
at
org.eclipse.core.internal.registry.ExtensionRegistry.<init>(ExtensionRegistry.java:725)
at
org.jboss.tools.project.examples.internal.discovery.xpl.ExternalBundleDiscoveryStrategy.performDiscovery(ExternalBundleDiscoveryStrategy.java:125)
at
org.jboss.tools.project.examples.internal.discovery.ChainedDiscoveryStrategy.performDiscovery(ChainedDiscoveryStrategy.java:62)
at
org.eclipse.mylyn.internal.discovery.core.model.ConnectorDiscovery.performDiscovery(ConnectorDiscovery.java:114)
at
org.jboss.tools.central.internal.discovery.wizards.ProxyWizardManager.loadWizards(ProxyWizardManager.java:101)
at
org.jboss.tools.central.internal.discovery.wizards.ProxyWizardManager.getProxyWizards(ProxyWizardManager.java:121)
at
org.jboss.tools.central.editors.GettingStartedPage.getProxyWizards(GettingStartedPage.java:563)
at
org.jboss.tools.central.editors.GettingStartedPage.access$11(GettingStartedPage.java:561)
at
org.jboss.tools.central.editors.GettingStartedPage$5.run(GettingStartedPage.java:515)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
{code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)