I am trying to use the MCRTsim simulator in my research work. As documented in https://resl.csie.nptu.edu.tw/dokuwiki/doku.php?id=guide, I run this command java -jar MCRTsim/dist/MCRTsim2.8.jar in specified directory, but the simulation window did not pop up. Instead, I got following exceptions:
Exception in thread "main" java.lang.NullPointerException
at java.base/java.io.Reader.<init>(Reader.java:167)
at java.base/java.io.InputStreamReader.<init>(InputStreamReader.java:109)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:2440)
at org.apache.commons.io.IOUtils.toString(IOUtils.java:1084)
at org.apache.commons.io.IOUtils.toString(IOUtils.java:1110)
at userInterface.frontEnd.SimulationViewer.setComboBox(SimulationViewer.java:529)
at userInterface.frontEnd.SimulationViewer.initialize(SimulationViewer.java:359)
at userInterface.frontEnd.SimulationViewer.<init>(SimulationViewer.java:97)
at userInterface.UserInterface.initialize(UserInterface.java:45)
at userInterface.UserInterface.<init>(UserInterface.java:31)
at mcrtsim.MCRTsim.main(MCRTsim.java:55)
I am using Ubuntu system and JDK 11. I have not used Java much. I am not able to understand what this error is saying. Would anyone please help me with this?
Finally, I got the solution to this problem. I think this simulator is compatible with openjdk-8. So, I removed openjdk-11 from my system and installed openjdk-8.
After installing openjdk-8, I run the command java -jar dist/MCRTsim2.8.jar . This time I got the following error:
Exception in thread "main" java.awt.AWTError: Assistive Technology not
found: org.GNOME.Accessibility.AtkWrapper
at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:807)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:886)
at java.awt.Window.getToolkit(Window.java:1358)
at java.awt.Window.init(Window.java:506)
at java.awt.Window.<init>(Window.java:537)
at java.awt.Frame.<init>(Frame.java:420)
at javax.swing.JFrame.<init>(JFrame.java:233)
at userInterface.UserInterface.initialize(UserInterface.java:37)
at userInterface.UserInterface.<init>(UserInterface.java:31)
at mcrtsim.MCRTsim.main(MCRTsim.java:55)
After that, I followed this blog https://askubuntu.com/questions/695560/assistive-technology-not-found-awterror to rectify the above error.
I just commented this line #assistive_technologies=org.GNOME.Accessibility.AtkWrapper in /etc/java-8-openjdk/accessibility.properties file.
And, it started working.
Related
Here is the error I'm getting. Tried to open other version of ireport and didn't encountered any errors.
Exception in thread "main" java.lang.IllegalArgumentException: port out of range:1313821769
at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143)
at java.net.InetSocketAddress.<init>(InetSocketAddress.java:188)
at java.net.Socket.<init>(Socket.java:244)
at org.netbeans.CLIHandler.initialize(CLIHandler.java:661)
at org.netbeans.CLIHandler.initialize(CLIHandler.java:346)
at org.netbeans.MainImpl.execute(MainImpl.java:195)
at org.netbeans.MainImpl.main(MainImpl.java:76)
at org.netbeans.Main.main(Main.java:75)
I am using java 7 on my ireport.conf, also I am using Ubuntu
jdkhome="/usr/jdk1.7.0_55.for.tmpfs/"
The application is working fine this morning and this just happens,
I've tried search for solutions but the only solutions I found on the internet is to check whether I am using java 7 which I am.
I guess the port has something to do with this but I'm not sure where to start.
Problem is with the lock file.
Try to find it using this command:
find /home/your_user_name -name lock
It will be located in path like /home/your_user_name/.ireport/4.5.1/lock
Delete this file and try to start iReport again.
When I run the uiautomatorviewer, I get the following error:
/android-sdk-linux/tools$
uiautomatorviewerException in thread "main" java.lang.NoSuchMethodError: com.ibm.icu.util.ULocale.getExtensionKeys()Ljava/util/Set;
at com.ibm.icu.util.ULocale$Builder.setLocale(ULocale.java:4011)
at com.ibm.icu.impl.javaspi.ICULocaleServiceProvider.addULocale(ICULocaleServiceProvider.java:204)
at com.ibm.icu.impl.javaspi.ICULocaleServiceProvider.getLocales(ICULocaleServiceProvider.java:140)
at com.ibm.icu.impl.javaspi.ICULocaleServiceProvider.getAvailableLocales(ICULocaleServiceProvider.java:53)
at com.ibm.icu.impl.javaspi.text.DecimalFormatSymbolsProviderICU.getAvailableLocales(DecimalFormatSymbolsProviderICU.java:28)
at sun.util.LocaleServiceProviderPool.getProviderLocales(LocaleServiceProviderPool.java:235)
at sun.util.LocaleServiceProviderPool.getLocalizedObjectImpl(LocaleServiceProviderPool.java:370)
at sun.util.LocaleServiceProviderPool.getLocalizedObject(LocaleServiceProviderPool.java:303)
at java.text.DecimalFormatSymbols.getInstance(DecimalFormatSymbols.java:150)
at java.util.Formatter.getZero(Formatter.java:2251)
at java.util.Formatter.<init>(Formatter.java:1877)
at java.util.Formatter.<init>(Formatter.java:1898)
at java.lang.String.format(String.java:2792)
at com.android.ddmlib.AndroidDebugBridge.checkAdbVersion(AndroidDebugBridge.java:583)
at com.android.ddmlib.AndroidDebugBridge.<init>(AndroidDebugBridge.java:559)
at com.android.ddmlib.AndroidDebugBridge.createBridge(AndroidDebugBridge.java:319)
at com.android.uiautomator.DebugBridge.init(DebugBridge.java:68)
at com.android.uiautomator.UiAutomatorViewer.main(UiAutomatorViewer.java:71)
could anybody help me out?
thanks for your time.
Since my tools/ directory is not added in the PATH. I used $./uiautomatorviewer command to run my uiautomatorviewer and it worked. Thanks #DiegoTorresMilano for the suggestion
Anyone know how to get JFugue to work on MacOS X 10.10 / JDK 8, talking to a default synthesiser? Even trivial examples which work fine on Windows give results like this, indicating a failure to find a default synth:
Exception in thread "main" java.lang.NullPointerException
at javax.sound.midi.MidiSystem.getFirstDevice(MidiSystem.java:1355)
at javax.sound.midi.MidiSystem.getFirstDevice(MidiSystem.java:1411)
at javax.sound.midi.MidiSystem.getFirstDevice(MidiSystem.java:1378)
at javax.sound.midi.MidiSystem.getDefaultDevice(MidiSystem.java:1165)
at javax.sound.midi.MidiSystem.getDefaultDeviceWrapper(MidiSystem.java:1115)
at javax.sound.midi.MidiSystem.getSynthesizer(MidiSystem.java:351)
at javax.sound.midi.MidiSystem.getSequencer(MidiSystem.java:458)
at javax.sound.midi.MidiSystem.getSequencer(MidiSystem.java:392)
at org.jfugue.player.SequencerManager.getDefaultSequencer(SequencerManager.java:55)
at org.jfugue.player.SequencerManager.<init>(SequencerManager.java:50)
at org.jfugue.player.SequencerManager.getInstance(SequencerManager.java:41)
at org.jfugue.player.ManagedPlayer.<init>(ManagedPlayer.java:47)
at org.jfugue.player.Player.<init>(Player.java:46)
at FirstJFugueApp.main(FirstJFugueApp.java:11)
Fixed it!
I had an old file plumstoneserv.jar in my path which was stopping things working.
I have a program that uses Sqlite database. It works fine on Windows (exported jar or directly in Eclipse) but when I move it to linux server (plan is to use run it at certain intervals, cron job). I'm exporting it to jar from Eclipse and packing the sqlite-jdbc4-3.8.2-SNAPSHOT.jar with it. Error is this:
/$ /usr/bin/java -jar /home/username/Software.jar /home/username/
java.lang.UnsatisfiedLinkError: /tmp/sqlite-3.8.2-amd64-libsqlitejdbc.so: /tmp/sqlite-3.8.2-amd64-libsqlitejdbc.so: failed to map segment from shared object: Operation not permitted
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(Ljava/lang/String;I)V
at org.sqlite.core.NativeDB._open(Native Method)
at org.sqlite.core.DB.open(DB.java:161)
at org.sqlite.core.CoreConnection.open(CoreConnection.java:145)
at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:66)
at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:21)
at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:23)
at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:44)
at org.sqlite.JDBC.createConnection(JDBC.java:113)
at org.sqlite.JDBC.connect(JDBC.java:87)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
....
So before you ask, I've made sure that sqlite-3.8.2-amd64-libsqlitejdbc.so in /tmp/ has all permissions (rwxrwxrwx). Still that native library is causing problems. It does get copied in /tmp/ folder though. That being said I totally suck in Linux... and for that reason I'm pretty much clueless what to try next.
What should I do? Switch connector?
EDIT:
Solved the problem by using System.setProperty("java.io.tmpdir", "/home/username/"); Apparently it for some reason couldn't execute the native library from tmp folder... Probably because it was created by root. Also I had to revert back to sqlite-jdbc-3.7.2.jar because the new one crashes on linux.
I had same problem, and I found the solution in this GitHub issue:
JAVA_OPTS=-Djava.io.tmpdir=/path/to/some/other/tmpdir bin/cerebro
Also look at this other SO answer.
I'm trying to install Play 2.2 on a fresh MacBook Pro with Java 7. Scala has already been installed. Here's what I get:
Okihara-MacBook-Pro:Extensions okihara$ play help
Exception in thread "main" java.lang.IncompatibleClassChangeError: Expected static method scala.Array$.unapplySeq(Ljava/lang/Object;)Lscala/Option;
at xsbt.boot.Boot$.main(Boot.scala:14)
at xsbt.boot.Boot.main(Boot.scala)
I saw Issue getting SBT to work on Mac OS X but there's no conclusive answer. I tried running the Scala REPL and that seems to work well too.
I only used Play on Linux before, this is my first attempt to install it on OS X.
Where should I look?
EDIT
As done in the other SO question, I get the above message with the scala-* jars in the Library/Java/Extensions folder. If I remove them, I get:
Okihara-MacBook-Pro:Extensions okihara$ play
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.ivy.core.RelativeUrlResolver.$init$$6ce060cb(Lscala/collection/mutable/HashTable$HashUtils;)V
at scala.collection.mutable.HashMap.<init>(HashMap.scala:39)
at scala.collection.mutable.HashMap.<init>(HashMap.scala:55)
at scala.collection.mutable.Map$.empty$7fee4dfc(Map.scala:68)
at scala.collection.generic.MutableMapFactory.newBuilder(MutableMapFactory.scala:29)
at scala.collection.generic.GenMapFactory.apply$41cb962a(GenMapFactory.scala:47)
at scala.sys.SystemProperties$.propertyHelp$lzycompute(SystemProperties.scala:62)
at scala.sys.SystemProperties$.noTraceSupression$lzycompute(SystemProperties.scala:80)
at scala.sys.SystemProperties$.noTraceSupression(SystemProperties.scala:80)
at scala.util.control.NoStackTrace$.<init>(NoStackTrace.scala:31)
at scala.util.control.NoStackTrace$.<clinit>(NoStackTrace.scala)
at scala.util.control.BreakControl.fillInStackTrace(Breaks.scala:93)
at java.lang.Throwable.<init>(Throwable.java:250)
at scala.util.control.BreakControl.<init>(Breaks.scala:93)
at scala.util.control.Breaks.<init>(Breaks.scala:28)
at scala.collection.Traversable$.<init>(Traversable.scala:96)
at scala.collection.Traversable$.<clinit>(Traversable.scala)
at scala.package$.<init>(package.scala:46)
at scala.package$.<clinit>(package.scala)
at scala.Predef$.<init>(Predef.scala:90)
at scala.Predef$.<clinit>(Predef.scala)
at scala.Array$.unapplySeq(Array.scala:443)
at xsbt.boot.Boot$.main(Boot.scala:14)
at xsbt.boot.Boot.main(Boot.scala)
Removing ivy-*.jar from /Library/Java/Extensions solved the
issue.
FWIW, I also have no scala*.jar in the extensions folder and I'm running Java 1.7.0_21. Play is symlinked as advised. HTH.