Avatar.js on SPARC - oracle

Node JS application is working fine with Linux, windows and Solaris. But Node JS is not working in SPARC system because it is not supporting V8 engine.
Myself found a External project called AVATAR, which is used to run NODE JS Programs in JVM (Java Virtual Machine) using the JAVA 8 inbuilt JavaScript Engine – Nashron.
In their official site they have provided me (.so) file for Linux, (.dll) file for Windows using that we compiled the program. By using those files (.so & .dll) we successfully executed Node JS programs in Linux, windows with JAVA 8.
I used same linux (.so) file to run on SPARC platform and it throws below error.
Error Occurred :
-bash-4.1$ java -Djava.library.path=dist -jar dist/avatar-js.jar HttpServer.js
Exception in thread "main" java.lang.UnsatisfiedLinkError: /export/home/thiru/LinuxAVatar/dist/libavatar-js.so: ld.so.1: java: fatal: /export/home/thiru/LinuxAVatar/dist/libavatar-js.so: wrong ELF data format: ELFDATA2LSB (Possible cause: endianness mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1854)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at com.oracle.libuv.LibUV.<clinit>(LibUV.java:33)
at com.oracle.avatar.js.Server.<init>(Server.java:166)
at com.oracle.avatar.js.Server.<init>(Server.java:140)
at com.oracle.avatar.js.Server.<init>(Server.java:128)
at com.oracle.avatar.js.Server.main(Server.java:122)
I have attached the basic HTTP Server Program in NODE JS which I used to run in JVM using avatar.
Could you please provide some feasibility for the below points:
1.Running NODE JS on SPARC system,
2.Is there any build for that .so file for SPARC,
3.shall I use any other Java Script Engines instead of Nashron in SPARC (ex: Spider Monkey).
Link For Official Site: https://avatar-js.java.net/
Procedure to run Avatar : http://blog.jonasbandi.net/2014/03/running-nodejs-applications-on-jvm-with.html
Version of Oracle Solaris OS : Oracle Solaris 11.3 SPARC
JAVA Version :
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java Hotspot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
Thanks in Advance.
var http = require('http');
var server = http.createServer(function (request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.end("Hello World\n");
});
server.listen(8000);
console.log("Server running at http://127.0.0.1:8585/");

Project Avatar from Oracle is dead.
Officially it's called "development is on hold", but... you know!
See also my blogpost about this: http://www.n-k.de/2015/02/current-status-of-oracles-project-avatar.html
The mentioned alternative "Nodyn" is also dead.
So, you have to look for another option to run node.js on your desired platform.

Related

Unlimited Security (Jasypt/WebSphere)

I am trying to encrypt a few password in a properties file using an Ant script. When I run the Ant script I get:
java.lang.RuntimeException: Security Error in doEncrypt: org.jasypt.exceptions.EncryptionInitializationException: java.security.NoSuchAlgorithmException: PBEWithHMACSHA512AndAES_256 SecretKeyFactory not available
this is with org.jasypt.util.text.AES256TextEncryptor. So I tried to move to PooledPBEStringEncryptor and that throws org.jasypt.exceptions.EncryptionOperationNotPossibleException
I have this in the code for the latter:
Security.setProperty("crypto.policy", "unlimited");
pooledPBEStringEncryptor = new PooledPBEStringEncryptor();
pooledPBEStringEncryptor.setPassword(encryptionKey);
pooledPBEStringEncryptor.setAlgorithm("PBEWITHHMACSHA512AND256BITAES");
pooledPBEStringEncryptor.setPoolSize(4);
pooledPBEStringEncryptor.setSaltGenerator(new RandomSaltGenerator());
This is how I initialize the object.
I am on WebSphere 8.5.5.10 and JAVA8 on a Unix system. My JDK version is:
java version "1.8.0"
Java(TM) SE Runtime Environment (build pxa6480sr3ifix-20160713_01(SR3+IX90174+IV85763))
IBM J9 VM (build 2.8, JRE 1.8.0 Linux amd64-64 Compressed References 20160713_311397 (JIT enabled, AOT enabled)
J9VM - R28_Java8_SR3_20160713_0915_B311397
JIT - tr.r14.java.green_20160329_114288
GC - R28_Java8_SR3_20160713_0915_B311397_CMPRSS
J9CL - 20160713_311397)
JCL - 20160421_01 based on Oracle jdk8u91-b14
Any advise would be nice. I searched for IBM WebSpehre forums, but couldn't find any. Thanks in advance.
This may help:
How to verify the Unlimited Strength Jurisdiction Policy Files used
on local_policy.jar & US_export_policy.jar and also How to check the
list of ciphers used by IBM Java?
https://www.ibm.com/support/pages/node/1171564

