Roller4.0.1源码编译安装

源码编译Roller4.0.1

所用的eclipse3.4,需要安装tomcat插件:
http://www.eclipsetotale.com/tomcatPlugin.html#A3
下载了tomcatPluginV321.zip

使用 -clean方式启动, tomcat用5.5.23版本

安装了插件,看到有tomcat的选项。但是如何部署Roller?见:
http://blog.csdn.net/luweifeng1983/archive/2008/12/23/3590726.aspx

源码编译:除了
apps中的 planet、webblogger中的src,components中core的src,
还需要webblogger中的web中的页面(在其他几个中间也有Web目录,暂时没有用到,就不复制过来了)

将installation.type设置成auto,创建数据库表的时候说找不到创建数据库脚本:

创建数据库的脚本,在WEB-INF中,classes目录下,分别有几个目录各自不同作用:
数据库脚本
模板等

数据库:使用MySQL数据库
脚本是在:WEB-INF/classes/dbscripts/mysql  中,系统调用 cretaedb.sql, 源码中没有这个文件,需要从执行包中复制过来
(2009-11-26 : Roller使用的是openjpa进行的orm,数据库创建的脚本,可以采用 openjpa提供的MappingTool,从源码中生成出来 --- org.apache.openjpa.jdbc.meta.MappingTool -sql createdb.sql )

用Elipse发布到tomcat,运行时发生以下问题:

问题:
java.lang.RuntimeException: <0.9.7-incubating fatal user error> org.apache.openjpa.persistence.ArgumentException: The type "class org.apache.roller.weblogger.pojos.TaskLock" has not been enhanced.
    at org.apache.roller.weblogger.business.jpa.JPAPropertiesManagerImpl.initialize(JPAPropertiesManagerImpl.java:92)
    at org.apache.roller.weblogger.business.WebloggerImpl.initialize(WebloggerImpl.java:301)
    at org.apache.roller.weblogger.ui.core.RollerContext.contextInitialized(RollerContext.java:159)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

找了些资料,没有搞清楚怎么回事,但是可以解决:
见:http://old.nabble.com/Class-has-not- been-%28JPA%29-enhanced--%28was-Re%3A-Daily-report-of-Referrers-%29-td17131123s12275r0.html
说明
As I remember things, the POJOs in Roller are JPA "enhanced " at build
time, which means that we run a special OpenJPA Ant task against the
POJO classes and it make some bytecode changes to the .class files.

If you are running against the jars in Roller's WEB-INF/lib direcory
then the POJO classes should have the enhanced bits and I'm not sure
what would cause JPA to think otherwise.

What version of Roller are you using? Are you using a custom build?

把自己编译出来的Roller classes文件(在WEB-INF/classes/中)都打包在一起(其实就是把Roller自己发布的4个Jar文件合并在一起了),放在lib中,运行正常,可以看到创建用户的界面了

你可能感兴趣的:(java,apache,tomcat,qq,jpa)