Thursday, December 18, 2014

Liferay Custom webservice client

As we are migrating to Liferay from WebSphere portal. I was testing if I can create a webservice client and access the remote SOAP bases webservices.

So, I created my Service builder portlet project ( many links on Google will help you to create one ! ), and then deployed on my local liferay server and tried to check if the service is running fine.

I was using http://localhost:8080/api/jsonws/ which is the utility provided by Liferay to check the services. But that was causing issues related to classloader. Like below,
 


10:43:25,081 ERROR [http-bio-8080-exec-4][JSONWebServiceServiceAction:87] interface com.sun.xml.ws.developer.WSBindingProvider is not visible from class loader



After spending few days on this I thought of not to test it from this utility and rather directly call that service from my portlet. And Voila ! it worked. I could connect to my remote webservice through the client code which was not working on that /jsonws utility.

So, I think there are some issues with that utility. As I understand that utility is part of Portal classloader/codebase and my custom code is loaded through separate class loader. And this might have been causing all problems.

So, best avoid using that utility and check your code from your portlet itself.

More on this on Liferay Forum... (See my response ! ).

https://www.liferay.com/community/forums/-/message_boards/message/39093968



Hope this helps.
Hardik

Tuesday, November 18, 2014

java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM

Last time when I tried to open my Eclipse it came with this exception in it's crash report. I did not change anything on my eclipse not with Java version then why would this happen ?

Then I realised I has updated Firefox with the latest version. And when it needed latest JRE it installed new JRE but it also updated the PATH in the environment. And also smart enough it put new path in front of all other paths.

AND Firefox is not available for 64 bit, although I am running on 64 bit machine, Firefox 32 bit got installed and that also installed 32 bit JRE without asking or checking if my machine is 64 bit ! ( or I guess it detected it but didnt found 32 bit as I have a 64 bit one ! ).

Anyway, I removed that path from the PATH and it worked fine for me.

!SESSION 2014-11-17 13:13:47.593 -----------------------------------------------
eclipse.buildId=4.3.0.M20130911-1000
java.version=1.8.0_25
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

!ENTRY org.eclipse.osgi 4 0 2014-11-17 13:13:49.021
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM
    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:260)
    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:240)
    at org.eclipse.swt.internal.C.<clinit>(C.java:21)
    at org.eclipse.swt.widgets.Display.<clinit>(Display.java:138)
    at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:675)
    at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:162)
    at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:154)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:96)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
    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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

Wednesday, October 29, 2014

IBM Poodle attack preventive actions

IBM Security Bulletins - Padding Oracle On Downgraded Legacy Encryption (POODLE) 

Specifically for WebSeal, IHS, WebSphere, TDS

TITLE: Security Bulletin: Vulnerability in SSLv3 affects Tivoli Access Manager for e-business and Security Access Manager for Web (CVE-2014-3566)
 
URL: http://www.ibm.com/support/docview.wss?uid=swg21687954&myns=swgother&mynp=OCSSPREK&mync=E
 
ABSTRACT: SSLv3 contains a vulnerability that has been referred to as the Padding Oracle On Downgraded Legacy Encryption (POODLE) attack.  SSLv3 is enabled in IBM Tivoli Access Manager for e-business and IBM Security Access Manager for Web.

TITLE: Security Bulletin: Vulnerability in SSLv3 affects WebSphere included with Tivoli Access Manager for e-business and Security Access Manager for Web (CVE-2014-3566)
URL: http://www.ibm.com/support/docview.wss?uid=swg21687955&myns=swgother&mynp=OCSSPREK&mync=E
ABSTRACT: SSLv3 contains a vulnerability that has been referred to as the Padding Oracle On Downgraded Legacy Encryption (POODLE) attack.  SSLv3 is enabled in the IBM WebSphere product bundled with IBM Tivoli Access Manager for e-business and IBM Security Access Manager for Web.

TITLE: Security Bulletin: Vulnerability in SSLv3 affects Directory Server (CVE-2014-3566)
URL: http://www.ibm.com/support/docview.wss?uid=swg21687611&myns=swgother&mynp=OCSSVJJU&mync=E
ABSTRACT: SSLv3 contains a vulnerability that has been referred to as the Padding Oracle On Downgraded Legacy Encryption (POODLE) attack.  SSLv3 is enabled in Tivoli Directory Server (TDS) and IBM Security Directory Server (SDS).

 


After making chnages one need to check if SSL connection is stopped, you can use below commands if you have OpenSSL installed.


openssl s_client -connect <website_address>:<secureport>-ssl3

openssl s_client -connect <website_address>:<secureport>-tls1