griffon programming error: unable to find class annotation - griffon

I am trying to get the hang of griffon/grails/groovy for a project.
I get this error at compile time from my Test1Controller.groovy file:
[griffonc] /home/ironmantis7x/griffon_projects/test1/griffon-app/controllers/test1/Test1Controller.groovy: 14: unable to resolve class Threading , unable to find class for annotation
[griffonc] # line 14, column 5.
[griffonc] #Threading(Threading.Policy.SKIP)
[griffonc] ^
[griffonc]
[griffonc] /home/ironmantis7x/griffon_projects/test1/griffon-app/controllers/test1/Test1Controller.groovy: 14: unable to find class 'Threading.Policy.SKIP' for annotation attribute constant
[griffonc] # line 14, column 16.
[griffonc] #Threading(Threading.Policy.SKIP)
[griffonc] ^
[griffonc]
[griffonc] 2 errors
Compilation error: Compilation Failed
This is my controller file:
package test1
import griffon.util.GriffonNameUtils as GNU
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')
)
}
}
Like I said I am new to griffon/grails/groovy - can someone help me understand what I seem to be missing?
Thanks!
ironmantis7x
I made the change suggested below and now I get this error when I run:
griffon run-webstart -clean:
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
How do I sign the app to get past this error?
This is my configuration running griffon -version:
------------------------------------------------------------
Griffon 1.2.0
------------------------------------------------------------
Build: 11-Jan-2013 09:10 AM
Groovy: 2.0.6
Ant: 1.8.4
Slf4j: 1.7.2
Spring: 3.2.0.RELEASE
JVM: 1.7.0_09 (Oracle Corporation 23.2-b09)
OS: Linux 3.5.0-22-generic amd64

As you are using threading annotations you should import griffon.transform.Threading on your controller.
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')
)
}
}

