liferay入门时遇到的一个错误
java.lang.NullPointerException
atcom.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.getInvokerFilterChain(InvokerFilter.java:177)
atcom.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:64)
atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
atorg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
atorg.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
atorg.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
atorg.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
atjava.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
atjava.lang.Thread.run(Thread.java:619)
在创建完一个liferay工程以后,在tomcat7下运行的时候,eclipse报了这错误,检查一下一的web-inf/lib下有没有portal-service.jar文件,如果有删除此文件。不要在新建的liferay插件工程下加入portal-service.jar或者portal-impl.jar,因为:在插件的WEB-INF/lib的拷贝一份portal-service.jar是禁止的,liferay插件的类加载机制不会初始化portal-service.jar