Hi,

I'm writing a program in C++ and trying to embed a Neo4j-Database. I 
successfully created some JNI-bindings to use the Neo4j-classes in C++, 
started a JVM-instance and set up an instance of a GraphDatabaseFactory. 
Though, the call to newEmbeddedDatabase("testdb") fails somewhere deep 
inside the JVM, and I'm not getting any exception, error-message or log 
that gives me a hint what is going on. I thought that I may get some 
further hints when I pack the newEmbeddedDatabase-call inside a method of a 
java-class, create a jar out of it (that now also contains the neo4j-jars), 
create the JNI-bindings for that class and call that new method from C++.

Turns out that this also crashes, although it created the testdb-directory 
and wrote the messages.log up to the "Network information:", so at least it 
does something.
I only have little knowledge of the JVM and JNI, so there may be a thousand 
reasons why it fails (wrong / missing arguments in the jvm-options, some 
kind of threading-issue, maybe some errors in my jni-bindings), and I'm not 
going to elaborate all of them, as this is more an experiment than a real 
use-case.

But out of curiosity, if someone managed it to start a Neo4j-instance via 
JNI, I would be glad to get some insights of the configuration.

I'm adding the output of the messages.log, as it should contain all 
necessary informations (java 7, mac os 10.9, neo4j 2.1.6 CE)

2015-01-24 00:40:48.567+0000 INFO  [org.neo4j]: No locking implementation 
specified, defaulting to 'community'
2015-01-24 00:40:48.643+0000 INFO  [org.neo4j]: --- INITIALIZED diagnostics 
START ---
2015-01-24 00:40:48.644+0000 INFO  [org.neo4j]: Neo4j Kernel properties:
    neostore.propertystore.db.mapped_memory=1285M
    neostore.nodestore.db.mapped_memory=357M
    neostore.relationshipstore.db.mapped_memory=1575M
    neostore.propertystore.db.strings.mapped_memory=1092M
    store_dir=testdb
    neostore.propertystore.db.arrays.mapped_memory=1238M
    ephemeral=false
2015-01-24 00:40:48.646+0000 INFO  [org.neo4j]: Diagnostics providers:
    org.neo4j.kernel.configuration.Config
    org.neo4j.kernel.info.DiagnosticsManager
    SYSTEM_MEMORY
    JAVA_MEMORY
    OPERATING_SYSTEM
    JAVA_VIRTUAL_MACHINE
    CLASSPATH
    LIBRARY_PATH
    SYSTEM_PROPERTIES
    NETWORK
2015-01-24 00:40:48.646+0000 INFO  [org.neo4j]: System memory information:
    Total Physical memory: 16.00 GB
    Free Physical memory: 220.08 MB
    Committed virtual memory: 6.74 GB
    Total swap space: 1.00 GB
    Free swap space: 1.00 GB
2015-01-24 00:40:48.651+0000 INFO  [org.neo4j]: JVM memory information:
    Free  memory: 233.76 MB
    Total memory: 247.50 MB
    Max   memory: 3.94 GB
    Garbage Collector: ParNew: [Par Eden Space, Par Survivor Space]
    Garbage Collector: ConcurrentMarkSweep: [Par Eden Space, Par Survivor 
Space, CMS Old Gen, CMS Perm Gen]
    Memory Pool: Code Cache (Non-heap memory): committed=2.44 MB, 
used=477.38 kB, max=48.00 MB, threshold=0.00 B
    Memory Pool: Par Eden Space (Heap memory): committed=68.31 MB, 
used=13.74 MB, max=532.56 MB, threshold=?
    Memory Pool: Par Survivor Space (Heap memory): committed=8.50 MB, 
used=0.00 B, max=66.50 MB, threshold=?
    Memory Pool: CMS Old Gen (Heap memory): committed=170.69 MB, used=0.00 
B, max=3.35 GB, threshold=0.00 B
    Memory Pool: CMS Perm Gen (Non-heap memory): committed=20.75 MB, 
used=6.24 MB, max=82.00 MB, threshold=0.00 B
2015-01-24 00:40:48.655+0000 INFO  [org.neo4j]: Operating system 
information:
    Operating System: Mac OS X; version: 10.9.5; arch: x86_64; cpus: 8
    Max number of file descriptors: 10240
    Number of open file descriptors: 18
    Process id: 20050@localhost
    Byte order: LITTLE_ENDIAN
    Local timezone: Europe/Berlin
