Foros de discusión

Liferay DXP Hot deploy error JSF Portlet

Jatinderveer Singh, modificado hace 6 años.

Liferay DXP Hot deploy error JSF Portlet

New Member Mensajes: 21 Fecha de incorporación: 24/02/17 Mensajes recientes
So each time i redploy my JSF portlet in DXP (copy the war and paste in deploy directory), I get the following stack, Now the portlet is available for use and can be deployed and all but what does this stack signify? Why is it giving null Pointer.

08:21:31,439 INFO  [fileinstall-D:/Jatinder/Liferay DXP/DXP Workspace/liferay-dxp-digital-enterprise-7.0-sp3/osgi/war][BaseAutoDeployListener:50] Portlets for D:\Jatinder\Liferay DXP\DXP Workspace\liferay-dxp-digital-enterprise-7.0-sp3\tomcat-8.0.32\temp\20170602082127689TXFCNJUK\DemoPortlet-7.war copied successfully
08:21:36,705 INFO  [Refresh Thread: Equinox Container: 90fe7b55-d446-0017-1cea-a8a134bc0ecc][BundleStartStopLogger:35] STARTED DemoPortlet-7_1.0.0 [537]
java.lang.reflect.UndeclaredThrowableException
	at com.sun.proxy.$Proxy706.getAttribute(Unknown Source)
	at com.sun.faces.application.ApplicationAssociate.getInstance(ApplicationAssociate.java:355)
	at com.sun.faces.config.ConfigureListener.reload(ConfigureListener.java:556)
	at com.sun.faces.config.ConfigureListener.access$700(ConfigureListener.java:122)
	at com.sun.faces.config.ConfigureListener$WebConfigResourceMonitor.run(ConfigureListener.java:1101)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor478.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ModifiableServletContextAdapter.invoke(ModifiableServletContextAdapter.java:449)
	... 12 more
Caused by: java.lang.NullPointerException
08:21:41,515 INFO  [Refresh Thread: Equinox Container: 90fe7b55-d446-0017-1cea-a8a134bc0ecc][HotDeployImpl:226] Deploying DemoPortlet-7 from queue
08:21:41,515 INFO  [Refresh Thread: Equinox Container: 90fe7b55-d446-0017-1cea-a8a134bc0ecc][PluginPackageUtil:1007] Reading plugin package for DemoPortlet-7
02-Jun-2017 08:21:41.519 INFO [Refresh Thread: Equinox Container: 90fe7b55-d446-0017-1cea-a8a134bc0ecc] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
08:21:41,538 INFO  [Refresh Thread: Equinox Container: 90fe7b55-d446-0017-1cea-a8a134bc0ecc][PortletHotDeployListener:201] Registering portlets for DemoPortlet-7
08:21:41,609 INFO  [BridgeImpl] Initializing Liferay Faces Bridge Implementation 4.0.0 (Aug 30, 2016 AD)
08:21:41,618 INFO  [Refresh Thread: Equinox Container: 90fe7b55-d446-0017-1cea-a8a134bc0ecc][PortletHotDeployListener:313] 1 portlet for DemoPortlet-7 is available for use
08:21:41,655 INFO  [BridgeSessionListener:73] Context initialized for contextPath=[/o/DemoPortlet-7]




My Pom is following :

