Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
Rochad Tlusty
Error deploying portlet with services generated by Service Builder
2 de marzo de 2012 9:43
Respuesta

Rochad Tlusty

Ranking: Junior Member

Mensajes: 42

Fecha de incorporación: 18 de enero de 2012

Mensajes recientes

They problem is exactly as the title says. I am currently running Liferay 6.1 on an existing Tomcat 6.0.29 server (out of root context) with MySQL. I cannot deploy any application where service builder was used.... I have attached the stack trace as a text file. If you need any more information about the set up (or config files), just let me know. Any help at all would be much appreciated,
archivos adjuntos: stacktrace.txt (23,3k)
Ram Manusani
RE: Error deploying portlet with services generated by Service Builder
2 de marzo de 2012 9:54
Respuesta

Ram Manusani

Ranking: Regular Member

Mensajes: 124

Fecha de incorporación: 27 de octubre de 2011

Mensajes recientes

Well, Coz you are running liferay 6.1.. It is expecting tomcat 7 for deployment and you have a older version of tomcat . That should be the problem I can think of now.
If you can outline the steps on what you did to get there, it might help us to troubleshoot.
David H Nebinger
RE: Error deploying portlet with services generated by Service Builder
2 de marzo de 2012 11:09
Respuesta

David H Nebinger

Ranking: Liferay Legend

Mensajes: 7252

Fecha de incorporación: 1 de septiembre de 2006

Mensajes recientes

Initially I was going to ask the question: Do you have the util-java.jar file in /www/tomcat/webapps/Liferay/webapp/deploy/test-portlet/WEB-INF/lib directory? If it's not there, that would explain your NoClassDefFoundError...

But now that I'm looking at the path, it seems kinda weird. You shouldn't have a /www/tomcat/webapps/Liferay/webapp/deploy directory, you should not be placing wars within the webapps, and test-portlet should actually get deployed as /www/tomcat/webapps/test-portlet.

I'm guessing you've been hacking at the portal-ext.properties file and have things so totally messed up that they're probably not going to work at all, even if you got around this particular issue...
Rochad Tlusty
RE: Error deploying portlet with services generated by Service Builder
2 de marzo de 2012 11:18
Respuesta

Rochad Tlusty

Ranking: Junior Member

Mensajes: 42

Fecha de incorporación: 18 de enero de 2012

Mensajes recientes

Yes that seems to be the typical response when I post questions about problems on this type of set-up... However we've been able to overcome every deployment issue we've had so far ( and to be honest we can't even get previous versions of Liferay to deploy on our server in this context and believe me, we've tried exhaustively). Our deployment method for Liferay matches this almost exactly, with the addition of adding dependencies that we're not including in the additional dependencies downloaded from the liferay.com. Also, we currently do not have any jndi connection data pool set up. I believe that the issue may be related to the following line in the stack trace:

ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.liferay.util.service.ServiceProps

Which is identical to the stack trace in the [#LPS-3142] jira ticket. I've followed the recommended steps of putting util-java.jar in WEB-INF/lib directory, however it doesn't help. I hope this helps you to understand the problem a little better.
Rochad Tlusty
RE: Error deploying portlet with services generated by Service Builder
2 de marzo de 2012 11:56
Respuesta

Rochad Tlusty

Ranking: Junior Member

Mensajes: 42

Fecha de incorporación: 18 de enero de 2012

Mensajes recientes

David H Nebinger:
You shouldn't have a /www/tomcat/webapps/Liferay/webapp/deploy directory, you should not be placing wars within the webapps, and test-portlet should actually get deployed as /www/tomcat/webapps/test-portlet.


Correct me if I'm wrong about this but, the Liferay deploy directory location shouldn't be relevent, as long as its not the same deploy directory as Tomcat and Liferay has access to it. And test-portlet actually gets deployed to /www/tomcat/base/current/webapps/test-portlet because of the way our catalina base and home are configured. I can confirm that this method of deployment currently works for portlets and themes that do not use Service Builder.

David H Nebinger:
I'm guessing you've been hacking at the portal-ext.properties file and have things so totally messed up that they're probably not going to work at all, even if you got around this particular issue...


Our portal-ext.properties....

portal.ctx=/Liferay
liferay.home=/www/tomcat/webapps/Liferay/webapp
setup.wizard.enabled=false
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://******.com:******/******?useUnicode=true&characterEncoding=UTF8&useFastDateParsing=false
jdbc.default.username=really?
jdbc.default.password=comeon;)

