這種問題已經被問到過,但是在StackOverlfow中沒有得到很好的支持......也許是因爲有人認爲它是最基本的......但像我這樣的初學者有花了幾天時間,但無濟於事。請幫助[我敢肯定,它將成爲一個永遠發生的問題]Flex 4,Spring 3 with Hibernate&MySQl setup +配置問題
我想做一個flex項目,並希望與它整合Spring 3.0和後來的休眠。
我試圖按照詹姆斯·沃德的Refcard說明 - http://refcardz.dzone.com/refcardz/flex-4-and-spring-3, 可悲的是,我被困在一個初始點本身在項目部署到JBoss的一些問題(在refcardz它說的Tomcat)..
我試圖使用「Flex和Java集成聖經」這本書[它使用JBoss],有人可以告訴我它是正確的嗎?還是有其他一些文本?請大家幫忙,因爲我一直堅持這個爲期2天......我想編碼並繼續前進,不要陷入配置問題。我會非常感激。
更新,更多詳細信息:
我開始了使用「Flex和Java集成聖經,因爲沒有任何的如何整合這麼多東西的想法(有出有什麼那麼沒有文本)」 。當我到達書的中間時,我無法做出一些步驟,因爲我猜想事情的版本發生了變化。 我搜索了James Ward的例子(對於像我這樣一個愚蠢的初學者來說,並不是很詳細)。使用Refcardz,我被困在以下 - 在製作flex spring項目時,我發現控制檯中的錯誤無法部署到服務器(嘗試使用JBoss和Tomcat)。錯誤跟蹤如下(我想在Refcardz提到的一些罐子是用它做):
Oct 8, 2010 2:07:24 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_21\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program Files\Common Files\Lenovo;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\ThinkPad\ConnectUtilities;C:\Program Files\Lenovo\Client Security Solution;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\WinSCP3\;C:\Program Files\Java\jdk1.6.0_21\bin;C:\apache-ant-1.8.1\bin;C:\Program Files\Java\jdk1.6.0_21\bin;C:\apache-ant-1.8.1\bin
Oct 8, 2010 2:07:24 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:flexspring' did not find a matching property.
Oct 8, 2010 2:07:24 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Oct 8, 2010 2:07:24 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 398 ms
Oct 8, 2010 2:07:24 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 8, 2010 2:07:24 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
Oct 8, 2010 2:07:25 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Oct 8, 2010 2:07:25 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.springframework.flex.core.ExceptionTranslationAdvice] for bean with name 'org.springframework.flex.core.ExceptionTranslationAdvice#0' defined in null: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1238)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)
at org.springframework.beans.factory.support.AbstractBeanFactory.getType(AbstractBeanFactory.java:549)
at org.springframework.flex.config.RemotingAnnotationPostProcessor.findRemotingDestinations(RemotingAnnotationPostProcessor.java:148)
at org.springframework.flex.config.RemotingAnnotationPostProcessor.postProcessBeanFactory(RemotingAnnotationPostProcessor.java:79)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:653)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2733)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1124)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2733)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1124)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2733)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1124)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1256)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1227)
... 25 more
Caused by: java.lang.ClassNotFoundException: org.aopalliance.aop.Advice
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
... 53 more
Oct 8, 2010 2:07:25 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Oct 8, 2010 2:07:25 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/flexspring] startup failed due to previous errors
Oct 8, 2010 2:07:25 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
有人可以請給一些一步一步的方法做so..or一些存在的文本來獲得這種直覺。我是一名學生和實習生。多年來沒有感受到這種無助感。我不能讓事情發生。 [我不知道我是最笨能有這樣的問題。]
問候, chirayu已
下一期的問題UPDATE-10 /二千〇一十分之二十一
上述問題解決了由於飛濺,詹姆斯(ANS以下。),但現在經過我已經照在Refcardz說,和sayHello.mxml加載瀏覽器,我輸入文字,並按下按鈕的sayHello,在此錯誤出現 -
[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8080/flexsping/messagebroker/amf'"] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\4.x\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:345] at mx.rpc::Responder/fault()[E:\dev\4.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:68] at mx.rpc::AsyncRequest/fault()[E:\dev\4.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:113] at mx.messaging::ChannelSet/faultPendingSends()[E:\dev\4.x\frameworks\projects\rpc\src\mx\messaging\ChannelSet.as:1614] at mx.messaging::ChannelSet/channelFaultHandler()[E:\dev\4.x\frameworks\projects\rpc\src\mx\messaging\ChannelSet.as:1206] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.messaging::Channel/connectFailed()[E:\dev\4.x\frameworks\projects\rpc\src\mx\messaging\Channel.as:1128] at mx.messaging.channels::PollingChannel/connectFailed()[E:\dev\4.x\frameworks\projects\rpc\src\mx\messaging\channels\PollingChannel.as:406] at mx.messaging.channels::AMFChannel/statusHandler()[E:\dev\4.x\frameworks\projects\rpc\src\mx\messaging\channels\AMFChannel.as:453]
我不知道這意味着什麼......大家花了很多時間在這...請親切的幫助我。我正在嘗試,並嘗試過所有的東西......但現在確實需要知道這一點的人的幫助。我會非常感激。
-Chirayu
也許你可以提供一些關於你遇到的問題的更多細節。也許在日誌或堆棧跟蹤中有錯誤可以粘貼到您的問題中。 – 2010-10-08 18:03:42
你卡在哪裏?到目前爲止你做了什麼?這是一個相當開放的問題 – 2010-10-08 18:06:26
感謝上帝的人在回覆......非常感謝..我會在接下來的5分鐘更新這個問題,以便更準確。 – Chirayu 2010-10-08 18:21:16