<rss version="2.0"><channel><title>RSS feed for InstantSpot site orangepips</title><link>http://orangepips.instantspot.com</link><language>en-us</language><copyright>This work is Copyright &#xA9; 2008 by orangepips</copyright><generator>RSSVille ColdFusion FeedMaker, version 1.0</generator><pubDate>Thu, 24 Jul 2008 11:29:11 GMT</pubDate><item><title>cfindex:Unable to connect to the ColdFusion Search service</title><link>http://orangepips.instantspot.com/blog/2008/02/20/cfindexUnable-to-connect-to-the-ColdFusion-Search-service</link><description>&lt;p&gt;Problem I ran into recently where I knew the collection existed. Running Coldfusion 8 in multiserver configuration on a Windows machine that previously had Coldfusion 7 installed. Tried to use the cfindex tag to no avail.&lt;/p&gt;
&lt;p&gt;Trial and error and &lt;a href=&quot;http://kb.adobe.com/selfservice/viewContent.do?externalId=kb400967&amp;amp;sliceId=1&quot;&gt;some reading here on Adobe&apos;s site&lt;/a&gt; led me to this:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Uninstalled Coldfusion 7 Search Service still on the box&lt;/li&gt;
    &lt;li&gt;Checked cfadmin to see what ports should be used 9951, 9921 &amp;amp; 9961&lt;/li&gt;
    &lt;li&gt;Noted that k2index.exe and k2server.exe services were not running via &lt;a href=&quot;http://www.nirsoft.net/utils/cports.html&quot;&gt;cports&lt;/a&gt; (i.e. 9921 &amp;amp; 9961)&lt;/li&gt;
    &lt;li&gt;ran &lt;font face=&quot;Courier New&quot;&gt;C:\JRun4\verity\verity-install.bat&lt;/font&gt; and noted the following errors:
    &lt;ol&gt;
        &lt;li&gt;&lt;font face=&quot;Courier New&quot;&gt;WARNING: The RCAdmin call failed. Command = styleset 1 &amp;quot;Def_FileSystem&amp;quot; 1 1&lt;strong&gt; &lt;/strong&gt;filesys &amp;quot;default File System style files&amp;quot; y exit&lt;/font&gt;&lt;/li&gt;
        &lt;li&gt;&lt;font face=&quot;Courier New&quot;&gt;WARNING: The RCAdmin call failed. Command = styleset 1 &amp;quot;ColdFusionK2&amp;quot; 1 1 filesys &amp;quot;ColdFusion K2 Style Files&amp;quot; y exit&lt;/font&gt;&lt;/li&gt;
        &lt;li&gt;&lt;font face=&quot;Courier New&quot;&gt;WARNING: The RCAdmin call failed. Command = styleset 1 &amp;quot;ColdFusionVspider&amp;quot; 1 1 filesys &amp;quot;ColdFusion Vspider Style Files&amp;quot; y exit&lt;/font&gt;&lt;/li&gt;
        &lt;li&gt;&lt;font face=&quot;Courier New&quot;&gt;WARNING: The RCAdmin call failed. Command = serverset 1 &amp;quot;ColdFusionK2_server1&amp;quot; 9921 &amp;quot;ColdFusion K2Server&amp;quot; y y y ColdFusionK2 &amp;quot;C:\JRun4\verity\k2\common&amp;quot; 200 2 n 300000 900000 y exit&lt;/font&gt;&lt;/li&gt;
        &lt;li&gt;&lt;font face=&quot;Courier New&quot;&gt;WARNING: The RCAdmin call failed. Command = indexerset 1 &amp;quot;ColdFusionK2_indexserver1&amp;quot; 9961 &amp;quot;ColdFusion K2 Index Server&amp;quot; ColdFusionK2 4 1 y exit&lt;/font&gt;&lt;/li&gt;
    &lt;/ol&gt;
    &lt;/li&gt;
    &lt;li&gt;ran &lt;font face=&quot;Courier New&quot;&gt;C:\JRun4\verity\k2\_nti40\bin\rcadmin.exe&lt;/font&gt;
    &lt;ol&gt;
        &lt;li&gt;styledel Def_FileSystem&lt;/li&gt;
        &lt;li&gt;styledel ColdfusionK2&lt;/li&gt;
        &lt;li&gt;styledel ColdfusionVspider&lt;/li&gt;
    &lt;/ol&gt;
    &lt;/li&gt;
    &lt;li&gt;ran &lt;font face=&quot;Courier New&quot;&gt;C:\JRun4\verity\verity-install.bat &lt;font face=&quot;Arial&quot;&gt;(still will get&lt;/font&gt; serverset &lt;font face=&quot;Arial&quot;&gt;and &lt;/font&gt;indexerset &lt;font face=&quot;Arial&quot;&gt;failure messages)&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Works again.&lt;/p&gt;
