所以这一切都始于尝试让 Coldfusion9 portlet 在 Liferay 下运行,就像我看到的运行 JBOSS 的示例一样:http: //help.adobe.com/en_US/ColdFusion/9.0/Developing/WSC00E3E9C-DC24-4488- 930D-AEED19172CC5.html
我遵循了这些步骤,但我的应用程序服务器将是 TomCat 5.5(与 Liferay 5.2.3 捆绑)。
我想从coldfusion 创建一个portlet(只是一个hello world 开始)。
安装进行cfusion
得很顺利,我创建了WAR
文件,并将其放入 Liferay 'hot depoly' 目录中,它被复制并无错误地集成到 Liferay 安装中。
我按照 JBOSS 示例中的步骤重新启动 Liferay 服务器(将.cfc
文件复制到正确的位置后)。
然而,在我启动 Liferay 之后,我在启动过程中遇到了这个错误:
21:04:33,648 INFO [PluginPackageUtil:1153] Reloading repositories
21:06:06,510 INFO [PortletHotDeployListener:227] Registering portlets for cfusion
javax.portlet.PortletException: javax.servlet.ServletException: ClassloaderHelper not initialized properly. Call ClassloaderHelper.init
(ServletContext) before using this class
at coldfusion.portlet.ColdFusionPortlet.invokeCFC(ColdFusionPortlet.java:123)
at coldfusion.portlet.ColdFusionPortlet.init(ColdFusionPortlet.java:67)
at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:250)
at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:245)
at com.liferay.portlet.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:135)
at com.liferay.portlet.PortletInstanceFactoryUtil.create(PortletInstanceFactoryUtil.java:47)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:660)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:250)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:127)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._doFireDeployEvent(HotDeployUtil.java:108)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:153)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:43)
at com.liferay.portal.kernel.servlet.PortletContextListener.portalInit(PortletContextListener.java:113)
at com.liferay.portal.kernel.util.PortalInitableUtil.init(PortalInitableUtil.java:48)
at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(PortletContextListener.java:109)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:927)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:890)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: javax.servlet.ServletException: ClassloaderHelper not initialized properly. Call ClassloaderHelper.init(ServletContext) befo
re using this class
at coldfusion.bootstrap.ClassloaderHelper.testInit(ClassloaderHelper.java:73)
at coldfusion.bootstrap.ClassloaderHelper.getClassLoader(ClassloaderHelper.java:178)
at coldfusion.portlet.ColdFusionPortlet.invokeCFC(ColdFusionPortlet.java:120)
... 38 more
21:06:07,135 INFO [PortletHotDeployListener:346] 1 portlet for cfusion is available for use
11/16 21:06:07 INFO License Service: Flex 1.5 CF Edition enabled
11/16 21:06:07 INFO Starting Flex 1.5 CF Edition
11/16 21:06:08 Information [main] - C:\chicago\liferay-portal-tomcat-5.5-5.2.3\tomcat-5.5.27\temp\0-cfusion\WEB-INF\cfusion\logs\server
.log initialized
11/16 21:06:08 Information [main] - Starting logging...
11/16 21:06:08 Information [main] - Starting license...
11/16 21:06:09 Information [main] - Invalid ColdFusion 9 license.
现在,为了嘘声和笑声,我尝试在 Liferay 上设置一个 portlet(portlet 出现了!耶!)。然而,只有 portlet 的标题会显示出来,正文是一条错误消息:
The requested resource (/cfusion/ColdFusionPortlet/invoke) is not available
现在我似乎无法找到解决方案......我用谷歌搜索,并查看了很多文件,没有人提到这种类型的错误。当然 Liferay.com 社区很安静,那里的论坛上没有冷融合讨论。所以我想我会和 SO 的每个人核实一下。
任何人?想法?