Hi Mack,

Just wondering if you filed this as a bug. My webservice continually throws
the duplicate class error message after running for some time. I have
resorted now to running the following code every 1 hour to clear the
template cache and hopefully avoid this error:


<!--- login --->
<cftry>
        <cfinvoke 
        component="cfide.adminapi.administrator" 
        method="login"
        adminPassword=""
        adminUsername="admin">
        <cflog file="wsCACHE" text="Log in successful">
        <cfcatch>
                <cflog file="wsCACHE" text="Error logging in to CFADMIN.
#cfcatch.message#">
                <cfabort>
        </cfcatch>
</cftry>


<!--- release templates from template cache --->
<cfset filepath = 'C:\Inetpub\wwwroot\www.yourmamassofat.com\cmp\bridge\'>
<cfset tpllist = ''>
<cfset tpllist = listAppend(tpllist, filepath & 'cp_startup.cfc')>
<cfset tpllist = listAppend(tpllist, filepath & 'cp_register.cfc')>
<cfset tpllist = listAppend(tpllist, filepath & 'cp_createTask.cfc')>
<cfset tpllist = listAppend(tpllist, filepath & 'cp_deleteTask.cfc')>
<cfset tpllist = listAppend(tpllist, filepath & 'cp_getFieldList.cfc')>
<cfset tpllist = listAppend(tpllist, filepath &
'cp_getFieldListandfilters.cfc')>
<cfset tpllist = listAppend(tpllist, filepath & 'cp_uninstallBridge.cfc')>
<cfset tpllist = listAppend(tpllist, filepath & 'cp_updateTask.cfc')>
<cfset tpllist = listAppend(tpllist, filepath & 'bridge.cfc')>

<cftry>
        <cfinvoke 
        component="cfide.adminapi.runtime" 
        method="clearTrustedCache" 
        templateList="#tpllist#">
        <!--- log failure clearing template cache --->
        <cfcatch>
                <cflog file="wsCACHE" text="Errror clearing template cache
via adminAPI. #cfcatch.message#">
        </cfcatch>
</cftry>

<!--- log success --->
<cflog file="wsCACHE" text="Template Cache cleared">

<!--- logout --->
<cftry>
        <cfinvoke 
        component="cfide.adminapi.administrator" 
        method="logout"
        adminPassword=""
        adminUsername="admin"            
        templateList="#tpllist#">
        <cfcatch>
                <cflog file="wsCACHE" text="Error logging out of CFADMIN">
        </cfcatch>
</cftry>


Brook

-----Original Message-----
From: Mack [mailto:[email protected]] 
Sent: December-11-10 10:05 AM
To: cf-talk
Subject: Re: Webservice error after CF 8.01 update


> Grrr.... I've pretty much exhausted all my options now, this is driving me
> batty..

Brook,

I think this is a bug in CF. I've made a small testcase on which I can
reproduce the error all the time:
http://dl.dropbox.com/u/15688335/wstest.zip

1. Put the files in a wstest folder in your root.
2. create a file to test the web service : <cfset ws =
createObject("webservice",
"http://SERVER/wstest/ws.cfc?wsdl";).function1()>

3. run the test file once. It should work properly.
4. rename wstest/result/function1Response.cfc (adding 1 at the end of
the file works just fine)
5. run the test file. It should complain about function1Response.cfc
not being found.
6. rename the cfc back to function1Response.cfc
7. run the test file. On my server (9.0.1) it alternates between
'java.lang.LinkageError : loader (instance of
coldfusion/xml/rpc/SkeletonClassLoader): attempted  duplicate class
definition for name: "wstest/result/Function1Response"' and
'java.lang.ClassNotFoundException :
wstest.result.Function1Response][java.lang.NullPointerException :
null'

The error is cleared temporarily by:
- changing ws.cfc (adding spaces at the start for example);
- using the clearTrustedCache function like in your code.

If you can duplicate the error I will log this as a bug with Adobe.

-- 
Mack



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340212
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to