You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Dave <sn...@gmail.com> on 2008/03/04 04:30:06 UTC

How to configure Roller caching

Why preparing my Advanced Apache Roller presentation for ApacheCon EU,
I wrote up some docs for configuring Roller's page/feed caches on my blog:

   http://rollerweblogger.org/roller/entry/howto_configure_roller_caching

Feedback is welcome. Did I get anything wrong? Did I leave any
important details out?

- Dave

RE: Weblogger initialization failed

Posted by John Langan <la...@homes.com>.
Dave,
I have just downloaded and built roller_4.1-dev and as you said the
'creator' field is in the 'create table website' script. So it seems like
the problem is solved when you release 4.1. 
For 4.0 I manually added the field to our database.
Thanks for your help.
John

On Tue, Mar 11, 2008 at 3:05 PM, John Langan <la...@homes.com> wrote:
> Dave,
>  Apologies, I forgot to run ant build but the Oracle DB 'create table
>  website' script created on my system in
>  \roller\apps\weblogger\build\webapp\WEB-INF\classes\dbscripts\oracle when
I
>  just ran it is still missing the 'creator' field.
>

I see it in mine in the trunk (i.e. 4.1-dev). I wonder what is going wrong.

- Dave



Re: Weblogger initialization failed

Posted by Dave <sn...@gmail.com>.
On Tue, Mar 11, 2008 at 3:05 PM, John Langan <la...@homes.com> wrote:
> Dave,
>  Apologies, I forgot to run ant build but the Oracle DB 'create table
>  website' script created on my system in
>  \roller\apps\weblogger\build\webapp\WEB-INF\classes\dbscripts\oracle when I
>  just ran it is still missing the 'creator' field.
>
> John.
>
>  -----Original Message-----
>  From: Dave [mailto:snoopdave@gmail.com]
>
> Sent: Tuesday, March 11, 2008 2:45 PM
>  To: user@roller.apache.org
>  Subject: Re: Weblogger initialization failed
>
>
>
> On Tue, Mar 11, 2008 at 2:37 PM, John Langan <la...@homes.com> wrote:
>  >  Thanks for the help and now I've got a working copy.
>  >  You were correct that the 'creator' field was missing from the 'website'
>  >  table, but I didn't notice any errors when the Roller tables were
>  created.
>  >  I think this is because they were created using the Oracle version of the
>  >  scripts that came with the Roller 4 download on
>  >  http://roller.apache.org/downloads.html.
>  >  I checked the scripts and the 'creator' field is not included in the
>  'create
>  >  table website' script.

I see it in mine in the trunk (i.e. 4.1-dev). I wonder what is going wrong.

- Dave

RE: Weblogger initialization failed

Posted by John Langan <la...@homes.com>.
Dave,
Apologies, I forgot to run ant build but the Oracle DB 'create table
website' script created on my system in
\roller\apps\weblogger\build\webapp\WEB-INF\classes\dbscripts\oracle when I
just ran it is still missing the 'creator' field.
John.

-----Original Message-----
From: Dave [mailto:snoopdave@gmail.com] 
Sent: Tuesday, March 11, 2008 2:45 PM
To: user@roller.apache.org
Subject: Re: Weblogger initialization failed

On Tue, Mar 11, 2008 at 2:37 PM, John Langan <la...@homes.com> wrote:
>  Thanks for the help and now I've got a working copy.
>  You were correct that the 'creator' field was missing from the 'website'
>  table, but I didn't notice any errors when the Roller tables were
created.
>  I think this is because they were created using the Oracle version of the
>  scripts that came with the Roller 4 download on
>  http://roller.apache.org/downloads.html.
>  I checked the scripts and the 'creator' field is not included in the
'create
>  table website' script.
>
>  There are no Oracle version scripts with the current download from the
>  roller/tag/roller_4.0 - final Roller 4.0 release in the repositry at
>  http://cwiki.apache.org/confluence/display/ROLLER/Roller+Source+Code