Application signing should happen by default. When run-webapp is invoked the signature is taken from griffon-app/conf/BuildConfig.groovy. This signature is a self-signed one when running in development. For example, the following output is form running webstart mode in development without any configuration changes
Welcome to Griffon 1.2.0 - http://griffon-framework.org/
Licensed under Apache Standard License 2.0
Griffon home is set to: /usr/local/griffon
Base Directory: /private/tmp/test1
Running script /usr/local/griffon/scripts/RunWebstart.groovy
Resolving dependencies...
Dependencies resolved in 857ms.
Environment set to development
Resolving framework plugin dependencies ...
Framework plugin dependencies resolved in 1495 ms.
Resolving plugin dependencies ...
Plugin dependencies resolved in 807 ms.
[mkdir] Created dir: /Users/aalmiray/.griffon/1.2.0/projects/test1/classes/cli
[mkdir] Created dir: /Users/aalmiray/.griffon/1.2.0/projects/test1/classes/main
[mkdir] Created dir: /Users/aalmiray/.griffon/1.2.0/projects/test1/classes/test
[mkdir] Created dir: /Users/aalmiray/.griffon/1.2.0/projects/test1/test-classes
[mkdir] Created dir: /Users/aalmiray/.griffon/1.2.0/projects/test1/test-resources
[mkdir] Created dir: /Users/aalmiray/.griffon/1.2.0/projects/test1/resources
[griffonc] Compiling 8 source files to /Users/aalmiray/.griffon/1.2.0/projects/test1/classes/main
[griffonc] Compiling 3 source files to /Users/aalmiray/.griffon/1.2.0/projects/test1/classes/main
[mkdir] Created dir: /private/tmp/test1/dist/webstart
[mkdir] Created dir: /Users/aalmiray/.griffon/1.2.0/projects/test1/resources/griffon-app/i18n
[mkdir] Created dir: /Users/aalmiray/.griffon/1.2.0/projects/test1/resources/griffon-app/resources
[copy] Copying 2 files to /Users/aalmiray/.griffon/1.2.0/projects/test1/resources/griffon-app/i18n
[copy] Copying 8 files to /Users/aalmiray/.griffon/1.2.0/projects/test1/resources/griffon-app/resources
[copy] Copying 1 file to /Users/aalmiray/.griffon/1.2.0/projects/test1/classes/main
[copy] Copying 11 files to /Users/aalmiray/.griffon/1.2.0/projects/test1/resources
[copy] Copied 8 empty directories to 8 empty directories under /Users/aalmiray/.griffon/1.2.0/projects/test1/resources
Auto-generating a local self-signed key
[genkey] Generating Key for development
[copy] Copying 1 file to /private/tmp/test1/staging
[signjar] Signing JAR: /private/tmp/test1/staging/groovy-all-2.0.6.jar to /private/tmp/test1/staging/groovy-all-2.0.6.jar as development
[signjar] Warning:
[signjar] The signer certificate will expire within six months.
[signjar] Enter Passphrase for keystore: Enter key password for development:
[copy] Copying 1 file to /private/tmp/test1/staging
[signjar] Signing JAR: /private/tmp/test1/staging/griffon-rt-1.2.0.jar to /private/tmp/test1/staging/griffon-rt-1.2.0.jar as development
[signjar] Warning:
[signjar] The signer certificate will expire within six months.
[signjar] Enter Passphrase for keystore: Enter key password for development:
[copy] Copying 1 file to /private/tmp/test1/staging
[signjar] Signing JAR: /private/tmp/test1/staging/slf4j-api-1.7.2.jar to /private/tmp/test1/staging/slf4j-api-1.7.2.jar as development
[signjar] Warning:
[signjar] The signer certificate will expire within six months.
[signjar] Enter Passphrase for keystore: Enter key password for development:
[copy] Copying 1 file to /private/tmp/test1/staging
[signjar] Signing JAR: /private/tmp/test1/staging/log4j-1.2.17.jar to /private/tmp/test1/staging/log4j-1.2.17.jar as development
[signjar] Warning:
[signjar] The signer certificate will expire within six months.
[signjar] Enter Passphrase for keystore: Enter key password for development:
[copy] Copying 1 file to /private/tmp/test1/staging
[signjar] Signing JAR: /private/tmp/test1/staging/slf4j-log4j12-1.7.2.jar to /private/tmp/test1/staging/slf4j-log4j12-1.7.2.jar as development
[signjar] Warning:
[signjar] The signer certificate will expire within six months.
[signjar] Enter Passphrase for keystore: Enter key password for development:
[copy] Copying 1 file to /private/tmp/test1/staging
[signjar] Signing JAR: /private/tmp/test1/staging/jcl-over-slf4j-1.7.2.jar to /private/tmp/test1/staging/jcl-over-slf4j-1.7.2.jar as development
[signjar] Warning:
[signjar] The signer certificate will expire within six months.
[signjar] Enter Passphrase for keystore: Enter key password for development:
[copy] Copying 1 file to /private/tmp/test1/staging
[signjar] Signing JAR: /private/tmp/test1/staging/jul-to-slf4j-1.7.2.jar to /private/tmp/test1/staging/jul-to-slf4j-1.7.2.jar as development
[signjar] Warning:
[signjar] The signer certificate will expire within six months.
[signjar] Enter Passphrase for keystore: Enter key password for development:
[copy] Copying 1 file to /private/tmp/test1/staging
[signjar] Signing JAR: /private/tmp/test1/staging/griffon-swing-runtime-1.2.0.jar to /private/tmp/test1/staging/griffon-swing-runtime-1.2.0.jar as development
[signjar] Warning:
[signjar] The signer certificate will expire within six months.
[signjar] Enter Passphrase for keystore: Enter key password for development:
[jar] Building jar: /private/tmp/test1/staging/test1.jar
[delete] Deleting directory /Users/aalmiray/.griffon/1.2.0/projects/test1/resources/griffon-app/resources
[mkdir] Created dir: /Users/aalmiray/.griffon/1.2.0/projects/test1/resources/griffon-app/resources
[copy] Copying 1 file to /private/tmp/test1/staging
[signjar] Signing JAR: /private/tmp/test1/staging/test1.jar to /private/tmp/test1/staging/test1.jar as development
[signjar] Warning:
[signjar] The signer certificate will expire within six months.
[signjar] Enter Passphrase for keystore: Enter key password for development:
[copy] Copying 11 files to /private/tmp/test1/staging
[copy] Copying 18 files to /private/tmp/test1/dist/webstart
[copy] Copied 3 empty directories to 2 empty directories under /private/tmp/test1/dist/webstart
[zip] Building zip: /private/tmp/test1/dist/webstart/test1-0.1-webstart.zip
Couldn't fail to notice net.sourceforge.jnlp.LaunchException in the stack trace you posted. Are you using a different JNLP launcher other from the one provided by the JDK? Also, what's the output of running griffon -version? Mine is
------------------------------------------------------------
Griffon 1.2.0
------------------------------------------------------------
Build: 11-Jan-2013 09:10 AM
Groovy: 2.0.6
Ant: 1.8.4
Slf4j: 1.7.2
Spring: 3.2.0.RELEASE
JVM: 1.6.0_37 (Apple Inc. 20.12-b01-434)
OS: Mac OS X 10.7.5 x86_64

