facebook

Deploying Portlet Projects on Websphere Portal 7

  1. MyEclipse IDE
  2.  > 
  3. WebSphere Development
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #340180 Reply

    TobiP
    Member

    Hi,

    my team and I are developing in a Websphere Portal 7 environment, using IBM’s RAD 8.0.4. As we want to start using Maven as a build tool, we are running into troubles with the Version of the RAD we are currently bound to.
    Evaluating MyEclipse Blue as an alternative, my team ran into problems deploying our projects to Websphere from within MyEclipse, because of which MyEclipse didn’t replace our RAD.
    I would like to see, whether this issue is just based on the configuration of our projects, so any help would be appreciated.

    The problem is very simple to describe:
    When trying to deploy a portlet to WPS, in the logs the following message shows up:
    EJPPG0024I: Web application with context root /.FooBar is deployed in the application server but not registered with portal.
    After logging into the portal, the portlet is simply not displayed. The project is installed in the WAS console, but no interaction is possible.

    IBM describes the problem in this technote and says it is based on either a non-unique portlet id, a non-unique context root or both. Following the advice, I changed both the context root and the portlet id several times to random values, without ever being able to successfully see the portlet.

    I created a completely new portlet project in MyEclipse to see, whether I would succeed if starting from scratch:
    I created a new Web Project with the settings as shown in the appended pic.
    I right-clicked the Web Project -> MyEclipse -> Project Facets -> Install JSR Portlets to change it into a portlet project
    I tried to deploy the project both inside an EAR Project and just the Web Project.
    I also cleaned the wstemp directory and the .metadata/.plugins/org.eclipse.wst.server.core temp directories in the RAD workspaces.

    Is there any other thing that I could try in order to be able to successfully get a portlet to show up when deploying from within MyEclipse?

    I will append my Installation Details of MyEclipse, it is a clean new installation of Version: 2013 Blue, Build id: 11.0-Blue-20130401

    Attachments:
    You must be logged in to view attached files.
    #340188 Reply

    support-swapna
    Moderator

    TobiP,

    Thank you for trying MyEclipse.

    Please go through this tutorial which explains in detail the Portlet development in MyEclipse :
    http://genuitec.com:8080/help/index.jsp?topic=%2Fcom.genuitec.eclipse.blue.doc%2Fhtml%2Ftutorials%2Fwps6_tutorial%2Findex.html

    Let us know if you see any issues.

    #340189 Reply

    TobiP
    Member

    @support-swapna wrote:

    http://genuitec.com:8080/help/index.jsp?topic=%2Fcom.genuitec.eclipse.blue.doc%2Fhtml%2Ftutorials%2Fwps6_tutorial%2Findex.html
    .

    Hi, thanks for your fast answer.
    I cannot access the link you posted, but i assume it is this tutorial: http://www.myeclipseide.com/documentation/quickstarts/blueedition/wps6_tutorial/

    I already worked through this, but that didn’t help to solve my problem. Also, what I forgot to mention, we are using the portlet 2.0 standard and create JSR286 portlets.
    Maybe there are some hidden stepstones that I need to be aware of, when creating a JSR286 portlet on WPS 7.0?

    The problem seems to persist since quite a while, but I was only able to find one thread in your forum about it, so I don’t guess it happens a lot?
    https://www.genuitec.com/forums/topic/deployment-on-websphere-portal-6-1-is-failing/&start=0&postdays=0&postorder=asc&highlight=

    #340244 Reply

    support-piotr
    Participant

    TobiP,

    Could you please send as an example Portlet project, which fails for you? This might be a project misconfiguration or an issue with server configuration/launch. Having that project locally will help us determine further steps required to get your projects set up with ME.

    #340245 Reply

    TobiP
    Member

    Sure thing. Concerning configuration of the project, I only used MyEclipse IDE functions to create the projects and the portlet. Then I added a portlet id manually.

    Attachments:
    You must be logged in to view attached files.
    #340248 Reply

    support-piotr
    Participant

    TobiP,

    I can deploy the project you’ve attached without any problems. I haven’t seen the error you’ve mentioned in the logs either. You can find logs in folder “.myeclipse” of the EAR or Web project. In the original project, with which you have problems – please remove whole folder, do one deployment and send it along with web.xml and portlet.xml to us.

    If you have previously deployed the project to the portal server from RAD, it might have not unregistered either portlets or the web app. It would be good to check in the portal management console if all portlets are unregistered and in admin console of WAS to check if web application is removed as well.

    #340252 Reply

    TobiP
    Member

    Hi,

    thanks for trying this out. I can deploy the project as well, but not use or access it.
    The project has never seen the RAD and vice versa, as I created it in MyEclipse, in a separate workspace.
    Before deplyoing, I made sure that the portlet was unregistered in the portal console (where it showed up, although I undeployed it last week), however not in the WAS console (where it seems to have been undeployed successfully).

    Then I cleaned the .myeclipse folder and deployed the project to Websphere. The output is attached, as well as the portlet.xml and web.xml (which are the same as in the project I just posted above).
    I deployed the plain web project, not the EAR project.

    Attachments:
    You must be logged in to view attached files.
    #340254 Reply

    TobiP
    Member

    PS: Sorry, I just realized that the server logs are in German, please tell me if you need translation of any kind. I can also try to configure my Websphere for an English locale.

    #340264 Reply

    support-piotr
    Participant

    TobiP,

    your logs indicate that portlets has been successfully registered with the portal. You can find it on the manage portlets page – see the attached screenshot (this is the state after deploying the MyFirstTest project you have sent earlier). Where are you checking if the portlet has been successfully registered with the portal?

    Note that, if you migrate RAD project to MyEclipse 2013, you shouldn’t need any additional configuration for basic portlet support.

    Let us know if you still have any issues!

    Attachments:
    You must be logged in to view attached files.
    #340284 Reply

    TobiP
    Member

    Hi,

    thanks a lot for your help, I finally understood what misconception we had about what we expected that would happen.

    We were puzzled by the fact, that, when deplyong a module with RAD, you see the portlet in the portal, right after deploying.
    When deplyoing with MyEclipse, you don’t see the portlet in the normal view of the portal. So we assumed that is wasn’t correctly deployed and were mislead by the ‘EJPPF0188E’ Exception.
    However, thanks to you I now found out, that the portlet actually gets correctly installed and registrated, but is not automatically added to a page. What RAD seems to do while deploying, is to append the portlet to a page and so the portlet shows up.

    So my question just altered to: Is it possible to configure MyEclipse to do this as well? Or is this only possible by manually adding the portlet to a view?

    Another thing that caught my attention right now: When I undeploy the project (right-click on project in server view -> remove deployment) the webmodule stays installed inside the portal administration. When I then try to redeploy the project (right-click on server -> add deployment -> (x)exploded), i get a stacktrace that the project could not be deployed. The project gets deployed and is also correctly appended to the view I appended it to before.

    Shouldn’t removing the deployment also remove the webmodule from the portal configuration?

    Appended is the stacktrace of the exception that is thrown while deploying the prject again. I changed the context root to /CCCCCC and changed the portlet id, but it’s still the same project.

    5.06.13 10:38:57:779 CEST] 00000028 Engine        E com.ibm.wps.command.xml.Engine processSax EJPFB0002E: Es ist eine Ausnahmebedingung aufgetreten.
                                     com.ibm.wps.command.xml.XmlCommandException: EJPXA0043E: Fehler beim Erstellen oder Aktualisieren der Ressource. [web-app uid=1233423432414345.webmod]
        at com.ibm.wps.command.xml.UpdateEngine.execItem(UpdateEngine.java:336)
        at com.ibm.wps.command.xml.UpdateEngine.processItem(UpdateEngine.java:231)
        at com.ibm.wps.command.xml.UpdateEngine.updateTopLevelItem(UpdateEngine.java:188)
        at com.ibm.wps.command.xml.XmlAccessHandler.fillObjectModel(XmlAccessHandler.java:345)
        at com.ibm.wps.command.xml.XmlAccessHandler.endElement(XmlAccessHandler.java:227)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.endElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
        at com.ibm.wps.command.xml.XmlUtils.parseSax(XmlUtils.java:273)
        at com.ibm.wps.command.xml.Engine.forInputSourceSax(Engine.java:230)
        at com.ibm.wps.command.xml.XmlCommand.execute(XmlCommand.java:203)
        at com.ibm.wps.command.xml.XmlCommandServlet.processInternal(XmlCommandServlet.java:384)
        at com.ibm.wps.command.xml.XmlCommandServlet.process(XmlCommandServlet.java:371)
        at com.ibm.wps.command.xml.XmlCommandServlet.doPost(XmlCommandServlet.java:309)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
        at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
        at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
        at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
        at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
        at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
        at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
    Caused by: com.ibm.wps.command.CommandFailedException: EJPPD0015E: Fehler im Portletanwendungsmanager, als der Benutzer xmlaccess scripting user den Befehl InstallWebApplication ausführte.
    WrappedException is: com.ibm.wps.pe.mgr.exceptions.DatastoreException: EJPPF0067E: Die Installation des Webmoduls aus der WAR-Datei CCCCCC.war ist fehlgeschlagen.
        at com.ibm.wps.command.applications.AbstractApplicationsCommand.throwAppMgrException(AbstractApplicationsCommand.java:585)
        at com.ibm.wps.command.applications.InstallWebApplicationCommand.execute(InstallWebApplicationCommand.java:140)
        at com.ibm.wps.command.xml.items.WebApplicationItem.createNormal(WebApplicationItem.java:567)
        at com.ibm.wps.command.xml.items.WebApplicationItem.create(WebApplicationItem.java:518)
        at com.ibm.wps.command.xml.UpdateEngine.execItem(UpdateEngine.java:295)
        ... 45 more
    Caused by: com.ibm.wps.pe.mgr.exceptions.DatastoreException: EJPPF0067E: Die Installation des Webmoduls aus der WAR-Datei CCCCCC.war ist fehlgeschlagen.
        at com.ibm.wps.pe.mgr.deployment.AbstractDeploymentManagerImpl.install(AbstractDeploymentManagerImpl.java:374)
        at com.ibm.wps.pe.mgr.AbstractApplicationManagerImpl.installWebModule(AbstractApplicationManagerImpl.java:587)
        at com.ibm.wps.pe.mgr.AbstractApplicationManagerImpl.installWebModule(AbstractApplicationManagerImpl.java:494)
        at com.ibm.wps.command.applications.InstallWebApplicationCommand.execute(InstallWebApplicationCommand.java:132)
        ... 48 more
    Caused by: com.ibm.wps.pe.mgr.exceptions.DatastoreException: EJPPF0188E: Installation der WAR-Datei CCCCCC.war ist fehlgeschlagen, da das Kontextstammverzeichnis /CCCCCC bereits mit WAR-Datei CCCCCC.war definiert wurde. 
        at com.ibm.wps.pe.mgr.deployment.AbstractDeploymentManagerImpl.install(AbstractDeploymentManagerImpl.java:309)
        ... 51 more
    
    [25.06.13 10:39:07:896 CEST] 00000028 servlet       I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [MyFirstTest] [/CCCCCC] [FirstPortlet]: Initialisierung erfolgreich.
    [25.06.13 10:39:08:035 CEST] 00000028 servlet       I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [MyFirstTest] [/CCCCCC] [/WEB-INF/jsp/FirstPortlet_view.jsp]: Initialisierung erfolgreich.
    
    #340289 Reply

    support-piotr
    Participant

    Hi!

    I am glad, that we’ve managed to find the source of the issue! As for automatic installation of the portlet into the site, MyEclipse doesn’t provide such an option yet. You are the first person to ask for such a feature. It should be possible from the technical point of view, but it would require a fair amount of investigation.

    Regarding the second issue – the webmodule should not stay installed. When you do the undeploy, an appropriate script is called to unregister the portlet application. However, that process can be done only if the server is running, so if you undeploy while the server is stopped, application will stay installed. Another moment when you can experience the issue is when you change identification elements in portlet.xml, while the application is deployed. Please check the deployment.log file for any errors during undeploy.

    #340327 Reply

    TobiP
    Member

    Thanks a lot for your help. I manually uninstalled the project, cleaned the server and wstemp dir and rebooted it. Then deployment/undeployment worked fine so far. I guess I just tinkered too much with the project when testing.

    I guess I will have to look for a way to make the projects get put into the portal view on deployment. But first I will now try to migrate some of our existing projects.

    #340338 Reply

    support-piotr
    Participant

    TobiP,

    I am glad that all works finally. For the installation of the portlet into main page, you can try to use “xmlaccess” script from the WAS Portal.

    Let us know if you have any questions or issues!

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: Deploying Portlet Projects on Websphere Portal 7

You must be logged in to post in the forum log in