auto.deploy.copy.commons.logging=true
auto.deploy.copy.log4j=true

auto.deploy.listeners=\
com.liferay.portal.deploy.auto.HookAutoDeployListener,\
com.liferay.portal.deploy.auto.LayoutTemplateAutoDeployListener,\
com.liferay.portal.deploy.auto.PortletAutoDeployListener,\
com.liferay.portal.deploy.auto.ThemeAutoDeployListener,\
com.liferay.portal.deploy.auto.WebAutoDeployListener,\
com.liferay.portal.deploy.auto.exploded.tomcat.LayoutTemplateExplodedTomcatListener,\
com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatListener,\
com.liferay.portal.deploy.auto.exploded.tomcat.ThemeExplodedTomcatListener

Which brings me to my next point. We have our entire installation process scripted into an Ant Build, which coupled with DB recreation from vendor scripts, brings us back to a "pure" installation (so it's safe to assume any time we try something new, we try it on a "pure" install). For the life of me I have yet to figure out why properties that are set in configuration files and then removed, stay persistent in the database and are not returned to default values. Yet, I digress. And the problem persists... I'm just thankful that everyone in the community here is so helpful, I am very confident that we will be able to overcome this problem. Any other ideas?
Rochad Tlusty
RE: Error deploying portlet with services generated by Service Builder
2 de marzo de 2012 12:03
Respuesta

Rochad Tlusty

Ranking: Junior Member

Mensajes: 42

Fecha de incorporación: 18 de enero de 2012

Mensajes recientes

This also might help to give some insight, this is our build.user.properties for the sdk

app.server.dir=/usr/local/apache-tomcat-6.0.29
app.server.classes.portal.dir=/www/tomcat/webapps/Liferay/webapp/WEB-INF/classes
app.server.deploy.dir=/www/tomcat/base/current/webapps
app.server.lib.global.dir=${app.server.dir}/lib/ext
app.server.lib.portal.dir=${app.server.portal.dir}/WEB-INF/lib
app.server.portal.dir=/www/tomcat/webapps/Liferay/webapp

Thanks again guys! Any help is truly appreciated.
David H Nebinger
RE: Error deploying portlet with services generated by Service Builder
2 de marzo de 2012 20:59
Respuesta

David H Nebinger

Ranking: Liferay Legend

Mensajes: 7252

Fecha de incorporación: 1 de septiembre de 2006

Mensajes recientes

Rochad Tlusty:
David H Nebinger:
You shouldn't have a /www/tomcat/webapps/Liferay/webapp/deploy directory, you should not be placing wars within the webapps, and test-portlet should actually get deployed as /www/tomcat/webapps/test-portlet.


Correct me if I'm wrong about this but, the Liferay deploy directory location shouldn't be relevent, as long as its not the same deploy directory as Tomcat and Liferay has access to it.


The deploy directory is just like the temp dir or the log dir, it's outside of the scope of an actual web application. Regardless of whether you're using a ROOT or non-ROOT context, you wouldn't put the temp dir or log dir in there, so don't put the deploy dir there either.

For the life of me I have yet to figure out why properties that are set in configuration files and then removed, stay persistent in the database and are not returned to default values.


Well, it boils down to who is the owner of the properties. In some cases, it's only the properties file. In other cases, the database is the owner (thus allowing you to make changes within the control panel), and the values from the properties file are only used when the database is being initially populated.