Flex Your Oracle Portal

Last week while many of us were gallivanting around Vegas at MAX, Oracle was holding their OpenWorld conference in San Francicso. Unfortunately I wasn’t able to be in two places at once, so I didn’t attend OpenWorld. But I did have the opportunity of building a Flex demo for one of the Oracle keynotes. I really just took a few of our sample applications and portalized them. You can see the end result on Oracle’s Portlet Testing Site. One cool thing to point out is that the portlets are actually remote portlets being served via Oracle’s JPDK. In case you want to play around with these portlets in your own portal, the provider url is: http://www.jamesward.org:8888/flexportlets/providers/flex_portlets

Also be sure to read the Oracle Press Release:
Oracle and Adobe Collaborate to Enable Enterprise Rich Client Development

And an article I helped write: Providing Rich Portlets with Adobe Flex

In the past 2 months Flex was used in a keynote at Intel’s developer conference, a Flex application took second place at SAP TechED’s Demo Jam, and most recently Oracle did the keynote Flex demo at OpenWorld! Enterprise software continues to be transformed by Flex!

  • FR

    According to the article, “Providing Rich Portlets with Adobe Flex”, it talks about using JSR-168 and WSRP. But it seems like this portlet was done using the PDK Java Portlet, not the JSR 168 and WSRP version. Can you please let me know the issues working with JSR168 and WSRP?

  • James Ward

    AFAIK, there aren’t any issues using JSR186 or WSRP with Flex portlets. I’ve tested both methods in Oracle Portal and BEA Portal. Please let me know if you do come across any problems.

  • Yos

    Hello,

    I’m really interested in developing flex on Oracle portal, are there any resources that I can look up?

  • James Ward

    Hi Yos,

    The best place to begin is to start experimenting with Flex Builder and the Flex Test Drive Server. Then take one of your Flex apps and create a portlet from it’s HTML wrapper. Let me know how it goes!

    -James

  • Yos

    Hi James,

    Thanks for the pointers. Now I’m trying to consume web service (on top of Spring) by using Flex. After this, I will move to portlet thing. Is it ok to contact you via email?

  • James Ward

    Cool! Sure. jaward<at>adobe<dot>com

  • Hi James

    Thanks for the wonderful provider. I could consume it on my Portal and it worked like a charm! However, running into issue while creating my own Provider.

    I am trying to create a sample FLEX portlet in Oracle Portal. I can run “.mxml” file without any issues. However, when trying to access through Jsp using Jsp Taglib, I end up with following

    error:java.lang.StackOverflowError
    at java.lang.Exception.(Exception.java:77)
    at java.lang.reflect.InvocationTargetException.(InvocationTargetException.java:54)
    at sun.reflect.GeneratedConstructorAccessor26.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at java.lang.Class.newInstance0(Class.java:308)
    at java.lang.Class.newInstance(Class.java:261)
    at flex.bootstrap.BootstrapTag.(BootstrapTag.java:39)
    at flex.bootstrap.BootstrapBodyTag.(BootstrapBodyTag.java:28)
    at flex2.server.j2ee.jsp.MxmlTagImpl.(MxmlTagImpl.java:2)
    ….

    I am sitting on this error for almost 3 days Any pointers will be highly appreciated. If I may ask, would you mind sending me your provider zip file so that I can compare and see if I am missing any mandatory configuration.

    Thanks in Advance,
    Amjad.

  • Hi Amjad,

    Can you tell me if this thread helps?
    http://tech.groups.yahoo.com/group/flexcoders/messages/6184?xm=1&m=e&l=1

    You might also try to post a message to the flexcoders Yahoo! group. I haven’t seen this error before.

    -James

  • Daniel

    Hi James

    Pretty well done job. I’m trying to do a similar thing: an oracle PDK portlet with an embeded flex client, but I’m having some problems. The SWF file is not loading when publish the portlet in portal. Do you have some link with information or tutorial that can help me to solve this? I think I need some kind of bridge of some configuration in portal because the same is happening with javascript files.

    Regards,
    Daniel del Castilo

  • Vamsi

    Hi James,

    Is this something which can be done in Oracle Application Server 10g Release2, or this works only with new WebCenter Suite!

    Regards,
    Vamsi

  • Hi Vamsi,

    This method should work in any version of Oracle Portal. Are you having problems?

    -James

  • Christopher

    Hi James,

    I have an existing Oracle portal and I would like to integrate Adobe Flex. How do you create the provider? I know where to go to register the provider; however, I don’t know how to create the provider.

    Thank you,

    Chris

  • I used the JPDK to do this. There is lots of documentation about how to deploy remote portlets with JPDK on Oracle’s site. Let me know if you have any problems.

    -James

  • Tom

    Interesting post. Thanks for the link to the awesome demo!

  • ugb

    Hi James,

    is there any sample JSP-Project out there to build on a simple Oracle Portal – Flex integration ? We build a nice logistic app with flex and now we want to integrate it in portal.

  • Hello James,

    Do you remember me from firstlink.

    Just sayin’ hello.

  • Flex Test Drive Server with Oracle Portal Server Ver. 10.1.2.0.2…

    We are currently using Oracle Portal Server Ver. 10.1.2.0.2. Initially, we were using Pop Chart for rendering graphs to our site, and now we have decided to move ahead and use Flex Charts for the same.

    Now, my main concern is how do we integrate the Flex Test Drive Server with the existing environment and communicate with the same? Is there any document/information available, which will guide us in setting up the whole environment?

    Please revert back, if you have any idea of the same? Also, can i directly main you with some my specfic queries about implementation of our planned upgrade?

    Cheers!
    Pramod

  • Hi Pramod,

    The Test Drive is more of a learning tool than an actual product. If you want to use Flex Data Services you can find out more here:
    http://www.adobe.com/products/livecycle/dataservices/

    If you just want to use Flex you can learn more at http://www.flex.org

    Flex Builder is a good way to get started. It has a 30 day trial you can use.

    -James

  • David

    I have created a very basic Flex app and now want to integrate it into Oracle Portal. I have used JDev to create a provider for jsp portlet but have been able to figure out how to create a provider for my flex app. Can you help with this?

    -David

  • ThanhNS

    Hi James.

    I want to develop a portlet in liferay portal (www.liferay.com).
    I have a problem when I use FlexTagLib. It seems missing taglib.tld file in flex-bootstrap.jar.
    Please suggest me. Thank you very much.

  • Hi ThanhNS,

    You might want to go download the new version of the Compiler Module:
    http://labs.adobe.com/downloads/livecycle_dataservices2_6.html

    Give that a try and let me know what happens. I’ve been able to get Flex apps into Liferay in the past.

    -James

  • Ray

    Very good Example, Thanks

    I am trying to do the same exact principle where i have a flex application with in a JSR 168 or PDK portal in Jdeveloper. I am using Flex builder 3 where i used the html and Action script generated for the flex application.I update me view.jsp with in the portal project in jdeveloper of what the flex html has. and i ran the veiw.jsp and it worked fine where i did see my flex application. but when deploying the portal and registering it then add it to a jsp page. the page runs fine, you see the portal but there is nothing showing in the portal content.

    if any has good comment and any resources please forward it, or the a tutorial of what you did it will be great thanks..

  • Hi Ray,

    View the source of the page and make sure that the object embed tag points to the correct location of the SWF file. Also make sure that the swf file loads if you point your browser directly to it.

    -James

  • Mansi

    Thanks for a great Demo,

    I have couple of portlets developed using Jdev,I can view them on Oracle portal, If I want to use flex for my UI,i.e. in my JSP’s where should I start? I have developed couple of simple apps using flex builder but not portlets, Any suggestions?

  • Hi Mansi,

    There is a JSP taglib library for Flex:
    http://opensource.adobe.com/wiki/display/flexsdk/Downloads

    Download the file named: FlexModule_j2ee.zip

    I hope that helps.

    -James

  • Aditi

    Hi James,

    Can you give me the steps you followed for integrating flex with portal. Like did you develop your portlet in jdev and deployed on portal server or on tomcat ? and if on tomcat how did you embed in jsp and combined swf and war files ? Also where did you download the libraries and where did you place them (web-inf/lib ?).

    sorry too many questions but I have been struggling with it for past 1 week using flex builder, flex compiler, Adobe lcds, jdev etc following different theories posted on web but just stuck.

    If you can email me the details would highly appreciate that.

    Thanks,
    Aditi

  • Hi Aditi,

    I first created a Flex application in Flex Builder. Then I created an HTML portlet in JDev which referenced the SWF file using an Object Embed tag. Email me if you need more details: jaward at adobe dot com

    -James

  • Andrew

    James,
    Is there any chance that I can get a look at the code that you wrote for Flex your Oracle Portal, article? I’m interested to understand how the inter-portal communication works to make it perform so well. I’ve been dumped into a project and I’m trying desparately to bail it out from disaster.

    Thanks
    Andrew

  • Hi Andrew,

    Email me and I can send you details: jaward at adobe dot com

    -James

  • satish

    Hi James,
    Can you help me with integrating flex and jboss portal server(2.6.3)? First of all i dont know which jar contains the flex.portal.GenericFlexPortlet class to create a sample portlet that is going to be remotable :(.

    Thanks,
    Satish

  • Hi Satish,

    flex.portal.GenericFlexPortlet is a class I created. It is just a basic HTML portlet that inserted an Object Embed tag pointing to the SWF file for the Flex app.

    -James

  • satish

    Hi James,

    i wanted to be able to use the LCDS and deploy the flex client on jboss portal. But i can’t seem to get it up and running.
    Anyways thanks for your help.

    -Satish

  • @satish – It should work. Feel free to email me with details about the problem. jaward at adobe dot com

    -James

  • ndivhu

    Hi james,
    I’m integrating flex with weblogic portlets, When i deploy my portlets i’m getting the error below

    No such portlet with URI CRM Portlet

    Thanx,
    ndivhu

  • Hi ndivhu,

    It sounds like the URI you are setting somewhere for your portlet is incorrect. I’m not sure what you should do to resolve this.

    -James

  • ndivhu

    hi , im trying to create a flex portlet using the weblogic portal however whenever i deploy the portlet application to the server and open the browser,don’t get any result. When i select view from the browser i get the .html file created in my flex project which contains a reference to the .swf file.

    I have copied the bin-release folder from my flex project under WebContent in my Portlet application.

    Im using portlet.xml to specify , and and then giving my .html file as the file to locate/

    any suggestions?

    regards thina

  • @ndivhu

    You will probably need to make the html file a jsp, then add the special code that finds the right path to the swf (similar to how images work).

    I really need to create a more in-depth tutorial about this. I’m curious though…. In the post BEA acquisition world, what is the portal server going forward? I’d like to write the tutorial for that server.

    Thanks.

    -James

  • ndivhu

    hi james,
    i’ve change .html to jsp but still getting the same result. When i open the html separate i can see the .swf successfully.

    do i need to set the .swf path on portlet.xml file?
    If so any suggestion.
    Thanks ndivhu.

  • @ndivhu

    You need to add some code to the JSP so that it can find the SWF file correctly. This is just like when you put an image in your page. There is usually something special you need to add so that the portal server knows where to get the image from since URLs usually change when retrieving static content through the portal.

    -James

  • Pingback: Integrating Adobe Flex with IBM WebSphere Portal()

  • SV

    I have downloaded the zip file,
    Could you please let me know of how do i deploy the same on the JBoss portal server
    You can also mail me to vatsavai AT gmail DOT com

  • SV

    Hi James
    I have developed a flex application
    its typically an .swf file embedded in an HTML file with some .as files and .js files in the project
    The application is working fine now
    I want the HTML file to be a portlet in JBoss.
    Could you please let me know of what are the steps to be followed to make this HTML file with swf as a portlet.
    I am using
    JBoss Portal 2.7.2
    Eclipse Java EE IDE for Web Developers (Helios)

    Could you please provide some links or tutorials regarding the same on how to put flex applications as portlets

    Thanks & Regards
    Satish SV

  • satish

    Hi James,

    We are trying to build web center portal for Oracle EBusiness Suite HR processes. Do you have any sample demo or guide that can illustrate how this can be configured in webcenter.

    Cheers
    Satish

    • Sorry, I don’t have any demos of that. I know it’s been done since I did this kind of integration 6 years ago. But I don’t have any code I can share.

  • Santosh

    Hi James,

    Currently we are planning to change the “Oracle Portal” as part of the Oracle COTS application to Flex based.
    This is similar to what Oracle has done on there MetaLink site.
    Do you have any more samples or references related to this?

    Sincerely appreciate your help.

    Regards,

    Santosh

    • Santosh

      Hi James,

      I forgot to mention that we are using the following server / ver…
      Java, J2EE, Oracle Application Server 10g
      Release 2 – Ver(10.1.2.3)

  • Ravi

    Hi James,

    Can you give a sample example or link, to start developing a sample flex portlet in Jboss portal platform.

    I have downloaded “flex_jboss_portal.zip” and installed in Jboss. The portlet which is loading html which contains SWF is working fine. There is an another portlet PhoneListPortlet, having following code.

    PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher(“/PhoneList.mxml”);

    The loading above portlet throws a NullPointerException.

    [[FlexMxmlServlet]] Servlet.service() for servlet FlexMxmlServlet threw exception
    java.lang.NullPointerException

    Can you please help me out.

    Regards,
    Ravi