Bug 839635
Summary: | arduino fails to start: java.lang.NoClassDefFoundError gnu/io/CommPortIdentifier | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Frederick Roth <f-roth> |
Component: | jpackage-utils | Assignee: | Deepak Bhole <dbhole> |
Status: | CLOSED CANTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 17 | CC: | akurtako, dbhole, f-roth, mavit, mesat, sigurijan |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-10-11 14:47:32 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Frederick Roth
2012-07-12 13:15:13 UTC
gnu/io/CommPortIdentifier should be included with the rxtx package. Could you check that it's properly installed with: rpm -V rxtx Also, you could try the following so we can see what CLASSPATH is getting set to: bash -x /bin/arduino rpm -V returns 0. rxtx-2.2-0.6.20100211.fc17.1.i686 is installed shouldn't it be a dependency of arduino? I get the following CLASSPATH related errors when using bash -x: ++ /usr/bin/build-classpath ecj jna RXTXcomm + LOCAL_CLASSPATH='/usr/bin/build-classpath: error: JVM_LIBDIR /usr/lib/jvm-exports/java-1.6.0-openjdk-1.6.0.0 does not exist or is not a directory' + CLASSPATH='/usr/bin/build-classpath: error: JVM_LIBDIR /usr/lib/jvm-exports/java-1.6.0-openjdk-1.6.0.0 does not exist or is not a directory:' + for lib in '/usr/share/arduino/*.jar' + CLASSPATH='/usr/bin/build-classpath: error: JVM_LIBDIR /usr/lib/jvm-exports/java-1.6.0-openjdk-1.6.0.0 does not exist or is not a directory::/usr/share/arduino/core.jar' + for lib in '/usr/share/arduino/*.jar' + CLASSPATH='/usr/bin/build-classpath: error: JVM_LIBDIR /usr/lib/jvm-exports/java-1.6.0-openjdk-1.6.0.0 does not exist or is not a directory::/usr/share/arduino/core.jar:/usr/share/arduino/pde.jar' I'm not quite shure where JVM_LIBDIR /usr/lib/jvm-exports/java-1.6.0-openjdk-1.6.0.0 does not exist or is not a directory is coming from, but I think that is the problem. Ok, I'm sorry, it was my mistake, I forgot that I had set JAVA_HOME some time (maybe years) ago in my bashrc which pointed to a nonexistent java 1.6. Could set_classpath in /usr/share/java-utils/java-functions issue an error to STDERR in this case, to make it harder for users to shoot themselves in the foot? Same problem, today on Fedora 17... Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier at processing.app.Editor.populateSerialMenu(Editor.java:989) at processing.app.Editor.buildToolsMenu(Editor.java:692) at processing.app.Editor.buildMenuBar(Editor.java:477) at processing.app.Editor.<init>(Editor.java:206) at processing.app.Base.handleOpen(Base.java:704) at processing.app.Base.handleOpen(Base.java:669) at processing.app.Base.handleNew(Base.java:565) at processing.app.Base.<init>(Base.java:305) at processing.app.Base.main(Base.java:194) Caused by: java.lang.ClassNotFoundException: gnu.io.CommPortIdentifier at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 9 more Here is the output of: $ bash -x /bin/arduino ++ id -u + [[ 1000 -ne 0 ]] + for group in dialout lock + groups iGenius + grep -q ' : .*\bdialout\b' + for group in dialout lock + groups iGenius + grep -q ' : .*\block\b' + [[ -n '' ]] + . /usr/share/java-utils/java-functions ++ _JAVA_HOME= ++ '[' -f /etc/java/java.conf ']' ++ . /etc/java/java.conf +++ JAVA_LIBDIR=/usr/share/java +++ JNI_LIBDIR=/usr/lib64/java +++ JAVAJNI_LIBDIR=/usr/share/java-jni +++ JVM_ROOT=/usr/lib/jvm +++ JAVACMD_OPTS= ++ '[' -f /home/iGenius/.java/java.conf ']' ++ '[' '!' -z '' -a -d '' ']' + MAIN_CLASS=processing.app.Base + set_classpath ecj jna RXTXcomm + _set_java_home + '[' -z '' ']' + local _java_dirs=java + case "$_prefer_jre" in + _java_dirs='java jre' + for d in '$_java_dirs' + '[' -d /usr/lib/jvm/java ']' + for d in '$_java_dirs' + '[' -d /usr/lib/jvm/jre ']' + jars='ecj jna RXTXcomm' + '[' -n '' ']' ++ /usr/bin/build-classpath ecj jna RXTXcomm + LOCAL_CLASSPATH='/usr/bin/build-classpath: error: JVM_LIBDIR /usr/lib/jvm-exports/jre-1.7.0u04-sun-x64 does not exist or is not a directory' + CLASSPATH='/usr/bin/build-classpath: error: JVM_LIBDIR /usr/lib/jvm-exports/jre-1.7.0u04-sun-x64 does not exist or is not a directory:' + for lib in '/usr/share/arduino/*.jar' + CLASSPATH='/usr/bin/build-classpath: error: JVM_LIBDIR /usr/lib/jvm-exports/jre-1.7.0u04-sun-x64 does not exist or is not a directory::/usr/share/arduino/core.jar' + for lib in '/usr/share/arduino/*.jar' + CLASSPATH='/usr/bin/build-classpath: error: JVM_LIBDIR /usr/lib/jvm-exports/jre-1.7.0u04-sun-x64 does not exist or is not a directory::/usr/share/arduino/core.jar:/usr/share/arduino/pde.jar' + set_flags -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel + FLAGS=-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel + '[' -n '' ']' + cd /usr/share/arduino + run + set_javacmd + '[' -x '' ']' + set_jvm + _set_java_home + '[' -z '' ']' + local _java_dirs=java + case "$_prefer_jre" in + _java_dirs='java jre' + for d in '$_java_dirs' + '[' -d /usr/lib/jvm/java ']' + for d in '$_java_dirs' + '[' -d /usr/lib/jvm/jre ']' + '[' -n '' ']' ++ which javac ++ : + java= + '[' -z '' ']' ++ which java + java=/usr/bin/java + '[' -n /usr/bin/java ']' + '[' -h /usr/bin/java ']' ++ readlink /usr/bin/java + java=/etc/alternatives/java + '[' -h /etc/alternatives/java ']' ++ readlink /etc/alternatives/java + java=/usr/lib/jvm/jre-1.7.0u04-sun-x64/bin/java + '[' -h /usr/lib/jvm/jre-1.7.0u04-sun-x64/bin/java ']' ++ dirname /usr/lib/jvm/jre-1.7.0u04-sun-x64/bin/java + JAVA_HOME=/usr/lib/jvm/jre-1.7.0u04-sun-x64/bin/.. + export JAVA_HOME + return + '[' -x /usr/lib/jvm/jre-1.7.0u04-sun-x64/bin/../jre/sh/java ']' + '[' -x /usr/lib/jvm/jre-1.7.0u04-sun-x64/bin/../bin/java ']' + JAVACMD=/usr/lib/jvm/jre-1.7.0u04-sun-x64/bin/../bin/java + '[' '!' -x /usr/lib/jvm/jre-1.7.0u04-sun-x64/bin/../bin/java ']' + '[' -n '' ']' + return 0 + '[' -n '' ']' + exec /usr/lib/jvm/jre-1.7.0u04-sun-x64/bin/../bin/java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -classpath '/usr/bin/build-classpath: error: JVM_LIBDIR /usr/lib/jvm-exports/jre-1.7.0u04-sun-x64 does not exist or is not a directory::/usr/share/arduino/core.jar:/usr/share/arduino/pde.jar' processing.app.Base alternatives --config java choose JRE 1.7 and set the path: export JAVA_HOME="/usr/java/latest" This can solve the problem if someone need... after update of JRE or after installation (if you had jdk before installing jre, like me). What does alternatives --display java say when the error occurs? $ alternatives --display java java - stato: manuale. il link attualmente punta a /usr/lib/jvm/jre-1.7.0u04-sun-x64/bin/java /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java - priorità 17006 slave keytool: /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/keytool slave orbd: /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/orbd slave pack200: /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/pack200 slave rmid: /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/rmid slave rmiregistry: /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/rmiregistry slave servertool: /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/servertool slave tnameserv: /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/tnameserv slave unpack200: /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/unpack200 slave jre_exports: /usr/lib/jvm-exports/jre-1.7.0-openjdk.x86_64 slave jre: /usr/lib/jvm/jre-1.7.0-openjdk.x86_64 slave java.1.gz: /usr/share/man/man1/java-java-1.7.0-openjdk.1.gz slave keytool.1.gz: /usr/share/man/man1/keytool-java-1.7.0-openjdk.1.gz slave orbd.1.gz: /usr/share/man/man1/orbd-java-1.7.0-openjdk.1.gz slave pack200.1.gz: /usr/share/man/man1/pack200-java-1.7.0-openjdk.1.gz slave rmid.1.gz: /usr/share/man/man1/rmid-java-1.7.0-openjdk.1.gz slave rmiregistry.1.gz: /usr/share/man/man1/rmiregistry-java-1.7.0-openjdk.1.gz slave servertool.1.gz: /usr/share/man/man1/servertool-java-1.7.0-openjdk.1.gz slave tnameserv.1.gz: /usr/share/man/man1/tnameserv-java-1.7.0-openjdk.1.gz slave unpack200.1.gz: /usr/share/man/man1/unpack200-java-1.7.0-openjdk.1.gz /usr/lib/jvm/jre-1.7.0u04-sun-x64/bin/java - priorità 18000 slave keytool: (null) slave orbd: (null) slave pack200: (null) slave rmid: (null) slave rmiregistry: (null) slave servertool: (null) slave tnameserv: (null) slave unpack200: (null) slave jre_exports: (null) slave jre: (null) slave java.1.gz: (null) slave keytool.1.gz: (null) slave orbd.1.gz: (null) slave pack200.1.gz: (null) slave rmid.1.gz: (null) slave rmiregistry.1.gz: (null) slave servertool.1.gz: (null) slave tnameserv.1.gz: (null) slave unpack200.1.gz: (null) La migliore versione attuale è /usr/lib/jvm/jre-1.7.0u04-sun-x64/bin/java. I translate for you (it's italian): java - status: manual. (first row) Best version is /usr/lib/jvm/jre-1.7.0u04-sun-x64/bin/java. (last row) I recreated the problem, restarting my laptop and not exporting the classpath with: export JAVA_HOME="/usr/java/latest" (this command solved my problem, but I have to redo it everytime I restart my laptop) Looks like you tried to manually install the Oracle JRE alternative. Such a configuration is unfortunately not supported so I will have to close this issue ( I wasn't aware that the proprietary JDK was being used). There is OpenJDK7 (java-1.7.0-openjdk{,-devel}) in Fedora that you can use instead. Or, if you absolutely must use the Oracle one, you can run rpm -q --scripts java-1.7.0-openjdk and rpm -q --scripts java-1.7.0-openjdk-devel and mimic the alternative install commands with appropriate path changes. Thanks a lot! I need the oracle one... but I can mange it in order to use what I need with arduino... thanks anyway... very usefull! I had this problem on F19 and fixed it by making a simlink to the missing directory. sudo ln -s java /usr/lib/java-1.7.0 Arduino now starts and runs. Just adding this as a helper if someone is looking for a solution. The bash -x /bin/arduino pointed me to the missing directory link. |