nbandroid not working if NetBeans is started without internet connection.

Issue #5 resolved
Former user created an issue

Title describes it: When I start NetBeans without a internet connection, all nbandroid-projects are only visible a few seconds, then they disappear... Everything works find, if I close NetBeans and start it again when internet connection is available.

(Want to say this: I really like the plugin !!)

See here some stacktraces:

java.lang.NoClassDefFoundError: Could not initialize class org.netbeans.modules.android.core.sdk.DalvikPlatformManager at org.netbeans.modules.android.project.queries.PlatformSourceForBinaryQueryImpl.findSourceRoots2(PlatformSourceForBinaryQueryImpl.java:37) at org.netbeans.api.java.queries.SourceForBinaryQuery.findSourceRoots2(SourceForBinaryQuery.java:126) at org.netbeans.modules.parsing.impl.indexing.PathRegistry.createResources(PathRegistry.java:666) at org.netbeans.modules.parsing.impl.indexing.PathRegistry.getSources(PathRegistry.java:265) at org.netbeans.modules.parsing.impl.indexing.errors.Utilities.findIndexedRootsUnderDirectory(Utilities.java:85) at org.netbeans.modules.parsing.impl.indexing.errors.ErrorAnnotator$1.run(ErrorAnnotator.java:322) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2044)

java.lang.NoClassDefFoundError: Could not initialize class org.netbeans.modules.android.core.sdk.DalvikPlatformManager at org.netbeans.modules.android.project.queries.PlatformSourceForBinaryQueryImpl.findSourceRoots2(PlatformSourceForBinaryQueryImpl.java:37) at org.netbeans.api.java.queries.SourceForBinaryQuery.findSourceRoots2(SourceForBinaryQuery.java:126) at org.netbeans.modules.parsing.impl.indexing.PathRegistry.createResources(PathRegistry.java:666) at org.netbeans.modules.parsing.impl.indexing.PathRegistry.getSources(PathRegistry.java:265) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$RootsWork.getDone(RepositoryUpdater.java:4297) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$InitialRootsWork.getDone(RepositoryUpdater.java:5106) [catch] at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:3066) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:5453) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.access$4600(RepositoryUpdater.java:5119) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$3$1.run(RepositoryUpdater.java:5378) at org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.performScan(RunWhenScanFinishedSupport.java:96) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$3.call(RepositoryUpdater.java:5374) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$3.call(RepositoryUpdater.java:5370) at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:176) at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:360) at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:74) at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:5370) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2044)

Comments (8)

  1. Radim Kubacki

    Please attach IDE log and more information to this bug report (see http://nbandroid.org/wiki/index.php/Contacts for some other tips).

    It is my suspicion that your home directory and thus NetBeans userdir is on a network drive. Additional plugins are installed into userdir by default (you can override this in Settings tab of plugin manager dialog). This would explain why it is working with the connectivity and fails when disconnected. Or some similar incompatibility between module JARs installed into location that is mapped differently when connected and disconnected.

  2. Former user Account Deleted

    More details to this error (sorry, forgot to login before):

    Product Version: NetBeans IDE 7.3 (Build 201302132200) Java: 1.7.0_25; OpenJDK 64-Bit Server VM 23.7-b01 Runtime: OpenJDK Runtime Environment 1.7.0_25-b30 System: Linux version 3.8.0-30-generic running on amd64; UTF-8; de_DE (nb) User directory: /home/floyd/.netbeans/7.3 Cache directory: /home/floyd/.cache/netbeans/7.3

    No network drive is used here. The exception I got today is slightly shorter: java.lang.NoClassDefFoundError: Could not initialize class org.netbeans.modules.android.core.sdk.DalvikPlatformManager at org.netbeans.modules.android.project.queries.PlatformSourceForBinaryQueryImpl.findSourceRoots2(PlatformSourceForBinaryQueryImpl.java:37) at org.netbeans.api.java.queries.SourceForBinaryQuery.findSourceRoots2(SourceForBinaryQuery.java:126) at org.netbeans.modules.parsing.impl.indexing.PathRegistry.createResources(PathRegistry.java:666) at org.netbeans.modules.parsing.impl.indexing.PathRegistry.getSources(PathRegistry.java:265) at org.netbeans.modules.parsing.impl.indexing.errors.Utilities.findIndexedRootsUnderDirectory(Utilities.java:85) at org.netbeans.modules.parsing.impl.indexing.errors.ErrorAnnotator$1.run(ErrorAnnotator.java:322) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2044)

  3. Radim Kubacki

    It seems that the nbandroid plugin installation is corrupted. My suggestion is to delete it (it is possible to do it in Plugin Manager) and install it again.

  4. Former user Account Deleted

    Sorry, that didn't do the trick. Uninstalled the plugin, installed it again. Exceptions like above when I start NetBeans with activated nbandroid plugin and WITHOUT internet connection...

    Can I do something else to help you reslove the problem?

  5. Radim Kubacki

    I see the problem now: without the internet connection statsdclient cannot be created and breaks init of DalvikPlatformManager that is critical part of nbandroid support. Will try to fix later today.

  6. Log in to comment