&lt;p&gt;Think the problem is either because (a) had Coldfusion 7 search service installed or (b) the admin.xml files inside the verity directory (subdirectory) had bad values in them and running styledel and subsequently the .bat file resolved it.&lt;/p&gt;</description><pubDate>Wed, 20 Feb 2008 17:58:00 GMT</pubDate><guid>http://orangepips.instantspot.com/blog/2008/02/20/cfindexUnable-to-connect-to-the-ColdFusion-Search-service</guid><category>Coldfusion,Verity</category></item><item><title>XML StAX Processing with Coldfusion</title><link>http://orangepips.instantspot.com/blog/2007/03/28/XML-StAX-Processing-with-Coldfusion</link><description>&lt;p&gt;Several problems with Coldfusion XML processing and solution set:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;&lt;strong&gt;Slow&lt;/strong&gt;: due to DOM processor (&lt;a href=&quot;http://xerces.apache.org/&quot;&gt;Xerces&lt;/a&gt;)&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Inconsistent Round-Tripping&lt;/strong&gt; (i.e. 	serialization / deserialization) :
    &lt;ol&gt;
        &lt;li&gt;(un-) escaping characters&lt;/li&gt;
        &lt;li&gt;non-printable characters&lt;/li&gt;
        &lt;li&gt;missing / multiple XML declaration(s)&lt;/li&gt;
        &lt;li&gt;character set problems&lt;/li&gt;
        &lt;li&gt;et al.&lt;/li&gt;
    &lt;/ol&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Kludgy Tree API&lt;/strong&gt; yes you can use structure and 	array functions, just don&apos;t like it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note, don&apos;t see this as a flame on Adobe/Macromedia. The Coldfusion XML implementation uses best available technology at the time and APIs that fit in with the language paradigm. Just have better options now.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Slow Solution&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://woodstox.codehaus.org/&quot;&gt;Woodstox&lt;/a&gt;&lt;/strong&gt;: &lt;a title=&quot;CFDJ: Advanced XML Processing with StAX in ColdFusion&quot; href=&quot;http://coldfusion.sys-con.com/read/236002.htm&quot;&gt;Jim Collins wrote a CFDJ article about using a StAX XML processor with Coldfusion&lt;/a&gt;. Unfortunately, as near as I can tell, his &lt;a href=&quot;http://sourceforge.net/projects/cfsynergy&quot;&gt;open source project to integrate Coldfusion with Woodstox&lt;/a&gt; was never released. &lt;a title=&quot;SUN: Streaming APIs for XML Parsers&quot; href=&quot;http://java.sun.com/performance/reference/whitepapers/StAX-1_0.pdf&quot;&gt;Testing demonstrates&lt;/a&gt; a StAX processor, such as Woodstox, provides very efficient (read: fast) XML processing, and a more intuitive API, than a SAX processor. But still not intuitive enough for me. So enter...&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Round-Tripping &amp;amp; API Solutions&lt;br /&gt;
&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a title=&quot;XML object model&quot; href=&quot;http://www.xom.nu/&quot;&gt;XOM&lt;/a&gt;&lt;/strong&gt; provides a very easy to use API that roundtrips XML like a champ. Correct I/O is XOM&apos;s middle name. But it doesn&apos;t integrate natively with a StAX processor unless you use...&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://dsd.lbl.gov/nux/&quot;&gt;NUX&lt;/a&gt; &lt;/strong&gt;is like a Swiss Army knife for XML. But the purpose of this entry just know it&apos;s the glue between XOM and Woodstox (&lt;em&gt;note that NUX includes the XOM jar so you do not need to download it separately&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Download the Woodstox and NUX jars and configure them in your Coldfusion classpath. The examples below build upon each other.&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Setup&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;Creates a &lt;a href=&quot;http://www.xom.nu/apidocs/nu/xom/Builder.html&quot;&gt;XOM Builder object&lt;/a&gt; backed by a StAX processor.&lt;font face=&quot;courier new,courier&quot;&gt; &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;courier new,courier&quot;&gt;inputFactory = createObject(&amp;quot;java&amp;quot;, &amp;quot;com.ctc.wstx.stax.WstxInputFactory&amp;quot;).init()&lt;br /&gt;
builder = createObject(&amp;quot;java&amp;quot;, &amp;quot;nux.xom.io.StaxUtil&amp;quot;).createBuilder(local.joInputFactory, javacast(&amp;quot;null&amp;quot;, &amp;quot;&amp;quot;)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;XMLParse() Alternative&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;Returns a &lt;a href=&quot;http://www.xom.nu/apidocs/nu/xom/Document.html&quot;&gt;XOM Document object&lt;/a&gt;. Note: provide &lt;em&gt;XMLString &lt;/em&gt;variable.&lt;/p&gt;
&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;courier new,courier&quot;&gt;document = builder.create(XMLString)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;XMLSearch() Alternative&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;Returns a &lt;a href=&quot;http://www.xom.nu/apidocs/nu/xom/Nodes.html&quot;&gt;XOM Nodes object&lt;/a&gt; (i.e. an iterator of Node objects). Note: provide &lt;em&gt;XQueryString&lt;/em&gt; variable.&lt;/p&gt;
&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;courier new,courier&quot;&gt;nodes = createObject(&amp;quot;java&amp;quot;, &amp;quot;nux.com.xquery.XQueryUtil&amp;quot;).xquery(document, XQueryString)&lt;br /&gt;
&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;courier new,courier&quot;&gt;loop from=&amp;quot;0&amp;quot; to=&amp;quot;#nodes.size() - 1#&amp;quot; index=&amp;quot;idx&amp;quot; &lt;br /&gt;
element = nodes.get(javacast(&amp;quot;int&amp;quot;, idx)) &lt;br /&gt;
attributeValue = element.getAttribute(&amp;quot;attributeName&amp;quot;).getValue() &lt;br /&gt;
attributeText = element.getValue &lt;br /&gt;
/loop &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;ToString() Alternative&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;Creates a string representation of the XML.&lt;/p&gt;
&lt;p&gt;&lt;font size=&quot;2&quot; face=&quot;courier new,courier&quot;&gt;XMLString = document.toXML()&lt;/font&gt;&lt;/p&gt;</description><pubDate>Wed, 28 Mar 2007 15:04:00 GMT</pubDate><guid>http://orangepips.instantspot.com/blog/2007/03/28/XML-StAX-Processing-with-Coldfusion</guid><category>XML,Coldfusion</category></item></channel></rss>