Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
IPC with Netbeans & Portlet Eventing StoryBoard zay zay zay November 25, 2008 3:07 PM
RE: IPC with Netbeans & Portlet Eventing StoryBoard sriram krishnan November 25, 2008 9:50 PM
RE: IPC with Netbeans & Portlet Eventing StoryBoard zay zay zay November 26, 2008 12:43 AM
Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portlet Eventi sriram krishnan November 26, 2008 2:01 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle zay zay zay November 26, 2008 2:25 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle Deepak Gothe November 26, 2008 3:58 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle zay zay zay November 26, 2008 4:16 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle Manish Kumar Gupta November 26, 2008 4:28 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle zay zay zay November 26, 2008 4:44 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle Manish Kumar Gupta November 26, 2008 5:02 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle zay zay zay November 26, 2008 5:14 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle Manish Kumar Gupta November 26, 2008 5:26 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle zay zay zay November 26, 2008 9:17 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle zay zay zay November 26, 2008 9:53 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle Manish Kumar Gupta November 26, 2008 9:22 PM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle zay zay zay November 27, 2008 2:58 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle zay zay zay November 27, 2008 9:53 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle zay zay zay November 28, 2008 7:39 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle Manish Kumar Gupta November 28, 2008 7:58 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle zay zay zay November 28, 2008 8:56 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle A L April 14, 2009 7:17 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle Manish Kumar Gupta April 14, 2009 8:16 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle A L April 14, 2009 10:31 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle A L April 17, 2009 7:08 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle Path Finder LifeRay October 29, 2009 2:54 AM
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle Path Finder LifeRay November 13, 2009 9:19 PM
RE: IPC with Netbeans & Portlet Eventing StoryBoard Yiru ma June 24, 2010 1:49 AM
zay zay zay
IPC with Netbeans & Portlet Eventing StoryBoard
November 25, 2008 3:07 PM
Answer

zay zay zay

Rank: New Member

Posts: 16

Join Date: November 25, 2008

Recent Posts

Hi,

I used Netbeans 6.1 and "Portlet Eventing StoryBoard" to communicate two Portlets :

- Portlet 1 : Publish an Event
The Type of Event is com.test.Employee (a class Serializable)

- Portlet 2 : Process this Event to get "Employee" info
(you can see this link of Eventing StoryBoard)

I deployed these 2 portlets on Liferay Portal 5.1.1, I got this error :

java.lang.ClassCastException: com.test.Employee cannot be cast to com.test.Employee


I have tested the same sample with Open Portal Portlet Container and it worked fine !!

Please do you have any idea about this issue?

Thanks
sriram krishnan
RE: IPC with Netbeans & Portlet Eventing StoryBoard
November 25, 2008 9:50 PM
Answer

sriram krishnan

Rank: New Member

Posts: 11

Join Date: May 20, 2008

Recent Posts

Hi,
Please add the follwing to portal-ext.properties under webapps\ROOT\WEB-INF\classes so that liferay will invoke sun's portlet container implementation.

portlet.container.impl=sun
OSPC already used sun's implemetaion may be thats the reason you don't see the exception there.
Please try this and let us know.

Thanks,
Sriram
zay zay zay
RE: IPC with Netbeans & Portlet Eventing StoryBoard
November 26, 2008 12:43 AM
Answer

zay zay zay

Rank: New Member

Posts: 16

Join Date: November 25, 2008

Recent Posts

Thank for your reply,

I don't find neither "webapps\ROOT\WEB-INF\classes" nor "portal-ext.properties"

I use Liferay 5.1.1 Bundled with Glassfish 2 for Linux.

Where can I find this file in my case?

Thanks.
sriram krishnan
Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portlet Eventi
November 26, 2008 2:01 AM
Answer

sriram krishnan

Rank: New Member

Posts: 11

Join Date: May 20, 2008

Recent Posts

I thought you are using tomcat-liferay.If you are using
glassfish-liferay then you'll have to create a portal-ext.properties
file under
glassfish/domains/domain1/applications/j2ee-modules/liferay-portal/WEB-INF/classes/

and then add portlet.container.impl=sun

Thanks,
Sriram


.
zay zay zay
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 26, 2008 2:25 AM
Answer

zay zay zay

Rank: New Member

Posts: 16

Join Date: November 25, 2008

Recent Posts

Hi,