The Oracle DB create script (and all others too) is generated by the
build process. Run the build and check in
build/webapp/WEB-INF/classes/dbscripts

- Dave



Re: Weblogger initialization failed

Posted by Dave <sn...@gmail.com>.
On Tue, Mar 11, 2008 at 2:37 PM, John Langan <la...@homes.com> wrote:
>  Thanks for the help and now I've got a working copy.
>  You were correct that the 'creator' field was missing from the 'website'
>  table, but I didn't notice any errors when the Roller tables were created.
>  I think this is because they were created using the Oracle version of the
>  scripts that came with the Roller 4 download on
>  http://roller.apache.org/downloads.html.
>  I checked the scripts and the 'creator' field is not included in the 'create
>  table website' script.
>
>  There are no Oracle version scripts with the current download from the
>  roller/tag/roller_4.0 - final Roller 4.0 release in the repositry at
>  http://cwiki.apache.org/confluence/display/ROLLER/Roller+Source+Code

The Oracle DB create script (and all others too) is generated by the
build process. Run the build and check in
build/webapp/WEB-INF/classes/dbscripts

- Dave

RE: Weblogger initialization failed

Posted by John Langan <la...@homes.com>.
Dave,
Thanks for the help and now I've got a working copy.
You were correct that the 'creator' field was missing from the 'website'
table, but I didn't notice any errors when the Roller tables were created.
I think this is because they were created using the Oracle version of the
scripts that came with the Roller 4 download on
http://roller.apache.org/downloads.html. 
I checked the scripts and the 'creator' field is not included in the 'create
table website' script.

There are no Oracle version scripts with the current download from the
roller/tag/roller_4.0 - final Roller 4.0 release in the repositry at
http://cwiki.apache.org/confluence/display/ROLLER/Roller+Source+Code

John.


-----Original Message-----
From: Dave [mailto:snoopdave@gmail.com] 
Sent: Monday, March 10, 2008 8:50 PM
To: user@roller.apache.org
Subject: Re: Weblogger initialization failed

On Fri, Mar 7, 2008 at 10:40 AM, John Langan <la...@homes.com> wrote:
> Version: Roller 4.0
>  Application Server: Glassfish V2 (Sun Java System Application Server
9.1_01
>  (build b09d-fcs))
>  Database: Oracle 10g
>  Java: Java 6 update 4
>  OS: Windows XP
>
>  I downloaded the Roller source this morning into a sub-directory named
roller
>  svn co https://svn.apache.org/repos/asf/roller/trunk roller

First of all, unless you're getting ready to help work on Roller 4.1
(which would be great) you should probably stick to the official
Apache Roller 4.0 release.


>
org.apache.roller.weblogger.business.WebloggerImpl.initialize(WebloggerImpl.
>  java:341)