Related

Error on installing Netbeans 12.0 using the official installer

Problem description:
I am trying to install Netbeans 12.0 on Debian "Buster", using the official Netbeans installer. Though the following exception occures:
No protocol specified
Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"
Maybe you know a solution for the above problem?
Thank you for your time!
Note: I know that I could install Netbeans 12.0 as a snap package, but here I'm not interested in it.
Followed steps:
1) In Terminal, I logged-in as the root user:
$ su
Password: ***
2) I installed the package openjdk-11-jdk:
$ apt install default-jdk
3) Then I checked the java version:
$ java --version
openjdk 11.0.7 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Debian-3deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Debian-3deb10u1, mixed mode, sharing)
4) I downloaded the three files specified by the official documentation (Downloading Apache NetBeans 12.0) into "~/Downloads" folder:
The installer file ("Apache-NetBeans-12.0-bin-linux-x64.sh") from the offered mirror site;
The PGP ASC file ("Apache-NetBeans-12.0-bin-linux-x64.sh.asc");
The KEYS file.
5) I navigated to the "Downloads" folder:
$ cd Downloads
6) I set the execute permission on the Netbeans installer file:
$ chmod +x Apache-NetBeans-12.0-bin-linux-x64.sh
7) Because the Netbeans documentation specifies this:
Officially, it is important that you verify the integrity of the
downloaded files using the PGP signatures (.asc file) [...]. The PGP
signatures should be matched against the KEYS file which contains
the PGP keys used to sign this release.
I followed the two steps (the ones using gpg) that they are providing in their link, in order to verify the integrity of the installer:
7.a) Importing KEYS file:
$ gpg --import KEYS
gpg: Schlüssel B4C1940FEA9364F1: "Jan Lahoda (Key for signing Apache NetBeans & co. releases.) <jlahoda#apache.org>" nicht geändert
gpg: Schlüssel 13E9F7AE3A4FD551: "geertjan#apache.org (Key for signing Apache NetBeans & co. releases.) <geertjan#apache.org>" nicht geändert
gpg: Schlüssel CF7BA0AB1CCF4647: "Emilian Marius Bold <emi#apache.org>" nicht geändert
gpg: Schlüssel B2BF814FA145CB2D: "Laszlo Kishalmi (CODE SIGNING KEY) <lkishalmi#apache.org>" nicht geändert
gpg: Schlüssel 4A2601CEDA9382F3: "Eric Barboni (Signing Key) <skygo#apache.org>" nicht geändert
gpg: Schlüssel 3703AC389A12A9D4: "Neil C Smith <neilcsmith#apache.org>" nicht geändert
gpg: Schlüssel 57D5896CD86C1320: "Reema Taneja (Code Signing Key) <rtaneja#apache.org>" nicht geändert
gpg: Schlüssel E860B148D27236F9: "Jaroslav Tulach (Key for signing Apache NetBeans & co. releases.) <jtulach#apache.org>" nicht geändert
gpg: Schlüssel 6FA863B0C32A18B1: Öffentlicher Schlüssel "Arunava Sinha (CODE SIGNING KEY) <arusinha#apache.org>" importiert
gpg: Schlüssel 3ED477750C09D18D: Öffentlicher Schlüssel "John McDonnell (CODE SIGNING KEY) <johnmcdonnell#apache.org>" importiert
gpg: Anzahl insgesamt bearbeiteter Schlüssel: 10
gpg: importiert: 2
gpg: unverändert: 8
7.b) Verifying the signature:
$ gpg --verify Apache-NetBeans-12.0-bin-linux-x64.sh.asc
gpg: die unterzeichneten Daten sind wohl in 'Apache-NetBeans-12.0-bin-linux-x64.sh'
gpg: Signatur vom Di 09 Jun 2020 17:50:58 CEST
gpg: mittels RSA-Schlüssel 8FE1C26F15E0320E740BAED84A2601CEDA9382F3
gpg: Aussteller "skygo#apache.org"
gpg: Korrekte Signatur von "Eric Barboni (Signing Key) <skygo#apache.org>" [unbekannt]
gpg: WARNUNG: Dieser Schlüssel trägt keine vertrauenswürdige Signatur!
gpg: Es gibt keinen Hinweis, daß die Signatur wirklich dem vorgeblichen Besitzer gehört.
Haupt-Fingerabdruck = 8FE1 C26F 15E0 320E 740B AED8 4A26 01CE DA93 82F3
8) In the end, I executed the installer:
$ sh Apache-NetBeans-12.0-bin-linux-x64.sh
Configuring the installer...
Searching for JVM on the system...
Extracting installation data...
Running the installer wizard...
No protocol specified
Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"
I also tried with "bash" command:
$ bash Apache-NetBeans-12.0-bin-linux-x64.sh
and with "./":
$ ./Apache-NetBeans-12.0-bin-linux-x64.sh
Unfortunately, the result is the same each time:
No protocol specified
Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"
Update:
#Kryštof Vosyka gave the working solution: to install Netbeans 12.0 as the current user, not as the root user.
In order to apply his solution, all the above installation steps are to be followed, with the exception of step 6 (setting the execute permission on the Netbeans installer file).
I had the same problem, and solution is quite simple:
Don't start the installation as root.
The installer is graphical and root user cannot really open windows for your user, thus failing.
No idea how to install it for all users, though.

