Forums de discussion

Portlet faces bridge

Vadym Ivashyn, modifié il y a 10 années.

Portlet faces bridge

New Member Publications: 15 Date d'inscription: 05/07/13 Publications récentes
When I try deploy my portlet, I get this exception:

Oct 09, 2013 2:41:45 PM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/rigensis-web-cust-application-termination-term-deposit]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)
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:724)
Caused by: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/faces/webapp/FacesServlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2823)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1160)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1655)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:108)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:58)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:338)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:831)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5148)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 more

Oct 09, 2013 2:41:45 PM org.apache.catalina.startup.HostConfig deployDirectory
SEVERE: Error deploying web application directory D:\work\liferay-portal-6.1.0\tomcat-7.0.23\webapps\rigensis-web-cust-application-termination-term-deposit
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/rigensis-web-cust-application-termination-term-deposit]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:869)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)
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)

How I can resolve this problem?
thumbnail
Vernon Singleton, modifié il y a 10 années.

RE: Portlet faces bridge

Expert Publications: 315 Date d'inscription: 14/01/13 Publications récentes
Vadym Ivashyn:
When I try deploy my portlet, I get this exception:
...
Caused by: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/faces/webapp/FacesServlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
...
How I can resolve this problem?


This fellow sums up the solution to your issue over on StackOVerflow:
http://stackoverflow.com/questions/8081234/absent-code-attribute-error-with-javaserverfaces
.
Vadym Ivashyn, modifié il y a 10 années.

RE: Portlet faces bridge

New Member Publications: 15 Date d'inscription: 05/07/13 Publications récentes
Thanx, I solved this problem. I changed dependency in my pom.xml file from:

<dependency>
<groupId>javax.faces</groupId>
<artifactId>javax.faces-api</artifactId>
<version>2.1</version>
</dependency>
to
<dependency>
<groupId>javax.faces</groupId>
<artifactId>javax.faces-api</artifactId>
<version>2.2</version>
</dependency>
thumbnail
Vernon Singleton, modifié il y a 10 années.

RE: Portlet faces bridge

Expert Publications: 315 Date d'inscription: 14/01/13 Publications récentes
Thanks for following up!

And I'm glad you were able to get things working.
.
thumbnail
Vernon Singleton, modifié il y a 10 années.

RE: Portlet faces bridge

Expert Publications: 315 Date d'inscription: 14/01/13 Publications récentes
Vadym Ivashyn:
Thanx, I solved this problem. I changed dependency in my pom.xml file from:

<dependency>
<groupId>javax.faces</groupId>
<artifactId>javax.faces-api</artifactId>
<version>2.1</version>
</dependency>
to
<dependency>
<groupId>javax.faces</groupId>
<artifactId>javax.faces-api</artifactId>
<version>2.2</version>
</dependency>



Hi Vadym,

I took a look at this again, and noticed that you may be heading for trouble, so I wanted to warn you now. You should not be using JSF 2.2 yet, if you are writing JSF portlets for Liferay. Make sure that you are following this version scheme when developing portlets for your version of the Liferay Portal. And if you are only interested in writing JSF 2.2 portlets, you will want to click the "watch" link in this thread so that you can get updates as soon as support for JSF 2.2 becomes available.

Hope that helps,
Vernon