Skip navigation
1668 Views 5 Replies Latest reply: Jul 8, 2011 2:42 AM by Aldoras RSS
Aldoras Bronze 4 posts since
Jun 15, 2011
Currently Being Moderated

Jun 15, 2011 4:44 AM

Plugin stopped working in Spark2.6.0

Hello,

 

  i have written a plugin for spark 2.5.8 last year and it was working great, until i installed spark 2.6.0 yesterday.

There is a line where i want to get the current user directory:

 

private static String userDirectory = SparkManager.getUserDirectory().getPath();

 

since i installed 2.6.0 this one is causing me trouble with the following error:

 


15.06.2011 13:20:05 org.jivesoftware.spark.util.log.Log error
SCHWERWIEGEND: Unable to load plugin
java.lang.ExceptionInInitializerError
at org.[myPlugin].<clinit>(plugin.java:94)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.jivesoftware.spark.PluginManager.loadPublicPlugin(PluginManager.java:347)
at org.jivesoftware.spark.PluginManager.loadPublicPlugins(PluginManager.java:692)
at org.jivesoftware.spark.PluginManager.loadPlugins(PluginManager.java:237)
at org.jivesoftware.Spark.startup(Spark.java:209)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jivesoftware.launcher.Startup.start(Startup.java:94)
at org.jivesoftware.launcher.Startup.main(Startup.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher.main(Unknown Source)


Caused by: java.lang.NullPointerException
at org.jivesoftware.spark.SparkManager.getUserDirectory(SparkManager.java:366)
at org.[myPlugin].<clinit>(pluginSettings.java:20)
... 23 more

 

 

did anything change in the source for SparkManager that i have to adapt to, or is this a bug?

 

 

Thanks in advance

 

- Aldoras

15.06.2011 13:20:05 org.jivesoftware.spark.util.log.Log error
SCHWERWIEGEND: Unable to load plugin org.pidas.aci.client.ACIClient.
java.lang.ExceptionInInitializerError
at org.pidas.aci.client.ACIClient.<clinit>(ACIClient.java:94)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.jivesoftware.spark.PluginManager.loadPublicPlugin(PluginManager.java:347)
at org.jivesoftware.spark.PluginManager.loadPublicPlugins(PluginManager.java:692)
at org.jivesoftware.spark.PluginManager.loadPlugins(PluginManager.java:237)
at org.jivesoftware.Spark.startup(Spark.java:209)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jivesoftware.launcher.Startup.start(Startup.java:94)
at org.jivesoftware.launcher.Startup.main(Startup.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher.main(Unknown Source)
Caused by: java.lang.NullPointerException
at org.jivesoftware.spark.SparkManager.getUserDirectory(SparkManager.java:366)
at org.pidas.aci.client.resources.Settings.<clinit>(Settings.java:20)
... 23 more

 

    • Wolf Gold 278 posts since
      Feb 5, 2011
      Currently Being Moderated
      Jun 26, 2011 6:02 AM (in response to Aldoras)
      Plugin stopped working in Spark2.6.0

      nope nothing changed with SparkManager.java

       

      you will need to post the source of your plugin for anyone to find an answer

        • Wolf Gold 278 posts since
          Feb 5, 2011
          Currently Being Moderated
          Jul 7, 2011 9:43 AM (in response to Aldoras)
          Plugin stopped working in Spark2.6.0

          i can currently not verify my thesis, cause i just upgraded to osx10.7 and dont have the java-jkd yet but here it goes:

           

          since 2.6 plugins will be loaded before workspace initialization, therefore the getUserDirectory() is not set yet

           

          this is only a thought i have, will check later.

           

           

          you might want to try something like

           

          private static String userDirectory = "~/Library/Application Support/Spark/" // or whatever path

           

          instead of

          private static String userDirectory = SparkManager.getUserDirectory().getPath();

           

          and ill check if this is actually true

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points