掲示板

LR 5.0.1: "BeanLocator has not been set" on 168 portlet deploy

thumbnail
15年前 に Markus Bopp によって更新されました。

LR 5.0.1: "BeanLocator has not been set" on 168 portlet deploy

Junior Member 投稿: 80 参加年月日: 06/05/13 最新の投稿
Hi,

I upgraded now to 5.0.1 and when I want to deploy a jsr168 jsp portlet like I did on 4.4 it throws this exception:


Buildfile: C:\intraocular-5.0.1RC\portlets\admin_kunden_manager\build.xml
deploy:
     [java] Loading jar:file:/C:/intraocular-5.0.1RC/ext/modules/portal-impl.jar!/system.properties
     [java] 18:07:22,067 INFO  [BaseDeployer:997] .\admin_kunden_manager.war does not have a WEB-INF/liferay-plugin-package.xml or WEB-INF/liferay-plugin-package.properties
     [java] 18:07:22,072 INFO  [BaseDeployer:500] Deploying admin_kunden_manager.war
     [java] 18:07:22,569 INFO  [EntityResolver:46] Resolving entity -//Liferay//DTD Display 4.0.0//EN http://www.liferay.com/dtd/liferay-display_4_0_0.dtd
     [java] 18:07:22,570 INFO  [EntityResolver:58] Entity found for public id http://www.liferay.com/dtd/liferay-display_4_0_0.dtd
     [java] 18:07:22,586 INFO  [EntityResolver:46] Resolving entity -//Liferay//DTD Portlet Application 4.0.0//EN http://www.liferay.com/dtd/liferay-portlet-app_4_0_0.dtd
     [java] 18:07:22,587 INFO  [EntityResolver:58] Entity found for public id http://www.liferay.com/dtd/liferay-portlet-app_4_0_0.dtd
     [java] 18:07:22,616 INFO  [EntityResolver:46] Resolving entity -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd
     [java] 18:07:22,617 INFO  [EntityResolver:58] Entity found for public id http://java.sun.com/dtd/web-app_2_3.dtd
     [java] 18:07:22,648 INFO  [EntityResolver:46] Resolving entity -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd
     [java] 18:07:22,650 INFO  [EntityResolver:58] Entity found for public id http://java.sun.com/dtd/web-app_2_3.dtd
     [java] 11.06.2008 18:07:22 com.liferay.portal.kernel.log.Jdk14LogImpl error
     [java] SCHWERWIEGEND: BeanLocator is null
     [java] com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set
     [java] 	at com.liferay.portal.kernel.bean.BeanLocatorUtil.locate(BeanLocatorUtil.java:41)
     [java] 	at com.liferay.portal.util.PortalUtil._getUtil(PortalUtil.java:734)
     [java] 	at com.liferay.portal.util.PortalUtil.getPortal(PortalUtil.java:334)
     [java] 	at com.liferay.portal.util.PortalUtil.getJsSafePortletId(PortalUtil.java:286)
     [java] 	at com.liferay.portal.tools.PortletDeployer.getServletContent(PortletDeployer.java:169)
     [java] 	at com.liferay.portal.tools.PortletDeployer.getExtraContent(PortletDeployer.java:137)
     [java] 	at com.liferay.portal.tools.BaseDeployer.updateWebXml(BaseDeployer.java:1145)
     [java] 	at com.liferay.portal.tools.BaseDeployer.deployDirectory(BaseDeployer.java:408)
     [java] 	at com.liferay.portal.tools.BaseDeployer.deployFile(BaseDeployer.java:598)
     [java] 	at com.liferay.portal.tools.BaseDeployer.deploy(BaseDeployer.java:370)
     [java] 	at com.liferay.portal.tools.BaseDeployer.<init>(BaseDeployer.java:125)
     [java] 	at com.liferay.portal.tools.PortletDeployer.<init>(PortletDeployer.java:95)
     [java] 	at com.liferay.portal.tools.PortletDeployer.main(PortletDeployer.java:88)
BUILD SUCCESSFUL
Total time: 5 seconds
</init></init>


I have absolutely no idea what is going on there. I do also not understand why a Jdk14LogImpl comes into play when I am on 1.6 oO

Is there something new in LR 5.0.1 that has to be created like another xml file or something??
thumbnail
15年前 に Markus Bopp によって更新されました。

RE: LR 5.0.1: "BeanLocator has not been set" on 168 portlet deplo

