Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
Jamie Grant
using mvn build-service
18 novembre 2012 4.14
Risposta

Jamie Grant

Punteggio: New Member

Messaggi: 7

Data di Iscrizione: 25 ottobre 2012

Messaggi recenti

Hello,

I'm using the mvn build-service archetype to create a separate service-builder module which can be shared across all portlets.

All's working fine, and the process has created 2 sub-modules, a service-builder war and a service-builder.jar file.

I want to be able to use the services in other portlets, so I copied the service-builder.jar to the tomcat/lib/ext directory and everything works, but it's a bit of a pain stopping and starting the server everytime there's a change.

I tried copying the service-builder.jar to the liferay webapp/ROOT/WEB-INF/lib, and then setting the portal-dependency-jars property in the liferay-plugin-package.properties file to move the service-builder jar to each portlet, but when I do this I get classcastexceptions from my sevices which use custom queries. I'm following the same pattern as the other service model classes with the interface in the services-portlet-services.jar and the model impl class in the service-portlet.war.

I'm guessing this a classloader issue since the classes are of the same type. But looking into this in a bit more detail, seems my DTO's which hold the data from the custom query output don't do any of the magic that ClpSerialiser is doing to the other service-builder objects.

Just wondering if there is a formula for making this work? Or do I need to implement my own version of ClpSerialiser to handle the DTOs from my custom queries?

Liferay 6.1 CE + mvn2.2 + tomcat7

thanks!

-Jamie