2025-07-21 09:43 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003079Spring engineLinuxpublic2012-05-08 14:52
Reportercazfi 
Assigned Tohoijui 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version89.0 
Target VersionFixed in Version89.0 
Summary0003079: Compilation failure due to undefined JNI error values
DescriptionJNI_ENOMEM, JNI_EEXIST, and E_INVAL are not defined leading to compilation failure when they are used. Googling hinted that this is due to gcj version in use, but I have not investigated that further.

Attached patch makes use of those values conditional, and with this patch compilation success in my system.
I have not tested this on any system that has those values defined.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • diff file icon OptJNIErr.diff (1,019 bytes) 2012-05-04 15:15 -
    diff --git a/AI/Interfaces/Java/src/main/native/JniUtil.c b/AI/Interfaces/Java/src/main/native/JniUtil.c
    index b10bcbd..478ffb6 100644
    --- a/AI/Interfaces/Java/src/main/native/JniUtil.c
    +++ b/AI/Interfaces/Java/src/main/native/JniUtil.c
    @@ -21,9 +21,15 @@ const char* jniUtil_getJniRetValDescription(const jint retVal) {
     		case JNI_ERR:       { return "JNI_ERR - unknown error"; break; }
     		case JNI_EDETACHED: { return "JNI_EDETACHED - thread detached from the VM"; break; }
     		case JNI_EVERSION:  { return "JNI_EVERSION - JNI version error"; break; }
    +#ifdef JNI_ENOMEM
     		case JNI_ENOMEM:    { return "JNI_ENOMEM - not enough (contiguous) memory"; break; }
    +#endif /* JNI_ENOMEM */
    +#ifdef JNI_EEXIST
     		case JNI_EEXIST:    { return "JNI_EEXIST - VM already created"; break; }
    +#endif /* JNI_EEXIST */
    +#ifdef JNI_EINVAL
     		case JNI_EINVAL:    { return "JNI_EINVAL - invalid arguments"; break; }
    +#endif /* JNI_EINVAL */
     		default:            { return "UNKNOWN - unknown/invalid JNI return value"; break; }
     	}
     }
    
    diff file icon OptJNIErr.diff (1,019 bytes) 2012-05-04 15:15 +

-Relationships
+Relationships

-Notes

~0008673

hoijui (reporter)

hey cazfi, thanks for the patch! :-)
it is in develop now, and will be in the next (mayor) release.
https://github.com/spring/spring/commit/c6f67d7c44a49b09c4ce3166b5e7d65df9441918
+Notes

-Issue History
Date Modified Username Field Change
2012-05-04 15:15 cazfi New Issue
2012-05-04 15:15 cazfi File Added: OptJNIErr.diff
2012-05-08 14:52 hoijui Note Added: 0008673
2012-05-08 14:52 hoijui Status new => resolved
2012-05-08 14:52 hoijui Fixed in Version => 89.0
2012-05-08 14:52 hoijui Resolution open => fixed
2012-05-08 14:52 hoijui Assigned To => hoijui
+Issue History