[opencms-dev] projectId of tempfileproject

Yasuhisa Itoh kumaneko at kumaneko.org
Tue Jun 3 01:21:01 CEST 2003


Yes, I had changed "wizard.enabled" and re-run ocsetup on "GOOD"
system, but didn't tried on "BAD" systems. That reminds me.
This is not platform-dependent problen - I think also.
Today, I will try again on "BAD" systems.

Thank you for your great help!

Roland Hordos wrote:

> A rebuild was not necessary for me.  I had this error, which is caused 
> by not running the installation wizard (ocsetup) after you've done a 
> re-deployment that results in the config/registry.xml file being 
> overwritten.  This happened just recently when I upgraded from Tomcat 
> 4.1.18 to JBoss 3.2.1+Tomcat 4.1.24.  I copied the entire expanded 
> opencms war directory over to the new server, then re-deployed the 
> opencms.war file as well.  When the server extracted the war, the 
> registry.xml became overwritten with the default which has an empty 
> <tempfileproject> tag.  Simply re-running ocsetup fixes the problem.
> 
> The exception message occurs here, in 
> com.opencms.workplace.CmsXmlTemplateEditor, after you edit an HTML page:
> 
>         // get the temporary file projectid
>         int tempProject = 0;
>         try{
>             tempProject = 
> Integer.parseInt((String)cms.getRegistry().getSystemValue
("tempfileproject"));
>         }catch(Exception e){
>             throw new CmsException("Can not read projectId of 
> tempfileproject for creating temporary file for editing! "+e.toString())
;
>         }
> 
> The registry DOM (cms.getRegistry()) is read for the "tempfileproject" 
> tag, causing an exception on the Integer.parseInt as the result is null 
> if only the default registry.xml exists.  This exception is caught and 
> re-thrown as the CmsException.
> 
> Suggestion:  It seems to me that this would only happen on a corrupt 
> installation / corrupt registry.  You could make it easier on future 
> users who hit this problem by simply suggesting that "the setup wizard 
> may have to be re-run" or something like this.  This should be safe on 
> two counts:
> 1)  as a precaution you already lock the setup after its initial run 
> with the "wizard.enabled" property in the config/opencms.properties file
> 2)  OpenCMS appears very tolerant to having the setup wizard re-run to 
> change config, so long as you pay attention (ie. don't blast right 
> through and drop and re-create your tables on the page that covers this)
.
> 
> With no disrespect intended to the previous post, I certainly don't 
> believe this problem has anything what-so-ever to do with a difference 
> between installations on Solaris vs Linux.  While I tracked down this 
> issue I noticed not a single line of code that would have known it's 
> running on my RedHat 7.3 platform.  It is a standard pure Java web 
> application and I doubt it even cares which servlet container it's 
> running in.  
> 
> I must say that I have never used an opensource solution that is as easy

> to configure and administer as OpenCMS -- nice work on the installation 
> wizard!
> 
> thanks, Roland;
> 
> 
> Yasuhisa Itoh wrote:
> 
> >Dear all,
> >
> >I found workaround for the exception below.
> >
> >Exception: 
> >com.opencms.core.CmsException: 0 Unknown exception. Detailed error:
> >Can not read projectId of tempfileproject for creating temporary
> >file for editing!
> >
> >I have "GOOD" Solaris system with default setting(but rebuild by
> >source - binary distribution has same error. By rebuilding,
> >got well, somehow), and  some "BAD" Linux systems.
> >In opencms/WEB-INF/config/registry.xml, "tempfileproject" is set to
> >"3" on "GOOD" system. On "BAD" systems, null.
> >
> ># Id 3 means "Offline" Project?
> >
> >Edit registry.xml, restart Tomcat, then all my systems run well.
> >But I'm afraid that this workaround is not safe.
> >Do you know whether this is OK?
> >
> >Regards
> >---
> >Yasuhisa Itoh

---
Yasuhisa Itoh



More information about the opencms-dev mailing list