XML error on upgrade

24 views
Skip to first unread message

Tom McNeer

unread,
Jul 22, 2014, 12:47:11 PM7/22/14
to transf...@googlegroups.com
I have some large applications using Transfer which currently run on CF9, and which I would like to move to CF10 and Railo. I downloaded the new version of Transfer from gitHub. But after changing my Transfer mapping to point to the new framework, I get the following error from all sites:

The XML Provided in 'C:/webroot/sitename/config/transfer.xml' is not valid against its XML Schema:[Error] :5:34: cvc-complex-type.2.4.a: Invalid content was found starting with element 'maxobjects'. One of '{setting}' is expected. [Error] :8:28: cvc-enumeration-valid: Value 'instance' is not facet-valid with respect to enumeration '[string, numeric, boolean, date, UUID, GUID, binary]'. It must be a value from the enumeration. [Error] :8:28: cvc-attribute.3: The value 'instance' of attribute 'type' on element 'scope' is not valid with respect to its type, 'null'.  

I've looked at the .xsd included in the new files, and I see the caching elements have changed, causing the above errors. And I assume this is part of the switch to ehCache.

Is there any documentation for the use of the new caching configuration? And are there other known areas where an old config might cause errors?

--
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560

Mark Mandel

unread,
Jul 22, 2014, 8:09:12 PM7/22/14
to transf...@googlegroups.com
Tom,

I just fired off to Brian the static copy of the wiki that was up on transfer-docs. I can't remember what in that in regards to the ehCache version.

The XSD is the definitive reference, but you may also want to check out these blog posts from 2009:

Mark

James Allen

unread,
Jul 23, 2014, 5:48:11 AM7/23/14
to transf...@googlegroups.com

I’m glad you posted this – I had the same issue when upgrading Transfer yesterday when trying it on a site I maintain to see if it will run on Railo 4.

 

However, I removed the XSD lines from the XML, restarted Railo and this error still comes up.

 

Without a reference to the XSD file how can this happen? I wondered if it might be cached but not sure that’s the issue here.

 

Thanks,

James.

 

---

James  Allen

E: ja...@jamesallen.name

Blog: http://jamesallen.name

Twitter: @CFJamesAllen

Twitter: @JamesAllenVoice (Voiceover)

Twitter: @80sRewindShow (My weekly 80s radio show)

 

Tune in to the best in community radio – Codebass Radio: http://codebassradio.net

--
--
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
 
Try out the new Transfer ORM Custom Google Search:
http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8
 
You received this message because you are subscribed to the Google Groups "transfer-dev" group.
To post to this group, send email to transf...@googlegroups.com
To unsubscribe from this group, send email to transfer-dev...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/transfer-dev?hl=en

---
You received this message because you are subscribed to the Google Groups "transfer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to transfer-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian G

unread,
Jul 23, 2014, 1:07:52 PM7/23/14
to transf...@googlegroups.com

On Tuesday, July 22, 2014 9:47:11 AM UTC-7, Tom McNeer wrote:
Is there any documentation for the use of the new caching configuration? And are there other known areas where an old config might cause errors?


Tom,

My apologies, this was so long ago for me I forgot it all changed.  Here's what you need to change your <objectCache> stanza in transfer.xml to:

<objectCache>
	<defaultcache provider="transfer.com.cache.provider.EHCacheProvider">
		<setting name="config" value="transfer/ehcache.xml" />
	</defaultcache>
</objectCache>

For an example, this is mine with some examples of objects for which I've specified no caching::

<objectCache>
  <defaultcache provider="transfer.com.cache.provider.EHCacheProvider">
    <setting value="/path/to/ehcache.xml" name="config"/>
  </defaultcache>
  <cache provider="transfer.com.cache.provider.NoCacheProvider" class="package.object"/>
  <cache provider="transfer.com.cache.provider.NoCacheProvider" class="package2.object2"/>
  <cache provider="transfer.com.cache.provider.NoCacheProvider" class="package2.object3"/>
</objectCache>

To get started, create an ehcache.xml file with one default cache:

<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd">
<defaultCache
        maxElementsInMemory="1000"
        eternal="false"
        timeToIdleSeconds="120"
        timeToLiveSeconds="900"
        overflowToDisk="false"
        />
</ehcache>

Converting from transfer.xml, timeToIdleSeconds replaces accessedminutestimeout and timeToLiveSeconds replaces maxminutespersisted. If you specify eternal=true, then the timeouts are ignored and the only thing that will cause an object to be discarded from the cache is running into the maxElementsInMemory limit.

If you want to get fancier, these are just a standard ehcache configuration file so you can use the docs here for more tunable options:
http://ehcache.org/documentation/user-guide/configuration

For an example, here is my ehcache.xml:

<?xml version="1.0" encoding="UTF-8"?>
<ehcache xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<defaultCache overflowToDisk="false" eternal="true" maxElementsInMemory="350"/>
<!-- eternal for big objects -->
<cache overflowToDisk="false" eternal="true" maxElementsInMemory="750" name="event.event"/>
<cache overflowToDisk="false" eternal="true" maxElementsInMemory="300" name="track.track"/>
<!-- fine tune away from the defaults -->
<cache overflowToDisk="false" eternal="true" maxElementsInMemory="500" name="member.member"/>
<cache overflowToDisk="false" eternal="true" maxElementsInMemory="1000" name="member.clubmember"/>

