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.
Related
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.
I am trying to capture video via JMStudio.
When I try to run jmfinit it not detect my webcam and also the device is not listed in jmfregistry.
When I try to add a device manually it is giving me an error Could not add item
I have tried to run both (jmfinit and jmfregistry) as administrator and even tried to change the security settings but nothing seems to work.
I am using Windows 7
I re-installed OS also..
Please find snap shots of error message.
error popup message as shown in snapshot 1
I'm getting below error when i try to run my application
Exception in thread "VFW Request Thread" java.lang.UnsatisfiedLinkError: JMFSecurityManager: java.lang.UnsatisfiedLinkError: no jmvfw in java.library.path
at com.sun.media.JMFSecurityManager.loadLibrary(JMFSecurityManager.java:206)
at com.sun.media.protocol.vfw.VFWCapture.<clinit>(VFWCapture.java:19)
at com.sun.media.protocol.vfw.VFWSourceStream.doConnect(VFWSourceStream.java:241)
at com.sun.media.protocol.vfw.VFWSourceStream.run(VFWSourceStream.java:763)
at java.lang.Thread.run(Thread.java:745)
solution for above Problem..
JMF Studio is 32 bit supporting software so we must install 32bit supported JDK and also Eclipse then we not get any exceptions and errors.
Once Run your application then Automatically Your system webcam will "On".
JMF Studio is 32 bit it not support to 64bit OS/Eclipse,
and another reason is may be Environment variable not defined.
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 running a program written in java, deployed on an Oracle application Server, running 1.5 JVM.following is the stack trace:
Exception in thread "main" java.lang.NoSuchMethodError: com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.getNamespaceContext()Lcom/sun/org/apache/xerces/internal/xni/NamespaceContext;
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.<init>(XMLStreamReaderImpl.java:99)
at com.sun.xml.internal.stream.XMLInputFactoryImpl.getXMLStreamReaderImpl(XMLInputFactoryImpl.java:264)
at com.sun.xml.internal.stream.XMLInputFactoryImpl.createXMLStreamReader(XMLInputFactoryImpl.java:136)
at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory$Zephyr.newInstance(XMLStreamReaderFactory.java:251)
at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.<clinit>(XMLStreamReaderFactory.java:84)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:805)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:262)
at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:129)
at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:265)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:228)
at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:176)
at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104)
at javax.xml.ws.Service.<init>(Service.java:56)
at com.earthport.bind.MerchantAPIService.<init>(MerchantAPIService.java:50)
at com.earthport.client.service.stub.MerchantAPIClientImpl$1CustomMerchantAPIService. <init>(MerchantAPIClientImpl.java:107)
at com.earthport.client.service.stub.MerchantAPIClientImpl.createMerchantAPIService(MerchantAPI ClientImpl.java:111)
at com.earthport.client.service.stub.MerchantAPIClientImpl.<init> (MerchantAPIClientImpl.java:84)
at com.earthport.client.service.ServiceProxyFactoryImpl.createServiceProxy(ServiceProxyFactoryI mpl.java:25)
at utils.AmxEPAccCre.<init>(AmxEPAccCre.java:79)
at utils.WService.<init>(WService.java:95)
at utils.WService.main(WService.java:795)
Process exited.
If i run the exact same program with jdk 1.6 though, the program runs perfectly. Is this a specific issue with a library reference? anyone see this exception before?
cheers.
I bet you are having a conflict between the Xerces implementation that comes with your app or the Oracle AppServer, and the one that comes with the JDK.
It works with the one that comes in JDK6, but is not compatible with the one in JDK 5.