If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Deploy webapp in cognos server

Started by jeeva, 08 Jul 2015 12:33:59 PM

Previous topic - Next topic

jeeva

Hi,

we developed one web application using spring mvc and cognos sdk to display list of reports, till now we tested this app in eclipse with apache tomcat server. but we need to deploy this app in cognos, because cognos itself having the websphere server by default. so how can i deploy this app.

and we configured cognos in iis server, what is the difference between iis and websphere.

Thanks.

MFGF

Quote from: Thanay on 08 Jul 2015 12:33:59 PM
Hi,

we developed one web application using spring mvc and cognos sdk to display list of reports, till now we tested this app in eclipse with apache tomcat server. but we need to deploy this app in cognos, because cognos itself having the websphere server by default. so how can i deploy this app.

and we configured cognos in iis server, what is the difference between iis and websphere.

Thanks.

Hi,

Cognos comes with its own embedded application server. In versions before 10.2.2 this was Tomcat, but at 10.2.2 it changed to Websphere Liberty. However, it is not designed to host anything other than the Cognos processing, so you will struggle to deploy anything of your own into it. If you have the full Websphere Application Server software you can use this to host both Cognos and your own application - you deploy both into it. Instructions for deploying Cognos into other Application Servers are in the Installation and Configuration Guide.

IIS is a web server not an application server. A web server routes http requests to the Cognos gateway, whereas an application server hosts the two java servlet containers required to support content manager and application server processing within the Cognos architecture.

MF.
Meep!

jeeva

Hi MFGF,

Thanks for your reply.

we can't change the cognos from iis server to websphere, is there any alternates are there to deploy my web app in cognos sever.

MFGF

Quote from: Thanay on 09 Jul 2015 05:52:43 AM
Hi MFGF,

Thanks for your reply.

we can't change the cognos from iis server to websphere, is there any alternates are there to deploy my web app in cognos sever.

Hi,

IIS is a web server not an application server. They are used for different things (see my previous post). If you are using a "vanilla" install of Cognos 10 your application server will either be Tomcat or it will be Websphere Liberty - Tomcat for 10.2.1 and all previous versions, Websphere Liberty for 10.2.2 and versions after this.

As far as I'm aware you cannot deploy other applications into Cognos's bundled application server (Tomcat or Websphere Liberty) as they are auto-provisioned and the tools to deploy into them are not included with the Cognos install. Your only other option is to use a different application server and deploy both Cognos and your application into this.

You stated in your original post that you have already deployed your application into Tomcat. Why not just leave it in Tomcat and have it sitting alongside the Cognos instance on the same server? Is there a specific reason you need your application to use the same application server as Cognos?

MF.
Meep!

jeeva

Hi,

my client doesn't want to maintain another server (Tomcat). because of this reason am looking for other alternatives.

Thanks.

jeeva

Hi,

i just created jsp pages and deployed in webapps folder in cognos installation. now it working fine.

Thanks

bdbits

I'd be sure your client knows what you did to get it working there. They will likely have to redo it down the road when they update/upgrade Cognos.

Andrew Weiss

I would expect that a JSP page would work.  That's not a "deployment" in the sense that it's not a .war file that needs to be unpacked and set up as a web application.  We're struggling with this right now as well as we used to deploy some components into Tomcat to inspect performance information.  I'll circle back if we find a reliable way to deploy an application.  I'm not pleased with the auto-provisioned stripped down application server.  Especially when many IBM samples rely on using the webapps directory.

-Andy
MetaManager makes administering IBM Cognos a breeze.  http://www.bspsoftware.com/MetaManager

Andrew Weiss

We recently found that you can deploy .war files into the wlpdropins folder in Cognos 10.2/Cognos11 using WebSphere Liberty Profile.

-Andy
MetaManager makes administering IBM Cognos a breeze.  http://www.bspsoftware.com/MetaManager

eballinger75

Hi Andy,

Can you give some more information about the wlpdropins folder in Cognos 10.2?

We have several java servlets that we have been running from the Cognos (webapps) tomcat application server in Cognos 10.1.1. These are simple java serlvets to extend some of the functionality of Cognos. All that is required is to update the web.xml file and then put the class files in the classes folder. This has worked great except now when we are testing for our move to 10.2.2, we find that they have changed the app server to IBM Liberty and a few of the servlets do not work anymore.