Junior Member 投稿: 80 参加年月日: 06/05/13 最新の投稿
additional info:

this is the deploy target and it seems to have problems with the PortletDeployer


<target name="deploy">
		<if>
			<or>
				<equals arg1="${app.server.type}" arg2="jetty" />
				<equals arg1="${app.server.type}" arg2="resin" />
				<equals arg1="${app.server.type}" arg2="tomcat" />
			</or>
			<then>
				<property name="portlet.deploy.dir" value="${app.server.dir}/webapps" />
			</then>
			<elseif>
				<equals arg1="${app.server.type}" arg2="weblogic" />
				<then>
					<property name="portlet.deploy.dir" value="${app.server.deploy.dir}/${ext.ear.file}" />
				</then>
			</elseif>
			<else>
				<property name="portlet.deploy.dir" value="${app.server.deploy.dir}" />
			</else>
		</if>

		<java classname="com.liferay.portal.tools.PortletDeployer" classpathref="project.classpath" fork="true" newenvironment="true">

				<!-- Required Arguments -->

				<jvmarg value="-Ddeployer.base.dir=./" />
				<jvmarg value="-Ddeployer.dest.dir=${portlet.deploy.dir}" />
				<jvmarg value="-Ddeployer.app.server.type=${app.server.type}" />
				<jvmarg value="-Ddeployer.portlet.taglib.dtd=${project.dir}/web-sites/liferay.com-web/docroot/WEB-INF/tld/liferay-portlet.tld" />

				<!-- Optional Arguments -->

				<jvmarg value="-Ddeployer.jboss.prefix=1" />
				<jvmarg value="-Ddeployer.tomcat.lib.dir=${app.server.lib.dir}" />

				<!-- Dependent Libraries -->

				<arg value="${project.dir}/web-sites/liferay.com-web/docroot/WEB-INF/lib/util-taglib.jar" />
				<!--<arg value="${project.dir}/lib/util-java.jar" />-->
				<!--<arg value="${project.dir}/lib/util-jsf.jar" />-->
		</java>
	</target>
thumbnail
15年前 に Markus Bopp によって更新されました。

RE: LR 5.0.1: "BeanLocator has not been set" on 168 portlet deplo

Junior Member 投稿: 80 参加年月日: 06/05/13 最新の投稿
no ideas anyone? I couldnt find anything in the forums, wiki or documentation that is even close to that problem.

but it is definitively cause of the change from 4.4 to 5 (I tripple checked the settings for ant for both and they are the same).

So I am missing something new here and really need help in this.

Thanks,
Markus
thumbnail
15年前 に Markus Bopp によって更新されました。

RE: LR 5.0.1: "BeanLocator has not been set" on 168 portlet deplo

Junior Member 投稿: 80 参加年月日: 06/05/13 最新の投稿
ok, I found out that the BeanLocatorImpl is only set once on InitAction. And if I understand that right, InitAction is the main server's action on a startup event.

So, now I am really confused because I just want to do my deploy task like it worked before - even when Liferay is not started. So I do really not understand why the BeanLocatorImpl is so important here? Or is this just a simple bug?

If it is no bug: How can I "bypass" this issue with ant? Do I have to inject a BeanLocatorImpl instance now for every ant task?

I am completely lost.

If someone out there has an example of a working build.xml/build-parent.xml for a (jsp) portlet I would be glad if you could post it here.

thanks!
thumbnail
15年前 に Markus Bopp によって更新されました。

RE: LR 5.0.1: "BeanLocator has not been set" on 168 portlet deplo

Junior Member 投稿: 80 参加年月日: 06/05/13 最新の投稿
unfortunately I have to use the HOME/liferay/deploy deploy dir. at least this works (guess it works cause it uses the right contenxt where the beanlocator is set).

The possibility to use the PortletDeployer directly within an ant task is from my point of view just broken.

please let me know if I am wrong and what I can do about it, because using the deploy dir is not the best solution in my case.
thumbnail
15年前 に Markus B によって更新されました。

RE: LR 5.0.1: "BeanLocator has not been set" on 168 portlet deplo

New Member 投稿: 17 参加年月日: 09/01/08 最新の投稿
Hello

There's something at

upgrade service wiki
<listener>
<listener-class>com.liferay.portal.kernel.spring.context.PortletContextLoaderListener</listener-class>
</listener>

in web.xml solved my Beanlocator is null problems.