Error while Initializating Fabric-CA server

I am trying to initialize fabric-ca following its user guide using this config file but when executing the following command:
fabric-ca-server init --cafiles fabric-ca-server-config.yaml
I am getting the following error:
2018/11/12 22:59:45 [DEBUG] Intializing nonce manager for issuer 'undercroft'
2018/11/12 22:59:45 [DEBUG] Closing server DBs
2018/11/12 22:59:45 [FATAL] Initialization failure: CA name 'undercroft' is used in '/home/paradox/hyperledger/fabric/undercroft/fabric-ca/server/fabric-ca-server-config.yaml' and '/home/paradox/hyperledger/fabric/undercroft/fabric-ca/server/fabric-ca-server-config.yaml'
While I am getting this error if I am using the command line flags of fabric-ca-server I am successfully able to initialize and launch the
This is the full error log
As of now the --cafiles flag is only used when there are multiple CAs, in case of a single ca it will only use the config file at the $FABRIC_CA_SERVER_HOME directory.
Have you try if you change the CN of the fabric-ca-server ? or change the name of the CA ?

Signing with comodo pfx in Installshield Fails when build executed through commandline

I have updated a new comodo CodeSign certificate by modifying the pfx and password in the ISM file ,
Now when running the build through the installshield IDE i see the package is signed successfully :
Successfully signed: 2070.mst
Started signing 1048.mst ...
Successfully signed: 1048.mst
While executing the same ISM file using IsCmdBld.exe through the command line i get :
[exec] Started signing 2070.mst ...
[exec] Number of errors: 1
[exec] SignTool Error: The specified PFX password is not correct.
[exec] ISDEV : error -1027: Failed signing 2070.mst
[exec] Started signing 1048.mst ...
[exec] Number of errors: 1
[exec] SignTool Error: The specified PFX password is not correct.
[exec] ISDEV : error -1027: Failed signing 1048.mst