why in the systemout.log of websphere i see wrong operating system information?

This is the start of my SystemOut.log of my WAS. Why i see a wrong operating system? i have windows server 2012 and not win srv 2008. Do you know where websphere take this information?
************ Start Display Current Environment ************
-WebSphere Platform 8.5.5.0 [ND 8.5.5.0 gm1319.01] running with process name blabla\blabla\server1 and process id 1234
-Host Operating System is Windows Server 2008, version 6.2 build 9200
-Java version = 1.6.0, Java Compiler = j9jit26, Java VM name = IBM J9 VM
-was.install.root = C:\Program Files\IBM\WASND85
-user.install.root = C:\Program Files\IBM\WASND85\profiles\AppSrv01
-Java Home = C:\Program Files\IBM\WASND85\java\jre
-ws.ext.dirs = C:\Program Files\IBM\WASND85/java/lib;C:\Program Files\IBM\WAS
-Classpath = C:\Program Files\IBM\WASND85\profiles\AppSrv01/properties;C:\Pro
-Java Library path = C:\Program Files\IBM\WASND85/lib/native/win/x86_64/;C:\P
-Orb Version = IBM Java ORB build orb626-20130112.01
************* End Display Current Environment *************
Thankyou in advance!!!!!!
bye
Based on my knowledge, WAS is taking the information from system property "os.name" and "os.version".
A quick way of checking is to write a quick java test class and have it print out the result of System.getProperty("os.name").toLowerCase() and System.getProperty("version").toLowerCase(). Then verify if they match the string you got from WAS log files' header.
The JVM pulls this information from a Windows API call (GetVersionEx). There was a change to this Windows API that required a change to the JDK in order to show the correct Windows OS name:
https://bugs.openjdk.java.net/browse/JDK-8059803
Since you are running a very old version of Java, upgrading to a later version should help.

h2o init error without admin rights

I am trying for first time to use h2o package in R. My problem comes when I try to use h2o.init() function I have the next error message
Error in value[[3L]](cond) :
You have a 32-bit version of Java. H2O works best with 64-bit Java.
Please download the latest Java SE JDK 7 from the following URL:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
In addition: Warning message:
In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="C:\Program Files\Java\jre1.8.0_111\bin/bin/java.exe": El sistema no puede encontrar la ruta especificada
I have followed the solutions here and there But I still have the same error things become worst since i do not have admin rights. Does any one can point me somewhere or give me some guide lines to get this solve?? This is driving me crazy.
My sesion info is
R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Java version:
java version "1.8.0_131"
JAVA(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) Client VM (build 25.131-b11, mixed mode)
In your local system environment you can set the JAVA_HOME as below:
JAVA_HOME=C:\\PATH_TO_YOUR_JAVA_1.8_INSTALL
After that you can check and confirm that your command line environment shows 64bit Java along with Sys.getenv call shows the 64 bit Java 1.8 as your java environment.
> Sys.getenv("JAVA_HOME")
[1] "/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home"
If it is not set in R environment then you can set it as below too:
> Sys.setenv(JAVA_HOME= "/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home")
Make sure to restart R/Rstudio with clean session so you have updated R with new environment. After that when you will call h2o initialize function it will pickup the right Java to get it started.
h2o.init()

SonarQube 5.1 PAM - no jpam in java.library.path

I'm unable to use PAM plugin on SonarQube 5.1 on Debian 8 (64bit).
I did setup according to https://github.com/SonarCommunity/sonar-pam and still getting following error during login:
Java::JavaLang::UnsatisfiedLinkError (no jpam in java.library.path):
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
java.lang.Runtime.loadLibrary0(Runtime.java:849)
java.lang.System.loadLibrary(System.java:1088)
net.sf.jpam.Pam.<clinit>(Pam.java:51)
org.sonar.plugins.pam.PamConfiguration.newInstance(PamConfiguration.java:61)
org.sonar.plugins.pam.PamConfiguration.getPAM(PamConfiguration.java:49)
org.sonar.plugins.pam.PamAuthenticator.authenticate(PamAuthenticator.java:45)
org.sonar.api.security.SecurityRealm$1.doAuthenticate(SecurityRealm.java:60)
Here's setup (sonar is located at /var/lib/sonarqube-5.1):
/var/lib/sonarqube-5.1/lib/JPam-1.1.jar
native libs (64bit and 32bit) have been put to /var/lib/sonarqube-5.1/bin/linux-x86-64/lib/libjpam.so and /var/lib/sonarqube-5.1/bin/linux-x86-32/lib/libjpam.so (just for sure in case sonar was run as 32bit)
All directories leading to native libraries and libraries themselves have +rx access
Any idea what can be causing problem?
I'd print the java.library.path variable. The only thing I can think of is that the jpam lib is in the wrong place or there is an issue with permissions. (Did you check the SonarQube user can actually read that file?)
UPDATE
Check java.library.path in Settings->System Info page
Move jpam lib to one of those paths

Processing: Migrating to 2.0b1 from 1.51 - Issues on video library

I'm trying to migrate to new processing, as I use often in my life (it's an update, so I'm moving on...).
Here's my setup:
Mac OS X 10.7.3
Processing 2.0b1 (Launch Program in 32-bit mode)
$ java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11D50b)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)
My setup used to work on Processing 1.5 - and all the problems that I'm seeing right now I not had using that release.
First:
Any examples from libraries/video/capture simply don't work. Sometimes it crashes, sometimes it freezes.
The console log after AsciiVideo:
DVFreeThread - CFMachPortCreateWithPort hack = 0xc083b7c0,
fPowerNotifyPort= 0xc085a0f0 DVFreeThread - CFMachPortCreateWithPort
hack = 0xc0809a60, fPowerNotifyPort= 0xc0808080 DVFreeThread -
CFMachPortCreateWithPort hack = 0xc08159a0, fPowerNotifyPort=
0xc082add0
I use the GSVideo too, and I tried to run the AsciiVideo from there.
The console error:
GSVideo version: 1.0.0 19200 Invalid memory access of location 0x0
eip=0x97cee3ba
and raised an error window
Process: java [25673] Path: /usr/bin/java
Identifier: com.apple.javajdk16.cmd Version: 1.0 (1.0)
Code Type: X86 (Native) Parent Process: JavaApplicationStub
[24849]
PlugIn Path: /var/folders/*/libjogl_desktop.jnilib PlugIn
Identifier: libjogl_desktop.jnilib PlugIn Version: ??? (???)
Date/Time: 2012-09-05 17:04:08.993 -0300 OS Version: Mac OS
X 10.7.3 (11D50b) Report Version: 9
...
I work with SimpleOpenNI, GSVideo, GLgraphics, SurfaceMapper... I decided migrate yesterday, to increase performance using the same CPU when I render videos.
I think it's better to ask this question on the processing forum.
Reason why you get this error is that the video library is rewritten from scratch in Processing 2, and it's based on GSVideo. Check the video examples in Processing 2.0b3.
Also, SurfaceMapper is currently not working with Processing 2.0, I'll look into that.
Best regards,
Jonas, Ixagon

Resources