2 Replies Latest reply on Oct 1, 2008 2:06 PM by mabimal

    Using Shared Libraries in Portlets.

      Hello everyone,

      I am using portlets to show the data from database. When a single portlet is deployed on JBoss Portal 2.6.5 SP1 then everything works fine but whenever more than one portlets (to show the data from database) are deployed there is always a OutOfMemory permGen Space error. 2 portlets have same jar files and access database from same database server. Is this the issue of jar file duplication and if this is the case than how can i use shared libraries in portlets. So please suggest me what to do?

      In the anticipation of the solution
      Mabimal

        • 1. Re: Using Shared Libraries in Portlets.
          peterj

          I assume that each portlet is being deployed in its own WAR file and that the library JARs required by the portlets are in their WEB-INF/lib directory. As you guesses, such JARs cannot be shared between WARs, as that would be against the spec. Here are a couple of solutions:

          1) Places you WARs in an EAR and move the library JARs out of WEB-INF/lib and itn othe EAR (but leave the servlet/portlet JAR, if any, in WEB-INF/lib).

          2) Move the library JARs out of WEB-INF/lib and place them into server/xxx/lib.

          I would go with option #1.

          • 2. Re: Using Shared Libraries in Portlets.

            Thank you peterJ

            I will try to go with 1st option

            Regards
            Mabimal