I’m working on a project using Spring-Flex 1.5.2 and Spring 3.1.2 and recently after adding some DAO’s to my project i started getting this error on the WebLogic Console when trying to populate one of my combos:
[BlazeDS]org/springframework/core/convert/support/PropertyTypeDescriptor
java.lang.NoClassDefFoundError: org/springframework/core/convert/support/PropertyTypeDescriptor
at org.springframework.flex.core.io.HibernateProxyConverter.convert(HibernateProxyConverter.java:48)
at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:35)
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:171)
at org.springframework.flex.core.io.SpringPropertyProxy.getValue(SpringPropertyProxy.java:160)
at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:601)
at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:532)
at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:207)
at flex.messaging.io.amf.Amf3Output.writeObjectArray(Amf3Output.java:854)
at flex.messaging.io.amf.Amf3Output.writeAMFArray(Amf3Output.java:445)
at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:193)
at flex.messaging.io.ArrayCollection.writeExternal(ArrayCollection.java:97)
at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:594)
at flex.messaging.io.amf.Amf3Output.writeArrayCollection(Amf3Output.java:476)
at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:189)
at flex.messaging.messages.AbstractMessage.writeExternalBody(AbstractMessage.java:705)
at flex.messaging.messages.AbstractMessage.writeExternal(AbstractMessage.java:435)
at flex.messaging.messages.AsyncMessage.writeExternal(AsyncMessage.java:140)
at flex.messaging.messages.AcknowledgeMessage.writeExternal(AcknowledgeMessage.java:94)
at flex.messaging.messages.AcknowledgeMessageExt.writeExternal(AcknowledgeMessageExt.java:55)
at flex.messaging.io.amf.Amf3Output.writePropertyProxy(Amf3Output.java:594)
at flex.messaging.io.amf.Amf3Output.writeCustomObject(Amf3Output.java:532)
at flex.messaging.io.amf.Amf3Output.writeObject(Amf3Output.java:112)
at flex.messaging.io.amf.Amf0Output.writeObject(Amf0Output.java:206)
at flex.messaging.io.amf.AmfMessageSerializer.writeObject(AmfMessageSerializer.java:196)
at flex.messaging.io.amf.AmfMessageSerializer.writeBody(AmfMessageSerializer.java:186)
at flex.messaging.io.amf.AmfMessageSerializer.writeMessage(AmfMessageSerializer.java:142)
at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:198)
at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:291)
at flex.messaging.endpoints.AMFEndpoint$$EnhancerByCGLIB$$25364767.service(<generated>)
at org.springframework.flex.servlet.MessageBrokerHandlerAdapter.handle(MessageBrokerHandlerAdapter.java:109)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.lang.ClassNotFoundException: org.springframework.core.convert.support.PropertyTypeDescriptor
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:176)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:35)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 57 more
Google has failed me on this one… so any help is greatly appreciated.
I have annotated my services with @RemotingDestination and created the Remote Objects in my Mxml, like this:
<s:RemoteObject id="marketSegment" destination="marketSegmentServiceImpl" endpoint="http://localhost:7001/scpi/messageBroker/amf"></s:RemoteObject>
then i’m adding this on my combobox:
dataProvider="{marketSegment.findAllCatalogs.lastResult}"
and this on my creationComplete:
private function init():void{
marketSegment.findAllCatalogs();
biotech.findAllCatalogs();
}
This is working to fetch obects that have only primitive type properties, but fails with the mentioned error when trying to fetch any object with complex type properties.
It looks like some versions are incompatible.
The class
org.springframework.core.convert.support.PropertyTypeDescriptorwas removed in Spring 3.1!Have a look at the jar that contains
org.springframework.flex.core.io.HibernateProxyConverter.Maybe you find in the pom.xml the version of spring-core that is needed.