5

I have an issue when I try running Pentaho Data Integration on Mac bigSur (M1).

issue code in below:

I'm sorry, this Mac platform [arm64] is not yet supported! Please try starting using 'Data Integration 32-bit' or 'Data Integration 64-bit' as appropriate.

java version

> java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)

can anyone help me with this issue?

Thanks

2 Answers2

17

Try this guide from reddit

Guide:

Here is how you can force the shell to run in Intel mode so that you can continue working in this little command-line Rosetta Island while waiting for native ARM64 support.

  1. Open the Terminal app.

  2. Open the Terminal app’s Preferences.

  3. Click on the Profiles tab.

  4. Select a profile, click on the ellipsis at the bottom of the profile list and then select Duplicate Profile.

  5. Click on the new profile and give it a good name. I named mine as “Rosetta Shell”.

  6. Also in the new profile, click on the Window tab. In the Title, put a name to indicate that this is for running Intel-based apps.I put “Terminal (Intel)” on mine.

  7. Click on the Shell tab and use the following as its Run Command to force the shell run under Rosetta: env /usr/bin/arch -x86_64 /bin/zsh --login

  8. Untick the Run inside shell checkbox. Clearing the checkbox would prevent running the shell twice, which could bloat your environment variables since ~/.zshrc gets run twice.

  9. Optionally set this profile as the Default.

This is the first step. After that you have to replace the swt.jar in the data-integration Folder /path_to_your_data-integration/libswt/osx64/ Otherwise it won't start.

You can download the jar here

Important!: You don't have to rename this file, but you have to remove the original swt.jar .

Tufan Atak
  • 191
  • 4
  • Thank you so much! This is the first complete solution for running pentaho on my M1 mac! – Niki H. Aug 04 '21 at 08:09
  • 2
    Thanks for your reply. I have just installed Rosetta terminal [how to install Rosetta](https://support.apple.com/en-gb/HT211861) and then started Pentaho same as on old Mac. Working ok for me. – Ivan Romanovych Aug 04 '21 at 20:06
  • 3
    Another thing I ran into: Make sure that you are not in dark mode, or you will see white letters on a white background. – Martijn Burger Aug 08 '21 at 14:08
  • 1
    I can confirm the PDI 9.2 with Java 1.8 over Rosseta works. Ones also have to switch to light mode. – rdemorais Feb 21 '22 at 17:06
  • 3
    This also worked with PDI 7.1 and Java 1.8 on an M1 with Monterrey. I also got Dark mode to work, Data Integration > Preferences > Look & Feel > Use Look of OS (checkbox) & close and restart PDI. – Thomas Pniewski May 16 '22 at 21:42
  • It does not work for me, I followed all the steps and I get Error: Invalid or corrupt jarfile /workspace/alaya/data-integration/launcher/launcher.jar – Puneet Sidhu Jul 26 '22 at 21:20
  • Thanks It's work, but not take the new version of Jar file – YAO ALEX DIDIER AKOUA Dec 08 '22 at 06:19
  • I have tested with PDI 9.4 and Amazon Corretto Java 17, and run correctly, thanks. – martosfre Feb 27 '23 at 21:35
  • It works for me with MacOS M1 and Java (openjdk version "18" 2022-03-22) with latest version of Pentaho 9.3 – user3184687 Mar 08 '23 at 04:43
  • Wonderful answer. For me, I have to specifically get the arm version of the jar, which is org.eclipse.swt.cocoa.macosx.aarch64 instead of org.eclipse.swt.cocoa.macosx.x86_64. – Thirumalai Chellam Balagopalan Mar 16 '23 at 19:41
2

I've just want to add that you need to have an x86 Java version installed for Tufan Atak solution to work.

So if you've installed an M1 compat Java version and you try to start spoon with that it will throw the next error:

java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
    no swt-cocoa-4944r26 in java.library.path
    no swt-cocoa in java.library.path
    no swt in java.library.path
    Can't load library: /<user-home-path>/.swt/lib/macosx/aarch64/libswt-cocoa-4944r26.jnilib
    Can't load library: /<user-home-path>/.swt/lib/macosx/aarch64/libswt-cocoa.jnilib
    Can't load library: /<user-home-path>/.swt/lib/macosx/aarch64/libswt.jnilib
    /<user-home-path>/.swt/lib/macosx/aarch64/libswt-cocoa-4944r26.jnilib: dlopen(/<user-home-path>/.swt/lib/macosx/aarch64/libswt-cocoa-4944r26.jnilib, 0x0001): tried: '/<user-home-path>/.swt/lib/macosx/aarch64/libswt-cocoa-4944r26.jnilib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))

    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:348)
    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:257)
    at org.eclipse.swt.internal.C.<clinit>(C.java:19)
    at org.eclipse.swt.widgets.Display.<clinit>(Display.java:107)
    at org.pentaho.di.ui.core.widget.OsHelper.setAppName(OsHelper.java:106)
    at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:652)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)

So you need to install Java again from the same intel terminal profile so an x86 version is installed.

You can use SDK Man and after that you can execute this command (for java 8 temurin):

> sdk install java 8.0.345-tem
.
.
.
> Do you want java 8.0.345-tem to be set as default? (Y/n): n

The n answer is because you don't wanna run every other java program with the x86 version.

After that you can tell SDK Man to use this new version for this terminal shell

> sdk use java 8.0.345-tem

then just verify the current version is the one you've just indicated sdk man to use:

> java -version

you should see something like this:

openjdk version "1.8.0_345"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_345-b01)
OpenJDK 64-Bit Server VM (Temurin)(build 25.345-b01, mixed mode)

After that you can finally start spoon

> ./spoon.sh
mogarick
  • 91
  • 1
  • 12