Trying to get my head wrapped around the new orm features.not doing well J.

 

I used an example I got from Manju's blog.trying to get one to many
relationships working.  I set up a Contacts.cfc with three one to many cfc's
(emails, addresses, phoneNumbers).  Then I created an index.cfm to set
things up and display results. I got an error.  So I commented out all the
code on index.cfm and tried again.same error.  

 

I'm guessing that would mean the error must be in application.cfc, but it's
pretty simple and I don't see what might be wrong.  Could the error be
coming from one of the other cfc's even though index is commented out?  Does
Coldfusion attempt to build the map as soon as it see ormenabled = "true"?

 

Here is the error and below that the code for application cfc

 

Thanks,

 

Mark

 

Error casting an object of type java.lang.String cannot be cast to
java.util.Map to an incompatible type. This usually indicates a programming
error in Java, although it could also mean you have tried to use a foreign
object in a different way than it was designed. 



java.lang.String cannot be cast to java.util.Map 

 

        

 

        

Resources: 

*       Check the ColdFusion <http://www.adobe.com/go/prod_doc>
documentation to verify that you are using the correct syntax.
*       Search the Knowledge Base <http://www.adobe.com/go/prod_support/>
to find a solution to your problem.



Browser  

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.17)
Gecko/2009122116 Firefox/3.0.17 GTB6 (.NET CLR 3.5.30729)


Remote Address  

127.0.0.1


Referrer  

        

Date/Time  

14-Jan-10 11:18 AM

 


Stack Trace 


 

java.lang.ClassCastException: java.lang.String cannot be cast to
java.util.Map
               at
coldfusion.orm.hibernate.ConfigurationManager.initConfiguration(Configuratio
nManager.java:63)
               at
coldfusion.orm.hibernate.HibernateProvider.InitializeORMForApplication(Hiber
nateProvider.java:182)
               at
coldfusion.orm.hibernate.HibernateProvider.beforeApplicationStart(HibernateP
rovider.java:85)
               at
coldfusion.filter.ApplicationFilter.fireBeforeAppStartEvent(ApplicationFilte
r.java:475)
               at
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:221)
               at
coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
               at
coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
               at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)
               at
coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
               at
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
               at
coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)
               at
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistence
Filter.java:28)
               at
coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
               at
coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
               at
coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
               at
coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
               at
coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)
               at coldfusion.CfmServlet.service(CfmServlet.java:200)
               at
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
               at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
               at
coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletF
ilter.java:42)
               at
coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
               at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
               at jrun.servlet.FilterChain.service(FilterChain.java:101)
               at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
               at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
               at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
               at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
               at
jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
               at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:
320)
               at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428
)
               at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:26
6)
               at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

 

 

Application.cfc :

 

<cfcomponent>

            

            <!---define the application--->

<cfset this.name = "myORMApplication">

<cfset this.ormenabled = "true">

 

            <!---store the datasource for the entire application--->

<cfset this.datasource = "OrmTesting">

<!---- ORM Setting this tells ORM to drop and create database---->

<cfset this.ormsettings = "dropcreate">

</cfcomponent>

 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329670
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to