Error on installing Netbeans 12.0 using the official installer - linux

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.

Related

Problem with install4j smart card EV code signing

We need to add EV signing to Our Install4j Maven build, which runs on Fedora.
So far in our .install4j file we have
<codeSigning windowsEnabled="true"
verbose="true"
windowsKeySource="pkcs11"
windowsPkcs11Library="/usr/lib/pkcs11/libIDPrimePKCS11.so"
winKeystorePassword="XXXXXXXXXXXXXX">
<windowsPkcs11Identifier issuer="GlobalSign GCC R45 EV CodeSigning CA 2020"
serial="YYYYYYYYYYYYYYYYY"
subject="ZZZZZZZZZZ" />
</codeSigning>
but we're getting
[INFO] install4j: compilation failed. Reason: The certificate file /usr/lib/pkcs11/libIDPrimePKCS11.so does not exist.
The file does exist, and keytool can see it.

Failing auth. via LDAPS

I setup Rundeck with LDAP/AD auth via JAAS module (vide official documentation).
Auth. works perfectly fine with non-encrypted connection (providerUrl="ldap://AD-FQDN").
When I am trying to switch from LDAP to LDAPS (providerUrl="ldaps://AD-FQDN"), that's where problem begins.
I gathered AD cert along with Sub and Root CA's, added them into rundeck truststore (and keystore afterwards) and restarted rundeckd.
Certs are being validated successfully:
[root#rundeck01 ssl]# openssl verify -CAfile RootCA.cer -untrusted SubCA.cer ad01.cer
ad01.cer: OK
What I can see in service.log:
Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Firewall ports are opened (can connect to p. 389,636 from via telnet).
Running on:
rundeck-3.4.0.20210614-1
CentOS 7.9
Kindly advise.
Extract the ldaps server cert:
echo -n | openssl s_client -connect your_ldap_server:636 > cert.out
Import to the Rundeck's truststore:
keytool -importcert -trustcacerts -file cert.out -alias myldap -keystore etc/rundeck/truststore
Add the truststore path on your rundeckd file (-Djavax.net.ssl.trustStore):
RDECK_JVM_OPTS="-Drundeck.jaaslogin=true \
-Djava.security.auth.login.config=/etc/rundeck/jaas-ldap.conf \
-Dloginmodule.name=ldap \
-Djavax.net.ssl.trustStore=/etc/rundeck/truststore"
Same issue solved here.

keytool error: java.io.IOException: Illegal header: -----BEGIN CERTIFICATE-----

Using the following command:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.55.x86_64/bin/keytool -import -alias tomcat -trustcacerts -file certificate.crt -keystore $OBM_HOMEconf/keystore
I receive the error:
keytool error: java.security.cert.CertificateException: java.io.IOException: Illegal header: -----BEGIN CERTIFICATE-----
I generated the certificate on GoDaddy, as I had done previously for the server I'm trying to install this cert on, and downloaded the Tomcat version of the files from them.
I ensured all of the hyphens are actual hyphens (I've had an issue before where they came out as em dashes) in both the cert and the command. I do not understand why it is saying that the cert header is an illegal header.
Java's PEM parser is a bit finicky when it comes to extra whitespace. A trailing space character in the header line causes this error message.

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.

griffon programming error: unable to find class annotation

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

Resources