<div>Hi</div>
<div>Is the method "createResource you use that one, which causes OpenCms to write the export points, or publishResource?</div>
<div>I'm asking cause i had some problems with the publishResource, but i never used it with craeteResource. I write the files instead in xmlFiles and import them afterwords than i use:</div>
<div><a href="http://www.opencms.org/export/javadoc/core/org/opencms/file/CmsObject.html#publishProject(org.opencms.report.I_CmsReport, org.opencms.file.CmsResource, boolean)"><strong><font face="Courier New">publishProject
</font></strong></a><font face="Courier New">(</font><a title="interface in org.opencms.report" href="http://www.opencms.org/export/javadoc/core/org/opencms/report/I_CmsReport.html"><font face="Courier New">I_CmsReport</font>
</a><font face="Courier New"> report, </font><a title="class in org.opencms.file" href="http://www.opencms.org/export/javadoc/core/org/opencms/file/CmsResource.html"><font face="Courier New">CmsResource</font></a><font face="Courier New">
directPublishResource, boolean directPublishSiblings)<br></font><font face="Courier New"></font></div>
<div>this one works fine...<br>So please give me feedback aubout that, cause i'm very interested in that<br>Thanks<br>Andy<br><br> </div>
<div><span class="gmail_quote">2006/10/13, Roman Uhlig <<a href="mailto:roman.uhlig@knve.de">roman.uhlig@knve.de</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>Note: Looks like this is caused by the 6.2.2 bug addressed here:<br><br><a href="http://www.opencms.org/bugzilla/show_bug.cgi?id=1201">
http://www.opencms.org/bugzilla/show_bug.cgi?id=1201</a><br><br><br><br>Roman Uhlig wrote:<br>><br>> Hi,<br>><br>> I'm currently trying on my first CmsScheduledJob class to be executed<br>> within the OpenCms job schedule. Basically everything is quite
<br>> straightforward and easy to use.<br>> Now I have to change and publish a resource within the launch() method of<br>> my CmsScheduledJob class, which is working very well when executed<br>> manually within a jsp page. When getting executed inside the class at it's
<br>> scheduled execution time, the following exception is noted inside the log<br>> file:<br>><br>> 11 Oct 2006 14:58:22,091 ERROR [rg.opencms.db.CmsDriverManager:7243] Error<br>> writing export points.<br>
> org.opencms.db.CmsDbSqlException: An SQL error occurred when executing the<br>> following query: .<br>> at<br>> org.opencms.db.generic.CmsProjectDriver.readPublishedResources(CmsProjectDriver.java:2174)
<br>> at<br>> org.opencms.db.CmsDriverManager.writeExportPoints(CmsDriverManager.java:7146)<br>> at<br>> org.opencms.db.CmsDriverManager.cmsEvent(CmsDriverManager.java:999)<br>> at<br>
> org.opencms.main.CmsEventManager.fireEventHandler(CmsEventManager.java:203)<br>> at<br>> org.opencms.main.CmsEventManager.fireEvent(CmsEventManager.java:126)<br>> at org.opencms.main.OpenCms.fireCmsEvent
(OpenCms.java:152)<br>> at<br>> org.opencms.db.CmsDriverManager.publishProject(CmsDriverManager.java:4535)<br>> at<br>> org.opencms.db.CmsSecurityManager.publishProject(CmsSecurityManager.java:2893)
<br>> at org.opencms.file.CmsObject.publishProject(CmsObject.java:1975)<br>> at org.opencms.file.CmsObject.publishProject(CmsObject.java:1998)<br>> at org.opencms.file.CmsObject.publishResource
(CmsObject.java:2033)<br>> at org.opencms.file.CmsObject.publishResource(CmsObject.java:2016)<br>> at<br>> com.idaba.common.IdabaGoogleSitemap.launch(IdabaGoogleSitemap.java:75)<br>> at
<br>> org.opencms.scheduler.CmsScheduleManager.execute(CmsScheduleManager.java:171)<br>> at org.quartz.core.JobRunShell.run(JobRunShell.java:191)<br>> at<br>> org.opencms.scheduler.CmsSchedulerThread.run
(CmsSchedulerThread.java:123)<br>> Caused by: java.sql.SQLException: Unsupported project ID "-1" to return a<br>> JDBC connection.<br>> at<br>> org.opencms.db.generic.CmsSqlManager.getConnection
(CmsSqlManager.java:502)<br>> at<br>> org.opencms.db.generic.CmsSqlManager.getConnection(CmsSqlManager.java:247)<br>> at<br>> org.opencms.db.generic.CmsProjectDriver.readPublishedResources(CmsProjectDriver.java
:2149)<br>> ... 15 more<br>><br>> Note: com.idaba.common.IdabaGoogleSitemap is the custom class mentioned<br>> above.<br>><br>> I can't really see a conection to my code inside the launch method, thats
<br>> why I'm asking this here. Anything is working well, the resource gets<br>> published. Just writing export points seems to fail. Any ideas or<br>> experience on this?<br>><br>> Here's the relevant code of my implementation of
<br>> I_CmsScheduledJob.launch():<br>><br>> public class IdabaGoogleSitemap implements I_CmsScheduledJob {<br>> ...<br>> public String launch(CmsObject arg0, Map arg1) throws Exception {<br>> ....
<br>> cmso.createResource(portal_prefix + "/" + sitemap_filename,<br>> i_restype_plain_id, s_content.getBytes(), list_props);<br>> cmso.unlockResource(portal_prefix + "/" + sitemap_filename);
<br>> cmso.publishResource(portal_prefix + "/" + sitemap_filename);<br>> ...<br>> }<br>> }<br>><br>> Thanks in advance,<br>> Roman<br>><br><br>--<br>View this message in context:
<a href="http://www.nabble.com/CmsScheduledJob-and-writeExportPoint-tf2424139.html#a6792396">http://www.nabble.com/CmsScheduledJob-and-writeExportPoint-tf2424139.html#a6792396</a><br>Sent from the OpenCMS - Dev mailing list archive at
<a href="http://Nabble.com">Nabble.com</a>.<br><br><br>_______________________________________________<br>This mail is sent to you from the opencms-dev mailing list<br>To change your list options, or to unsubscribe from the list, please visit
<br><a href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a><br></blockquote></div><br>