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

Uwe Heldt UweHeldt at gmx.de
Sat Jun 2 01:02:24 CEST 2001


I solved the problem. I used the wrong csm object. Now it works fine.

-----Ursprüngliche Nachricht----- 
  Von: Uwe Heldt 
  An: opencms-dev at www.opencms.com 
  Gesendet: Freitag, 1. Juni 2001 22:55
  Betreff: [opencms-dev] creating a new CmsFile in a java class


  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/20010602/b923abd7/attachment.htm>


More information about the opencms-dev mailing list