[ 
https://issues.apache.org/jira/browse/ACCUMULO-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13156839#comment-13156839
 ] 

Minh Duc Nguyen commented on ACCUMULO-185:
------------------------------------------

I ran make, but I got an error.  From what I can tell, I'm missing a "jni.h" 
file.  I couldn't find any such file looking through the directory tree.

[pegasus@server1 c++]$ make
cd nativeMap ; make
make[1]: Entering directory 
`/opt/accumulo-1.3.5-incubating-rc7/src/server/src/main/c++/nativeMap'
mkdir -p ../../../../../../lib/native/map
javah -classpath ../../../../../../lib/accumulo-server-1.3.5-incubating-rc7.jar 
org.apache.accumulo.server.tabletserver.NativeMap
g++ -g -fPIC -shared -O2 -fno-omit-frame-pointer -fno-strict-aliasing -Wall  
-I/include/linux -I/include -m64 -o libNativeMap-Linux-amd64-64.so 
org_apache_accumulo_server_tabletserver_NativeMap.cc util.cc 
In file included from org_apache_accumulo_server_tabletserver_NativeMap.cc:17:
org_apache_accumulo_server_tabletserver_NativeMap.h:2:17: error: jni.h: No such 
file or directory
org_apache_accumulo_server_tabletserver_NativeMap.h:15: error: ‘JNIEXPORT’ does 
not name a type
org_apache_accumulo_server_tabletserver_NativeMap.h:23: error: expected 
constructor, destructor, or type conversion before ‘void’
org_apache_accumulo_server_tabletserver_NativeMap.h:31: error: ‘JNIEXPORT’ does 
not name a type
org_apache_accumulo_server_tabletserver_NativeMap.h:39: error: expected 
constructor, destructor, or type conversion before ‘void’
org_apache_accumulo_server_tabletserver_NativeMap.h:47: error: ‘JNIEXPORT’ does 
not name a type
org_apache_accumulo_server_tabletserver_NativeMap.h:55: error: ‘JNIEXPORT’ does 
not name a type
org_apache_accumulo_server_tabletserver_NativeMap.h:63: error: ‘JNIEXPORT’ does 
not name a type
org_apache_accumulo_server_tabletserver_NativeMap.h:71: error: ‘JNIEXPORT’ does 
not name a type
org_apache_accumulo_server_tabletserver_NativeMap.h:79: error: ‘JNIEXPORT’ does 
not name a type
org_apache_accumulo_server_tabletserver_NativeMap.h:87: error: ‘JNIEXPORT’ does 
not name a type
org_apache_accumulo_server_tabletserver_NativeMap.h:95: error: expected 
constructor, destructor, or type conversion before ‘void’
org_apache_accumulo_server_tabletserver_NativeMap.h:103: error: ‘JNIEXPORT’ 
does not name a type
org_apache_accumulo_server_tabletserver_NativeMap.h:111: error: expected 
constructor, destructor, or type conversion before ‘void’
Field.h:50: error: ‘JNIEnv’ has not been declared
Field.h:50: error: ‘jbyteArray’ has not been declared
Field.h:56: error: ‘JNIEnv’ has not been declared
Field.h:56: error: ‘jbyteArray’ has not been declared
Field.h:87: error: ‘JNIEnv’ has not been declared
Field.h:87: error: ‘jbyteArray’ has not been declared
Field.h:107: error: ‘JNIEnv’ has not been declared
Field.h:107: error: ‘jbyteArray’ has not been declared
Field.h:112: error: ‘jbyteArray’ does not name a type
Field.h: In constructor ‘Field::Field(LinkedBlockAllocator*, int*, int, int)’:
Field.h:53: error: request for member ‘GetByteArrayRegion’ in ‘* env’, which is 
of non-class type ‘int’
Field.h:53: error: ‘jbyte’ was not declared in this scope
Field.h:53: error: expected primary-expression before ‘)’ token
Field.h: In constructor ‘Field::Field(LinkedBlockAllocator*, int*, int)’:
Field.h:57: error: request for member ‘GetArrayLength’ in ‘* env’, which is of 
non-class type ‘int’
Field.h:59: error: request for member ‘GetByteArrayRegion’ in ‘* env’, which is 
of non-class type ‘int’
Field.h:59: error: ‘jbyte’ was not declared in this scope
Field.h:59: error: expected primary-expression before ‘)’ token
Field.h: In member function ‘void Field::set(int*, int, int)’:
Field.h:92: error: request for member ‘GetByteArrayRegion’ in ‘* env’, which is 
of non-class type ‘int’
Field.h:92: error: ‘jbyte’ was not declared in this scope
Field.h:92: error: expected primary-expression before ‘)’ token
Field.h: In member function ‘void Field::fillIn(int*, int) const’:
Field.h:109: error: request for member ‘SetByteArrayRegion’ in ‘* env’, which 
is of non-class type ‘int’
Field.h:109: error: ‘jbyte’ was not declared in this scope
Field.h:109: error: expected primary-expression before ‘)’ token
Field.h: At global scope:
Field.h:132: error: expected `)' before ‘*’ token
SubKey.h:78: error: ‘JNIEnv’ has not been declared
SubKey.h:78: error: ‘jbyteArray’ has not been declared
SubKey.h:78: error: ‘jbyteArray’ has not been declared
SubKey.h:78: error: ‘jbyteArray’ has not been declared
SubKey.h:78: error: ‘jlong’ has not been declared
SubKey.h:78: error: ‘jboolean’ has not been declared
SubKey.h: In constructor ‘SubKey::SubKey(LinkedBlockAllocator*, int*, int, int, 
int, int, int, int32_t)’:
SubKey.h:80: error: request for member ‘GetArrayLength’ in ‘* env’, which is of 
non-class type ‘int’
SubKey.h:81: error: request for member ‘GetArrayLength’ in ‘* env’, which is of 
non-class type ‘int’
SubKey.h:82: error: request for member ‘GetArrayLength’ in ‘* env’, which is of 
non-class type ‘int’
SubKey.h:94: error: request for member ‘GetByteArrayRegion’ in ‘* env’, which 
is of non-class type ‘int’
SubKey.h:94: error: ‘jbyte’ was not declared in this scope
SubKey.h:94: error: expected primary-expression before ‘)’ token
SubKey.h:95: error: request for member ‘GetByteArrayRegion’ in ‘* env’, which 
is of non-class type ‘int’
SubKey.h:95: error: expected primary-expression before ‘)’ token
SubKey.h:96: error: request for member ‘GetByteArrayRegion’ in ‘* env’, which 
is of non-class type ‘int’
SubKey.h:96: error: expected primary-expression before ‘)’ token
SubKey.h: At global scope:
SubKey.h:185: error: expected `)' before ‘*’ token
NativeMap.h:128: error: expected ‘;’ before ‘(’ token
NativeMap.h:133: error: expected `;' before ‘ColumnMap’
NativeMap.h:151: error: ‘JNIEnv’ has not been declared
NativeMap.h:151: error: ‘jbyteArray’ has not been declared
NativeMap.h:151: error: ‘jbyteArray’ has not been declared
NativeMap.h:151: error: ‘jbyteArray’ has not been declared
NativeMap.h:151: error: ‘jlong’ has not been declared
NativeMap.h:151: error: ‘jboolean’ has not been declared
NativeMap.h:151: error: ‘jbyteArray’ has not been declared
NativeMap.h:151: error: ‘jint’ has not been declared
NativeMap.h: In member function ‘void NativeMap::update(ColumnMap*, int*, int, 
int, int, int, int, int, int)’:
NativeMap.h:164: error: request for member ‘GetArrayLength’ in ‘* env’, which 
is of non-class type ‘int’
org_apache_accumulo_server_tabletserver_NativeMap.cc: At global scope:
org_apache_accumulo_server_tabletserver_NativeMap.cc:32: error: ‘JNIEXPORT’ 
does not name a type
org_apache_accumulo_server_tabletserver_NativeMap.cc:36: error: ‘JNIEXPORT’ 
does not name a type
org_apache_accumulo_server_tabletserver_NativeMap.cc:41: error: ‘JNIEXPORT’ 
does not name a type
org_apache_accumulo_server_tabletserver_NativeMap.cc:46: error: expected 
constructor, destructor, or type conversion before ‘void’
org_apache_accumulo_server_tabletserver_NativeMap.cc:52: error: ‘JNIEXPORT’ 
does not name a type
org_apache_accumulo_server_tabletserver_NativeMap.cc:61: error: expected 
constructor, destructor, or type conversion before ‘void’
org_apache_accumulo_server_tabletserver_NativeMap.cc:67: error: ‘JNIEXPORT’ 
does not name a type
org_apache_accumulo_server_tabletserver_NativeMap.cc:75: error: ‘JNIEXPORT’ 
does not name a type
org_apache_accumulo_server_tabletserver_NativeMap.cc:92: error: ‘JNIEXPORT’ 
does not name a type
org_apache_accumulo_server_tabletserver_NativeMap.cc:113: error: ‘JNIEXPORT’ 
does not name a type
org_apache_accumulo_server_tabletserver_NativeMap.cc:126: error: expected 
constructor, destructor, or type conversion before ‘void’
make[1]: *** [libNativeMap-Linux-amd64-64.so] Error 1
make[1]: Leaving directory 
`/opt/accumulo-1.3.5-incubating-rc7/src/server/src/main/c++/nativeMap'
make: *** [nm] Error 2
[pegasus@server1 c++]$ ls
Makefile  mlock  nativeMap


[pegasus@server1 c++]$ find . -name "*.h" 
./mlock/accumulo_server_tabletserver_MLock.h
./nativeMap/org_apache_accumulo_server_tabletserver_NativeMap_ConcurrentIterator.h
./nativeMap/Key.h
./nativeMap/util.h
./nativeMap/BlockAllocator.h
./nativeMap/org_apache_accumulo_server_tabletserver_NativeMap_NMIterator.h
./nativeMap/org_apache_accumulo_server_tabletserver_NativeMap_NMEntry.h
./nativeMap/SubKey.h
./nativeMap/Field.h
./nativeMap/org_apache_accumulo_server_tabletserver_NativeMap_NMSKVIter.h
./nativeMap/org_apache_accumulo_server_tabletserver_NativeMap.h
./nativeMap/NativeMap.h
                
> Error in tserver.log: Failed to load native map library 
> --------------------------------------------------------
>
>                 Key: ACCUMULO-185
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-185
>             Project: Accumulo
>          Issue Type: Bug
>          Components: tserver
>    Affects Versions: 1.3.5
>         Environment: CentOS release 5.6
> single node Accumulo setup
>            Reporter: Minh Duc Nguyen
>            Assignee: Keith Turner
>            Priority: Minor
>
> Getting this error in tserver.log:
> 23 17:13:58,614 [tabletserver.NativeMap] ERROR: Failed to load native map 
> library /opt/accumulo/lib/native/map/libNativeMap-Linux-amd64-64.so
> java.lang.UnsatisfiedLinkError: Can't load library: 
> /opt/accumulo/lib/native/map/libNativeMap-Linux-amd64-64.so
>         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1706)
>         at java.lang.Runtime.load0(Runtime.java:770)
>         at java.lang.System.load(System.java:1003)
>         at 
> org.apache.accumulo.server.tabletserver.NativeMap.loadNativeLib(NativeMap.java:144)
>         at 
> org.apache.accumulo.server.tabletserver.NativeMap.<clinit>(NativeMap.java:156)
>         at 
> org.apache.accumulo.server.tabletserver.TabletServerResourceManager.<init>(TabletServerResourceManager.java:127)
>         at 
> org.apache.accumulo.server.tabletserver.TabletServer.config(TabletServer.java:2726)
>         at 
> org.apache.accumulo.server.tabletserver.TabletServer.main(TabletServer.java:2837)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.accumulo.start.Main$1.run(Main.java:89)
>         at java.lang.Thread.run(Thread.java:662)
> This file doesn't come packaged with Accumulo.  There is no lib/native 
> directory.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to