Forums de discussion

Spring configuration problems version 5.1.2 tomcat 6.0 bundle

thumbnail
Paul Voors, modifié il y a 15 années.

Spring configuration problems version 5.1.2 tomcat 6.0 bundle

New Member Publications: 11 Date d'inscription: 12/08/08 Publications récentes
Hello folks,

This message is related to the message: upgrade 5.1.1 to 5.1.2 on tomcat from Andrew Tillinghast.

The log files shows some spring configuraton errors in liferay 5.1.2:

There are 3 classes which could not be found:
1. /WEB-INF/classes/META-INF/data-source-spring.xml - Bean 'liferayDataSourceTarget' - com.liferay.portal.kernel.jndi.PortalJNDIUtil
2. WEB-INF/classes/META-INF/misc-spring.xml - Bean 'logInterceptor' - com.liferay.portal.spring.aop.LogInterceptor
3. WEB-INF/classes/META-INF/portlet-spring.xml - Bean 'com.liferay.chat.service.EntryLocalService.impl' - com/liferay/portal/kernel/bean/InitializingBean

From the first class I have checked that it indeed does not exist in the portal-kernel.jar. For the other 2 files I trust spring fully,

This error occurs many times in log files, it is also an nullpointer, so it might be releated, to the free classes which could not be found:

14:04:59,076 ERROR [PortletRequestDispatcherImpl:311] org.apache.jasper.JasperException: An exception occurred processing JSP page /latest.jsp at line 40

37: Status status = null;
38:
39: try {
40: status = StatusLocalServiceUtil.getUserStatus(themeDisplay.getUserId());
41: }
42: catch (NoSuchStatusException nsse) {
43: }


Stacktrace:
org.apache.jasper.JasperException: An exception occurred processing JSP page /latest.jsp at line 40

37: Status status = null;
38:
39: try {
40: status = StatusLocalServiceUtil.getUserStatus(themeDisplay.getUserId());
41: }
42: catch (NoSuchStatusException nsse) {
43: }


Stacktrace:
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
............................
at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.NullPointerException
at com.liferay.chat.service.StatusLocalServiceUtil.getUserStatus(StatusLocalServiceUtil.java:97)
at org.apache.jsp.latest_jsp._jspService(latest_jsp.java:277)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
... 103 more

Who can help me to solve these errors?
thumbnail
Ray Augé, modifié il y a 15 années.

Re: [Liferay Forums][1. Installation / Deployment / Setup] Spring configura

Liferay Legend Publications: 1197 Date d'inscription: 08/02/05 Publications récentes
On Wed, 2008-10-08 at 08:07 +0000, Paul Voors at Liferay's Community
Forums wrote:

> /WEB-INF/classes/META-INF


The first thing you should do is delete the folder
[tt]/WEB-INF/classes/META-INF[/tt]

If you have files in that folder they will override those found in the
portal-impl.jar.

If that is the case, you will for sure break the portal since those
files were heavily restructured between 5.1.1 and 5.1.2
Andrew Tillinghast, modifié il y a 15 années.

RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] Spring confi

Junior Member Publications: 60 Date d'inscription: 05/09/08 Publications récentes
On our server we don't have a /WEB-INF/classes/META-INF folder at all, we deleted the entire /webapps/root folder and replaced with the content from the download. the same with the /lib/ext directory (with the exception of the database connectivity jar files)

-Andrew
thumbnail
Paul Voors, modifié il y a 15 années.

RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] Spring confi

New Member Publications: 11 Date d'inscription: 12/08/08 Publications récentes
Hello Ray, Adrew and all other folks,

Found it!!!

After the remark of Ray I spent some time looking further.
I could not find a directory "classes/META-INF" in de WEB_INF directory. So I wondered where those spring files where declared. First I did a text search on the liferay sources without result. Then I searched the tomcat directory of the tomcat bundel. In the
"chat-portlet/WEB-INF/web.xml" I found the declartion of the spring files!
I will delete the tag with content below:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/classes/META-INF/data-source-spring.xml,WEB-INF/classes/META-INF/misc-spring.xml,WEB-INF/classes/META-INF/portlet-spring.xml,WEB-INF/classes/META-INF/ext-spring.xml</param-value>
</context-param>

But do I have to put something in place? i.e. other spring xml files?

The other listeners defined in web.xml file causes duplicate warnings in the log file.

How can I rewrite the xml file of the chat-portlet so it does not contain errors?
Andrew Tillinghast, modifié il y a 15 années.

RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] Spring confl

Junior Member Publications: 60 Date d'inscription: 05/09/08 Publications récentes
Thank Paul,

This got our portal up and running, seeing as I've already blown out our DB I just completely removed chat-portlet I'll re-add in Liferay if we actually need it.

-Andrew
Bernardo Riveira Faraldo, modifié il y a 15 années.

RE: Re: [Liferay Forums][1. Installation / Deployment / Setup] Spring confl

Regular Member Publications: 135 Date d'inscription: 30/10/08 Publications récentes
after trying removing that section from the xml config, it still fails with...

Caused by: org.apache.jasper.JasperException: An exception occurred processing JSP page /latest.jsp at line 40

37: Status status = null;
38:
39: try {
40: status = StatusLocalServiceUtil.getUserStatus(themeDisplay.getUserId());
41: }
42: catch (NoSuchStatusException nsse) {
43: }
Andrew Tillinghast, modifié il y a 15 années.

RE: Spring configuration problems version 5.1.2 tomcat 6.0 bundle

Junior Member Publications: 60 Date d'inscription: 05/09/08 Publications récentes
With no response here I tried blowing out my entire tomcat installation and getting a new one from the bundle, still get the error from the clean bundle. After this I tried making a backup of our DB and blowing that out as well. On startup Liferay rebuilt database and then errored out with the same PortalJNDIUtil error. So I created this as an issue in the support site:
http://support.liferay.com/browse/LPS-70

-Andrew
thumbnail
Juan Fernández, modifié il y a 14 années.

RE: Spring configuration problems version 5.1.2 tomcat 6.0 bundle

Liferay Legend Publications: 1261 Date d'inscription: 02/10/08 Publications récentes
Hi!
I had the same problem and I solved it by completely removing the chat porltet.
Thanks for the help
Greetings