Fórum

How to deploy ext-plugin in a production Tomcat?

thumbnail
Juan José Fuentes, modificado 12 Anos atrás.

How to deploy ext-plugin in a production Tomcat?

Junior Member Postagens: 48 Data de Entrada: 16/07/10 Postagens Recentes
Hi,

I've been developing an ext plugin for Liferay 6.0.5 with Liferay IDE in Windows 7. When testing it in the Tomcat bundle used (and started) by the IDE works great: I deploy it, restart Tomcat, and the changes are applied.

But if I try to deploy it placing the war file in the deploy folder of a fresh Liferay runtime (no ext plugin deployed before), started from the startup.bat script , and restart it, the changes are not applied. I mean, the last entry in the log is the "Deploying XXXX". No message telling me to restart or something.

Is there anything I have to do additionally? Is there a wiki that explains how to deploy an ext plugin in a non development environment?

Thank you for your time.
thumbnail
Juan José Fuentes, modificado 12 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Junior Member Postagens: 48 Data de Entrada: 16/07/10 Postagens Recentes
¿Nobody has had this problem before? I'm still unable of installing the ext plugin...
Lirone75 M., modificado 12 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Regular Member Postagens: 118 Data de Entrada: 19/03/07 Postagens Recentes
tomcat supports auto deploy so just putting the war in the auto deploy folder should be ok.


Documentation on it : http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/deploying-in-production
thumbnail
Juan José Fuentes, modificado 12 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Junior Member Postagens: 48 Data de Entrada: 16/07/10 Postagens Recentes
It should be that easy, but the fact is that the plugin isn't deployed. I'm going to download the latest tomcat bundle and the latest plugins sdk, create a simple ext plugin and deploy. I'll share the results.
Marc Piparo, modificado 12 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Junior Member Postagens: 43 Data de Entrada: 14/03/11 Postagens Recentes
Has this been resolved. I am having the same issue. When I deploy my ext plugin as a war in my production tomcat environment the war is extracted as a webapp, but it doesnt appear any of the appropriate libs are copied over the ROOT/WEB-INF/lib as it does in my dev environment when deploying.
Does any one know the correct steps for deploying an Ext plugin into a tomcat prod environment?

thanks!
thumbnail
Lina Margarita Holguin, modificado 12 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Junior Member Postagens: 25 Data de Entrada: 25/03/11 Postagens Recentes
Hello, i have the same problem, nobody found the solution? i have liferay into tomcat server
thumbnail
Hitoshi Ozawa, modificado 12 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
I really haven't had any problem deploying ext plugin on Tomcat. Is there any error messages? Is the war file deleted from the deploy directory?

How are you creating your war file to deploy to Tomcat? I had one user who was just zipping the project directory instead of doing a build.
thumbnail
Lina Margarita Holguin, modificado 12 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Junior Member Postagens: 25 Data de Entrada: 25/03/11 Postagens Recentes
look, in development enviroment, the ext-plugin works fine using the sdk, but when i want to install the .war of the ext-plugin into my tomcat production, install fine but the changes are not visible.

i was restarted the server but is the same, not works.

My plugin-ext works fine and i had the .war, how install in the server?
Thanks
thumbnail
Hitoshi Ozawa, modificado 12 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
look, in development enviroment, the ext-plugin works fine using the sdk, but when i want to install the .war of the ext-plugin into my tomcat production, install fine but the changes are not visible.


So how are you deploying your ext plugin on to your production tomcat server? By modifying your build.properties from development to production. Please answer my questions I posted before.
thumbnail
Lina Margarita Holguin, modificado 12 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Junior Member Postagens: 25 Data de Entrada: 25/03/11 Postagens Recentes
Thanks for your answer... When i install my plugin-ext inte tomcat server, not show message error, say that the plugin is installed sucess. But don't work.

I did the ext-plugin with liferay sdk, but my tomcat production was clean install, only upload the plugins when works fine un te development enviroment.

In the liferay directory server production doesn't file build.properties
thumbnail
Hitoshi Ozawa, modificado 12 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
So the war file you're uploading to your production server is corrupt. Modify the ant build.properties file to deploy to your production server after testing your ext plugin on your development server.
thumbnail
Lina Margarita Holguin, modificado 12 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Junior Member Postagens: 25 Data de Entrada: 25/03/11 Postagens Recentes
HItoshi sorry, in the tomcat server production where create the file build.properties?? because this file is available into liferay-sdk, but in the server doesn't sdk only the liferay-tomcat6

