• Welcome to KonaKart Community Forum. Please login or sign up.
 

Deployment in liferay 6.5.0 causes ClassCastException

Started by tokamak, October 20, 2010, 10:37:25 am

Previous topic - Next topic

tokamak

Hi,

I'm trying to deploy Konakart 5.0.0.0 portlet in Liferay 6.5.0 on a Glassfish 3.0.1 server but during deployment multiples ClassCast Exceptions occured.

Quote[#|2010-10-19T18:41:05.778+0000|INFO|glassfish3.0.1|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=34;_ThreadName=Thread-1;|18:41:05,777 FATAL [InternalException:88] Exception:
org.apache.axis.ConfigurationException: org.apache.axis.deployment.wsdd.WSDDException: java.lang.ClassCastException: org.apache.axis.encoding.ser.BeanSerializerFactory cannot be cast to org.apache.axis.encoding.SerializerFactory
java.lang.ClassCastException: org.apache.axis.encoding.ser.BeanSerializerFactory cannot be cast to org.apache.axis.encoding.SerializerFactory
    at org.apache.axis.encoding.ser.BaseSerializerFactory.createFactory(BaseSerializerFactory.java:277)
    at org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.java:542)
    at org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java:253)
    at org.apache.axis.deployment.wsdd.WSDDService.<init>(WSDDService.java:233)


The konakart portlet is trying to set up its axis-1.4 services but Liferay 6.5.0 uses Axis 1.5...
How can I work around this problem ?

Is there a way to allow liferay to use his version of axis and my portlet to use another version ?

Any help would be warmly welcomed   :-[
Tokamak

Brian

First of all do you mean Liferay 6.5.0 or Liferay 6.0.5 ?

If Liferay 6.0.5 I had compatibility problems with the tomcat 6.0.26 version (a problem with the logic:iterate tag) but had success with the JBoss version.  (I haven't tried the Glassfish variant).

In Liferay 6.0.5 I found I had to remove the wsdd file to stop the AXIS startup due to the incompatibility.   I don't know of a solution to get the KonaKart Axis 1.4 web services to work when Liferay has already loaded another version.   If you find a way, please post the solution!

If you need the web services maybe they could be implemented in another JVM?

Alternatively KonaKart also supports RMI - maybe that's another solution?

tokamak

 :-X I was meaning Liferay 6.0.5 of course  :-X

It seems to be an issue with Liferay 6 and Iterate tag. (http://issues.liferay.com/browse/LPS-12766?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel)
A solution is to use foreach instead (http://www.liferay.com/community/forums/-/message_boards/message/5940178;jsessionid=FE5798C5EF082799906E91B3E1E5125F.node-1:-[

I tryed to remove the wsdd file from the war file but that ocurred Warnings on XSD validation and a MySQLSyntaxErrorException : Table 'lifeportaldb.counter' doesn't exist
Is there some script to load on my database before deploying the portlet ?
I thought the portlet would create its tables during initialization... Is it right ?

During konakart portlet initialization I got another MySQLSyntaxErrorException: Table 'lifeportaldb.configuration' doesn't exist...

I'm also trying to get those WebServices working on another domain of my glassfish server. If I succeed I'll post a comment on how to proceed.

Thanks for your help.
Corentin

Brian

QuoteIt seems to be an issue with Liferay 6 and Iterate tag.


No I don't think it's Liferay itself because it works OK with Liferay 6.0.5 with JBoss.  It's more likely to be a tomcat 6.0.26 problem.

I don't like the idea of changing all the JSPs from perfectly legal syntax to workaround this...  I'm sure the problem will be fixed soon... it's too important you would have thought...

Removing the WSDD file from the deployed portlet works for me on many platforms.   Did you try after you deployed?

What you should do is to install KonaKart normally using the wizard.  You should choose to create all the tables at that time.   This will also set up all your properties files correctly.  Then go to the custom directory and create your WARs for Liferay.  This is by far the easiest process.

Do you really need the we services to be active for your store?

tokamak

Many thanks for your help !  :) It's working at last !

I install Konakart using the wizard and created a new portlet war from wich I remove WSDD file.
Then I reinitialize my liferay database (due to corruption occured by an error in portlet deployment) and redeploy the war to have the portlet working correctly.

By the way, you were absolutly right, iterate tags works correctly on glassfish with Liferay 6.0.5.
So it's shurely a tomcat issue...

Web services would have been a plus for me to develop quickly custom portlets based on Konakart services...

Tokamak

Brian

Thanks very much for the feedback.

It's useful to know that there is no problem with the logic:iterate tags on Glassfish + Liferay 6.0.5.

The web services problem is a tricky one.   You can run the RMI version of the KonaKart engines as an alternative to the AXIS web services version of the engines.  Perhaps that might be a solution? 

Otherwise you could KonaKart and its AXIS services in another JVM (did you have any joy running it in another Glassfish domain?)

Michael

A solution to the logic:iterate problem has been found for Liferay 6.0.5 + tomcat 6.0.26

Just extract the contents of the zip file at the following URL into your konakart/WEB-INF/classes directory, restart Liferay and you will see the categories tile populated with categories!

http://www.konakart.com/kits/IterateTagFix-Liferay-6.0.5.zip

tokamak

As Michael said, there is now a solution for the integration of Konakart with Liferay 6... But still no solution to keep using Konakart Webservices.
http://www.liferay.com/community/forums/-/message_boards/message/6221486

The problem in running Konakart Webservices in another glassfish domain is that they will both use the same database... So I'm little bit affraid of potential concurrent accesses that may result in a production environment.

But It's possible to use konakart WebServices from customs Liferay Portlet... Then every interaction with database would go through Konakart WebServices and we keep away from concurrent access and database corruption  ;)

Thanks !

Brian

No solution yet for the Axis web services problem... but perhaps can you use RMI instead?   (The neat thing is that to use the direct java or SOAP or RMI versions of the engines in KonaKart all you have to do is change the engine that is instantiated (by the "client") at runtime to switch between them).

About your point on whether there are problems with concurrent access.  There is absolutely no problem here.   This is precisely the way load-balancing works in KonaKart...  you have as many engines replicated as you like all with their own connections to the database.

--Brian


kevin207

Hi Brian,

KonaKart is the rich set if APIs that can be used to control all of the eCommerce engine functionality making it very easy to build systems with it using your chosen technology.  The APIs implement a defined interface and three implementations of the interface are provided (direct java, SOAP and RMI).   The beauty is that you write your code against the interfaces and can instantiate the preferred implementation of the KonaKart engine interface by name at runtime making it easy to switch from one to another.



Regards
Kevin Thomas
Attune Infocom Inc
http://www.attuneinfocom.com
Email : contact@attuneinfocom.com
Liferay portlet Development