Foren

Problem with IBM JCE provider on AIX and IBM JDK (Liferay with JBoss)

Nedim Azapagić, geändert vor 11 Jahren.

Problem with IBM JCE provider on AIX and IBM JDK (Liferay with JBoss)

New Member Beiträge: 4 Beitrittsdatum: 01.02.13 Neueste Beiträge
Hello,

We have problem with running installation of Liferay with JBoss on AIX 6.1 or 5.3 (same problem on both) with IBM JDK for AIX, both 6 and 7. Obviously, class com.ibm.crypto.provider.IBMJCE from ibmjceprovider.jar is JCE Provider. Now we first had problem that this class is not visible to liferay (altought it is in lib/ext of JAVA_HOME/jre), so we put it in the ROOT.war/WEB-INF/lib.

Now class is visible so we thought we solved it, but now we have following exception which appears generic (ArrayIndexOutOfBoundsException):

15:33:30,092 INFO [stdout] (MSC service thread 1-22) 15:33:30,091 WARN [MSC service thread 1-22][Encryptor:230] IBM JVM does not have com.sun.crypto.provider.SunJCE, using com.ibm.crypto.provider.IBMJCE instead
15:33:30,109 INFO [stdout] (MSC service thread 1-22) 15:33:30,107 ERROR [MSC service thread 1-22][MainServlet:358] java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
15:33:30,110 INFO [stdout] (MSC service thread 1-22) java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
15:33:30,110 INFO [stdout] (MSC service thread 1-22) at com.liferay.portal.util.PortalInstances._getDefaultCompanyId(PortalInstances.java:317)
15:33:30,111 INFO [stdout] (MSC service thread 1-22) at com.liferay.portal.util.PortalInstances.getDefaultCompanyId(PortalInstances.java:82)
15:33:30,112 INFO [stdout] (MSC service thread 1-22) at com.liferay.portal.servlet.MainServlet.initCompanies(MainServlet.java:803)
15:33:30,112 INFO [stdout] (MSC service thread 1-22) at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:355)
15:33:30,113 INFO [stdout] (MSC service thread 1-22) at javax.servlet.GenericServlet.init(GenericServlet.java:242)
15:33:30,114 INFO [stdout] (MSC service thread 1-22) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202)
15:33:30,114 INFO [stdout] (MSC service thread 1-22) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102)
15:33:30,115 INFO [stdout] (MSC service thread 1-22) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655)
15:33:30,116 INFO [stdout] (MSC service thread 1-22) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873)
15:33:30,116 INFO [stdout] (MSC service thread 1-22) at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)
15:33:30,117 INFO [stdout] (MSC service thread 1-22) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
15:33:30,118 INFO [stdout] (MSC service thread 1-22) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
15:33:30,119 INFO [stdout] (MSC service thread 1-22) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
15:33:30,119 INFO [stdout] (MSC service thread 1-22) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
15:33:30,120 INFO [stdout] (MSC service thread 1-22) at java.lang.Thread.run(Thread.java:738)


We first thought that there is problem with database and "Company_" table, but we investigated and found that error was actually caused by invocation company.setKey(...) in com.liferay.portal.service.impl.CompanyLocalServiceImpl, so it appears that this error is still related with problems with JCE provider, but we are unable to solve it or further investigate, so any help would be appreciated. What is correct way to enable IBM JCE provider on AIX and IBM JDK?

Please note that we don't have any issues with test Liferay + JBoss installation on IBM JDK on Windows, so this is AIX-only problem.

Thank you, Nedim
Nedim Azapagić, geändert vor 11 Jahren.

RE: Problem with IBM JCE provider on AIX and IBM JDK (Liferay with JBoss)

New Member Beiträge: 4 Beitrittsdatum: 01.02.13 Neueste Beiträge
One update, I run again detailed tests with Windows IBM JDK 6.0 and I must correct myself: the problem is same on Windows as on AIX, so it is possibly some IBM JDK related issue. Did anyone had success with running Liferay + JBoss on IBM JDK, any platform?

Thanks, Nedim
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: Problem with IBM JCE provider on AIX and IBM JDK (Liferay with JBoss)

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
Liferay supports Oracle JDK. I think you issue isn't really liferay issue but just issue on difference between IBM JDK and Oracle JDK.
Nedim Azapagić, geändert vor 11 Jahren.

RE: Problem with IBM JCE provider on AIX and IBM JDK (Liferay with JBoss)

New Member Beiträge: 4 Beitrittsdatum: 01.02.13 Neueste Beiträge
Thank you for your answer.

Unfortunately, the target environment is AIX where IBM JDK is only available option. Windows environment is used only for development/testing, and we are trying to duplicate environment there with using IBM JDK on Windows too, so we encounter same problems there.

I understand that this is probably JDK issue, I am just interested are there any guidelines for running Liferay on IBM JDK?

Thanks, Nedim
J B, geändert vor 11 Jahren.

RE: Problem with IBM JCE provider on AIX and IBM JDK (Liferay with JBoss)

Junior Member Beiträge: 37 Beitrittsdatum: 05.04.12 Neueste Beiträge
can we try with websphere on aix?

I know for a fact that works.
Maciej Brzeziński, geändert vor 11 Jahren.

RE: Problem with IBM JCE provider on AIX and IBM JDK (Liferay with JBoss)

New Member Beiträge: 2 Beitrittsdatum: 05.12.11 Neueste Beiträge
Hello,

You should try to install the Sun (Oracle) JCE provider. This requires more than just making the classes / jars available on the classpath. Have a look at the following link:
http://documentation.pingidentity.com/display/WSIK/SunJCE+Provider+Installation
- it should give you a clue on how to solve this issue.

regards,
Maciej