星期三, 十一月 24, 2010

Confluence 3.4 版本安装的问题及解决方法

在Ubuntu Server 10.10上安装Confluence 3.4.2,基于已有的Tomcat6服务器,遇到了如下问题,也分别找到了解决办法:

1. 错误信息:

You cannot access Confluence at present. Look at the table below to identify the reasons

Type: bootstrap

Description: Could not load bootstrap from environment. No server id found.

Exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootstrapPluginManager' defined in class path resource [setupContext.xml]: Cannot resolve reference to bean 'bootstrapBundledPluginLoader' while setting constructor argument with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootstrapBundledPluginLoader': FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException

 

这个问题在Ubuntu上大致是由于使用OpenJDK引起的,因为目前Confluence还不支持OpenJDK,需要安装Sun JDK1.6和安装一些Xorg的包。

1.1. Sun JDK:

修改/etc/apt/source.list,找到带“partner”的两行,去掉注释,执行

$ sudo apt-get update

$ sudo apt-get install sun-java6-jdk

然后将系统缺省JDK设置成Sun JDK:

$ sudo update-alternatives --config java

 

1.2. Xorg 包:

$ sudo apt-get install libice-dev libsm-dev libx11-dev libxext-dev libxp-dev libxt-dev libxtst-dev

 

2. 创建PostgreSql数据库

$ sudo su - postgres

$ psql

postgres=# create user confluence password 'XXXXXX' CREATEDB;
CREATE ROLE

postgres=# set role confluence;
SET

postgres=> create database wiki;

postgres=> \q

 

3. java.lang.OutOfMemoryError: Java Heap Space

这个问题比较麻烦,不过也是已知问题了,有现成解决方案。在Ubuntu server上,就是去修改/etc/default/tomcat6,将里面的一行:

JAVA_OPTS="-Djava.awt.headless=true -Xmx128m"

改成:

JAVA_OPTS="-Djava.awt.headless=true -Xms128m -Xmx1024m -XX:MaxPermSize=256m"

 

4. 安装完成后页面显示有问题,一些css等资源文件找不到,例如batch.css

这个问题暂时还没找到解决办法……

没有评论: