• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Data service connection: BlazeDS root and/or RDS server

New Here ,
Sep 02, 2010 Sep 02, 2010

Copy link to clipboard

Copied

Hello all,

I already went through the very well written and clear tutorials of Flex and Flash builder. Now I am trying to develop alone my first felx-spring application.

here is my web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">

   <servlet>
      <servlet-name>spring</servlet-name>
         <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
         <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/services-config.xml</param-value>
         </init-param>
         <load-on-startup>1</load-on-startup>
   </servlet>

   <servlet-mapping>
       <servlet-name>spring</servlet-name>
       <url-pattern>/messagebroker/*</url-pattern>
   </servlet-mapping>
     
</web-app>

and my services-config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:flex="http://www.springframework.org/schema/flex"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
          http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
          http://www.springframework.org/schema/flex
          http://www.springframework.org/schema/flex/spring-flex-1.0.xsd">

   <flex:message-broker/>

   <bean id="employeeService" class="services.EmployeeServiceImpl" >
      <flex:remoting-destination />
      <!--constructor-arg ref="dataSource" /-->
   </bean>
 
   <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
      <property name="driverClassName" value="org.h2.Driver" />
      <property name="url" value="jdbc:h2:~/sprinflexdemodb/sprinflexdemodb" />
   </bean>        
</beans>

First: when I configured the BlazeDS and validated the configuration, I had the warning:

Server root is not pointing to a BlazeDS server root folder


Googling this message gives only two results, that roughly say: it's not really a problem.

But after, when trying to connect to the data service in the Data/Services view in Flash builder, I am asked for a password, I put nothing, then I have this error alert:

RDF server message:

Error executing RDS command. Status code : 404 , Reason: Introuvable (in french, means "not found")

Suggestion:


...

The suggestions are to make sure that there is an RDS servlet in my web.xml. Well, before this alert I haven't heared about RDS servlets in the tutorials I made. But, as suggested in someplaces on the web, I added the following in my web.xml:

<servlet>
        <servlet-name>RDSDispatchServlet</servlet-name>
        <servlet-class>flex.rds.server.servlet.FrontEndServlet</servlet-class>
        <init-param>
            <param-name>useAppserverSecurity</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>10</load-on-startup>
    </servlet>

and now I am still having the same error.

Please, any suggestions?

thanks in advance.

Views

5.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 03, 2010 Sep 03, 2010

Copy link to clipboard

Copied

No ideas?

.... any ideas!?!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 03, 2010 Sep 03, 2010

Copy link to clipboard

Copied

test

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 06, 2010 Sep 06, 2010

Copy link to clipboard

Copied

same problem here. i've been banging my head against the wall with this. hours...

everything looks to be in place...

in fact if i check the RDS from the preferences page - it tests fine. but from Data/Services panel i get the error abobe.

please someone from adbe post the solution

FB4 / blaze 4 (latest)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Sep 06, 2010 Sep 06, 2010

Copy link to clipboard

Copied

Make sure that your root url (don't forget the port), root folder and context root are correctly validated while creating a project.

This blog post gives a step by step process of creating this kind of application.

http://sujitreddyg.wordpress.com/category/blazeds/

Thanks

-Sunil

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 06, 2010 Sep 06, 2010

Copy link to clipboard

Copied

thanks sunil.

actually yes i am using a combined java/flex facet project which i have been using for a while to attempt this.

when attempting to create a new combined project i get an error which i can't get past: One or more constraints have not been satisfied. - but no indication on what it is. this must exist in my other project which is problematic but there is no descriptive error on what it is.

workaround will likely be to create two seperate projects, one flex/web and the other dynamic web project/spring - i suspect this will likely work. i just wanted to keep everything together in one project.

thanks for any additional help / thoughts you might have.

stef

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 06, 2010 Sep 06, 2010

Copy link to clipboard

Copied

well now i'm really perplexed. i create a plain vanilla dynamic web project - brought in blazeds' assets. server comes up fine, RDS tests fine from preferences in eclipse but STILL the Data/Services cannot pick it up. same error as above...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 06, 2010 Sep 06, 2010

Copy link to clipboard

Copied

if RDS is working, should http://localhost:8080/<SERVER CONTEXT>/RDSDispatchServlet come back with something (and not a 404)? thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 06, 2010 Sep 06, 2010

Copy link to clipboard

Copied

ok  was able to get the Data/Service panel to work but ONLY against an external standalone TOMCAT server (mr Christophe Coenraets ' java test drive).

so my workaround is to use an external/standalone tomcat 6 server... weird.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 06, 2010 Sep 06, 2010

Copy link to clipboard

Copied

Hello,

thank you both for your answers. It's working now.

Sujit, actually what I did is indeed to folllow step by step the tutorial you wrote.

However, it still not really clear why it didn't work... I think the general reason is that I mixed (or didn't manage to mix!) two tutorials:

  • your tutorial: http://www.adobe.com/devnet/flex/articles/flashbuilder4_blazeds_03.html
  • and the one I found on spring source: http://static.springsource.org/spring-flex/docs/1.0.x/reference/html/index.html

Concretely, I noticed these differences:

  • The dispatcher servlet in the spring tutorial is a org.springframework.web.servlet.DispatcherServlet, while in your tutorial we use a flex.messaging.MessageBrokerServlet.
  • In your web.xml, you put a flex.messaging.HttpFlexSession listener, in the spring tutorial they don't.
    • You use and RDS servlet. As far as I understood, this is specific to FlashBuilder 4.
    • In the spring tutorial, it's said that we don't need to use a "remoting-config.xml" file...  while in your tutorial we use such a file.
    • In the spring tutorial, they claim that using the follwing tag <flex:message-broker/> will automatically generate default configuration, and you don't use this tag.

    Is there this difference because these two tutorials are about different versions of BlazeDS...? Or did they in the spring tutorial omit some instructions, making the assumption that it's straightforward?

    It would be very helpful if we can have an answer about these questions!

    Anyway, now my Data service is working and I can get the list of the available services.... now, I have to check if they are working...

    Regards.

      Votes

      Translate

      Translate

      Report

      Report
      Community guidelines
      Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
      community guidelines
      Guest
      Dec 16, 2010 Dec 16, 2010

      Copy link to clipboard

      Copied

      LATEST

      I'd like to confirm LePew's result.  I got RDS working against BlazeDS after I separated flex and java into two projects.

      Votes

      Translate

      Translate

      Report

      Report
      Community guidelines
      Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
      community guidelines