groovy错误:罐子未签名

时间:2013-01-29 17:49:15

标签: java security jnlp java-web-start griffon

我的应用程序中只有当我尝试在griffon中将其作为webstart或applet运行时,我才会出现以下错误:

net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application. 
    at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:778)
    at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:552)
    at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:889)
Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: 
  Cannot grant permissions to unsigned jars. 
  Application requested security permissions, but jars are not signed.
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.setSecurity(JNLPClassLoader.java:312)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:232)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:357)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:330)
    at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:770)
    ... 2 more

我需要将什么内容放入我的代码中以便过度使用(我正处于开发阶段而不想仅仅部署)?

我使用了命令:“griffon run-webstart -clean”

这是我的控制器文件:

package test1

import griffon.util.GriffonNameUtils as GNU
import griffon.transform.Threading

class Test1Controller {

    def model

    def clear = {
            model.griffonClass.propertyNames.each { name -> model[name] = ''
            }
    }

    @Threading(Threading.Policy.SKIP)
    def submit = {
            java.swing.JoptionPane.showMessageDialog(
            app.windowManager.windows.find{it.focused}, 
            model.griffonClass.propertyNames.collect([]) {
                     name -> "${GNU.getNaturalName(name)} = ${model[name]}"
            }.join('n')
            )
    }

}

1 个答案:

答案 0 :(得分:0)

@Steinar给出了正确答案:

  

@ ironmantis7x:你应该包括&#39; @&#39;在评论中向人们发送用户名之前。如果你不这样做,我认为他们不会收到通知。 - Steinar Mar 13&#39; 13 at 22:51