Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Mathieu Hicauber
Redeployment issue
July 31, 2012 1:00 AM
Answer

Mathieu Hicauber

Rank: Junior Member

Posts: 79

Join Date: December 22, 2010

Recent Posts

Hi,

Might not be the right place, so feel free to move the post if needed.

I just downloaded jrebel eclipse plugin.
I also use Liferay IDE plugin for Eclipse for a while now.

Everything goes smooth during jrebel plugin installation. Then I add my liferay server to jrebel managed servers through the JRebl perspective. The java agent seems to ben installed , as I can see the following log lines :

1JRebel: Starting logging to file: C:\Documents and Settings\utilisateur\.jrebel\jrebel.log
2[2012-07-02 08:20:28]
3[2012-07-02 08:20:28] #############################################################
4[2012-07-02 08:20:28]
5[2012-07-02 08:20:28] JRebel 5.0.0 (201206080930)
6[2012-07-02 08:20:28] (c) Copyright ZeroTurnaround OU, Estonia, Tartu.
7........



Next step, I add the jrebel nature to one of my portlet projects. The rebel.xml file is created,, with the classpath configuration pointing to the WEB-INF/classes of the project in the plugin SDK :



 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd">
 3     <classpath>
 4         <dir name="C:/dev/liferay-plugins-sdk-6.0.5/portlets/PortletMHI-portlet/docroot/WEB-INF/classes">
 5         </dir>
 6     </classpath>
 7     <web>
 8         <link target="/">
 9             <dir name="C:/dev/liferay-plugins-sdk-6.0.5/portlets/PortletMHI-portlet/docroot">
10            </dir>
11        </link>
12   </web>
13</application>


But when I alter my portlet class, nothing happen in the portal. The class is compiled by the IDE in ${pluginSDK}/portlets/myproject/docroot/WEB-INF/classes, but never deployed to my app server.

Am I missing something here ?

Thank you,

Mathieu.
Andres Luuk
RE: Redeployment issue
July 31, 2012 4:52 AM
Answer

Andres Luuk

Rank: New Member

Posts: 11

Join Date: December 18, 2011

Recent Posts

Hi
I think this is the good place to post the problem.

From the first lines it seems you got your server running with JRebel.

Also the rebel.xml you created probably is correct but I think the path you said in this post is not:
${pluginSDK}/portlets/myproject/docroot/WEB-INF/classes
vs
C:/dev/liferay-plugins-sdk-6.0.5/portlets/PortletMHI-portlet/docroot/WEB-INF/classes from rebel.xml
So I assume that ${pluginSDK} = C:/dev/liferay-plugins-sdk-6.0.5 and instead of "myproject/docroot/WEB-INF/classes" the real IDE compilation directory is in "PortletMHI-portlet/docroot/WEB-INF/classes".

The next thing to check is that when you deployed your portlet did the rebel.xml get deployed along with it. It should be somewhere like this:
c:\Liferay\tomcat-6.0.29\webapps\PortletMHI-portlet\WEB-INF\classes\rebel.xml

JRebel checks the classes for changes on the each usage of the class. So to see the changes to the portlet you must click some links in your portlet to trigger reload.

If the rebel.xml is deployed alongside the portlet. Then could you say what file are you changing and generate a jrebel.log file and send it to support@zeroturnaround.com
http://zeroturnaround.com/software/jrebel/sending-log/
Mathieu Hicauber
RE: Redeployment issue
July 31, 2012 5:43 AM
Answer

Mathieu Hicauber

Rank: Junior Member

Posts: 79

Join Date: December 22, 2010

Recent Posts

Hi,

Thank for taking some time with my issue.

Andres Luuk:

Also the rebel.xml you created probably is correct but I think the path you said in this post is not:
${pluginSDK}/portlets/myproject/docroot/WEB-INF/classes
vs
C:/dev/liferay-plugins-sdk-6.0.5/portlets/PortletMHI-portlet/docroot/WEB-INF/classes from rebel.xml
So I assume that ${pluginSDK} = C:/dev/liferay-plugins-sdk-6.0.5 and instead of "myproject/docroot/WEB-INF/classes" the real IDE compilation directory is in "PortletMHI-portlet/docroot/WEB-INF/classes".



Yes you are right I just 'generalized' my path.


The next thing to check is that when you deployed your portlet did the rebel.xml get deployed along with it. It should be somewhere like this:
c:\Liferay\tomcat-6.0.29\webapps\PortletMHI-portlet\WEB-INF\classes\rebel.xml


rebel.xml file is in the expected place : C:\dev\liferay-portal-6.0.5\tomcat-6.0.26\webapps\PortletMHI-portlet\WEB-INF\classes



JRebel checks the classes for changes on the each usage of the class. So to see the changes to the portlet you must click some links in your portlet to trigger reload.


Tried that too.


If the rebel.xml is deployed alongside the portlet. Then could you say what file are you changing and generate a jrebel.log file and send it to support@zeroturnaround.com
http://zeroturnaround.com/software/jrebel/sending-log/


I'm changing a portlet class located in
C:\dev\liferay-plugins-sdk-6.0.5\portlets\EspaceClients-portlet\docroot\WEB-INF\src\com\...\portlets\authentification\PortletAuthentification.java

The IDE detects my change and compile a new class in
C:\dev\liferay-plugins-sdk-6.0.5\portlets\EspaceClients-portlet\docroot\WEB-INF\classes\com\...\portlets\authentification\PortletAuthentification.class

But from there, nothing happens (as I removed automatic publishing, as suggested by the jrebel eclipse plugin doc)
Mathieu Hicauber
RE: Redeployment issue
July 31, 2012 5:44 AM
Answer

Mathieu Hicauber

Rank: Junior Member

Posts: 79

Join Date: December 22, 2010

Recent Posts

Just sent my jrebel log file to the support, but there's not much in it.
Mathieu Hicauber
RE: Redeployment issue
July 31, 2012 8:41 AM
Answer

Mathieu Hicauber

Rank: Junior Member

Posts: 79

Join Date: December 22, 2010

Recent Posts

Well well well...
That was a license issue :-)

Thanks to the support II have a brand new trial license and everything goes well now !

Thanks again, now I can say it : jrebel rocks !

One more question : when I download the jrebel eclipse plugin from the market place, isn't there any trial license included ? beacause I wasn't ablae to find any jrebel.lic anywhere on my drive (neither in my OS user folder nor in my eclipse jrebel plugins folder)
Andres Luuk
RE: Redeployment issue
August 1, 2012 12:17 AM
Answer

Andres Luuk

Rank: New Member

Posts: 11

Join Date: December 18, 2011

Recent Posts

Great that you got it, with the new license, working.

But yes, when you install JRebel from the Eclipse marketplace it does not have the a trial license included. But after installation it should open a window that directs you to our trial license registration page that allows you to send a trial license to your eMail.
Mathieu Hicauber
RE: Redeployment issue
August 1, 2012 12:22 AM
Answer

Mathieu Hicauber

Rank: Junior Member

Posts: 79

Join Date: December 22, 2010

Recent Posts

Ok I probably missed this point.

Thanks again.

Mathieu.