<div>Hi</div>
<div>Ok, thanks for quick feedback...this is what i thought about, i know what the createResource thing is about, but i took the other option, cause so i have some evidence when the thing is running automatically every day, and i thougt it was better to use the xml stuff for bigger amount of data. So may try the publishProject stuff i wrote last time
<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>Writing export points and therefore the exception happens while publishing<br>resources. As stated in the bug report posted earlier in this thread, this
<br>did not happen until OpenCms 6.2.2. In 6.2.1 everything was working fine.<br><br>Using createResource is usually working fine. Especially when creating<br>(custom) XMLContent resources, it does the whole work like creating the
<br>default XML structure inside the resource. We use it i.e. for our intranet<br>knowledge management, it has some advantages over classic wiki solutions.<br><br>Roman<br><br><br>Andy Bicksbo wrote:<br>><br>> Hi<br>
> Is the method "createResource you use that one, which causes OpenCms to<br>> write the export points, or publishResource?<br>> I'm asking cause i had some problems with the publishResource, but i never<br>
> used it with craeteResource. I write the files instead in xmlFiles and<br>> import them afterwords than i use:<br>> *publishProject*<<a href="http://www.opencms.org/export/javadoc/core/org/opencms/file/CmsObject.html#publishProject(org.opencms.report.I_CmsReport">
http://www.opencms.org/export/javadoc/core/org/opencms/file/CmsObject.html#publishProject(org.opencms.report.I_CmsReport</a>,<br>> org.opencms.file.CmsResource,<br>> boolean)>(I_CmsReport<<a href="http://www.opencms.org/export/javadoc/core/org/opencms/report/I_CmsReport.html">
http://www.opencms.org/export/javadoc/core/org/opencms/report/I_CmsReport.html</a>><br>> report,<br>> CmsResource<<a href="http://www.opencms.org/export/javadoc/core/org/opencms/file/CmsResource.html">http://www.opencms.org/export/javadoc/core/org/opencms/file/CmsResource.html
</a>><br>> directPublishResource,<br>> boolean directPublishSiblings)<br>> 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>><br>> 2006/10/13, Roman Uhlig <<a href="mailto:roman.uhlig@knve.de">roman.uhlig@knve.de</a>>:<br>>><br>>><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<br>>> 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
<br>>> it's<br>>> > scheduled execution time, the following exception is noted inside the<br>>> log<br>>> > file:<br>>> ><br>>> > 11 Oct 2006 14:58:22,091 ERROR [rg.opencms.db.CmsDriverManager
:7243]<br>>> Error<br>>> > writing export points.<br>>> > org.opencms.db.CmsDbSqlException: An SQL error occurred when executing<br>>> the<br>>> > following query: .<br>>> > at
<br>>> > org.opencms.db.generic.CmsProjectDriver.readPublishedResources(<br>>> CmsProjectDriver.java:2174)<br>>> > at<br>>> > org.opencms.db.CmsDriverManager.writeExportPoints(CmsDriverManager.java
<br>>> :7146)<br>>> > at<br>>> > org.opencms.db.CmsDriverManager.cmsEvent(CmsDriverManager.java:999)<br>>> > at<br>>> > org.opencms.main.CmsEventManager.fireEventHandler
(CmsEventManager.java<br>>> :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<br>>> :4535)<br>>> > at<br>>> ><br>>> org.opencms.db.CmsSecurityManager.publishProject
(CmsSecurityManager.java<br>>> :2893)<br>>> > at org.opencms.file.CmsObject.publishProject(CmsObject.java<br>>> :1975)<br>>> > at org.opencms.file.CmsObject.publishProject(CmsObject.java
<br>>> :1998)<br>>> > at org.opencms.file.CmsObject.publishResource(CmsObject.java<br>>> :2033)<br>>> > at org.opencms.file.CmsObject.publishResource(CmsObject.java<br>>> :2016)
<br>>> > at<br>>> > com.idaba.common.IdabaGoogleSitemap.launch(IdabaGoogleSitemap.java:75)<br>>> > at<br>>> ><br>>> org.opencms.scheduler.CmsScheduleManager.execute
(CmsScheduleManager.java<br>>> :171)<br>>> > at org.quartz.core.JobRunShell.run(JobRunShell.java:191)<br>>> > at<br>>> > org.opencms.scheduler.CmsSchedulerThread.run(CmsSchedulerThread.java
<br>>> :123)<br>>> > Caused by: java.sql.SQLException: Unsupported project ID "-1" to return<br>>> a<br>>> > JDBC connection.<br>>> > at<br>>> > org.opencms.db.generic.CmsSqlManager.getConnection
(CmsSqlManager.java<br>>> :502)<br>>> > at<br>>> > org.opencms.db.generic.CmsSqlManager.getConnection(CmsSqlManager.java<br>>> :247)<br>>> > at<br>>> > org.opencms.db.generic.CmsProjectDriver.readPublishedResources
(<br>>> 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,<br>>> 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:
<br>>> <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
<br>>> visit<br>>> <a href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a><br>>><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>><br><br>--<br>View this message in context: <a href="http://www.nabble.com/CmsScheduledJob-and-writeExportPoint-tf2424139.html#a6794018">http://www.nabble.com/CmsScheduledJob-and-writeExportPoint-tf2424139.html#a6794018
</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>