Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-2133

Allow translations to be found when running from IDE

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.3
    • Fix Version/s: 2.9.0
    • Component/s: Translation
    • Labels:
      None

      Description

      When running from an IDE, the following is logged after logging in:

      Aug 03, 2020 7:27:46 PM org.jivesoftware.spark.util.log.Log error
      SEVERE: Error unzipping plugin
      java.io.FileNotFoundException: /home/guus/github/Spark/core/target/classes (Is a directory)
      	at java.util.zip.ZipFile.open(Native Method)
      	at java.util.zip.ZipFile.<init>(ZipFile.java:225)
      	at java.util.zip.ZipFile.<init>(ZipFile.java:155)
      	at java.util.jar.JarFile.<init>(JarFile.java:166)
      	at java.util.jar.JarFile.<init>(JarFile.java:130)
      	at org.jivesoftware.sparkimpl.plugin.language.LanguagePlugin.initialize(LanguagePlugin.java:96)
      	at org.jivesoftware.spark.PluginManager.lambda$initializePlugins$1(PluginManager.java:723)
      	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
      	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
      	at java.awt.EventQueue.access$500(EventQueue.java:97)
      	at java.awt.EventQueue$3.run(EventQueue.java:709)
      	at java.awt.EventQueue$3.run(EventQueue.java:703)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
      	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
      	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
      	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

      The problem is caused by the code explicitly trying to extract i18n files from the spark.jar file. When running from an IDE, there's no such archive.

      Instead, i18n files should be loaded from the classpath. This will work either way.

        Attachments

          Activity

            People

            Assignee:
            guus Guus der Kinderen
            Reporter:
            guus Guus der Kinderen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: