Is there a solution around Pentaho 9.3 Spoon errors related to Apple Silicon M1 ARM? - swt

Installed Pentaho Data Integration 9.3 on Mac OS Monterey on a MacBook Pro M1 (Apple Silicon.)
I am running OpenJDK 11:
Openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10)
OpenJDK 64-Bit Server VM (build 11.0.15+10, mixed mode)
The install.sh process runs without error. However, after install, trying to execute the spoon.sh process, the following errors occur...
WARNING: Using java from path
DEBUG: _PENTAHO_JAVA_HOME=
DEBUG: _PENTAHO_JAVA=java
DEBUG: PENTAHO_INSTALLED_LICENSE_PATH=
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-cocoa-3738 in java.library.path: [./../libswt/osx64/]
no swt-cocoa in java.library.path: [./../libswt/osx64/]
Can't load library: /Users/jgregory/.swt/lib/macosx/aarch64/libswt-cocoa-3738.jnilib
Can't load library: /Users/jgregory/.swt/lib/macosx/aarch64/libswt-cocoa.jnilib
Can't load library: /Users/jgregory/.swt/lib/macosx/aarch64/libswt-cocoa-3738.jnilib
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at org.pentaho.di.ui.core.widget.OsHelper.setAppName(OsHelper.java:106)
at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:652)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
Has anyone run into this issue and are there any known workarounds?

Download latest swt for arm64 support from here
https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/S-4.25M1-202207061800/swt-4.25M1-cocoa-macosx-aarch64.zip&mirror_id=518
unzip it, get swt.jar and Put it under /path_to_your_data-integration/libswt/osx64/ and delete the one thats there.
Than using rosseta shell, guide how to set up rosseta can be found here:
https://stackoverflow.com/a/68571463/19586128
start the spoon.sh with required configurations
If you use java 8 It will complain first with:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/eclipse/swt/widgets/Control has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
I update my JAVA_HOME to 18 (17 works too) and it worked
This worked for me, but please feel free to ask if it does not work and i can help more with this

Download this jar from here and replace the one from /path_to_your_data-integration/libswt/osx64/.
Don't forget to run it using Rosetta and from the terminal
/Applications/data-integration/Data Integration.app/Contents/MacOS
Run
./JavaApplicationStub

Related

JMC Java Flight Recorder not enabled

I am using spring tool suite with the java mission control plugin to start an app which I would like to monitor using the JFR. I added -XX:+UnlockCommercialFeatures -XX:+FlightRecorder to the SpringToolSuite4.ini and additionally set JAVA_OPTS with those two flags (both of which is not necessary if I understand it correctly) and -XX:+FlightRecorder in Run configurations > Arguments > VM arguments of the application to be monitored. When adding both flags as well to the run configuration the application cannot be started with the openJdk.
After starting the application in the JVM Browser when selecting the Flight Recorder I get the following exception.
java.lang.RuntimeException: Flight Recorder features are not enabled. To enable this you need to use a Java 7u4 or later JVM started with -XX:+UnlockCommercialFeatures -XX:+FlightRecorder.
at com.oracle.jmc.flightrecorder.controlpanel.ui.FlightRecorderProvider.refresh(FlightRecorderProvider.java:105)
at com.oracle.jmc.browser.views.JVMBrowserView$1.run(JVMBrowserView.java:98)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.oracle.jmc.rjmx.services.jfr.FlightRecorderException: Flight Recorder features are not enabled. To enable this you need to use a Java 7u4 or later JVM started with -XX:+UnlockCommercialFeatures -XX:+FlightRecorder.
at com.oracle.jmc.flightrecorder.controlpanel.ui.FlightRecorderProvider.getService(FlightRecorderProvider.java:161)
at com.oracle.jmc.flightrecorder.controlpanel.ui.FlightRecorderProvider.refreshRecordings(FlightRecorderProvider.java:117)
at com.oracle.jmc.flightrecorder.controlpanel.ui.FlightRecorderProvider.refresh(FlightRecorderProvider.java:94)
... 7 more
I tried it with the following java versions.
$ java -version
openjdk version "11.0.2" 2018-10-16
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.2+7)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.2+7, mixed mode)
or with the JDK from oracle
$ java -version
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
For none of the above mentioned JDK's there is a jmc.exe which was there with java 8. Is that part of the plugin?
How can I get this running?
IIRC, Java 11 requires JMC 7 to be able to start and view recordings.
JMC 7 EA builds are expected to appear here soon - https://jdk.java.net/jmc/
In the meantime you can build JMC yourself, see http://hg.openjdk.java.net/jmc/jmc7/ (or github, not exactly sure which version it is synced to - https://github.com/JDKMissionControl/jmc) and the README on how to build.
You can start recordings using JVM command line flags, and using jcmd, and parse the recordings using https://docs.oracle.com/en/java/javase/11/docs/api/jdk.jfr/jdk/jfr/consumer/package-summary.html

Not able to run gremlin shell on open JDK

I am using a Mac (Mac OS 10.13.6) and I am using Open JDK openjdk version "1.8.0_192"
I can easily run the Orient Database by running server.sh
But when I try to run gremlin.sh I get an error
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
Exception in thread "main" java.lang.UnsatisfiedLinkError: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/libfontmanager.dylib: dlopen(/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/libfontmanager.dylib, 1): Library not loaded: #rpath/libfreetype.6.dylib
Referenced from: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/libfontmanager.dylib
Reason: image not found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
OK. I resolved it after a some googling. The solution on Mac OS (which worked for me is)
brew cask upgrade
This upgraded to a new version of open JDK which doesn't has this problem.
https://github.com/AdoptOpenJDK/homebrew-openjdk/issues/42

scala-native build failed in windwos with java.io.IOException: Cannot run program "which" error

When I build Scala native demo using sbt rtlib/publishLocal nscplugin/publishLocal it gives following error
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
Scala code runner version 2.12.0-M3 -- Copyright 2002-2015, LAMP/EPFL
Error
[info] Loading project definition from D:\Work\RandD\WSAMITScript\Scala-Native\scala-native\project
java.io.IOException: Cannot run program "which": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at sbt.SimpleProcessBuilder.run(ProcessImpl.scala:349)
at sbt.AbstractProcessBuilder.lines(ProcessImpl.scala:149)
at sbt.AbstractProcessBuilder.lines_$bang(ProcessImpl.scala:143)
at scala.scalanative.sbtplugin.ScalaNative
Scala Native currently doesn't support Windows. Follow the corresponding issue to track progress on that front.
Have you tried if it works inside a Cygwin terminal?

wso2 unable to install features for I/O Error while copying

I'm trying to install new features on wso2 Carbon version 4.0.1
I'm on a VMWare Virtual Machine running CentOS 6.3
I followed these steps
Download of the binary version of wso2carbon-4.0.1 (wso2carbon-4.0.1)
extracted under path /opt/wso2/
went into /opt/wso2/wso2carbon-4.0.1/bin and edited wso2server.sh adding these lines:
JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/
PATH=$JAVA_HOME/bin:$PATH
export PATH
export JAVA_HOME
run the server with ./wso2server.sh
the server runs fine
Downloaded file p2-repo.zip for version 4.0.1 and unzipped in /opt/wso2/
Logged into https://localhost:9443/carbon and added a new repository in the features->Repository Management pointing to file:///opt/wso2/p2-repo
went to available features clicked on "Find Features"
From the list I've selected "API Manager" then clicked on Install Features.
At this point a window telling that a provisioning error has occured.
The terminal where wso2server.sh was running says:
[2012-09-24 18:27:23,118] ERROR {org.wso2.carbon.feature.mgt.services.prov.ProvisioningAdminService} - Error occured while performing provisioning action
org.wso2.carbon.feature.mgt.core.ProvisioningException: An error occurred while configuring the installed items
session context was:(profile=WSO2CarbonProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Configure, operand=null --> [R]org.jaggeryjs.server.feature.group 0.9.0.ALPHA1, action=org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CopyAction).
I/O Error while copying /opt/wso2/wso2carbon-4.0.1/repository/components/features/org.jaggeryjs.server_0.9.0.ALPHA1/modules - see details.
Source: /opt/wso2/wso2carbon-4.0.1/repository/components/features/org.jaggeryjs.server_0.9.0.ALPHA1/modulesdoes not exists
at org.wso2.carbon.feature.mgt.core.util.ProvisioningUtils.performProvisioningAction(ProvisioningUtils.java:77)
at org.wso2.carbon.feature.mgt.core.util.ProvisioningUtils.performProvisioningAction(ProvisioningUtils.java:86)
at org.wso2.carbon.feature.mgt.services.prov.ProvisioningAdminService.performProvisioningAction(ProvisioningAdminService.java:278)
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.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver$AsyncMessageReceiverWorker.run(AbstractMessageReceiver.java:271)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Where did I go wrong?
I moved to Ubuntu 10.04 x64 and openjdk.
OpenJDK version is: java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.4) (6b24-1.11.4-1ubuntu0.10.04.1). OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) ... now features are installing fine using the same p2-repo.zip as above!
Thank you Artemix for your suggestions!

Using XMLVM: Android to iPhone

Related to this question: Use with XMLVM to convert android app to iphone app
XMLVM comes with several demo projects which I assume must work perfectly for some people. I've been running into snags and can't find very much documentation to help me. I've been following the documentation from the xmlvm site: http://www.xmlvm.org/documentation/manual.pdf
My story so far (skip down a bit for my current problem)
First of all, this is a Windows XP SP3 32-bit system.
I installed Android SDK and downloaded and installed SDK Platform Android 1.5, 1.6, 2.2, 2.3.3, 3.0.
I checked out XMLVM and built it using ant. So far, so good. (Section 1.3 on the manual)
I tried building the android demo projects (xokoban, helloworld, afireworks). Each one fails, complaining that it can't find my Android SDK. It's been properly set up as described in the manual, so I open up the build.xml files to see what they're actually looking for... they're looking for "$sdk$/tools/android". Well, the android sdk has an "android.bat" in the right spot, so I copy the batch file as just "android" and the builds run fine now.
My current problem:
Now I invoke XMLVM using the line
java -Xmx1G -jar c:\xmlvm\xmlvm.jar --in=/demo/android/helloworld --target=android-on-iphone --app-name=bleh
And I get the error
Error: Unknown target: android-on-iphone
So I try the same line, but with --target=iphone
This returns the error
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.simontuffs.onejar.Boot.run(Boot.java:306)
at com.simontuffs.onejar.Boot.main(Boot.java:159)
Caused by: java.lang.NullPointerException
at org.xmlvm.util.FileSet$3.hasNext(FileSet.java:98)
...
In a nutshell, I'm stuck and I can't even get through the demo. Halp.
RTFM.......... In fact, this part was highlighted in the "related post":
In section 2.2.3 of the manual, it clearly states that the makefile will only work on a Mac OS platform with the Xcode IDE. I guess I really can't start on this project until I get the mac.