Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Greg Roberts
Problems using axis-1.4 in portlet with Liferay 6.0.5
October 14, 2010 10:49 AM
Answer

Greg Roberts

Rank: New Member

Posts: 11

Join Date: October 14, 2010

Recent Posts

My portlet works fine with liferay 5.2.2 and liferay 5.2.3 but fails to start up in liferay 6.0.5.

I get lots of casting failures when my portlet tries to set up its axis-1.4 services:

===========================================================================

 1 FATAL [InternalException:88] Exception:
 2org.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
 3java.lang.ClassCastException: org.apache.axis.encoding.ser.BeanSerializerFactory cannot be cast to org.apache.axis.encoding.SerializerFactory
 4        at org.apache.axis.encoding.ser.BaseSerializerFactory.createFactory(BaseSerializerFactory.java:277)
 5        at org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.java:542)
 6        at org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java:253)
 7        at org.apache.axis.deployment.wsdd.WSDDService.<init>(WSDDService.java:233)
 8        at org.apache.axis.deployment.wsdd.WSDDDeployment.<init>(WSDDDeployment.java:192)
 9        at org.apache.axis.deployment.wsdd.WSDDDocument.setDocument(WSDDDocument.java:139)
10        at org.apache.axis.deployment.wsdd.WSDDDocument.<init>(WSDDDocument.java:65)
11        at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)
12        at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
13        at org.apache.axis.AxisEngine.<init>(AxisEngine.java:156)
14        at org.apache.axis.server.AxisServer.<init>(AxisServer.java:88)
15        at org.apache.axis.server.DefaultAxisServerFactory.createServer(DefaultAxisServerFactory.java:109)
16        at org.apache.axis.server.DefaultAxisServerFactory.getServer(DefaultAxisServerFactory.java:73)
17        at org.apache.axis.server.AxisServer.getServer(AxisServer.java:73)
18        at org.apache.axis.transport.http.AxisServletBase.getEngine(AxisServletBase.java:185)
19        at org.apache.axis.transport.http.AxisServletBase.getOption(AxisServletBase.java:396)
20        at org.apache.axis.transport.http.AxisServletBase.init(AxisServletBase.java:112)
21        at org.apache.axis.transport.http.AxisServlet.init(AxisServlet.java:156)
22        at javax.servlet.GenericServlet.init(GenericServlet.java:212)
23        at com.liferay.portal.servlet.AxisServlet.init(AxisServlet.java:65)
24        at com.liferay.portal.kernel.servlet.PortalClassLoaderServlet.portalInit(PortalClassLoaderServlet.java:73)
25        at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:52)
26        at com.liferay.portal.kernel.servlet.PortalClassLoaderServlet.init(PortalClassLoaderServlet.java:44)
27        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)


===========================================================================

Presumably liferay 6.0.5 is opening up an axis jar that's incompatible with mine in my portlet ?

How can I work around this problem ?

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

(BTW my portlet will start up OK if I remove the wsdd file that defines the web services)

Thanks for any guidance.
Greg
priti parmar
RE: Problems using axis-1.4 in portlet with Liferay 6.0.5
November 28, 2011 6:13 AM
Answer

priti parmar

Rank: New Member

Posts: 24

Join Date: November 29, 2010

Recent Posts

Hi Greg,

try this add dependency jars in your liferay-plugin-package.properties

portal-dependency-jars=\
axis.jar,\
jaxrpc.jar,\
commons-discovery.jar,\
saaj-api.jar,\
log4j.jar,\
wsdl4j.jar,\
commons-logging.jar
Greg Roberts
RE: Problems using axis-1.4 in portlet with Liferay 6.0.5
December 1, 2011 5:00 AM
Answer

Greg Roberts

Rank: New Member

Posts: 11

Join Date: October 14, 2010

Recent Posts

Thanks for the suggestion.

Unfortunately I don't think this will work because this would simply load the axis.jar that Liferay has which is incompatible with the axis.jar which I want to use.

If I could define that my portlet only opens *my* version of axis and does not have the liferay one on the classpath I think I would be OK... but I don't know how to do that whilst leaving Liferay's jars in place (because it needs them for other things).

Do you know how to do that?
Alex Swain
RE: Problems using axis-1.4 in portlet with Liferay 6.0.5
February 8, 2013 7:26 AM
Answer

Alex Swain

Rank: New Member

Posts: 8

Join Date: August 28, 2012

Recent Posts

I'm seeing this problem in V 6.1.1.0(ee), only on one portlet though, no separate Axis JAR, nothing referenced in the "liferay-plugin-package.properties" and it works fine unless the argument to any of my methods is the Service Builder object the interface relates to. As it can't take that object as an argument it makes it pretty useless as an interface. Anyone else seen this?
Alex Swain
RE: Problems using axis-1.4 in portlet with Liferay 6.0.5
February 11, 2013 1:35 AM
Answer

Alex Swain

Rank: New Member

Posts: 8

Join Date: August 28, 2012

Recent Posts

Ok, turns out re-booting the server and clearing the cache doesn't quite work, but re-booting my development machine has had a positive effect. Totally unable to explain why though.