>  --- ROOT CAUSE ---
>  <0.9.7-incubating nonfatal general error>
>  org.apache.openjpa.persistence.PersistenceException: ORA-00904:
>  "T1"."CREATOR": invalid identifier
>   {prepstmnt 3814511 SELECT t0.id, t0.autoenabled, t0.conditioncode,
...
>  t4.pagemodels, t4.showalllangs, t4.timeZone, t4.weblogdayid, t1.creator,
...
>  t1.weblogdayid FROM pingtarget t0, website t1, weblogcategory t2,

>  Any help on overcoming this problem would be appreciated.


Based on that, it appears that the 'creator' field is missing from the
'website' table.
Did you notice any errors when the Roller tables were created?

- Dave



Re: Weblogger initialization failed

Posted by Dave <sn...@gmail.com>.
On Fri, Mar 7, 2008 at 10:40 AM, John Langan <la...@homes.com> wrote:
> Version: Roller 4.0
>  Application Server: Glassfish V2 (Sun Java System Application Server 9.1_01
>  (build b09d-fcs))
>  Database: Oracle 10g
>  Java: Java 6 update 4
>  OS: Windows XP
>
>  I downloaded the Roller source this morning into a sub-directory named roller
>  svn co https://svn.apache.org/repos/asf/roller/trunk roller

First of all, unless you're getting ready to help work on Roller 4.1
(which would be great) you should probably stick to the official
Apache Roller 4.0 release.


>  org.apache.roller.weblogger.business.WebloggerImpl.initialize(WebloggerImpl.
>  java:341)

>  --- ROOT CAUSE ---
>  <0.9.7-incubating nonfatal general error>
>  org.apache.openjpa.persistence.PersistenceException: ORA-00904:
>  "T1"."CREATOR": invalid identifier
>   {prepstmnt 3814511 SELECT t0.id, t0.autoenabled, t0.conditioncode,
...
>  t4.pagemodels, t4.showalllangs, t4.timeZone, t4.weblogdayid, t1.creator,
...
>  t1.weblogdayid FROM pingtarget t0, website t1, weblogcategory t2,

>  Any help on overcoming this problem would be appreciated.


Based on that, it appears that the 'creator' field is missing from the
'website' table.
Did you notice any errors when the Roller tables were created?

- Dave

Weblogger initialization failed

Posted by John Langan <la...@homes.com>.
Version: Roller 4.0 
Application Server: Glassfish V2 (Sun Java System Application Server 9.1_01
(build b09d-fcs))
Database: Oracle 10g
Java: Java 6 update 4
OS: Windows XP

I downloaded the Roller source this morning into a sub-directory named
roller:

svn co https://svn.apache.org/repos/asf/roller/trunk roller

I changed directory:
C> cd roller\apps\weblogger
And then built the Roller web application
C> ant dist

I deployed the directory roller/apps/webblogger/build/webapp to Glassfish.

I have not made any changes to the code but when I launched the webapp I got
a 404 Message with Exception The file that you requested could not be found
on this server.

In the roller.log file contains the following:
INFO  2008-03-07 09:12:42,843 DatabaseProvider:successMessage - SUCCESS: Got
parameters. Using configuration type JNDI_NAME
INFO  2008-03-07 09:12:42,843 DatabaseProvider:successMessage - -- Using
JNDI datasource name: java:comp/env/jdbc/rollerdb
INFO  2008-03-07 09:12:42,843 DatabaseProvider:successMessage - SUCCESS:
located JNDI DataSource [java:comp/env/jdbc/rollerdb]
INFO  2008-03-07 09:12:42,875 JPAPersistenceStrategy:<init> - openjpa.Log:
commons
INFO  2008-03-07 09:12:44,484 IndexManagerImpl:<init> - search enabled: true
INFO  2008-03-07 09:12:44,500 IndexManagerImpl:<init> - index dir:
C:\Documents and Settings\langanj\roller_data\search-index
INFO  2008-03-07 09:12:44,531 ReferrerQueueManagerImpl:<init> -
Instantiating Referrer Queue Manager
INFO  2008-03-07 09:12:44,531 ReferrerQueueManagerImpl:<init> - Asynchronous
referrer processing = false
INFO  2008-03-07 09:12:44,531 ThreadManagerImpl:<init> - Instantiating
Thread Manager
INFO  2008-03-07 09:12:44,546 WebloggerFactory:bootstrap - Roller Weblogger
business tier successfully bootstrapped
INFO  2008-03-07 09:12:44,546 WebloggerFactory:bootstrap -    Version: 4.0
INFO  2008-03-07 09:12:44,546 WebloggerFactory:bootstrap -    Revision:
632796
INFO  2008-03-07 09:12:44,546 WebloggerImpl:initialize - Initializing Roller
Weblogger business tier
INFO  2008-03-07 09:12:47,265 ThemeManagerImpl:initialize - Loaded 4 themes
from disk.
INFO  2008-03-07 09:12:47,281 ThreadManagerImpl:initialize - Initializing
task: ScheduledEntriesTask
INFO  2008-03-07 09:12:47,375 ThreadManagerImpl:initialize - Initializing
task: ResetHitCountsTask
INFO  2008-03-07 09:12:47,390 ThreadManagerImpl:initialize - Initializing
task: TurnoverReferersTask
INFO  2008-03-07 09:12:47,390 ThreadManagerImpl:initialize - Initializing
task: PingQueueTask
FATAL 2008-03-07 09:12:47,718 RollerContext:contextInitialized - Roller
Weblogger initialization failed
org.apache.roller.weblogger.business.InitializationException: Error
initializing ping systems
	at
org.apache.roller.weblogger.business.WebloggerImpl.initialize(WebloggerImpl.
java:341)
	at
org.apache.roller.weblogger.ui.core.RollerContext.contextInitialized(RollerC
ontext.java:159)
	at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
4523)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:5184)
	at com.sun.enterprise.web.WebModule.start(WebModule.java:326)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:9