2015-01-24 00:40:48.658+0000 INFO  [org.neo4j]: JVM information:
    VM Name: Java HotSpot(TM) 64-Bit Server VM
    VM Vendor: Oracle Corporation
    VM Version: 24.75-b04
    JIT compiler: HotSpot 64-Bit Tiered Compilers
    VM Arguments: [-Xmx4096m, -XX:+DisableExplicitGC, 
-XX:+UseConcMarkSweepGC, -XX:+CMSClassUnloadingEnabled, 
-XX:-OmitStackTraceInFastThrow, -Djava.awt.headless=true]
2015-01-24 00:40:48.659+0000 INFO  [org.neo4j]: Java classpath:
     [loader.1] file:/System/Library/Java/Extensions/dns_sd.jar
     [bootstrap] 
/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib/resources.jar
     [loader.1] file:/System/Library/Java/Extensions/j3dutils.jar
     [loader.1] file:/System/Library/Java/Extensions/MRJToolkit.jar
     [loader.1] file:/System/Library/Java/Extensions/jai_core.jar
     [loader.1] 
file:/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib/ext/dnsns.jar
     [bootstrap] 
/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib/sunrsasign.jar
     [loader.1] file:/System/Library/Java/Extensions/vecmath.jar
     [loader.1] file:/System/Library/Java/Extensions/libmlib_jai.jnilib
     [loader.1] file:/System/Library/Java/Extensions/jai_codec.jar
     [bootstrap] 
/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib/charsets.jar
     [loader.1] 
file:/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib/ext/zipfs.jar
     [loader.1] 
file:/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib/ext/localedata.jar
     [bootstrap] 
/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib/jfr.jar
     [loader.1] file:/System/Library/Java/Extensions/libJ3D.jnilib
     [bootstrap] 
/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib/jsse.jar
     [loader.1] file:/System/Library/Java/Extensions/mlibwrapper_jai.jar
     [bootstrap] 
/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/classes
     [loader.1] file:/System/Library/Java/Extensions/QTJava.zip
     [classpath + loader.0] 
file:/Users/xxx/develop/SerializeToNeo4j/Neo4jTests.jar
     [loader.1] 
file:/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar
     [bootstrap] 
/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib/rt.jar
     [loader.1] file:/System/Library/Java/Extensions/libJ3DAudio.jnilib
     [loader.1] 
file:/System/Library/Java/Extensions/libAppleScriptEngine.jnilib
     [loader.1] 
file:/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar
     [bootstrap] 
/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib/jce.jar
     [loader.1] file:/System/Library/Java/Extensions/AppleScriptEngine.jar
     [loader.1] file:/System/Library/Java/Extensions/j3daudio.jar
     [loader.1] file:/System/Library/Java/Extensions/libJ3DUtils.jnilib
     [loader.1] file:/System/Library/Java/Extensions/libQTJNative.jnilib
     [loader.1] 
file:/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib/ext/sunec.jar
     [loader.1] file:/System/Library/Java/Extensions/j3dcore.jar
     [loader.1] file:/usr/lib/java/libjdns_sd.jnilib
2015-01-24 00:40:48.660+0000 INFO  [org.neo4j]: Library path:
    
/Users/xxx/Library/Developer/Xcode/DerivedData/SerializeToNeo4j-bpqlhwthxyfzapgqlrlnxberxwnh/Build/Products/Debug
    /usr/lib/system/introspection
    /Users/xxx/Library/Java/Extensions
    /Library/Java/Extensions
    /Network/Library/Java/Extensions
    /System/Library/Java/Extensions
    /usr/lib/java
    /Users/xxx/develop/testproject
2015-01-24 00:40:48.660+0000 INFO  [org.neo4j]: System.properties:
    sun.boot.library.path = 
/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre/lib
    user.country.format = DE
    gopherProxySet = false
    path.separator = :
    file.encoding.pkg = sun.io
    user.country = US
    sun.os.patch.level = unknown
    user.dir = /Users/xxx/develop/testproject
    sun.jnu.encoding = UTF-8
    sun.management.compiler = HotSpot 64-Bit Tiered Compilers
    http.nonProxyHosts = local|*.local|169.254/16|*.169.254/16
    user.home = /Users/xxx
    user.timezone = Europe/Berlin
    file.encoding = UTF-8
    user.name = xxx
    sun.arch.data.model = 64
    user.language = en
    awt.toolkit = sun.lwawt.macosx.LWCToolkit
    file.separator = /
    sun.io.unicode.encoding = UnicodeBig
    sun.cpu.endian = little
    socksNonProxyHosts = local|*.local|169.254/16|*.169.254/16
    ftp.nonProxyHosts = local|*.local|169.254/16|*.169.254/16
    sun.cpu.isalist = 
2015-01-24 00:40:48.661+0000 INFO  [org.neo4j]: Network information:
    Interface en0:
        address: xxx
        address: xxx
    Interface lo0:
        address: fe80:0:0:0:0:0:0:1%1
        address: 0:0:0:0:0:0:0:1
        address: 127.0.0.1


-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to