[Building Sakai] DynaBeanAdapter can't be cast to FieldAdapter

Aaron Zeckoski azeckoski at unicon.net
Fri Jun 8 07:29:46 PDT 2012


The version difference shouldn't matter too much. There are mostly
just bug fixes between those versions.

That trace might be a red herring so double check there aren't others
earlier on in the stack.

You also might want to actually search for the class itself:
http://aaronz-sakai.blogspot.com/2008/08/using-find-to-locate-duplicate-or.html

-AZ


On Fri, Jun 8, 2012 at 10:12 AM, D. Stuart Freeman
<stuart.freeman at et.gatech.edu> wrote:
> Here's all the places that I have reflectutils:
>
> --(dfreeman31 at speck4:pts/2)--------------------------------(/opt/sakai/tomcat)--
> --(1008:Fri,08 Jun 12:$)-- find . -type f -name '*.jar'|grep reflectutils
> ./components/turningtool-pack/WEB-INF/lib/reflectutils-0.9.10.jar
> ./components/search-pack/WEB-INF/lib/reflectutils-0.9.14.jar
> ./components/polls-pack/WEB-INF/lib/reflectutils-0.9.14.jar
> ./components/accountvalidator-pack/WEB-INF/lib/reflectutils-0.9.14.jar
> ./components/basiclti-pack/WEB-INF/lib/reflectutils-0.9.14.jar
> ./components/sakai-blogwow-pack/WEB-INF/lib/reflectutils-0.9.10.jar
> ./components/entitybroker-pack/WEB-INF/lib/reflectutils-0.9.14.jar
> ./components/emailtemplateservice-pack/WEB-INF/lib/reflectutils-0.9.14.jar
> ./components/profile2-pack/WEB-INF/lib/reflectutils-0.9.14.jar
> ./webapps/imsblti/WEB-INF/lib/reflectutils-0.9.14.jar
> ./webapps/direct/WEB-INF/lib/reflectutils-0.9.14.jar
> ./webapps/sakai-user-tool-prefs/WEB-INF/lib/reflectutils-0.9.14.jar
> ./webapps/sakai-announcement-tool/WEB-INF/lib/reflectutils-0.9.14.jar
> ./webapps/profile2-tool/WEB-INF/lib/reflectutils-0.9.14.jar
> ./webapps/turningtool-tool/WEB-INF/lib/reflectutils-0.9.10.jar
> ./webapps/imsblis/WEB-INF/lib/reflectutils-0.9.14.jar
> ./webapps/accountvalidator/WEB-INF/lib/reflectutils-0.9.14.jar
> ./webapps/providers/WEB-INF/lib/reflectutils-0.9.14.jar
> ./webapps/polls-tool/WEB-INF/lib/reflectutils-0.9.14.jar
>
> I only see blogwow in there once, and no shared. The mix of 0.9.10 and
> 0.9.14 wouldn't cause it, right since they're in separate classloaders?
>
> On Fri, Jun 08, 2012 at 10:05:53AM -0400, Aaron Zeckoski wrote:
>> I haven't see that specifically, but it looks like you have some
>> classloader issues. That cast failure would indicate that you somehow
>> have 2 copies of the FieldAdapter class in the classloader resolution
>> path.
>> DynaBeanAdapter implements FieldAdapter so it should always be
>> possible to cast it unless there are 2 instances of the FieldAdapter
>> class out there.
>>
>> I would check for something like reflectutils being in shared or maybe
>> there being 2 copies of the jars (2 versions probably) in the
>> component or some other mismatch like that.
>>
>> -AZ
>>
>>
>> On Fri, Jun 8, 2012 at 9:34 AM, D. Stuart Freeman
>> <stuart.freeman at et.gatech.edu> wrote:
>> > When starting up my 2.8 instance I'm seeing the following in the log:
>> >
>> > WARN: Failed to instantiate field adapter (class org.azeckoski.reflectutils.beanutils.DynaBeanAdapter), will continue without the dynabean adapter: java.lang.ClassCastException: org.azeckoski.reflectutils.beanutils.DynaBeanAdapter cannot be cast to org.azeckoski.reflectutils.beanutils.FieldAdapter
>> >
>> > Which seems reasonable, but then BlogWow gets loaded and we get:
>> >
>> > org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.entitybroker.impl.entityprovider.EntityProviderAutoRegistrar' defined in file [/opt/sakai/tomcat/components/entitybroker-pack/WEB-INF/components.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.blogwow.logic.entity.BlogRssEntityProviderImpl#0' defined in file [/opt/sakai/tomcat/components/sakai-blogwow-pack/WEB-INF/components.xml]: Cannot resolve reference to bean 'org.sakaiproject.blogwow.logic.BlogLogic' while setting bean property 'blogLogic'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.blogwow.logic.BlogLogic' defined in file [/opt/sakai/tomcat/components/sakai-blogwow-pack/WEB-INF/components.xml]: Cannot resolve reference to bean 'org.sakaiproject.blogwow.logic.ExternalLogic'
>>   while setting bean property 'externalLogic'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.blogwow.logic.ExternalLogic' defined in file [/opt/sakai/tomcat/components/sakai-blogwow-pack/WEB-INF/components.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.sakaiproject.blogwow.logic.ExternalLogicImpl]: Constructor threw exception; nested exception is java.lang.RuntimeException: Failed to instantiate field adapter: class org.azeckoski.reflectutils.beanutils.DynaBeanAdapter
>> >
>> > and then a stack trace that I'd be happy to put on pastebin or something
>> > if necessary. And the failed bean resolution of course stops everything.
>> >
>> > Has anyone seen this before, or have an idea of the cause?
>> >
>> > --
>> > D. Stuart Freeman
>> > Georgia Institute of Technology
>> >
>> > _______________________________________________
>> > sakai-dev mailing list
>> > sakai-dev at collab.sakaiproject.org
>> > http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>> >
>> > TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>>
>>
>>
>> --
>> Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile
>> _______________________________________________
>> sakai-dev mailing list
>> sakai-dev at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>
> --
> D. Stuart Freeman
> Georgia Institute of Technology



-- 
Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile


More information about the sakai-dev mailing list