7 Replies Latest reply on Jan 9, 2007 7:33 AM by hussain_rangwala

    How To Deploy An Application As A Portlet On JBoss Portal  2

    hussain_rangwala

      Hi,
      I have a web application and its running fine on a Jboss AS 2.4.0 However i wish to deploy the same as a portlet on JBoss Portal 2.4.0.I followed all the steps for Deploying an application as a portlet on Jboss portal.However i am unable to deploy the same .I am facing the following issue:
      1)Neither the portlet shows up when i click on the portlets link nor a portlet instance is created.
      However I have the following doubts.
      1)What all changes are required in portlet.xml,portlet-instances.xml,*-object.xml.jboss-portlet.xml.
      2)Are there any changes to be done in other files apart from the one above.
      3)Also what should we write in the tag <portlet-class> in the portlet.xml file coz i have many class files under the classes folder.
      4)Also can you please explain the different elements in portlet.xml and how do we map the same for our application.

      Kindly reply as soon as possible.
      Thanks and regards
      Hussain

        • 1. Re: How To Deploy An Application As A Portlet On JBoss Porta
          peterj

          Please do not double post! I answered in your other post.

          • 2. Re: How To Deploy An Application As A Portlet On JBoss Porta
            amod_kulkarni

            Hi PeterJ,

            I have gone through the docs u have mentioned in the other posts regd deployment of an application...I have an EAR file web application, which is based on MVC architecture, and i want to deploy it on JBOSS portal 2.4.0 ... Can you throw some light on the portlet.xml file, for e.g. tags like <portlet-class>....also what all .jar files are to be added in the lib folder so as to deploy the .war on portal...if the portlet instance is not created in portlets link of the management portal after deployment of war, wat shud be the 1st thing to check so as to solve the issue...

            Thanks and Regards,
            Amod

            • 3. How To Deploy A Struts Application As A Portlet On JBoss Por
              hussain_rangwala

              Hey guys
              sorry for the double post
              Peter I read the entire document at http://docs.jboss.org/jbportal/v2.4/reference-guide/en/html/tutorials.html and followed all the steps properly still i m not able to deploy the application.I still have the following doubts
              1)I read that *-object.xml is responsible for creating pages ,windows etc.I created the file *-object.xml but Still when i access [url]http://localhost:8080/portal/ . I m not able to see my Portal page.
              2)Also I cannot figure what to write in the <portlet-class> tag in portlet.xml because in my application there are lots of .class file.
              3)Also I m not clear with the directory structure of the Portlet.war file .Can you please shed some light on it.
              4)Also do i need to make any changes in struts-config.xml

              Kindly reply as soon as possible
              Thanks & Regards
              Hussain

              [/img]

              • 4. Re: How To Deploy An Application As A Portlet On JBoss Porta
                theute

                portlet-class should be the class of your portlet.

                You should have a class implementing javax.portlet.Portlet, you cannot take any web application and make it work as a portlet without having a Portlet class (unless you use a bridge, then you need to use the bridge portlet class)

                • 5. How To Deploy An Application As A Portlet On JBoss Portal
                  hussain_rangwala

                  Hey thomas
                  thanx for the reply.Actually i downloaded the portlet.xml of an already running struts application fom the net.I m using the same in my application.The portlet-class in this xml file represents StrutsPortlet class.However i m not clear about what should be the portlet-class in my application because my Struts Application contains many .class files...Below is my Portlet.xml file..It wud be gr8 if you let me know what all changes i need to make.....Thanks once again

                  <?xml version="1.0" encoding="UTF-8"?>
                  <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
                  version="1.0">


                  <init-param>
                  ServletContextProvider
                  org.jboss.portal.bridge.JBossServletContextProvider
                  </init-param>
                  <init-param>
                  ViewPage
                  /Login.do
                  </init-param>
                  <init-param>
                  HelpPage
                  /signIn.jsp
                  </init-param>
                  <portlet-name>SETLStrutsPortletDemo</portlet-name>
                  <display-name>SETL Struts Portlet Demo</display-name>
                  This is the SETLBANK
                  <portlet-class>org.apache.portals.bridges.struts.StrutsPortlet</portlet-class>
                  <expiration-cache>-1</expiration-cache>

                  <mime-type>text/html</mime-type>
                  <portlet-mode>VIEW</portlet-mode>
                  <portlet-mode>HELP</portlet-mode>

                  <portlet-info>
                  SETL Struts Demo
                  <short-title>This is the short title</short-title>
                  Struts
                  </portlet-info>

                  </portlet-app>


                  Kindly reply as soon as possible....
                  Thanks & Regards
                  Hussain

                  • 6. Re: How To Deploy An Application As A Portlet On JBoss Porta
                    theute

                    keep the same portlet-class: org.apache.portals.bridges.struts.StrutsPortlet

                    The Struts bridge is already included in JBoss Portal.

                    Here is the project page for the Struts Bridge
                    http://portals.apache.org/bridges/multiproject/portals-bridges-struts/index.html

                    • 7. Urgent: How To Deploy An Application As A Portlet On JBoss P
                      hussain_rangwala

                      hey thomas
                      can u please elaborate the complete procedure on How To Deploy An Struts Application As A Portlet On JBoss Portal 2.4.0.Also all the necessary changes to be done in the deployment descriptors.My application is a Banking Application that uses beans,utils ,jsp's etc.Also when i try to deploy the war i get the following error on the console.


                      )
                      state: FAILED
                      watch: file:/C:/jboss-portal-2.4.0/server/default/deploy/jboss-portal.sar/port
                      al-wsrp.sar/portal-wsrp.jse
                      altDD: null
                      lastDeployed: 1168244412274
                      lastModified: 1168244388384
                      mbeans:

                      org.jboss.deployment.DeploymentInfo@695ebde7 { url=file:/C:/jboss-portal-2.4.0/s
                      erver/default/deploy/jms/jbossmq-destinations-service.xml }
                      deployer: org.jboss.deployment.SARDeployer@ca470
                      status: null
                      state: FAILED
                      watch: file:/C:/jboss-portal-2.4.0/server/default/deploy/jms/jbossmq-destinati
                      ons-service.xml
                      altDD: null
                      lastDeployed: 1168244427607
                      lastModified: 1168244427576
                      mbeans:

                      org.jboss.deployment.DeploymentInfo@236fde98 { url=file:/C:/jboss-portal-2.4.0/s
                      erver/default/deploy/DataEntities.jar }
                      deployer: MBeanProxyExt[jboss.ejb:service=EJBDeployer]
                      status: Deployment FAILED reason: Verification of Enterprise Beans failed, see
                      above for error messages.
                      state: FAILED
                      watch: file:/C:/jboss-portal-2.4.0/server/default/deploy/DataEntities.jar
                      altDD: null
                      lastDeployed: 1168244484663
                      lastModified: 1168244484241
                      mbeans:

                      org.jboss.deployment.DeploymentInfo@3f2818c7 { url=file:/C:/jboss-portal-2.4.0/s
                      erver/default/deploy/SETLStruts.war }
                      deployer: MBeanProxyExt[jboss.web:service=WebServer]
                      status: Deployment FAILED reason: Error during deploy; - nested throwable: (ja
                      vax.naming.NamingException: ejb-local-ref: 'ejb/AccountDetailsEJB', with web.xml
                      ejb-link: 'AccountDetails' failed to resolve to an ejb with a LocalHome)
                      state: FAILED
                      watch: file:/C:/jboss-portal-2.4.0/server/default/deploy/SETLStruts.war
                      altDD: null
                      lastDeployed: 1168244490737
                      lastModified: 1168244490659
                      mbeans:

                      --- MBeans waiting for other MBeans ---
                      ObjectName: jboss.web.deployment:id=1059592391,war=SETLStruts.war
                      State: FAILED
                      Reason: org.jboss.deployment.DeploymentException: Error during deploy; - neste
                      d throwable: (javax.naming.NamingException: ejb-local-ref: 'ejb/AccountDetailsEJ
                      B', with web.xml ejb-link: 'AccountDetails' failed to resolve to an ejb with a L
                      ocalHome)

                      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
                      ObjectName: jboss.web.deployment:id=1059592391,war=SETLStruts.war
                      State: FAILED
                      Reason: org.jboss.deployment.DeploymentException: Error during deploy; - neste
                      d throwable: (javax.naming.NamingException: ejb-local-ref: 'ejb/AccountDetailsEJ
                      B', with web.xml ejb-link: 'AccountDetails' failed to resolve to an ejb with a L
                      ocalHome)


                      13:51:33,672 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0
                      -8080
                      13:51:34,031 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
                      13:51:34,094 INFO [JkMain] Jk running ID=0 time=0/203 config=null
                      13:51:34,109 INFO [Server] JBoss (MX MicroKernel) [4.0.4.GA (build: CVSTag=JBos
                      s_4_0_4_GA date=200605151000)] Started in 2m:684ms


                      Kindly reply as soon as possible
                      Thanks & Regards
                      Hussain