[opencms-dev] projectId of tempfileproject
Phil Taylor
philip_taylor at btinternet.com
Mon Jun 2 23:00:01 CEST 2003
Thanks v much. I have now resolved the problem by re-running ocsetup. I
had several problems during the original configuration due to user
permisiions etc etc and consequently I had to keep re-running ocsetup.
It sounds like you may get this problem if the ocsetup does not progress
through from start to finish succesfully first time. It also explains
why I get the problem with different browsers on different platforms.
Thanks again
Phil
-----Original Message-----
From: opencms-dev-admin at opencms.org
[mailto:opencms-dev-admin at opencms.org] On Behalf Of Roland Hordos
Sent: 02 June 2003 18:10
To: opencms-dev at opencms.org
Subject: Re: [opencms-dev] projectId of tempfileproject
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("tempfileproje
ct"));
}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
>_______________________________________________
>This mail is send to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please
>visit http://mail.opencms.org/mailman/listinfo/opencms-dev
>
>
_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please
visit http://mail.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list