Contacta con nosotros
contacto@flabo.es

ParamoException : Parameter names not available for method

En ocasiones, cuando creamos un portlet con Service Builder y trabajamos con maven para construir los proyecto nos encontramos con la siguiente excepción:

16:10:22,660 ERROR [localhost-startStop-16][MethodParametersResolverImpl:59] jodd.paramo.ParamoException: Parameter names not available for method: com.axa.portal.portlet.siteminder.service.impl.siteminderconnectorServiceImpl#disable
jodd.paramo.ParamoException: Parameter names not available for method: com.axa.portal.portlet.siteminder.service.impl.siteminderconnectorServiceImpl#disable
        at jodd.paramo.MethodFinder.getResolvedParameters(MethodFinder.java:113)
        at jodd.paramo.Paramo.resolveParameters(Paramo.java:62)
        at com.liferay.portal.util.MethodParametersResolverImpl.resolveMethodParameters(MethodParametersResolverImpl.java:47)
        at com.liferay.portal.kernel.util.MethodParametersResolverUtil.resolveMethodParameters(MethodParametersResolverUtil.java:34)
        at com.liferay.portal.jsonwebservice.JSONWebServiceActionConfig.<init>(JSONWebServiceActionConfig.java:44)
        at com.liferay.portal.jsonwebservice.JSONWebServiceActionConfig.<init>(JSONWebServiceActionConfig.java:66)
        at com.liferay.portal.jsonwebservice.JSONWebServiceActionsManagerImpl.registerJSONWebServiceAction(JSONWebServiceActionsManagerImpl.java:275)
        at com.liferay.portal.kernel.jsonwebservice.JSONWebServiceActionsManagerUtil.registerJSONWebServiceAction(JSONWebServiceActionsManagerUtil.java:92)
        at com.liferay.portal.jsonwebservice.JSONWebServiceRegistrator.registerJSONWebServiceAction(JSONWebServiceRegistrator.java:261)
        at com.liferay.portal.jsonwebservice.JSONWebServiceRegistrator.onJSONWebServiceBean(JSONWebServiceRegistrator.java:195)
        at com.liferay.portal.jsonwebservice.JSONWebServiceRegistrator.processBean(JSONWebServiceRegistrator.java:93)
        at com.liferay.portal.jsonwebservice.JSONWebServiceRegistrator.processAllBeans(JSONWebServiceRegistrator.java:68)
        at com.liferay.portal.jsonwebservice.JSONWebServiceActionsManagerImpl.registerServletContext(JSONWebServiceActionsManagerImpl.java:332)
        at com.liferay.portal.jsonwebservice.JSONWebServiceActionsManagerImpl.registerServletContext(JSONWebServiceActionsManagerImpl.java:296)
        at com.liferay.portal.kernel.jsonwebservice.JSONWebServiceActionsManagerUtil.registerServletContext(JSONWebServiceActionsManagerUtil.java:97)
        at com.liferay.portal.deploy.hot.JSONWebServiceHotDeployListener.doInvokeDeploy(JSONWebServiceHotDeployListener.java:66)
        at com.liferay.portal.deploy.hot.JSONWebServiceHotDeployListener.invokeDeploy(JSONWebServiceHotDeployListener.java:34)
        at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:230)
        at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:28)
        at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:164)
        at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:154)
        at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
        at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:74)
        at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:58)
        at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54)
        at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:116)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
16:10:22,660 ERROR [localhost-startStop-16][JSONWebServiceRegistrator:96] java.lang.NullPointerException
java.lang.NullPointerException
        at com.liferay.portal.jsonwebservice.JSONWebServiceActionConfig.<init>(JSONWebServiceActionConfig.java:48)
        at com.liferay.portal.jsonwebservice.JSONWebServiceActionConfig.<init>(JSONWebServiceActionConfig.java:66)
        at com.liferay.portal.jsonwebservice.JSONWebServiceActionsManagerImpl.registerJSONWebServiceAction(JSONWebServiceActionsManagerImpl.java:275)
        at com.liferay.portal.kernel.jsonwebservice.JSONWebServiceActionsManagerUtil.registerJSONWebServiceAction(JSONWebServiceActionsManagerUtil.java:92)
        at com.liferay.portal.jsonwebservice.JSONWebServiceRegistrator.registerJSONWebServiceAction(JSONWebServiceRegistrator.java:261)
        at com.liferay.portal.jsonwebservice.JSONWebServiceRegistrator.onJSONWebServiceBean(JSONWebServiceRegistrator.java:195)
        at com.liferay.portal.jsonwebservice.JSONWebServiceRegistrator.processBean(JSONWebServiceRegistrator.java:93)
        at com.liferay.portal.jsonwebservice.JSONWebServiceRegistrator.processAllBeans(JSONWebServiceRegistrator.java:68)

Esta excepción se lanza en el momento de desplegar el componente en el servidor. Si revisamos el código fuente de la librería que lo lanza ( jodd.paramo ) : GitHub vemos que esa excepción ocurre cuando no hay “debugInfoPresent”. Esto significa que dicha librería necesita para trabajar correctamente que las clases hayan sido compiladas en modo debug ( se añade información extra en el proceso de compilación ). Para hacer esto con maven debemos activar el modo debug en nuestro plugin de compilación:

			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<groupId>org.apache.maven.plugins</groupId>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>					
					<debug>true</debug><!-- This is required to the jsonws -->
					<debuglevel>lines,vars,source</debuglevel>					
				</configuration>				
			</plugin>

Después volvemos a generar liferay:service-builder, compilamos y deplegamos.