facing trouble launching spoon.sh on amazon ec2 linux

匿名 (未验证) 提交于 2019-12-03 02:14:01

问题:

I am quit new to linux and Amazon EC2.

i configure JAVA_HOME by following below two link

How to know JAVA_HOME_Variable

bash_profile

so current path in my bash_profile are

export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64  export PATH=$PATH:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/bin

now i am trying to launch ./spoon.sh it is giving me error of

 Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:     no swt-pi-gtk-3740 in java.library.path     no swt-pi-gtk in java.library.path     /root/.swt/lib/linux/x86_64/libswt-pi-gtk-3740.so: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory     Can't load library: /root/.swt/lib/linux/x86_64/libswt-pi-gtk.so      at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)     at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)     at org.eclipse.swt.internal.gtk.OS.<clinit>(Unknown Source)     at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)     at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)     at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)     at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:540)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:622)     at org.pentaho.commons.launcher.Launcher.main(Launcher.java:134)

so can somebody suggest that what is wrong?

回答1:

Pentaho do not supports the openjdk java version. Install the the Oracle/Sun java.

But anyway... Are you trying to run the kettle environment on a Ec2 instance? without X screen? If you want simply to run kettle jobs or transformations you have to use kitchen.sh or pan.sh , not spoon.sh. Spoon.sh is only to create the trans or jobs with a GUI interface.



回答2:

You have exported the wrong path of JAVA_HOME. It should be the as below:

export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64


回答3:

The issue I see here is that the yum repository for EC2 Amazon Linux AMI instance does not include any graphical binaries. These binaries include gtk and swt with gtk. You can either compile all dependencies or use another image. Since you are a newbie, I suggest you switch to an ubuntu image.

On an ubuntu image, you should be able to run apt-get to install missing dependencies:

For Java: - sudo add-apt-repository ppa:webupd8team/java for oracle java - sudo apt-get update - sudo apt-get install oracle-java8-installer

For libswt: - sudo apt-get install libswt-gtk-3-jni libswt-gtk-3-java

Another issue I can think of is that you are likely trying to run a graphical application. If that is the case, you will have to run it with a window manager like Xvnc or Xvfb.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!