<!--?xml version="1.0"?-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelversion>4.0.0</modelversion>
	<groupid>com.demo</groupid>
	<artifactid>DemoPortlet</artifactid>
	<packaging>war</packaging>
	<name>DemoPortlet</name>
	<version>7</version>
	<properties>
		<faces.api.version>2.2</faces.api.version>
		<liferay.faces.bridge.ext.version>5.0.0</liferay.faces.bridge.ext.version>
		<liferay.faces.bridge.version>4.0.0</liferay.faces.bridge.version>
		<mojarra.version>2.2.13</mojarra.version>
	</properties>
	<build>
		<plugins>
			<plugin>
				<artifactid>maven-compiler-plugin</artifactid>
				<version>3.3</version>
				<configuration>
					<encoding>UTF-8</encoding>
					<source>1.8
					<target>1.8</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactid>maven-war-plugin</artifactid>
				<version>2.3</version>
				<configuration>
					<filteringdeploymentdescriptors>true</filteringdeploymentdescriptors>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<dependencies>
		<dependency>
			<groupid>commons-fileupload</groupid>
			<artifactid>commons-fileupload</artifactid>
			<version>1.3.1</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupid>commons-io</groupid>
			<artifactid>commons-io</artifactid>
			<version>2.4</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupid>javax.faces</groupid>
			<artifactid>javax.faces-api</artifactid>
			<version>${faces.api.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupid>org.glassfish</groupid>
			<artifactid>javax.faces</artifactid>
			<version>${mojarra.version}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupid>com.liferay.faces</groupid>
			<artifactid>com.liferay.faces.bridge.ext</artifactid>
			<version>${liferay.faces.bridge.ext.version}</version>
		</dependency>
		<dependency>
			<groupid>com.liferay.faces</groupid>
			<artifactid>com.liferay.faces.bridge.impl</artifactid>
			<version>${liferay.faces.bridge.version}</version>
		</dependency>
		<dependency>
			<groupid>log4j</groupid>
			<artifactid>log4j</artifactid>
			<version>1.2.14</version>
		</dependency>
		<dependency>
			<groupid>org.primefaces</groupid>
			<artifactid>primefaces</artifactid>
			<version>6.0</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.liferay.portal/com.liferay.portal.kernel -->
		<dependency>
			<groupid>com.liferay.portal</groupid>
			<artifactid>com.liferay.portal.kernel</artifactid>
			<version>2.2.0</version>
			<scope>provided</scope>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core -->
		<dependency>
			<groupid>org.hibernate</groupid>
			<artifactid>hibernate-core</artifactid>
			<version>3.6.7.Final</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.json/json -->
		<dependency>
			<groupid>org.json</groupid>
			<artifactid>json</artifactid>
			<version>20160810</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/javax.portlet/portlet-api -->
		<dependency>
			<groupid>javax.portlet</groupid>
			<artifactid>portlet-api</artifactid>
			<version>2.0</version>
			<scope>provided</scope>
		</dependency>
		<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
		<dependency>
			<groupid>javax.servlet</groupid>
			<artifactid>javax.servlet-api</artifactid>
			<version>3.1.0</version>
			<scope>provided</scope>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-jdbc -->
		<dependency>
			<groupid>org.apache.tomcat</groupid>
			<artifactid>tomcat-jdbc</artifactid>
			<version>8.0.32</version>
			<!-- <scope>provided</scope> --> 
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.liferay.faces/com.liferay.faces.portal -->
		<dependency>
			<groupid>com.liferay.faces</groupid>
			<artifactid>com.liferay.faces.portal</artifactid>
			<version>3.0.0</version>
		</dependency>
	</dependencies>
</project>
thumbnail
Neil Griffin, modificado hace 6 años.

RE: Liferay DXP Hot deploy error JSF Portlet

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
This is a benign problem that we documented in FACES-3025.

If you have the following in WEB-INF/web.xml, then try commenting it out (or removing it) and the UndeclaredThrowableException should go away:
<context-param>
    <param-name>javax.faces.PROJECT_STAGE</param-name>
    <param-value>Development</param-value>
</context-param>
Jatinderveer Singh, modificado hace 6 años.

RE: Liferay DXP Hot deploy error JSF Portlet

New Member Mensajes: 21 Fecha de incorporación: 24/02/17 Mensajes recientes
Neil Griffin:
This is a benign problem that we documented in FACES-3025.

If you have the following in WEB-INF/web.xml, then try commenting it out (or removing it) and the UndeclaredThrowableException should go away:
<context-param>
    <param-name>javax.faces.PROJECT_STAGE</param-name>
    <param-value>Development</param-value>
</context-param>



Well that is a relief. So this is a known issue. Is this something to do with Liferay or JSF internal functionality?
thumbnail
Neil Griffin, modificado hace 6 años.

RE: Liferay DXP Hot deploy error JSF Portlet

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
The problem is with the way Mojarra expects to be able to monitor resources in the filesystem with a thread every two seconds. Vernon Singleton's comment on May 17, 2017 in FACES-3025 helps explain the problem a little better. It only happens in Development mode, and only when a portlet is redeployed.