When I test the servlets outside of Cognos they work fine (ie: in MyEclipse/separate app server), but putting them in Cognos gives a nasty error:

exception javax.servlet.ServletException: Servlet execution threw an exception

root cause java.lang.LinkageError: loading constraint violation: loader "org/apache/catalina/loader/WebappClassLoader@db286ee8" previously initiated loading for a different type with name "javax/xml/soap/SOAPMessage" defined by loader "com/cognos/pogo/isolation/ParanoidClassLoader@a804e8d4

I am not sure how to solve this yet. I have tried switching from the default IBM Liberty profile to Tomcat in Cognos Configuration but I get the same error.

I'll include the routine that its dying on just in case there is someone that might know whats happening:



private boolean checkExecutePermission (String reportsearchpath, String appName, String logLevel)
    {
       
        BaseClass bc[] = null;
       
        SearchPathMultipleObject spMulti = new SearchPathMultipleObject(reportsearchpath);
       
        logDebugToFile(logLevel, appName + " spMulti = " + spMulti.get_value() );
        try {
            bc = cmService.query(spMulti, new PropEnum[] {PropEnum.user, PropEnum.userName, PropEnum.permissions}, new Sort[] {}, new QueryOptions());
           
            for (int i = 0; i < bc.length; i++) {
                for (int a = 0; a < bc.getPermissions().getValue().length; a++) {
                    if (bc.getPermissions().getValue()[a].toString().contains("execute")) {
                        return true;
                    }
                }
            }
            } catch (Exception e) {
            e.printStackTrace();
       logErrorToFile(logLevel, appName + e.getMessage());
        } 
        return false;     
     }

Maybe the wlpdropins folder is what is need. Please tell me more about this.

Thanks
   

eballinger75

Hi Guys,

I wanted to update this post since I found a workaround to this problem. If anyone else is using the embedded application server in 10.2.2 (WLP or Tomcat) you will need to make a change to web.xml found in [coginstalldir]/p2pd/WEB-INF and remove jaxrpc.jar from the section classLoaderExclude. This will allow your servlets to run without this new linkage error.

Cognos does not recommend using the embedded app server, but for simple java servlets we have been using this method for years with no issues without having to add the overhead of another app server to maintain.

Eddie

pznevill

Hey eballinger75,

I tried doing what you suggested, but with no success currently; Cognos stalls on restart. Could you give me a step by step of how you got this to work?

Thanks,

Philip

eballinger75

Hello pznevill,

Are you trying to deploy a war file or servlet/jsps? If its a servlet then place the class file under [coginstalldir]/webapps/p2pd/WEB-INF/classes and then add a line to web.xml to reference the servlet.

        <servlet>
      <servlet-name>getPDF</servlet-name>
      <servlet-class>com.cognos.getPDF.getPDF</servlet-class>
   </servlet>
   <servlet-mapping>
      <servlet-name>getPDF</servlet-name>
      <url-pattern>/cognos/getPDF</url-pattern>
   </servlet-mapping>

Then you just reference the servlet like https://localhost:9400/p2pd/cognos/getPDF...

I also recently got a war file to deploy. If you place a war file into [coginstalldir]/webapps it will deploy itself automatically when you start Cognos. I switched the application server to Tomcat in 10.2.2 since it defaults to Websphere Liberty Profile by default. If you don't switch from the default then you should be able to use the wlpdropins folder like Andrew said.

One nice example I just got to work is for barcodes (example from IBM below). There is a barcode servlet out there at works great. Find the example here:

https://www.google.ca/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&ved=0ahUKEwj8ntfJ-dDRAhVH0YMKHaiiAMwQFghBMAM&url=https%3A%2F%2Fwww.ibm.com%2Fdeveloperworks%2Fcommunity%2Fforums%2Fajax%2Fdownload%2F77777777-0000-0000-0000-000014591060%2Feb0a22a6-a85a-4583-8047-2683eaf6cab3%2Fattachment_14591060_Print_Barcodes_in_Report_Studio.doc&usg=AFQjCNFOo9PsuqSfwI4rqAOFWP1s2tUWzQ&bvm=bv.144224172,d.amc

Also remember to remove the one jar I mentioned in this post.

Hope this helps.
Eddie