Thanks for all.
thumbnail
Hitoshi Ozawa, modificado 12 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
build.properties is not in the production server. It's in the SDK. Change the properties in the build.properties to point to your production server.

Change the following property to point to your production server instead of your development server:
app.server.dir =
thumbnail
Florencia Gadea, modificado 11 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Regular Member Postagens: 146 Data de Entrada: 27/03/12 Postagens Recentes
Hi José,

I'm having exactly the same problem. But I'm using LR 6.1.1 GA2.

Did you ever find a solution?

Regards,

Flor.
thumbnail
Sushil Kumar Saini, modificado 11 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Regular Member Postagens: 104 Data de Entrada: 27/07/11 Postagens Recentes
Hi All,

Using the Liferay version 6.1.1 GA2 with tomcat. And used the following steps while deploying the ext plugin on the production and it is working fine for me.

Liferay Redeploy Ext Plugin


1.	Stop the tomcat server.
2.     Delete the temporary data from the temp and work folder of tomcat server.
3.	Delete the following jar file from $TOMCAT_HOME/lib/ext
        •	 ext-*-ext-service.jar
4.	Delete the following file from $TOMCAT_HOME/ROOT/WEB-INF/lib/
        •	ext-*-ext-impl.jar 
        •	ext-*-ext-util-bridges.jar
        •	ext-*-ext-util-java.jar
        •	ext-*-ext-util-taglib.jar
5.	Delete the following file from $TOMCAT_HOME/ROOT/WEB-INF
        •	ext-*-ext.xml 
6.	Replace the $TOMCAT_HOME/ROOT/WEB-INF/web.xml file with the default web.xml file which comes with the liferay bundle. (I think this step is required when you are doing any modification in web.xml through the ext plugin.)
7.     Delete the ext-* plugin folder from the $TOMCAT_HOME/webapps directory.
8.     Deploy the ext-*.war file in the deploy directory.
9.	Start the tomcat server.
10.	Restart the tomcat server again.





Thanks & Regards
Sushil Saini
thumbnail
Sushil Kumar Saini, modificado 11 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Regular Member Postagens: 104 Data de Entrada: 27/07/11 Postagens Recentes
Guys,... Please let us know if you still face any issue...
thumbnail
Florencia Gadea, modificado 11 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Regular Member Postagens: 146 Data de Entrada: 27/03/12 Postagens Recentes
Hi Sushil,

The actual problem is that we can't even deploy in a production server.

Regards,

Flor.
thumbnail
Sushil Kumar Saini, modificado 11 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Regular Member Postagens: 104 Data de Entrada: 27/07/11 Postagens Recentes
Hi Florencia,.. I am not getting, what is the problem you are facing.. Can you please describe.

In my case, i am using the liferay 6.1.1 and building the ext-plugin using the plugin-sdk. And then i am manually deploying the ext-plugin to tomcat-liferay setup using the above steps and it is working fine.

Regards
Sushil Saini
thumbnail
Florencia Gadea, modificado 11 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Regular Member Postagens: 146 Data de Entrada: 27/03/12 Postagens Recentes
Well, if you read the first post, that is the problem I'm having.

I put the war in the deploy folder, it looks like it gets deployed, but the changes are not applied.

Regards,

Flor.
Oliver Bayer, modificado 11 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Liferay Master Postagens: 894 Data de Entrada: 18/02/09 Postagens Recentes
Hi Florencia,

the "easiest" workaround would be to deploy it manually - even if it's not really solution for your reported problem. Be careful when deploying the ext-service.jar file. I ran into another issue there. You should copy it into a different folder (not /lib/ext) as described in the following Jira issue.

HTH Oli
thumbnail
Florencia Gadea, modificado 11 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Regular Member Postagens: 146 Data de Entrada: 27/03/12 Postagens Recentes
Hi Oliver,

Thank you so much for this valuable piece of information. I woudn't have been able to find it out without your help.

If I have problems with it, I'll contact you again.

Thanks,

Flor.
thumbnail
Florencia Gadea, modificado 11 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Regular Member Postagens: 146 Data de Entrada: 27/03/12 Postagens Recentes
Hi Oliver,