Configure Security Manager on Tomcat7

Trying to configure Security Manager for Tomcat 7. We are running Java 1.8.0_51 on a 64 bit Windows 2008 server and run Tomcat as a service. I've added the following lines as Java Options:
-Djava.security.manager
-Djava.security.policy=D:\Program Files\Apache Software Foundation\Tomcat7.0\conf\catalina.policy
The security policy file is the default file and has not been modified. After adding the lines I can no longer start Tomcat. I get the following error messages:
2015-10-07 08:58:31 Commons Daemon procrun stderr initialized properties: reading security properties file: C:\Program Files\Java\jre1.8.0_51\lib\security\java.security jar: beginEntry META-INF/MANIFEST.MF jar: done with meta! jar: nothing to verify! scl: getPermissions ProtectionDomain (file:/D:/Program%20Files/Apache%20Software%20Foundation/Tomcat7.0/bin/tomcat-juli.jar <no signer certificates>) sun.misc.Launcher$AppClassLoader#c387f44 <no principals> java.security.Permissions#28d93b30 ( ("java.lang.RuntimePermission" "exitVM") ("java.io.FilePermission" "\D:\Program Files\Apache Software Foundation\Tomcat7.0\bin\tomcat-juli.jar" "read") ) scl: policy: reading file:/D:/Program%20Files/Apache%20Software%20Foundation/Tomcat7.0/conf/catalina.policy [Policy Parser]: sun.security.util.PropertyExpander$ExpandException: unable to expand property catalina.home [Policy Parser]: sun.security.util.PropertyExpander$ExpandException: unable to expand property catalina.base
I also see errors like the following:
java.lang.IllegalArgumentException: null KeyStore name
If I remove the new config lines all is well.
Any ideas?

debsign fails due to GPG error

Am Trying to build a debian package from source, it signs the package once the source builds.
Am able to build package on my desktop but same package build is failing on my VNC session which is the same desktop.
success on desktop:
----------
Now signing changes and any dsc files...
signfile <file1>.changes info#abc.com
gpg: key 9F54A1B3: secret key without public key - skipped
Successfully signed changes file
---------------------------
Error on VNC:
----------
Now signing changes and any dsc files...
signfile <file1>.changes info#abc.com
gpg: key 9F54A1B3: secret key without public key - skipped
gpg: problem with the agent - disabling agent use
debsign: gpg --no-tty --passphrase tigris error occurred! Aborting....
debuild: fatal error at line 1283:
running debsign failed
Do I need to add anything to the keyring may be. Here is the gpg key list
root#vdeore:/home/vdeore/ws/VCA# gpg --list-keys
/root/.gnupg/pubring.gpg
------------------------
pub 1024R/A3888BE1 2015-01-15
uid vdeore <info#abc.com>
sub 1024R/9965A356 2015-01-15
pub 1024R/EAE69D3A 2015-01-15
uid abc <info#abc.com>
sub 1024R/79C683AB 2015-01-15
Tried generating key on VNC, but it did not make any difference.
Any suggestions ? Appreciate the help, thanks in advance.

Resources