I am trying to run some JUnit tests over cassandra. But I get the following error:
[08/12/19 10:48:40:411](main)([]) INFO - c.h.c.c.e.EmbeddedCassandra - Starting embedded Cassandra server.
8/12/19 10:48:41:497](main)([]) ERROR - o.a.c.u.NativeLibraryDarwin - Failed to link the C library against JNA. Native methods will be unavailable.
java.lang.UnsatisfiedLinkError: /private/var/folders/ty/wl4gxf352m328101m101hwh40000gn/T/jna--321969061/jna10641195286884112036.tmp: dlopen(/private/var/folders/ty/wl4gxf352m328101m101hwh40000gn/T/jna--321969061/jna10641195286884112036.tmp, 1): no suitable image found. Did find:
/private/var/folders/ty/wl4gxf352m328101m101hwh40000gn/T/jna--321969061/jna10641195286884112036.tmp: code signature in (/private/var/folders/ty/wl4gxf352m328101m101hwh40000gn/T/jna--321969061/jna10641195286884112036.tmp) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
It was running well until I changed to mac mojave and re-setup everything. I think it is an issue related to permissions may be or JNA?
IDE: IntelliJ
Java: AdoptOpenJDK 11.0.4
JNA: 4.2.2
Any kind of help will be highly appreciated!
This is the result of a bug in AdoptOpenJDK jdk-11.0.4+11 on macOS, persisting through 11.2.
It will be fixed in the jdk-11.0.4+11.3 release.
If you can't wait for the new release you can temporarily resolve by downgrading to 11.0.3+7
What version of cassandra unit? Support for java 11 (https://issues.apache.org/jira/browse/CASSANDRA-9608) isn't in until cassandra 4 and I dont think embedded cassandra is setup for that yet
Related
I am using an M1 MBP running Monterey and trying to connect to an oracle database to pull data into R. Currently I am trying to setup RJDBC but am open to other options if there is something easier to use.
When I try to load RJDBC I am getting:
Loading required package: rJava
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(jli, FALSE)
error: unable to load shared object '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib':
dlopen(/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib, 0x000A): tried: '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/libjli.dylib' (no such file)
Error: package ‘rJava’ could not be loaded
I have seen a few similar posts:
How to install rJava package in Mac with M1 architecture
Problem with R studio on Mac with Monterey and arm system
And am wondering what the best course of action here is. Would it be better to try and instal the arm version of java or the arm version of R?
JavaAppletPlugin no longer exists.
Java Applet technology has been retired, phased out across all platforms including macOS.
See Oracle white paper, Java Client Roadmap Update.
Contact the app publisher for an updated modern release. The release you have must be from many years ago.
Resolved by downloading ARM version of java:
https://www.oracle.com/java/technologies/downloads/#jdk17-mac
I am getting the following error while trying to start cassandra.
My configuration is as follows:
OS:Windows 10
Cassandra:3.11
jdk:1.9
As per JIRA, current latest cassandra 3.11 is still not fully supported for java 1.9. Hence, I would recommend you to try again with java 1.8.
Windows 7, java 8, Neo4j 3.0.0-M03, initial install of structr.
When I first try to run the program I'm getting this error:
SEVERE: Vital service HttpService failed to start: No resource provider available for servlet JsonRestServlet. Aborting
Reading the Google Groups the report is that structr is only good up to 2.2.6 - looking at the Neo4j Release Page 2.2.6 has been skipped - it goes from 2.1.8 to 2.2.8.
My question is what version should I use?
Also - is java 7 still a requirement? Looking at the Oracle website I'm seeing that 7 has been deprecated and won't be patched.
The most recent pre-built versions of Structr are built against and embed Neo4j 2.2.8.
To use with custom Neo4j versions, you can to build your own driver, see https://github.com/structr/structr-neo4j-driver. Should work with any 2.x version of Neo4j.
On the Java side, Java JDK 8 is a requirement.
I was trying to upgrade my cassandra 1.2.13 to cassandra 2.0.5 but I was having some issues. I was follwing the instructions here:
https://github.com/apache/cassandra/blob/trunk/NEWS.txt
it says:
2.0.5
=====
...
Upgrading
---------
- If your cluster began on a version before 1.2, check that your secondary
index SSTables are on version 'ic' before upgrading. If not, run
'nodetool upgradesstables' if on 1.2.14 or later, or run 'nodetool
upgradesstables ks cf' with the keyspace and secondary index named
explicitly otherwise...
So since I have not initialized anything (any tables/kspaces and stuff) that matters I did:
nodetool upgradesstables
However when I do that command the following error is thrown at me:
objc[88756]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
I tried googling that error but was still unsure how to proceed. Does someone know how to fix this without screwing up java environment?
I have a MAC OS X 10.9.1
it's a bug in JDK 1.7.0_45. you must upgrade your jdk.
see also Class JavaLaunchHelper is implemented in both. One of the two will be used. Which one is undefined
I want to do something with the HypergraphDB in Java. I'm not very familiar with this language and IDE Netbeans.
I followed steps describing the HGDB installation:Link to tutorial
Now I want to write an example in Java (using NetbeansIDE).
So I created new project, added refferences to the downloaded libraries. OK, now I'm able to import packages with HGDB. The only thing I have in my main method is HyperGraph HG = new HyperGraph(dbLocation);. This code compiles. But get following runtime error:
run:
checkpoint kbytes:0
checkpoint minutes:0
java.lang.IllegalStateException: There is 1 existing transaction opened against the Environment.
Aborting open transactions ...
aborting <Transaction id="28">
at com.sleepycat.je.Environment.close(Environment.java:383)
at org.hypergraphdb.storage.bje.BJEStorageImplementation.shutdown(BJEStorageImplementation.java:178)
at org.hypergraphdb.HGStore.close(HGStore.java:355)
at org.hypergraphdb.HyperGraph.open(HyperGraph.java:392)
at org.hypergraphdb.HyperGraph.open(HyperGraph.java:213)
at org.hypergraphdb.HyperGraph.<init>(HyperGraph.java:200)
at hgdbtest.HgdbTest.main(HgdbTest.java:16)
Exception in thread "main" org.hypergraphdb.HGException: java.lang.NoSuchMethodError: org.hypergraphdb.storage.bje.LinkBinding.objectToEntry(Ljava/lang/Object;Lcom/sleepycat/je/DatabaseEntry;)V
at org.hypergraphdb.HyperGraph.open(HyperGraph.java:395)
at org.hypergraphdb.HyperGraph.open(HyperGraph.java:213)
at org.hypergraphdb.HyperGraph.<init>(HyperGraph.java:200)
at hgdbtest.HgdbTest.main(HgdbTest.java:16)
Caused by: java.lang.NoSuchMethodError: org.hypergraphdb.storage.bje.LinkBinding.objectToEntry(Ljava/lang/Object;Lcom/sleepycat/je/DatabaseEntry;)V
at org.hypergraphdb.storage.bje.BJEStorageImplementation.store(BJEStorageImplementation.java:234)
at org.hypergraphdb.HGStore.store(HGStore.java:119)
at org.hypergraphdb.HGTypeSystem.addPrimitiveTypeToStore(HGTypeSystem.java:185)
at org.hypergraphdb.HGTypeSystem.bootstrap(HGTypeSystem.java:234)
at org.hypergraphdb.HyperGraph.open(HyperGraph.java:355)
... 3 more
Java Result: 1
BUILD SUCCESSFUL (total time: 4 seconds)
I guess it's caused by the native API of the BerkeleyDB.
According to the tutorial, in project options I supply the -Djava.library.path=$HGDB_ROOT/lib/native/$PLATFORM argument on Run card as a VM Option. Instead of the system variables I use full-path to the libraries.
My OS in Windows7. I'm not sure about using slashes or backslashes or double-backslashes as a path-separator.?
So a simply question is: how have I to set up the IDE for using the HypergraphDB?
Thank you for advices!
Judging from the stack trace, you are using the latest version of HyperGraphDB. In that version, the native API is not used. Rather, it's Java only libraries. You have to include the BerkeleyDB Java Edition 5.0.34 jar in your runtime classpath. You can get it either from the Oracle http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html or from the HyperGraphDB Maven repository: http://hypergraphdb.org/maven/org/hypergraphdb/hgbdbje/1.2/hgbdbje-1.2.jar
I had the same issue. I fixed it (by accident) by fixing the order of the libraries on which you're HyperGraphDB application relies on. The library je-[version].jar has to be ABOVE (and hence to be referenced before) db-[version].jar