angle-left Back

Liferay 7 JSF Portlet WAR, Maven and WSDD

Ingo Schildmann, modified 8 Months ago.

Liferay 7 JSF Portlet WAR, Maven and WSDD

New Member Posts: 12 Join Date: 12/21/11 Recent Posts

I'm upgrading a Liferay Primefaces Portlet from Liferay 6.1.1-ce-ga2 to 7.0-ga4.
I'm using Maven as build tool.

I could sucessfully build and deploy the resulting WAR.
Now I want to make a service work again, that the portlet offered.

I added the service.xml to the project and added to the pom the build plugins

I used the goal service-builder:build sucessfully to generate the service.
But I can't use the goal wsdd-builder:build to generate the WSDD-files,
because of a ClassNotFoundException (the generated service classes in /src/main/java can't be found).

Java2WSDL de.karb.service.http.TaskServiceSoap
  java.lang.ClassNotFoundException: de.karb.service.http.TaskServiceSoap
      at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(
      at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(
      at java.lang.ClassLoader.loadClass(
      at org.apache.axis.utils.ClassUtils$
      at Method)
      at org.apache.axis.utils.ClassUtils.loadClass(
      at org.apache.axis.utils.ClassUtils.forName(
      at org.apache.axis.wsdl.fromJava.Emitter.setCls(
      at com.liferay.util.ant.Java2WsddTask.generateWsdd(

The page mentions
the property builderClasspath.
Is it possible to set this in the Maven configuration of the plugin?
If not, is the WSDD-Builder only usable with Gradle?
Is there a documentation how to add a simple Gradle-buildfile to a Maven project for building the WSDD files?

Ingo Schildmann
Neil Griffin, modified 8 Months ago.

RE: Liferay 7 JSF Portlet WAR, Maven and WSDD

LIFERAY STAFF Liferay Legend Posts: 2540 Join Date: 7/26/05 Recent Posts
Hi Ingo,

I recommend that you read the forum thread titled Problem to cosume Liferay 7 service in JSF portlet. In that thread I attached a file named that shows how to do this with Maven. Note that for Liferay Portal 7.0, the ServiceBuilder API is its own jar, and the ServiceBuilder Impl is also its own jar. In other words, you would not generate services directly in your JSF portlet war project.

Kind Regards,

Ingo Schildmann, modified 8 Months ago.

RE: Liferay 7 JSF Portlet WAR, Maven and WSDD

New Member Posts: 12 Join Date: 12/21/11 Recent Posts
Hi Neil,
thanks for the with the customer service. It was helpful to seperate the service from the portlet.

But it had the same problem, that I couldn't create the WSDD with Maven .
I built then the service with Gradle and the API with Maven, so I could easily use the API in my portlet.

But although I could connect to the service with SOAP, the ServiceTracker in ..ServiceUtil.getService() returned null.

I then decided that the jsonws REST implementation is sufficient and gave up the SOAP web service.
So I could abandon Gradle in the project and build API and service with Maven.

Kind regards,