Forums de discussion

Problem with deploying default liferay ide project

Sebastian Wikholm, modifié il y a 10 années.

Problem with deploying default liferay ide project

Regular Member Publications: 104 Date d'inscription: 10/03/11 Publications récentes
I´m having problems with being able to deploy a JSF portlet of any kind to a fresh install of liferay portal 6.1.1 ga2.

I´ve just created a new liferay project with the wizards in liferay IDE(1.6.2) into which i´ve created jsf porlets of different types (ICEFaces, PrimeFaces, LiferayFaces).

They all compile ok, but when deploying i get the errors below...

Anyone have any clue why these things created with the wizards, which contain a minimal "hello world" portlet, deployed on a fresh install of liferay are just DOA, borken ?


09:48:38,303 ERROR [BridgeConfigImpl:854] org.portletfaces.bridge.container.Port
letContainerFactoryImpl cannot be cast to com.liferay.faces.bridge.container.Por
tletContainerFactory
java.lang.ClassCastException: org.portletfaces.bridge.container.PortletContainer
FactoryImpl cannot be cast to com.liferay.faces.bridge.container.PortletContaine
rFactory
        at com.liferay.faces.bridge.config.BridgeConfigImpl$FacesConfigPostHandl
er.endElement(BridgeConfigImpl.java:845)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endEleme
nt(AbstractSAXParser.java:601)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2938)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X
MLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next
(XMLNSDocumentScannerImpl.java:140)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:808)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
java:119)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
stractSAXParser.java:1205)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
arse(SAXParserImpl.java:522)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
        at com.liferay.faces.bridge.config.BridgeConfigImpl.<init>(BridgeConfigI
mpl.java:229)
        at com.liferay.faces.bridge.config.BridgeConfigFactoryImpl.<init>(Bridge
ConfigFactoryImpl.java:29)
        at com.liferay.faces.bridge.BridgeFactoryFinderImpl.init(BridgeFactoryFi
nderImpl.java:55)
        at com.liferay.faces.bridge.BridgeFactoryFinder.getInstance(BridgeFactor
yFinder.java:97)
        at com.liferay.faces.bridge.BridgeFactoryFinder.getFactory(BridgeFactory
Finder.java:73)
        at com.liferay.faces.bridge.BridgeImpl.init(BridgeImpl.java:154)
        at javax.portlet.faces.GenericFacesPortlet.init(GenericFacesPortlet.java
:92)
        at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:2
56)
        at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFa
ctoryImpl.java:221)
        at com.liferay.portlet.PortletInstanceFactoryImpl.create(PortletInstance
FactoryImpl.java:140)
        at com.liferay.portlet.PortletInstanceFactoryUtil.create(PortletInstance
FactoryUtil.java:41)
        at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:3
10)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(Po
rtletHotDeployListener.java:546)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy
(PortletHotDeployListener.java:321)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(P
ortletHotDeployListener.java:120)
        at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDepl
oyImpl.java:188)
        at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeploy
Impl.java:96)
        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(Ho
tDeployUtil.java:27)
        at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEve
nt(PluginContextListener.java:151)
        at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(
PluginContextListener.java:141)
        at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePor
talLifecycle.java:42)
        at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLif
ecycleUtil.java:64)
</init></init>



09:48:38,278 ERROR [BridgeConfigImpl:741] org.portletfaces.bridge.scope.BridgeRe
questScopeManagerFactoryImpl
java.lang.InstantiationException: org.portletfaces.bridge.scope.BridgeRequestSco
peManagerFactoryImpl
        at java.lang.Class.newInstance0(Class.java:340)
        at java.lang.Class.newInstance(Class.java:308)
        at com.liferay.faces.bridge.config.BridgeConfigImpl.newFactoryInstance(B
ridgeConfigImpl.java:425)
        at com.liferay.faces.bridge.config.BridgeConfigImpl$FacesConfigPostHandl
er.endElement(BridgeConfigImpl.java:731)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endEleme
nt(AbstractSAXParser.java:601)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2938)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X
MLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next
(XMLNSDocumentScannerImpl.java:140)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
l.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:808)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
thumbnail
Neil Griffin, modifié il y a 10 années.

RE: Problem with deploying default liferay ide project

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Since "org.portletfaces.bridge" is displayed in the error log, that means that you must have the legacy portletfaces-bridge.jar dependency somewhere in your classpath. It needs to be removed so that the portlet will deploy properly. Also I wrote a blog post titled Migration to Liferay Faces that points to the Migration Guide in the documentation.
Sebastian Wikholm, modifié il y a 10 années.

RE: Problem with deploying default liferay ide project

Regular Member Publications: 104 Date d'inscription: 10/03/11 Publications récentes
The eclipse "wizard" puts portletfaces-bridge-2.0.0.jar in the empty projects web-inf/lib , which i now removed. When removed liferay portal gives the following error (it seems to really miss org.portletfaces)
ALLVARLIG: Exception sending context initialized event to listener instance of c
lass com.sun.faces.config.ConfigureListener
java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGU
RATION FAILED! org.portletfaces.logging.LoggerFactory
        at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureLi
stener.java:292)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:4779)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5273)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java
:1366)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1454)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:295)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
se.java:90)
        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBas
e.java:1379)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
rocessChildren(ContainerBase.java:1537)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
rocessChildren(ContainerBase.java:1547)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.r
un(ContainerBase.java:1526)
        at java.lang.Thread.run(Thread.java:619)
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! or
g.portletfaces.logging.LoggerFactory
        at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:379)

        at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureLi
stener.java:225)
        ... 13 more
Caused by: java.lang.ClassNotFoundException: org.portletfaces.logging.LoggerFact
ory
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1711)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1556)
        at org.portletfaces.liferay.faces.lifecycle.LiferayLocalePhaseListener.&lt;
clinit&gt;(LiferayLocalePhaseListener.java:47)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance
(AbstractConfigProcessor.java:268)
        at com.sun.faces.config.processor.LifecycleConfigProcessor.addPhaseListe
ners(LifecycleConfigProcessor.java:132)
        at com.sun.faces.config.processor.LifecycleConfigProcessor.process(Lifec
ycleConfigProcessor.java:111)
        at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(Abs
tractConfigProcessor.java:114)
        at com.sun.faces.config.processor.FactoryConfigProcessor.process(Factory
ConfigProcessor.java:222)
        at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:360)

        ... 14 more
2013-apr-24 11:32:05 org.apache.catalina.core.StandardContext startInternal
ALLVARLIG: Error listenerStart
thumbnail
Neil Griffin, modifié il y a 10 années.

RE: Problem with deploying default liferay ide project

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
I think you might be using an old version of the Liferay Plugins SDK. I just downloaded liferay-plugins-sdk-6.1.1-ce-ga2.zip from the downloads page and it contains Liferay Faces jar artifacts, and not legacy PortletFaces jar artifacts.

When you create a new portlet with the wizard, it copies these artifacts from the Plugins SDK. So I would recommend that you check to see which version of the Plugins SDK that Liferay IDE is using.
Sebastian Wikholm, modifié il y a 10 années.

RE: Problem with deploying default liferay ide project

Regular Member Publications: 104 Date d'inscription: 10/03/11 Publications récentes
Ok thanks, got it to work with the new plugins sdk, apparently the one from august 2012 was too old... thanks again
thumbnail
Neil Griffin, modifié il y a 10 années.

RE: Problem with deploying default liferay ide project

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
My pleasure, glad to hear it's working now. emoticon