Announcement Announcement Module
Collapse
No announcement yet.
Flex Addon for Spring Roo Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Flex Addon for Spring Roo

    Hello !

    I am trying to test the Flex addon for Spring Roo and it doesn't work. I did all as suggested in "Spring BlazeDS Integration Reference Guide - Chapter 8. Working with the Flex Addon for Spring Roo" and it fell ok, I managed to deploy in the TC Server Developer Edition v2.0, but when I am trying to acess in Firefox received this error:

    Code:
    javax.servlet.ServletException: Circular view path [index]: would dispatch back to the current handler URL [/rootunes/app/index] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
    	org.springframework.web.servlet.view.InternalResourceView.prepareForRendering(InternalResourceView.java:275)
    	org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:214)
    	org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
    	org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
    	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
    	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
    	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
    	org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
    	org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
    	org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
    	org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)
    	org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
    	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    	org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113)
    	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    I saw the webserver log and have this message:

    Code:
    [BlazeDS]No login command was found for 'SpringSource tc Server runtime/6.0.25.A'. Please ensure that the login-command tag has the correct server attribute value, or use 'all' to use the login command regardless of the server.
    My services-config.xml is that way:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <services-config>
    
        <services>
            <default-channels>
               <channel ref="amf"/>
            </default-channels>
        </services>
    
        <channels>
    
            <channel-definition id="amf" class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/app/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
            </channel-definition>
    
            <channel-definition id="secure-amf" class="mx.messaging.channels.SecureAMFChannel">
                <endpoint url="https://{server.name}:{server.port}/{context.root}/app/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
                <properties>
                    <add-no-cache-headers>false</add-no-cache-headers>
                </properties>
            </channel-definition>
    
            <channel-definition id="polling-amf" class="mx.messaging.channels.AMFChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/app/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
                <properties>
                    <polling-enabled>true</polling-enabled>
                    <polling-interval-seconds>4</polling-interval-seconds>
                </properties>
            </channel-definition>
            
    		<channel-definition id="longpolling-amf" class="mx.messaging.channels.AMFChannel">
    			<endpoint url="http://{server.name}:{server.port}/{context.root}/app/messagebroker/amflongpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
    			<properties>
    				<polling-enabled>true</polling-enabled>
    				<polling-interval-seconds>5</polling-interval-seconds>
    				<wait-interval-millis>60000</wait-interval-millis>
    				<client-wait-interval-millis>1</client-wait-interval-millis>
    				<max-waiting-poll-requests>200</max-waiting-poll-requests>
    			</properties>
    		</channel-definition>        
    
            <channel-definition id="streaming-amf" class="mx.messaging.channels.StreamingAMFChannel">
                <endpoint url="http://{server.name}:{server.port}/{context.root}/app/messagebroker/streamingamf" class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
            </channel-definition>
    
        </channels>
    
        <logging>
            <target class="flex.messaging.log.ConsoleTarget" level="Warn">
                <properties>
                    <prefix>[BlazeDS] </prefix>
                    <includeDate>false</includeDate>
                    <includeTime>false</includeTime>
                    <includeLevel>false</includeLevel>
                    <includeCategory>false</includeCategory>
                </properties>
                <filters>
                    <pattern>Endpoint.*</pattern>
                    <pattern>Service.*</pattern>
                    <pattern>Configuration</pattern>
                </filters>
            </target>
        </logging>
    
        <system>
            <redeploy>
                <enabled>false</enabled>
            </redeploy>
        </system>
    
    </services-config>
    Can anyone help me ?

    Thanks,

    Marcello.

  • #2
    I have changed the urlrewrite.xml file

    I have changed the RULE
    <from casesensitive="false">/</from>
    <to last="true" type="forward">/app/index</to>



    <from casesensitive="false">/</from>
    <to last="true" type="forward">/<your_app_name>_scaffold.html</to>



    I am new to this java-flex world. I just fixed by trail and error method, so correct me if i am wrong

    Comment


    • #3
      I am also facing the same error message. I followed the instructions from Jeremy's screen cast for Roo Flex Addon.

      The only thing I did different was that I made the following change in urlrewrite.xml to get rid of an error this xml was throwing.
      Code:
      <!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN" "http://tuckey.org/res/dtds/urlrewrite3.0.dtd">
      Code:
      <!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.2//EN" "http://tuckey.org/res/dtds/urlrewrite3.2.dtd">

      Comment


      • #4
        @aseembehl The error you mentioned is because of cache problem, this can be solved by removing the cache of the url from preferences->general->network connection->cache and validating the urlrewrite.xml until getting good copy of the DTD file.

        But marcello.marques question is related circular path <appln>/app/index while running the application in the server. My earlier post method solved this problem. But need know is it right of solving it.

        Comment


        • #5
          @janakg

          Your solution works for me too. Thanks!

          Changed the following rule:

          Code:
          <rule>
          	<from>/</from>
          	<to last="true">/app/index</to>		
          </rule>
          Code:
          <rule>
          	<from>/</from>
          	<to last="true">/<your_app_name>_scaffold.html</to>		
          </rule>

          Comment


          • #6
            here is mine.but same error

            Code:
            <?xml version="1.0" encoding="utf-8"?>
            <!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.2//EN" "http://tuckey.org/res/dtds/urlrewrite3.2.dtd">
            
            <urlrewrite default-match-type="wildcard">
            	<rule>
            		<from>/resources/**</from>
            		<to last="true">/resources/$1</to>
            	</rule>
            	<rule>
            		<from>/static/WEB-INF/**</from>
            		<set type="status">403</set>
            		<to last="true">/static/WEB-INF/$1</to>
            	</rule>
            	<rule>
            		<from>/static/**</from>
            		<to last="true">/$1</to>
            	</rule>
            	<rule>
            		<from>/</from>
            		<to last="true">/rootunes_scaffold.html</to>		
            	</rule>
            	<rule>
            		<from>/rootunes/**</from>
            		<to last="true">/rootunes/$1</to>
            	</rule>
            	<rule>
            		<from>/*.*</from>
            		<to>/$1.$2</to>
            	</rule>
            	<rule>
            		<from>/**/*.*</from>
            		<to>/$1/$2.$3</to>
            	</rule>
            	<rule>
            		<from>/**</from>
            		<to>/app/$1</to>
            	</rule>
            	<outbound-rule>
            		<from>/app/**</from>
            		<to>/$1</to>
            	</outbound-rule>	
            </urlrewrite>
            Error :

            Comment

            Working...
            X