views:

656

answers:

2

After I installed Aptana (install directory: /usr/share/aptana )

I keep getting errors like this:

An SWT Error has occurred, you are recommended to exit the workbench. Subsequent errors may happen and terminate the workbench without warning. See the .log file for more details.

looking in the logs I see this:

!MESSAGE No more handles (java.lang.UnsatisfiedLinkError: /root/.Aptana/Aptana Studio/configuration/org.eclipse.osgi/bundles/72/1/.cp/libswt-mozilla-gtk-3236.so: libxpcom.so: cannot open shared object file: No such file or directory)

!STACK 0

org.eclipse.swt.SWTError: No more handles

(java.lang.UnsatisfiedLinkError: /root/.Aptana/Aptana Studio/configuration/org.eclipse.osgi/bundles/72/1/.cp/libswt-mozilla-gtk-3236.so: libxpcom.so: cannot open shared object file: No such file or directory)

Well after search the forums and other sites for about an hour, people suggested I install these packages.

* yum install gtk2-devel
* yum install xulrunner
* yum install libstdc*
* yum install gtk2*
* yum install libswt3-gtk2*
* yum install compat-libstdc++-33

I had some already installed and I don't know if they are really required but there they are for you.

After all that it still didn't work

A: 

I came across this post. in the post it has a file you need to download called aptana.sh.

Here is the code if the file is not available:

/*************** START OF FILE **************/

#!/bin/bash

# Set path for the Mozilla SWT binding

MOZILLA_FIVE_HOME=${MOZILLA_FIVE_HOME%*/}
if false && [ -n "$MOZILLA_FIVE_HOME" -a -e $MOZILLA_FIVE_HOME/libgtkembedmoz.so ]; then
:
elif [ -e /usr/lib/mozilla/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/mozilla
elif [ -e /usr/lib/firefox/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/firefox
elif [ -e /usr/lib/xulrunner/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/xulrunner
elif [ -e /usr/lib/mozilla-firefox/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/mozilla-firefox
elif [ -e /usr/lib/mozilla/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/mozilla
else
$DIALOGW \
--title="Integrated browser support not working" \
--text="This Eclipse build doesn't have support for the integrated browser."
[ $? -eq 0 ] || exit 1
fi
# libraries from the mozilla choosen take precedence
LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}

# Do the actual launch of Aptana Studio
exec ./AptanaStudio


/*************** END OF FILE **************/

Still didn't work so I decided to see if the file it was trying to call existed. the command for the file name in:

locate libgtkembedmoz.so

it found it so I added the condition to the script and now it works great, YEAH!!

elif [ -e /usr/lib/esc-1.0.0/xulrunner/libgtkembedmoz.so ]; then export MOZILLA_FIVE_HOME=/usr/lib/esc-1.0.0/xulrunner

Let me know of any other findings that might help out.

Thanks, --Phill

Phill Pafford
FireFox 3.0.7 Breaks this below is a workaround
Phill Pafford
A: 

Okay so after much digging around I found that Aptana needs libgtkembedmoz.so to run (Aptana team please fix this, just include the file in the next build please!!!).

Work around:

Well xulrunner (the new version) doesn't include libgtkembedmoz.so file. So after much Googling I found that Thunderbird does. So I YUM install thunderbird and went to check if the file libgtkembedmoz.so was there. (BTW: thunderbird version 2.0.0.18 on CentOS 5). Yeah it's there.

So I have a script that looks for the libgtkembedmoz.so file

#!/bin/bash

# Set path for the Mozilla SWT binding
MOZILLA_FIVE_HOME=${MOZILLA_FIVE_HOME%*/}
if false && [ -n "$MOZILLA_FIVE_HOME" -a -e $MOZILLA_FIVE_HOME/libgtkembedmoz.so ]; then
:
elif [ -e /usr/lib/mozilla/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/mozilla
elif [ -e /usr/lib/firefox/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/firefox
elif [ -e /usr/lib/xulrunner/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/xulrunner
elif [ -e /usr/lib/esc-1.0.0/xulrunner/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/esc-1.0.0/xulrunner
elif [ -e /usr/lib/mozilla-firefox/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/mozilla-firefox
elif [ -e /usr/lib/mozilla/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/mozilla
elif [ -e /usr/lib/thunderbird-2.0.0.18/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/thunderbird-2.0.0.18
else
$DIALOGW \
--title="Integrated browser support not working" \
--text="This Eclipse build doesn't have support for the integrated browser."
[ $? -eq 0 ] || exit 1
fi

# libraries from the mozilla choosen take precedence
LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}

# Do the actual launch of Aptana Studio
exec ./AptanaStudio

make it executable (chmod 755 scriptname) and run.

Note:

Just cjeck to make sure you have the right version of the program and/or that the path works.

[user@machine]# ls /usr/lib/thunderbird-2.0.0.18/libgtkembedmoz.so /usr/lib/thunderbird-2.0.0.18/libgtkembedmoz.so

So if you have thunerbird 2.0.0.14 please make the change in the script as well.

Hope this help ;-)

Phill Pafford