73)
	at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957)
	at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688)
	at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1584)
	at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1222)
	at
com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebMod
uleDeployEventListener.java:182)
.............
--- ROOT CAUSE ---
<0.9.7-incubating nonfatal general error>
org.apache.openjpa.persistence.PersistenceException: ORA-00904:
"T1"."CREATOR": invalid identifier
 {prepstmnt 3814511 SELECT t0.id, t0.autoenabled, t0.conditioncode,
t0.lastsuccess, t0.name, t0.pingurl, t1.id, t1.about, t1.isactive,
t1.allowcomments, t1.blacklist, t2.id, t2.description, t2.image, t2.name,
t3.id, t3.description, t3.image, t3.name, t3.path, t3.websiteid, t2.path,
t4.id, t4.about, t4.isactive, t4.allowcomments, t4.blacklist,
t4.bloggercatid, t4.creator, t4.customstylesheet, t4.datecreated,
t4.defaultallowcomments, t4.defaultcatid, t4.defaultcommentdays,
t4.defaultpageid, t4.defaultplugins, t4.description, t4.editorpage,
t4.editortheme, t4.emailaddress, t4.emailcomments, t4.emailfromaddress,
t4.enablebloggerapi, t4.enablemultilang, t4.isenabled, t4.displaycnt,
t4.handle, t4.icon, t4.lastmodified, t4.locale, t4.commentmod, t4.name,
t4.pagemodels, t4.showalllangs, t4.timeZone, t4.weblogdayid, t1.creator,
t1.customstylesheet, t1.datecreated, t1.defaultallowcomments, t5.id,
t5.description, t5.image, t5.name, t5.parentid, t5.path, t5.websiteid,
t1.defaultcommentdays, t1.defaultpageid, t1.defaultplugins, t1.description,
t1.editorpage, t1.editortheme, t1.emailaddress, t1.emailcomments,
t1.emailfromaddress, t1.enablebloggerapi, t1.enablemultilang, t1.isenabled,
t1.displaycnt, t1.handle, t1.icon, t1.lastmodified, t1.locale,
t1.commentmod, t1.name, t1.pagemodels, t1.showalllangs, t1.timeZone,
t1.weblogdayid FROM pingtarget t0, website t1, weblogcategory t2,
weblogcategory t3, website t4, weblogcategory t5 WHERE (t0.websiteid IS
NULL) AND t0.websiteid = t1.id(+) AND t1.bloggercatid = t2.id(+) AND
t1.defaultcatid = t5.id(+) AND t2.parentid = t3.id(+) AND t2.websiteid =
t4.id(+) ORDER BY t0.name ASC} [code=904, state=42000]
	at
org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java
:3784)

Any help on overcoming this problem would be appreciated.
John.



Re: How to configure Roller caching

Posted by Dave <sn...@gmail.com>.
On Fri, Mar 7, 2008 at 4:04 AM, m0llbuz_ <mi...@moscowmail.com> wrote:
>  Why doesn't Roller use ehcache as default LRU page cache, when ehcache is
>  used as the database query cache?
>
>  Roller 4 uses an ancient version of ehcache 1.1 (4 years old) though, but
>  can be easily upgraded to the latest version (1.4.1). Just replace the
>  ehcache jar.
>
>  The same with openjpa: you can replace openjpa-0.9.7 with openjpa-1.0.2
>  without code changes.

