[opencms-dev] creating a new CmsFile in a java class

Uwe Heldt UweHeldt at gmx.de
Fri Jun 1 22:55:02 CEST 2001


Hi all,
i'am trying to create an new CmsFile in a java class. I using the following statement: CmsFile file = fCms.createFile(path, templateFile, content, "page").
The path is set to "moduledemos/com.opencms.document.test010603". These folder exists in my test project.
And when i start the programm from my test project, i got the follwoing exception:
[ModuleFileBuilder] Exception while creating overview template: [CmsException]:
2 Not found. Detailed Error: [com.opencms.file.mySql.CmsDbAccess] /moduledemos/com.opencms.document.test010603/.

Could it be that the statements tries to create the file in the online project instead of the test project? When i start the shell, and call the "readFolder" command, i got the same exception. After publishing the test project the command executed succesfully. What could it be?. Have i to switch to project in the java class??

Regards Uwe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20010601/18f1bba7/attachment.htm>


More information about the opencms-dev mailing list