Facing problems while converting from Flex to Apache Royale

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Facing problems while converting from Flex to Apache Royale

Ravics32
Hi everyone,
                  Currently I am working on migration project from
Flex+Spring with BlazeDS to Apache royale. I am very new to Flex and Apache
Roayle. My Flex(spring+balzeDS) project architecture is We are  using maven
flexmojo plugin to convert flex package to .swf file then we are loading
that file in .swf file whenever user is login in the app. Once that is done
I can able to see that all action whatever I am doing in flex UI it going to
backend service by using the "my-amf" channel and I can able to talk to my
destination classes from UI.

Here is my question in this architecture How Can I introduce Apache royale
UI to get rid off Flex by using Maven. I created  new project with in that
I have just one text box with submit button on click event I am talking to
My old Application where I have added one method but I am unable to get any
response and it is giving me some erro.

<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:js="library://ns.apache.org/royale/basic"
xmlns:mx="library://ns.apache.org/royale/mx" xmlns:local="*"
initialize="iniApp(event)"> <fx:Style
source="../../main/resources/styles.css"/> <fx:Script>

 </fx:Script> <fx:Declarations> <mx:RemoteObject id="loaderService"
endpoint="http://localhost:8081/STARS/messagebroker/amf"
destination="reportService" result="handleLoadResult(event)"
fault="handleFault(event)" showBusyCursor="true" /> <mx:RemoteObject
id="remoteObject" destination="helloWorldRemotingService"
endpoint="http://localhost:8081/STARS/messagebroker/amf"
result="handleLoadResult(event)" fault="handleFault(event)"
showBusyCursor="true"/> </fx:Declarations> <mx:VBox width="400"> <mx:HBox>
<mx:VBox> <mx:Label text="Name to send via AMF"/> <mx:TextInput
id="name_txt"/> </mx:VBox> <mx:Button label="Send to Name"
click="loaderService.welcome()"/> </mx:HBox> <mx:Label
text="{loaderService.welcome.lastResult}" height="15"/> </mx:VBox>
</mx:Application>



ERROR:


 Exception: java.lang.NullPointerException
        at
java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
        at
flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1373)
        at
flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:1005)
        at
flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:103)
        at
flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
        at
flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
        at
flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
        at
flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:166)
        at
flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:291)
        at
flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:353)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at
org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter.doFilter(AbstractPreAuthenticatedProcessingFilter.java:107)
        at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
        at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
        at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
        at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
        at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
        at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
        at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
        at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
        at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
        at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at
org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
        at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
        at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
        at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
        at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at
com.sp.cpem.filter.ExceptionHandlerFilter.doFilterInternal(ExceptionHandlerFilter.java:25)
        at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
        at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
        at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
        at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
        at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
        at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)


[
  errorReply: Flex Message (flex.messaging.messages.ErrorMessage)
    clientId = 470F44C5-680A-3F0D-D58C-605A866C0B1F
    correlationId =BlazeDS]Unhandled error when processing a message:
java.lang.NullPointerException
  incomingMessage: Flex Message (flex.messaging.messages.RemotingMessage)
    operation = null
    clientId = 470F44C5-680A-3F0D-D58C-605A866C0B1F
    destination = null
    messageId =
    timestamp = 1557396783081
    timeToLive = 0
    body =
    [
      {headers={DSMessagingVersion=1, DSId=nil}, timeToLive=0,
clientId=null, destination=, messageId=4CC0F8ED-8234-AEA2-F9B4-5CD3FD2D0DF0,
correlationId=, body={}, operat
ion=5, timestamp=0}
    ]
    hdr(DSEndpoint) = my-amf
    destination = null
    messageId = 470F4616-520F-9E4E-0484-14188756FFA6
    timestamp = 1557396783218
    timeToLive = 0
    body = null
    code =  Server.Processing
    message =  There was an unhandled failure on the server.
java.lang.NullPointerException
    details =  null
    rootCause =  null
    body =  null
    extendedData =  null



Thanks in advance.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/