The ext plugin is still not working for me. In my extension I also override classes from portal-impl.jar. Not sure when that jar is loaded.

This is what I have in catalina.properties:

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/lib/liferay-ext,${catalina.home}/lib/liferay-ext/*.jar,${catalina.home}/lib/liferay,${catalina.home}/lib/liferay/*.jar

What do you think?

Regards,

Flor.
Oliver Bayer, modificado 11 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Liferay Master Postagens: 894 Data de Entrada: 18/02/09 Postagens Recentes
Hi Flor,

your configuration of the common.loader property seems to be ok. You only need this change if ext-service overrides aren't loaded.

The ext-impl jar file should be placed into the "webapps \ ROOT \ WEB-INF \ lib" folder instead and should automatically override the original ones from the portal-impl.jar file.
There could be some reasons if your modifications aren't loaded - without any further info I have to guess:
- is the package structure correct (the same as in portal-impl)?
- do these classes need additional configuration (spring, struts, tiles ...)?
- are these classes filters or listeners (then you have to modify web.xml)?

- did you delete the work and temp folder of tomcat before restarting?

Normally it's an "easy" task -more or less- to deploy the ext manually but as a drawback you have to know the internals e.g. where and how it's configured to be able to apply it on your own. If you have any questions feel free to ask again but please provide some more info (e.g. the server you are using, which classes aren't loaded, which error messages shown up, do they shown up in jsps or in classes...).

Greets Oli
thumbnail
Florencia Gadea, modificado 11 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Regular Member Postagens: 146 Data de Entrada: 27/03/12 Postagens Recentes
Hi Oli,

Thanks for you help. I could make it work. The thing was that I didn't know that I had to manually move the ext-service.jar and ext-impl.jar.

I'm developing an app that will be available for the community, for LR 6.1.1 GA 2 CE. So the OS shoudn't matter, I would like it to work in any environment. And I would like it to make it as easy as possible for any user to install it. I first deploy a portlet and then an ext plugin.

Here are the steps for the ext plugin:

1) Drop the war in the deploy folder. Then in gets deployed.
2) Turn the server off.
3) Copy the ext-service.jar in tomcat/lib/ext.
4) Copy the ext-impl.jar in webapps/ROOT/WEB-INF/lib
5) Delete the temp and work directories.
6) Start the server.

Now everything works fine.

Are these the standard steps that any user should follow to install an ext plugin?

Regards, thanks again,

Flor.
Oliver Bayer, modificado 11 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Liferay Master Postagens: 894 Data de Entrada: 18/02/09 Postagens Recentes
Hi Flor,

afaik you dont' have to copy files manually if you use the deploy mechanism. If you have no ext plugin deployed it should work for the very first time (but you have to restart the server). Afterwards if you want to redeploy it you can first undeploy it as described in this wiki or you can "deploy" it manually as I've tried to describe it.

Regards Oli
thumbnail
Florencia Gadea, modificado 11 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Regular Member Postagens: 146 Data de Entrada: 27/03/12 Postagens Recentes
Hi Oli,

Well, that is extactly the problem I have! I have a clean server where no ext plugin has ever been deployed. I put the war in the deploy folder. It looks like it has been deployed. I restart the server. But it never gets fully deployed! I only see that it is copied under webapps folder and that the global libraries are under lib/ext. But the changes are not applied. So in order to make it work, I have to move those jars manually. Why do you think I have that problem?

I'm using Ubuntu 10.04.4. Java version "1.6.0_24", OpenJDK. Liferay 6.1.1 GA 2 CE.

Regards,

Flor.
thumbnail
Florencia Gadea, modificado 11 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Regular Member Postagens: 146 Data de Entrada: 27/03/12 Postagens Recentes
Hi Oli,

I finally found the problem. I didn't have the file liferay-plugin-package.xml in the ext plugin. Now it works fine. It is such a pity that this is not specified in the ext plugin development documentation.

Thanks for the help,

Flor.
Oliver Bayer, modificado 11 Anos atrás.

RE: How to deploy ext-plugin in a production Tomcat?

Liferay Master Postagens: 894 Data de Entrada: 18/02/09 Postagens Recentes
Hi Flor,

I'm glad to hear that you've got it to work. Thanks for the info about the missing liferay-plugin-package.xml file. I've never thought about it being the reason for not deploying the ext plugin correctly emoticon.

Greets Oli