<!-- short lived, eternal = false with ttl -->
<cache overflowToDisk="false" eternal="false" maxElementsInMemory="750" name="user.user" timeToIdleSeconds="900"/>
<cache overflowToDisk="false" eternal="false" maxElementsInMemory="1500" name="user.authrole" timeToIdleSeconds="900"/>
</ehcache>

 
Don't forget to delete all of your *.transfer files when upgrading!  (which, now based on the github repo, will actually be *.transfer.cfm files)



James Allen

unread,
Jul 23, 2014, 1:18:58 PM7/23/14
to transf...@googlegroups.com

Hi Brian,

 

The only specific cache config I have on a site I’m trying to get to work with the latest Transfer version is:

 

<objectCache>

<cache class="emc">

                                <scope type="none" />

                </cache>

</objectCache>

 

Is there any easy way to replace this?

 

Thanks,

James.

 

---

James  Allen

E: ja...@jamesallen.name

Blog: http://jamesallen.name

Twitter: @CFJamesAllen

Twitter: @JamesAllenVoice (Voiceover)

Twitter: @80sRewindShow (My weekly 80s radio show)

 

Tune in to the best in community radio – Codebass Radio: http://codebassradio.net

 

From: transf...@googlegroups.com [mailto:transf...@googlegroups.com] On Behalf Of Brian G


Sent: 23 July 2014 18:08
To: transf...@googlegroups.com

Brian G

unread,
Jul 23, 2014, 1:36:43 PM7/23/14
to transf...@googlegroups.com, sling...@googlemail.com

James,

Does that just disable caching for the class "emc"?

James Allen

unread,
Jul 23, 2014, 1:42:43 PM7/23/14
to transf...@googlegroups.com

Hi Brian,

 

Yeah that’s all it does. Is there any easy way to do that with the new caching?

 

---

James  Allen

E: ja...@jamesallen.name

Blog: http://jamesallen.name

Twitter: @CFJamesAllen

Twitter: @JamesAllenVoice (Voiceover)

Twitter: @80sRewindShow (My weekly 80s radio show)

 

Tune in to the best in community radio – Codebass Radio: http://codebassradio.net

 

--

Brian G

unread,
Jul 23, 2014, 1:43:58 PM7/23/14
to transf...@googlegroups.com, sling...@googlemail.com


On Wednesday, July 23, 2014 10:36:43 AM UTC-7, Brian G wrote:

Does that just disable caching for the class "emc"?


If that is the case, you can replace it with:

<objectCache>
<cache class="emc"
provider="transfer.com.cache.provider.NoCacheProvider"/>
</objectCache>

 I think that's a valid config - you don't have to have an external config file.

Tom McNeer

unread,
Jul 23, 2014, 3:33:14 PM7/23/14
to transf...@googlegroups.com
Hi Brian and Mark,

Thanks for your help, as always.

While I haven't done any testing yet, the two blog entries Mark cites are very clear, and Brian's explanation here is even more complete. That's what I needed: just some documentation on what should go into the XML.

Brian, I hope you can place Mark's old wiki content in GitHub. Like you, even though I no longer use Transfer for new development, I've built some rather large applications using it. And every now and then, there needs to be an update to those applications -- and I find myself saying "I think I remember the syntax for that, but ...."

Thanks again to both of you.

-- 

-- 
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
 
Try out the new Transfer ORM Custom Google Search:
http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8
 
You received this message because you are subscribed to the Google Groups "transfer-dev" group.
To post to this group, send email to transf...@googlegroups.com
To unsubscribe from this group, send email to transfer-dev...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/transfer-dev?hl=en

--- 
You received this message because you are subscribed to the Google Groups "transfer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to transfer-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560

--
--
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
 
Try out the new Transfer ORM Custom Google Search:
http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8
 
You received this message because you are subscribed to the Google Groups "transfer-dev" group.
To post to this group, send email to transf...@googlegroups.com
To unsubscribe from this group, send email to transfer-dev...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/transfer-dev?hl=en

---
You received this message because you are subscribed to the Google Groups "transfer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to transfer-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian G

unread,
Jul 24, 2014, 2:53:42 PM7/24/14
to transf...@googlegroups.com


On Wednesday, July 23, 2014 12:33:14 PM UTC-7, Tom McNeer wrote:
Brian, I hope you can place Mark's old wiki content in GitHub. Like you, even though I no longer use Transfer for new development, I've built some rather large applications using it. And every now and then, there needs to be an update to those applications -- and I find myself saying "I think I remember the syntax for that, but ...."

That's the plan, need to do some S&R on it but I will copy in at least the most important pages into the github wiki.   I'm like you, I can't remember the syntax so I wind up looking at the docs more than I'd like to admit. ;)


Brian
Reply all
Reply to author
Forward
0 new messages