Those are great ideas. Would you like to submit  a patch to implement
those changes?

- Dave

Re: How to configure Roller caching

Posted by Dave <sn...@gmail.com>.
On Mon, Mar 10, 2008 at 3:47 PM, John Langan <la...@homes.com> wrote:
> How did you manage to replace openjpa-0.9.7 with openjpa-1.0.2
>  without code changes?
>  I tried this and edited properties.xmlf with
>  <property name="tools.jpa" value="${ro.tools}/apache-openjpa-1.0.2" />
>
>  When I tried to compile I got the error:
>  org.apache.openjpa.util.GeneralException: An error occurred while enhancing
>  org.apache.roller.weblogger.pojos.WeblogPermission. Exception message: null.
>
>  What have I missed?

Moving from 0.9.7 to JPA will almost certainly require some code
changes. That is why we did not do it before 4.0 was released, 1.0
caused unit tests to break and it was too late in the release cycle.

- Dave

RE: How to configure Roller caching

Posted by John Langan <la...@homes.com>.
How did you manage to replace openjpa-0.9.7 with openjpa-1.0.2
without code changes?
I tried this and edited properties.xmlf with 
<property name="tools.jpa" value="${ro.tools}/apache-openjpa-1.0.2" />

When I tried to compile I got the error:
org.apache.openjpa.util.GeneralException: An error occurred while enhancing
org.apache.roller.weblogger.pojos.WeblogPermission. Exception message: null.

What have I missed?
John.

-----Original Message-----
From: m0llbuz_ [mailto:milo@moscowmail.com] 
Sent: Friday, March 07, 2008 4:05 AM
To: user@roller.apache.org
Subject: Re: How to configure Roller caching

Greetings,

Why doesn't Roller use ehcache as default LRU page cache, when ehcache is
used as the database query cache?

Roller 4 uses an ancient version of ehcache 1.1 (4 years old) though, but
can be easily upgraded to the latest version (1.4.1). Just replace the
ehcache jar.

The same with openjpa: you can replace openjpa-0.9.7 with openjpa-1.0.2
without code changes.

Regards,
Milo

  ----- Original Message -----
  From: Dave
  To: dev@roller.apache.org, user
  Subject: How to configure Roller caching
  Date: Mon, 3 Mar 2008 22:30:06 -0500


  Why preparing my Advanced Apache Roller presentation for ApacheCon
  EU,
  I wrote up some docs for configuring Roller's page/feed caches on my
  blog:

  http://rollerweblogger.org/roller/entry/howto_configure_roller_caching

  Feedback is welcome. Did I get anything wrong? Did I leave any
  important details out?

  - Dave

-- 
Want an e-mail address like mine?
Get a free e-mail account today at www.mail.com!



Re: How to configure Roller caching

Posted by m0llbuz_ <mi...@moscowmail.com>.
Greetings,

Why doesn't Roller use ehcache as default LRU page cache, when ehcache is
used as the database query cache?

Roller 4 uses an ancient version of ehcache 1.1 (4 years old) though, but
can be easily upgraded to the latest version (1.4.1). Just replace the
ehcache jar.

The same with openjpa: you can replace openjpa-0.9.7 with openjpa-1.0.2
without code changes.

Regards,
Milo

  ----- Original Message -----
  From: Dave
  To: dev@roller.apache.org, user
  Subject: How to configure Roller caching
  Date: Mon, 3 Mar 2008 22:30:06 -0500


  Why preparing my Advanced Apache Roller presentation for ApacheCon
  EU,
  I wrote up some docs for configuring Roller's page/feed caches on my
  blog:

  http://rollerweblogger.org/roller/entry/howto_configure_roller_caching

  Feedback is welcome. Did I get anything wrong? Did I leave any
  important details out?

  - Dave

-- 
Want an e-mail address like mine?
Get a free e-mail account today at www.mail.com!