I created the file "portal-ext.properties" under "glassfish/domains/domain1/applications/j2ee-modules/liferay-portal/WEB-INF/classes/ "
then I added the line "portlet.container.impl=sun" to "portal-ext.properties" , I started the server, I deployed the 2 portlets, but I got the same Error :

java.lang.ClassCastException: com.test.Employee cannot be cast to com.test.Employee


!!!
I don't know what to do!! It's urgent

Thanks
Deepak Gothe
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 26, 2008 3:58 AM
Answer

Deepak Gothe

Rank: Junior Member

Posts: 44

Join Date: May 19, 2008

Recent Posts

Are these two portlets two different webapplications. If yes..Make sure that the Employee class is present in both webapps.

Regards,
Deepak
zay zay zay
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 26, 2008 4:16 AM
Answer

zay zay zay

Rank: New Member

Posts: 16

Join Date: November 25, 2008

Recent Posts

Yes the two portlets are two different webapplications and the Employee class is present in both webapps.

I think that it isn't a content problem since 2 portlets work fine with Open Portal Portlet Container, I think that it's a problem of Liferay Portal config.

Thank you for your reply.
Manish Kumar Gupta
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 26, 2008 4:28 AM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

I suspect that your install is not using Sun's PC.

Can you please open web.xml of your deployed portlet (glassfish\domains\domain1\applications\j2ee-modules\<your-portlet>\WEB-INF\web.xml) to verify whether it has entry for "PortletAppEngineFilter"?
zay zay zay
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 26, 2008 4:44 AM
Answer

zay zay zay

Rank: New Member

Posts: 16

Join Date: November 25, 2008

Recent Posts

Hi,
Actually it hasn't an entry for "PortletAppEngineFilter" !

Here is the content of "web.xml" of the Portlet publishing event (EmployeeInfo) :

 1
 2<?xml version="1.0" encoding="UTF-8"?>
 3
 4<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
 5    <display-name>EmployeeInfo</display-name>
 6    <listener>
 7        <listener-class>com.liferay.portal.kernel.servlet.PortletContextListener</listener-class>
 8    </listener>
 9    <servlet>
10        <servlet-name>EmployeeInfo</servlet-name>
11        <servlet-class>com.liferay.portal.kernel.servlet.PortletServlet</servlet-class>
12        <init-param>
13            <param-name>portlet-class</param-name>
14            <param-value>com.test.EmployeeInfo</param-value>
15        </init-param>
16        <load-on-startup>0</load-on-startup>
17    </servlet>
18    <servlet-mapping>
19        <servlet-name>EmployeeInfo</servlet-name>
20        <url-pattern>/EmployeeInfo/*</url-pattern>
21    </servlet-mapping>
22    <session-config>
23        <session-timeout>30</session-timeout>
24    </session-config>
25    <welcome-file-list>
26        <welcome-file>index.jsp</welcome-file>
27    </welcome-file-list>
28    <jsp-config>
29        <taglib>
30            <taglib-uri>http://java.sun.com/portlet_2_0</taglib-uri>
31            <taglib-location>/WEB-INF/tld/liferay-portlet.tld</taglib-location>
32        </taglib>
33        <taglib>
34            <taglib-uri>http://liferay.com/tld/portlet</taglib-uri>
35            <taglib-location>/WEB-INF/tld/liferay-portlet-ext.tld</taglib-location>
36        </taglib>
37        <taglib>
38            <taglib-uri>http://liferay.com/tld/security</taglib-uri>
39            <taglib-location>/WEB-INF/tld/liferay-security.tld</taglib-location>
40        </taglib>
41        <taglib>
42            <taglib-uri>http://liferay.com/tld/theme</taglib-uri>
43            <taglib-location>/WEB-INF/tld/liferay-theme.tld</taglib-location>
44        </taglib>
45        <taglib>
46            <taglib-uri>http://liferay.com/tld/ui</taglib-uri>
47            <taglib-location>/WEB-INF/tld/liferay-ui.tld</taglib-location>
48        </taglib>
49        <taglib>
50            <taglib-uri>http://liferay.com/tld/util</taglib-uri>
51            <taglib-location>/WEB-INF/tld/liferay-util.tld</taglib-location>
52        </taglib>
53    </jsp-config>
54</web-app>


Here is the content of "web.xml" of the Portlet processing event (Health) :

 1
 2<?xml version="1.0" encoding="UTF-8"?>
 3
 4<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
 5    <display-name>Health</display-name>
 6    <listener>
 7        <listener-class>com.liferay.portal.kernel.servlet.PortletContextListener</listener-class>
 8    </listener>
 9    <servlet>
10        <servlet-name>Health</servlet-name>
11        <servlet-class>com.liferay.portal.kernel.servlet.PortletServlet</servlet-class>
12        <init-param>
13            <param-name>portlet-class</param-name>
14            <param-value>com.test.Health</param-value>
15        </init-param>
16        <load-on-startup>0</load-on-startup>
17    </servlet>
18    <servlet-mapping>
19        <servlet-name>Health</servlet-name>
20        <url-pattern>/Health/*</url-pattern>
21    </servlet-mapping>
22    <session-config>
23        <session-timeout>30</session-timeout>
24    </session-config>
25    <welcome-file-list>
26        <welcome-file>index.jsp</welcome-file>
27    </welcome-file-list>
28    <jsp-config>
29        <taglib>
30            <taglib-uri>http://java.sun.com/portlet_2_0</taglib-uri>
31            <taglib-location>/WEB-INF/tld/liferay-portlet.tld</taglib-location>
32        </taglib>
33        <taglib>
34            <taglib-uri>http://liferay.com/tld/portlet</taglib-uri>
35            <taglib-location>/WEB-INF/tld/liferay-portlet-ext.tld</taglib-location>
36        </taglib>
37        <taglib>
38            <taglib-uri>http://liferay.com/tld/security</taglib-uri>
39            <taglib-location>/WEB-INF/tld/liferay-security.tld</taglib-location>
40        </taglib>
41        <taglib>
42            <taglib-uri>http://liferay.com/tld/theme</taglib-uri>
43            <taglib-location>/WEB-INF/tld/liferay-theme.tld</taglib-location>
44        </taglib>
45        <taglib>
46            <taglib-uri>http://liferay.com/tld/ui</taglib-uri>
47            <taglib-location>/WEB-INF/tld/liferay-ui.tld</taglib-location>
48        </taglib>
49        <taglib>
50            <taglib-uri>http://liferay.com/tld/util</taglib-uri>
51            <taglib-location>/WEB-INF/tld/liferay-util.tld</taglib-location>
52        </taglib>
53    </jsp-config>
54</web-app>


What can I do in this case?
Thanks
Manish Kumar Gupta
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 26, 2008 5:02 AM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

This means, either your installation is still missing portlet.container.impl=sun entry or you haven't redeployed your portlet after adding this entry in portal-ext.properties.

When you deploy a portlet with Sun PC, you will get message like PSPL_PAECSPPAI0012 : Portlet Initialized:

try undeploy and deploy again and see whether you are getting this message.
zay zay zay
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 26, 2008 5:14 AM
Answer

zay zay zay

Rank: New Member

Posts: 16

Join Date: November 25, 2008

Recent Posts

No I don't have this message !!!

So how can I resolve missing installation?
Manish Kumar Gupta
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 26, 2008 5:26 AM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

Ok. Please follow these steps :

1. Undeploy your portlets.
2. Stop glassfish.
3. Move portal-ext.properties (containing portlet.container.impl=sun entry ) to glassfish\domains\domain1\lib\classes.
4. Start glassfish.
5. Deploy your portlets
6. See whether you are getting the message that I mentioned in my last post.
zay zay zay
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 26, 2008 9:17 AM
Answer

zay zay zay

Rank: New Member

Posts: 16

Join Date: November 25, 2008

Recent Posts

Hi Thank for your reply,

Also After following these steps, I don't have the message !

Thanks
zay zay zay
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 26, 2008 9:53 AM
Answer

zay zay zay

Rank: New Member

Posts: 16

Join Date: November 25, 2008

Recent Posts

I followed the steps indicated in the "Liferay Portal 4 - Installation Guide" section "Installing a Liferay Bundle"

Is there any file missing in my installation?
Manish Kumar Gupta
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 26, 2008 9:22 PM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

Let's go one more step back...are you able to see message "PSPL_PCCSPCPCI0003 : Starting PortletContainer" in the server.log??
zay zay zay
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 27, 2008 2:58 AM
Answer

zay zay zay

Rank: New Member

Posts: 16

Join Date: November 25, 2008

Recent Posts

Hi,

when I started glassfish, I got this message :

PSPL_PCCSPCPCI0003 : Starting PortletContainer 2.0_01
Starting Liferay Portal 5.1.1 (Calvin / Build 5101 / August 11, 2008)
zay zay zay
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 27, 2008 9:53 AM
Answer

zay zay zay

Rank: New Member

Posts: 16

Join Date: November 25, 2008

Recent Posts

when I started glassfish, I got this message :

PSPL_PCCSPCPCI0003 : Starting PortletContainer 2.0_01
Starting Liferay Portal 5.1.1 (Calvin / Build 5101 / August 11, 2008)

So what is the problem?
zay zay zay
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 28, 2008 7:39 AM
Answer

zay zay zay

Rank: New Member

Posts: 16

Join Date: November 25, 2008

Recent Posts

There is no solution?

I can't waste more time!!!

Shall I work with Open Portal Portlet Container?

Thank you for your reply.
Manish Kumar Gupta
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 28, 2008 7:58 AM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

There may be some problem with switching of portlet container in 5.1.1 release as this was the first release after Sun's PC integration with LR. Is it possible for you download trunk/5.2 branch and build it locally? I am suggesting this because there is no LR 5.1.2 release for Glassfish. If it is not feasible for you, you can try 5.1.2 tomcat bundle.
zay zay zay
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 28, 2008 8:56 AM
Answer

zay zay zay

Rank: New Member

Posts: 16

Join Date: November 25, 2008

Recent Posts

Thank you
A L
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
April 14, 2009 7:17 AM
Answer

A L

Rank: New Member

Posts: 4

Join Date: April 14, 2009

Recent Posts

Any new information on how this can be resolved would be helpful.

I get java.lang.ClassCastException during run when its processing the event in the target portlet. I get the error when typecasting the object retrieved from the javax.portlet.Event's getValue() method. The class exists in my target portlet's source packages, I have also validated that it exists (as .class) in the Target Portlet's jar file.

I am using liferay 5.2.2, netbeans 6.1 and portal pack 3.0

Thanks for any help.
Manish Kumar Gupta
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
April 14, 2009 8:16 AM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

a quick solution is to move your event payload class in the server/global classpath and remove from your webapps.
A L
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
April 14, 2009 10:31 AM
Answer

A L

Rank: New Member

Posts: 4

Join Date: April 14, 2009

Recent Posts

Manish - I yanked the payload class out of both portlets. And added a jar file with the package+payload class to tomcat/common/lib. Didn't work.
I tried moving the jar file to tomcat/common/lib/ext and restarted tomcat, no dice. (Wasnt sure where the payload jar belonged).
No change in error message.

What should I look for next?
A L
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
April 17, 2009 7:08 AM
Answer

A L

Rank: New Member

Posts: 4

Join Date: April 14, 2009

Recent Posts

I've 'solved' this. The work around may or may not work for you.
I've created a ArrayList of strings that I am able to extract in my target portlet.
Hope this is helpful to others.
Path Finder LifeRay
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
October 29, 2009 2:54 AM
Answer

Path Finder LifeRay

Rank: Expert

Posts: 262

Join Date: September 18, 2009

Recent Posts

A L:
I've 'solved' this. The work around may or may not work for you.
I've created a ArrayList of strings that I am able to extract in my target portlet.
Hope this is helpful to others.



Can u please elaborate what u have done.... still struggling to find solution...
Path Finder LifeRay
RE: Re: [Liferay Forums][3. Development] RE: IPC with Netbeans & Portle
November 13, 2009 9:19 PM
Answer

Path Finder LifeRay

Rank: Expert

Posts: 262

Join Date: September 18, 2009

Recent Posts

solved see this post for answer
Yiru ma
RE: IPC with Netbeans & Portlet Eventing StoryBoard
June 24, 2010 1:49 AM
Answer

Yiru ma

Rank: New Member

Posts: 1

Join Date: June 24, 2010

Recent Posts

Hi,

I have a problem. I followed everything in this site http://contrib.netbeans.org/portalpack/tutorials/eventing/EventingStoryBoardTutorial.html, with some changes

-Liferay Portal Server 5.1x/5.2x
-GlassFish2v

The problem is, after i press save button, nothing happens. Pls give advice as soon as possible.

Thank you