JBoss Portal and Alfresco integration (集成)

I have been able to deploy Alfresco into a JBoss 4.0.3 with JBoss Portal 2.2.0 but only into the default configuration. I tried deploying it into the all configuration and it fails.

Steps that I followed are below. These instructions work for the default configuration but not the all configuration.

Install JBoss
  • 1) Unizip JBoss-4.0.3SP1

Install JBoss-Portal
  • 1) cp JBoss-Portal-2.2.0/JBoss-Portal.sar JBoss-4.0.3/server/default/deploy
    2) cp JBoss-Portal-2.2.0/Setup/portal-hsqldb-ds.xml JBoss-4.0.3/server/default/deploy
    3) Edit portal-hsqldb-ds.xml to fix the slashes for unix ( change / to / )

Install Alfresco
  • 1) get the Alfresco-JBoss 1.2.0 distribution
    2) cp Alfresco-JBoss 1.2.0/jboss/server/default/deploy/alfresco.war JBoss-4.0.3/server/default/deploy
    3) cp Alfresco-JBoss-1.2.0/jboss/server/defalut/conf/alfresco directory into JBoss-4.0.3/server/default/conf
    4) create Alfresco-JBoss-1.2.0/jboss/server/defalut/conf/alfresco/custom-services-context.xml to override the root.dir & DB options.
    5) cp Alfresco-JBoss-1.2.0/jboss/server/default/deploy/jbossweb-tomcat55.sar/jsf-libs/myfaces* JBoss 4.0.3/server/default/deploy/jbossweb-tomcat55.sar/jsf-libs
  When I run with the all configuration I get the following errors:

2006-03-29 02:19:01,986 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/alfresco]] StandardWrapper.Throwable
java.lang.OutOfMemoryError: PermGen space
2006-03-29 02:19:06,315 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/alfresco]] Servlet /alfresco threw load() exception
java.lang.OutOfMemoryError: PermGen space
2006-03-29 02:19:10,849 WARN [org.jgroups.stack.DownHandler] DownHandler (UDP) exception is java.lang.OutOfMemoryError: PermGen space
2006-03-29 02:19:10,851 WARN [org.jgroups.stack.DownHandler] DownHandler (UDP) exception is java.lang.OutOfMemoryError: PermGen space
2006-03-29 02:19:32,689 WARN [org.jgroups.stack.DownHandler] DownHandler (UDP) exception is java.lang.OutOfMemoryError: PermGen space
2006-03-29 02:19:32,690 WARN [org.jgroups.stack.DownHandler] DownHandler (UDP) exception is java.lang.OutOfMemoryError: PermGen space

Solution:
The settings you have are for heap size, and do not affect the Permanent Generation size - which is where you are getting your OutOfMemory errors.

The permanent generation is special because it holds meta-data describing user classes (classes that are not part of the Java language). Examples of such meta-data are objects describing classes and methods and they are stored in the Permanent Generation.

Applications with large code-base can quickly fill up this segment of the heap which will cause java.lang.OutOfMemoryError: PermGen no matter how high your -Xmx and how much memory you have on the machine.

To set a new initial size on Sun JVM use the -XX:PermSize=64m option when starting the virtual machine.
To set the maximum permanent generation size use -XX:MaxPermSize=128m option.

If you set the initial size and maximum size to equal values you may be able to avoid some full garbage collections that may occur if/when the permanent generation needs to be resized.
The default values differ from among different versions but for Sun JVMs upper limit is typically 64MB. And if you are running the 'All' Jboss configuration the default sounds like it is not enough.

Hope this helps,

Steve

你可能感兴趣的:(Java,Portal,jboss,exception,generation,collections,servlet,methods)