本文介绍了PropertyTypeDescriptor 和 Spring 3.1.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Spring-Flex 1.5.2 和 Spring 3.1.2 处理一个项目,最近在我的项目中添加了一些 DAO 后,当我尝试填充我的组合之一时,我开始在 WebLogic 控制台上收到此错误:

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.

我用@RemotingDestination 注释了我的服务并在我的 Mxml 中创建了远程对象,如下所示:

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}"

这在我的创作中完成:

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.

org.springframework.core.convert.support.PropertyTypeDescriptor 类在 Spring 3.1 中被移除了!

The class org.springframework.core.convert.support.PropertyTypeDescriptor was removed in Spring 3.1!

查看包含 org.springframework.flex.core.io.HibernateProxyConverter 的 jar.也许你在 pom.xml 中找到了需要的 spring-core 版本.

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.

这篇关于PropertyTypeDescriptor 和 Spring 3.1.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 15:34