15 Replies Latest reply on Dec 1, 2006 11:09 AM by Anatole Tartakovsky

    FDS can't find my destination.... how to trouble shoot?

    kedward
      Hello,

      I am using the adobe DaoFlex to generate a flex application. Seemed to go well, but when I try to run the application it throws this error as soon as it trys to "fill" the grid:

      "No destination 'Employee' exists in service flex.data.DataService"

      HOW DO I TROUBLE SHOOT? What Can I check?

      1) I looked in the application WEB-INF/flex directory

      C:\bea\user_projects\applications\theriabook\WEB-INF\flex\data-management-config.xml

      and the destination employee is there!


        • 1. Re: FDS can't find my destination.... how to trouble shoot?
          kedward Level 1
          I have tried the "contacts" tutorial also, but get the same problem. I have the WEB-INF/flex/data-management-config.xml file with the contact destination....but still the problem!:

          MessagingError message='Unknown destination 'contact' for service with id 'data-service'.']
          at mx.messaging.config::ServerConfig$/getProperties()
          at mx.data::Metadata$iinit()
          at mx.data::ConcreteDataService$iinit()
          at mx.data::ConcreteDataService$/getService()
          at mx.data::DataService$iinit()
          at contact_app/initApp()
          at contact_app/___Application1_creationComplete()
          at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.core::UIComponent/set initialized()
          at mx.managers::LayoutManager/::doPhasedInstantiation()
          at Function/ http://adobe.com/AS3/2006/builtin::apply()
          at mx.core::UIComponent/::callLaterDispatcher2()
          at mx.core::UIComponent/::callLaterDispatcher()
          • 2. Re: FDS can't find my destination.... how to trouble shoot?
            seth_hodgson Level 1
            Hi,

            Try importing mx.messaging.config.ServerConfig in your app and then trace(ServerConfig.xml.toXMLString()).

            This is the FDS configuration data that gets injected into a swf then you compile using the -services option. If this proprety is empty or does not contain the 'Employee' destination you'll need to recompile and make sure that you reference your services.config.xml file using the -services option.

            Best,
            Seth
            • 3. Re: FDS can't find my destination.... how to trouble shoot?
              michael6
              Hi Kedward,

              Did you fix your problem? I have tried this sample as well and got the exact error as you.

              I did try the way that Seth suggested. It has something and seems to miss <source>com.theriabook.datasource.EmployeeAssembler</source>
              <scope>application</scope> properties. But when I check the data-mamangement-config.xml in WEB-INF, it does include those. I am not sure which services.config.xml and data-mamangement-config.xml that JRun really reload.
              • 4. Re: FDS can't find my destination.... how to trouble shoot?
                seth_hodgson Level 1
                Hi Michael,

                The config info that is injected into the swf and accessible via ServerConfig.xml is a subset of the total configuration on the server. The client doesn't need to know the assembler source class or scope for the destination so those elements are not injected into the swf.

                services.config.xml in my previous post was a typo; it should be services-config.xml. This config file references the other service specific config files you're using (e.g. data-mamangement-config.xml).

                Assuming that the destination you're trying to contact is defined on the client in ServerConfig.xml and the server is running and also has this destination defined things should work. What is the specific error you are seeing?

                Best,
                Seth
                • 5. FDS can't find my destination.... how to trouble shoot?
                  michael6 Level 1
                  Hi Seth,

                  Thank you for your reply. After I launch the main.xmal and then click the Fill button, the Message column shows that "No destination 'Employee' exists in service flex.data.DataService". I also notice that there are some errors when I start the JRun with Integrated Flex Server. The bellow is the message copy from the JRun.

                  ****************************************************************************************** ********************************************
                  Starting Macromedia JRun 4.0 (Build 106363), default server
                  Flex OEM License for JRun enabled
                  11/02 08:55:17 warning Unable to open C:\fds2\jrun4/lib/license.properties
                  11/02 08:55:18 info JRun Naming Service listening on *:2907
                  11/02 08:55:18 info No JDBC data sources have been configured for this server (s
                  ee jrun-resources.xml)
                  11/02 08:55:19 info JRun Web Server listening on *:8700
                  11/02 08:55:19 info Deploying web application "Flex Default Web Application" fro
                  m: file:/C:/fds2/jrun4/servers/default/default-war/
                  11/02 08:55:19 user JSPServlet: init
                  11/02 08:55:19 info Deploying web application "Flex Data Services" from: file:/C
                  :/fds2/jrun4/servers/default/flex/
                  11/02 08:55:19 user JSPServlet: init
                  11/02 08:55:19 user FlexMxmlServlet: init
                  11/02 08:55:20 INFO Loading configuration file C:\fds2\jrun4\servers\default\fle
                  x\WEB-INF\flex\flex-webtier-config.xml
                  11/02 08:55:20 INFO Loading configuration file C:\fds2\jrun4\servers\default\fle
                  x\WEB-INF\flex\flex-config.xml
                  11/02 08:55:20 user FlexMxmlServlet: Starting Adobe Flex Web Tier Compiler
                  11/02 08:55:20 user FlexMxmlServlet: Adobe Flex Web Tier Compiler Build: 143451
                  11/02 08:55:20 user MessageBrokerServlet: init
                  11/02 08:55:22 user FlexSwfServlet: init
                  11/02 08:55:22 user FlexInternalServlet: init
                  11/02 08:55:22 info Deploying web application "Flex Admin Web Application" from:
                  file:/C:/fds2/jrun4/servers/default/flex-admin/
                  11/02 08:55:22 user JSPServlet: init
                  11/02 08:55:22 user MessageBrokerServlet: init
                  11/02 08:55:23 info Deploying web application "Flex Data Services Samples" from:
                  file:/C:/fds2/jrun4/servers/default/samples/
                  11/02 08:55:23 user JSPServlet: init
                  11/02 08:55:23 user FlexMxmlServlet: init
                  11/02 08:55:24 INFO Loading configuration file C:\fds2\jrun4\servers\default\sam
                  ples\WEB-INF\flex\flex-webtier-config.xml
                  11/02 08:55:24 INFO Loading configuration file C:\fds2\jrun4\servers\default\sam
                  ples\WEB-INF\flex\flex-config.xml
                  11/02 08:55:24 user FlexMxmlServlet: Starting Adobe Flex Web Tier Compiler
                  11/02 08:55:24 user FlexMxmlServlet: Adobe Flex Web Tier Compiler Build: 143451
                  11/02 08:55:24 user MessageBrokerServlet: init
                  11/02 08:55:27 user FlexSwfServlet: init
                  11/02 08:55:27 user FlexInternalServlet: init
                  11/02 08:55:27 info Deploying web application "Employee Flex Data Services" from
                  : file:/C:/fds2/jrun4/servers/default/theriabook/
                  11/02 08:55:27 user JSPServlet: init
                  11/02 08:55:27 error Could not pre-load servlet: JSPServlet
                  java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
                  at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:
                  107)
                  at jrun.jsp.JSPEngine.findExplicitTaglibs(JSPEngine.java:513)
                  at jrun.jsp.JSPEngine.<init>(JSPEngine.java:138)
                  at jrun.jsp.JSPServlet.init(JSPServlet.java:62)
                  at jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.
                  java:1200)
                  at jrun.servlet.WebApplicationService.preloadServlets(WebApplicationServ
                  ice.java:791)
                  at jrun.servlet.WebApplicationService.postStart(WebApplicationService.ja
                  va:293)
                  at jrun.deployment.DeployerService.initModules(DeployerService.java:711)

                  at jrun.deployment.DeployerService.createWatchedDeployment(DeployerServi
                  ce.java:242)
                  at jrun.deployment.DeployerService.deploy(DeployerService.java:430)
                  at jrun.deployment.DeployerService.checkWatchedDirectories(DeployerServi
                  ce.java:179)
                  at jrun.deployment.DeployerService.run(DeployerService.java:891)
                  at jrunx.scheduler.SchedulerService.invokeRunnable(SchedulerService.java
                  :230)
                  at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j
                  ava:428)
                  at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

                  11/02 08:55:28 user FlexMxmlServlet: init
                  11/02 08:55:28 INFO Loading configuration file C:\fds2\jrun4\servers\default\the
                  riabook\WEB-INF\flex\flex-webtier-config.xml
                  11/02 08:55:29 INFO Loading configuration file C:\fds2\jrun4\servers\default\the
                  riabook\WEB-INF\flex\flex-config.xml
                  11/02 08:55:29 user FlexMxmlServlet: Starting Adobe Flex Web Tier Compiler
                  11/02 08:55:29 user FlexMxmlServlet: Adobe Flex Web Tier Compiler Build: 143451
                  11/02 08:55:29 user MessageBrokerServlet: init
                  [Flex] RTMP-Server failed to start up: java.net.BindException: Address already i
                  n use: bind
                  Exception in thread "RTMP-Server" flex.messaging.endpoints.rtmp.RTMPException: T
                  he RTMP server has encountered a fatal exception starting up: Address already in
                  use: bind
                  at flex.messaging.endpoints.rtmp.BaseNIORTMPServer.run(BaseNIORTMPServer
                  .java:310)
                  at java.lang.Thread.run(Thread.java:595)
                  11/02 08:55:32 user FlexSwfServlet: init
                  11/02 08:55:32 user FlexInternalServlet: init
                  11/02 08:55:32 info Deploying enterprise application "JRun 4.0 Internal J2EE Com
                  ponents" from: file:/C:/fds2/jrun4/lib/jrun-comp.ear
                  11/02 08:55:32 info Deploying EJB "JRunSQLInvoker" from: file:/C:/fds2/jrun4/lib
                  /jrun-comp.ear
                  Server default ready (startup time: 17 seconds)
                  ****************************************************************************************** ****************************************
                  Hope it can provide some clues.
                  Thanks.
                  Michael
                  • 6. Re: FDS can't find my destination.... how to trouble shoot?
                    CathyM


                    > Try importing mx.messaging.config.ServerConfig in your app and then trace(ServerConfig.xml.toXMLString()).

                    When you try Seth's troubleshooting technique, do you see any Employee destination listed among the destinations?

                    As for the server startup, it looks like JRun didn't close down successfully. Open up the Windows Task Manager. Find the jrun.exe process (processes) and terminate them. After that, start up your server again. I don't believe the errors you see are related to the server startup errors but it's nice to eliminate this possibility.
                    • 7. Re: FDS can't find my destination.... how to trouble shoot?
                      michael6 Level 1
                      Thanks for the reply. I tried the Seth's troubleshooting technique, and the Employee destination was there. The following is the output in the Console of Eclipse with trace(ServerConfig.xml.toXMLString()).

                      ****************************************************************************************** *************************************
                      <services>
                      <proxy-service messageTypes="flex.messaging.messages.HTTPMessage,flex.messaging.messages.SOAPMessage">
                      <destination id="DefaultHTTP">
                      <channels>
                      <channel ref="my-rtmp"/>
                      <channel ref="my-http"/>
                      <channel ref="my-amf"/>
                      </channels>
                      </destination>
                      </proxy-service>
                      <remoting-service messageTypes="flex.messaging.messages.RemotingMessage"/>
                      <message-service messageTypes="flex.messaging.messages.AsyncMessage"/>
                      <data-service messageTypes="flex.data.messages.DataMessage">
                      <destination id="Employee">
                      <properties>
                      <metadata>
                      <identity property="EMP_ID"/>
                      </metadata>
                      <network>
                      <paging enabled="false"/>
                      </network>
                      </properties>
                      <channels>
                      <channel ref="my-rtmp"/>
                      <channel ref="my-amf"/>
                      <channel ref="my-polling-amf"/>
                      </channels>
                      </destination>
                      </data-service>
                      <channels>
                      <channel id="my-amf" type="mx.messaging.channels.AMFChannel">
                      <endpoint uri=" http://{server.name}:{server.port}/messagebroker/amf"/>
                      <properties>
                      <polling-enabled>false</polling-enabled>
                      </properties>
                      </channel>
                      <channel id="my-polling-amf" type="mx.messaging.channels.AMFChannel">
                      <endpoint uri=" http://{server.name}:{server.port}/messagebroker/amfpolling"/>
                      <properties>
                      <polling-interval-seconds>8</polling-interval-seconds>
                      <polling-enabled>true</polling-enabled>
                      </properties>
                      </channel>
                      <channel id="my-http" type="mx.messaging.channels.HTTPChannel">
                      <endpoint uri=" http://{server.name}:{server.port}/messagebroker/http"/>
                      <properties/>
                      </channel>
                      <channel id="my-secure-amf" type="mx.messaging.channels.SecureAMFChannel">
                      <endpoint uri="https://{server.name}:9100/messagebroker/amfsecure"/>
                      <properties/>
                      </channel>
                      <channel id="my-rtmp" type="mx.messaging.channels.RTMPChannel">
                      <endpoint uri="rtmp://{server.name}:2038"/>
                      <properties/>
                      </channel>
                      <channel id="my-secure-http" type="mx.messaging.channels.SecureHTTPChannel">
                      <endpoint uri="https://{server.name}:9100/messagebroker/httpsecure"/>
                      <properties/>
                      </channel>
                      </channels>
                      </services>
                      ****************************************************************************************** ********************************

                      I also terminate the jrun.exe process (processes) and even restart the machine. But I still see the same errors when I start JRun or when I click Fill button.
                      Thanks.
                      • 8. Re: FDS can't find my destination.... how to trouble shoot?
                        seth_hodgson Level 1
                        Hi Michael,

                        This is the important piece of info in your server startup stack trace:

                        Exception in thread "RTMP-Server" flex.messaging.endpoints.rtmp.RTMPException: T
                        he RTMP server has encountered a fatal exception starting up: Address already in
                        use: bind

                        RTMP Endpoints start up an internal socket server that binds to the port specified in the channel-definition endpoint URI. Unlike HTTP traffic which is all managed by the servlet container and handed off to your web app(s), RTMP traffic must be handled directly by FDS. Only a single process can bind to and service network traffic on any given port so you need to take a look at the RTMP channel definitions for all FDS apps you've deployed to your server and make sure they're using unique port values in their endpoint URIs. Once you've resolved this port collision the server should start up and run without issue.

                        HTH,
                        Seth
                        • 9. FDS can't find my destination.... how to trouble shoot?
                          michael6 Level 1
                          Hi Seth,

                          Thank you for your reply. I found that the services-config.xml files in flex\WEB-INF\flex and theriabook\WEB-INF\flex used the same port number 2038 (<endpoint uri="rtmp://{server.name}:2038" class="flex.messaging.endpoints.RTMPEndpoint"/> ), therefore, I changed the endpoint uri port number to 2039 for the file services-config.xml in the theriabook\WEB-INF\flex.
                          When I start JRun again, the exception

                          Exception in thread "RTMP-Server" flex.messaging.endpoints.rtmp.RTMPException: T
                          he RTMP server has encountered a fatal exception starting up: Address already in
                          use: bind

                          is not there anymore. But the error

                          ...................
                          11/02 08:55:27 error Could not pre-load servlet: JSPServlet
                          java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
                          at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:
                          107)
                          .................
                          remains there. Strange enough, when I look at the endpoint uri for my-rtmp in the Console panel output by the trace, it remains as 2038 (output is: <channel id="my-rtmp" type="mx.messaging.channels.RTMPChannel">
                          <endpoint uri="rtmp://{server.name}:2038"/>
                          <properties/>
                          </channel> ),
                          though I have already changed it to 2039. Any ideas?

                          Thanks.
                          Michael
                          • 10. Re: FDS can't find my destination.... how to trouble shoot?
                            seth_hodgson Level 1
                            Hi Michael,

                            For your last question, I think you probably need to recompile your swf to pick up the changes you made to the config.

                            For the ClassCastException, could you provide more of that stack trace?

                            Best,
                            Seth
                            • 11. Re: FDS can't find my destination.... how to trouble shoot?
                              michael6 Level 1
                              Hi Seth,

                              You are right. I need to recompile my swf to pick up changes made in services-config.xml. The following is the stack trace when I start JRun.

                              ****************************************************************************************** **************************

                              Starting Macromedia JRun 4.0 (Build 106363), default server
                              Flex OEM License for JRun enabled
                              11/02 15:56:32 warning Unable to open C:\fds2\jrun4/lib/license.properties
                              11/02 15:56:33 info JRun Naming Service listening on *:2907
                              11/02 15:56:33 info No JDBC data sources have been configured for this server (s
                              ee jrun-resources.xml)
                              11/02 15:56:33 info JRun Web Server listening on *:8700
                              11/02 15:56:33 info Deploying web application "Flex Default Web Application" fro
                              m: file:/C:/fds2/jrun4/servers/default/default-war/
                              11/02 15:56:33 user JSPServlet: init
                              11/02 15:56:34 info Deploying web application "Flex Data Services" from: file:/C
                              :/fds2/jrun4/servers/default/flex/
                              11/02 15:56:34 user JSPServlet: init
                              11/02 15:56:34 user FlexMxmlServlet: init
                              11/02 15:56:34 INFO Loading configuration file C:\fds2\jrun4\servers\default\fle
                              x\WEB-INF\flex\flex-webtier-config.xml
                              11/02 15:56:35 INFO Loading configuration file C:\fds2\jrun4\servers\default\fle
                              x\WEB-INF\flex\flex-config.xml
                              11/02 15:56:35 user FlexMxmlServlet: Starting Adobe Flex Web Tier Compiler
                              11/02 15:56:35 user FlexMxmlServlet: Adobe Flex Web Tier Compiler Build: 143451
                              11/02 15:56:35 user MessageBrokerServlet: init
                              11/02 15:56:37 user FlexSwfServlet: init
                              11/02 15:56:37 user FlexInternalServlet: init
                              11/02 15:56:37 info Deploying web application "Flex Admin Web Application" from:
                              file:/C:/fds2/jrun4/servers/default/flex-admin/
                              11/02 15:56:37 user JSPServlet: init
                              11/02 15:56:37 user MessageBrokerServlet: init
                              11/02 15:56:38 info Deploying web application "Flex Data Services Samples" from:
                              file:/C:/fds2/jrun4/servers/default/samples/
                              11/02 15:56:38 user JSPServlet: init
                              11/02 15:56:38 user FlexMxmlServlet: init
                              11/02 15:56:39 INFO Loading configuration file C:\fds2\jrun4\servers\default\sam
                              ples\WEB-INF\flex\flex-webtier-config.xml
                              11/02 15:56:39 INFO Loading configuration file C:\fds2\jrun4\servers\default\sam
                              ples\WEB-INF\flex\flex-config.xml
                              11/02 15:56:39 user FlexMxmlServlet: Starting Adobe Flex Web Tier Compiler
                              11/02 15:56:39 user FlexMxmlServlet: Adobe Flex Web Tier Compiler Build: 143451
                              11/02 15:56:39 user MessageBrokerServlet: init
                              11/02 15:56:42 user FlexSwfServlet: init
                              11/02 15:56:42 user FlexInternalServlet: init
                              11/02 15:56:42 info Deploying web application "Employee Flex Data Services" from
                              : file:/C:/fds2/jrun4/servers/default/theriabook/
                              11/02 15:56:42 user JSPServlet: init
                              11/02 15:56:42 error Could not pre-load servlet: JSPServlet
                              java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
                              at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:
                              107)
                              at jrun.jsp.JSPEngine.findExplicitTaglibs(JSPEngine.java:513)
                              at jrun.jsp.JSPEngine.<init>(JSPEngine.java:138)
                              at jrun.jsp.JSPServlet.init(JSPServlet.java:62)
                              at jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.
                              java:1200)
                              at jrun.servlet.WebApplicationService.preloadServlets(WebApplicationServ
                              ice.java:791)
                              at jrun.servlet.WebApplicationService.postStart(WebApplicationService.ja
                              va:293)
                              at jrun.deployment.DeployerService.initModules(DeployerService.java:711)

                              at jrun.deployment.DeployerService.createWatchedDeployment(DeployerServi
                              ce.java:242)
                              at jrun.deployment.DeployerService.deploy(DeployerService.java:430)
                              at jrun.deployment.DeployerService.checkWatchedDirectories(DeployerServi
                              ce.java:179)
                              at jrun.deployment.DeployerService.run(DeployerService.java:891)
                              at jrunx.scheduler.SchedulerService.invokeRunnable(SchedulerService.java
                              :230)
                              at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j
                              ava:428)
                              at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

                              11/02 15:56:42 user FlexMxmlServlet: init
                              11/02 15:56:42 INFO Loading configuration file C:\fds2\jrun4\servers\default\the
                              riabook\WEB-INF\flex\flex-webtier-config.xml
                              11/02 15:56:43 INFO Loading configuration file C:\fds2\jrun4\servers\default\the
                              riabook\WEB-INF\flex\flex-config.xml
                              11/02 15:56:43 user FlexMxmlServlet: Starting Adobe Flex Web Tier Compiler
                              11/02 15:56:43 user FlexMxmlServlet: Adobe Flex Web Tier Compiler Build: 143451
                              11/02 15:56:43 user MessageBrokerServlet: init
                              11/02 15:56:46 user FlexSwfServlet: init
                              11/02 15:56:46 user FlexInternalServlet: init
                              11/02 15:56:46 info Deploying enterprise application "JRun 4.0 Internal J2EE Com
                              ponents" from: file:/C:/fds2/jrun4/lib/jrun-comp.ear
                              11/02 15:56:46 info Deploying EJB "JRunSQLInvoker" from: file:/C:/fds2/jrun4/lib
                              /jrun-comp.ear
                              Server default ready (startup time: 15 seconds)
                              ****************************************************************************************** ***********************************

                              The following is the stack trace got after I click Fill button. Also the error message in the Message column becomes "Unable to invoke a fill operation on destination 'Employee' due to the following error: class com.theriabook.daoflex.DAOException:javax.naming.NameNotFoundException: No such binding: jdbc."

                              Best regards,
                              Michael

                              ****************************************************************************************** ************************************
                              11/02 16:00:16 user FileServlet: init
                              - File not found for SingletonProperties("daoflex-runtime")
                              javax.naming.NameNotFoundException: No such binding: jdbc
                              at jrun.naming.ContextManager.getBinding(ContextManager.java:680)
                              at jrun.naming.ContextManager.getBinding(ContextManager.java:686)
                              at jrun.naming.ContextManager.getObject(ContextManager.java:690)
                              at jrun.naming.ContextManager.lookup(ContextManager.java:423)
                              at jrun.naming.JRunNamingContext.lookup(JRunNamingContext.java:526)
                              at jrun.naming.JRunNamingContext.lookup(JRunNamingContext.java:495)
                              at javax.naming.InitialContext.lookup(InitialContext.java:351)
                              at com.theriabook.daoflex.JDBCConnection.getDataSource(JDBCConnection.ja
                              va:49)
                              at com.theriabook.daoflex.JDBCConnection.getConnection(JDBCConnection.ja
                              va:59)
                              at com.theriabook.datasource.EmployeeDataServiceDAO.getEmployees(Employe
                              eDataServiceDAO.java:30)
                              at com.theriabook.datasource.EmployeeAssembler.getEmployees(EmployeeAsse
                              mbler.java:15)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                              java:39)
                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                              sorImpl.java:25)
                              at java.lang.reflect.Method.invoke(Method.java:585)
                              at flex.data.adapters.JavaAdapter.invokeFillOperation(JavaAdapter.java:7
                              67)
                              at flex.data.adapters.JavaAdapter.invoke(JavaAdapter.java:198)
                              at flex.messaging.services.MessageService.serviceMessage(MessageService.
                              java:138)
                              at flex.data.DataService.serviceMessage(DataService.java:309)
                              at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java
                              :548)
                              at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndp
                              oint.java:302)
                              at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(Abst
                              ractRTMPServer.java:682)
                              at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTM
                              PConnection.java:665)
                              at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
                              ker.runTask(ThreadPoolExecutor.java:643)
                              at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
                              ker.run(ThreadPoolExecutor.java:668)
                              at java.lang.Thread.run(Thread.java:595)
                              - javax.naming.NameNotFoundException: No such binding: jdbc
                              • 12. Re: FDS can't find my destination.... how to trouble shoot?
                                michael6 Level 1
                                Hi Seth,

                                You are right. I need to recompile my swf to pick up changes made in services-config.xml. The following is the stack trace when I start JRun.

                                ****************************************************************************************** **************************

                                Starting Macromedia JRun 4.0 (Build 106363), default server
                                Flex OEM License for JRun enabled
                                11/02 15:56:32 warning Unable to open C:\fds2\jrun4/lib/license.properties
                                11/02 15:56:33 info JRun Naming Service listening on *:2907
                                11/02 15:56:33 info No JDBC data sources have been configured for this server (s
                                ee jrun-resources.xml)
                                11/02 15:56:33 info JRun Web Server listening on *:8700
                                11/02 15:56:33 info Deploying web application "Flex Default Web Application" fro
                                m: file:/C:/fds2/jrun4/servers/default/default-war/
                                11/02 15:56:33 user JSPServlet: init
                                11/02 15:56:34 info Deploying web application "Flex Data Services" from: file:/C
                                :/fds2/jrun4/servers/default/flex/
                                11/02 15:56:34 user JSPServlet: init
                                11/02 15:56:34 user FlexMxmlServlet: init
                                11/02 15:56:34 INFO Loading configuration file C:\fds2\jrun4\servers\default\fle
                                x\WEB-INF\flex\flex-webtier-config.xml
                                11/02 15:56:35 INFO Loading configuration file C:\fds2\jrun4\servers\default\fle
                                x\WEB-INF\flex\flex-config.xml
                                11/02 15:56:35 user FlexMxmlServlet: Starting Adobe Flex Web Tier Compiler
                                11/02 15:56:35 user FlexMxmlServlet: Adobe Flex Web Tier Compiler Build: 143451
                                11/02 15:56:35 user MessageBrokerServlet: init
                                11/02 15:56:37 user FlexSwfServlet: init
                                11/02 15:56:37 user FlexInternalServlet: init
                                11/02 15:56:37 info Deploying web application "Flex Admin Web Application" from:
                                file:/C:/fds2/jrun4/servers/default/flex-admin/
                                11/02 15:56:37 user JSPServlet: init
                                11/02 15:56:37 user MessageBrokerServlet: init
                                11/02 15:56:38 info Deploying web application "Flex Data Services Samples" from:
                                file:/C:/fds2/jrun4/servers/default/samples/
                                11/02 15:56:38 user JSPServlet: init
                                11/02 15:56:38 user FlexMxmlServlet: init
                                11/02 15:56:39 INFO Loading configuration file C:\fds2\jrun4\servers\default\sam
                                ples\WEB-INF\flex\flex-webtier-config.xml
                                11/02 15:56:39 INFO Loading configuration file C:\fds2\jrun4\servers\default\sam
                                ples\WEB-INF\flex\flex-config.xml
                                11/02 15:56:39 user FlexMxmlServlet: Starting Adobe Flex Web Tier Compiler
                                11/02 15:56:39 user FlexMxmlServlet: Adobe Flex Web Tier Compiler Build: 143451
                                11/02 15:56:39 user MessageBrokerServlet: init
                                11/02 15:56:42 user FlexSwfServlet: init
                                11/02 15:56:42 user FlexInternalServlet: init
                                11/02 15:56:42 info Deploying web application "Employee Flex Data Services" from
                                : file:/C:/fds2/jrun4/servers/default/theriabook/
                                11/02 15:56:42 user JSPServlet: init
                                11/02 15:56:42 error Could not pre-load servlet: JSPServlet
                                java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
                                at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:
                                107)
                                at jrun.jsp.JSPEngine.findExplicitTaglibs(JSPEngine.java:513)
                                at jrun.jsp.JSPEngine.<init>(JSPEngine.java:138)
                                at jrun.jsp.JSPServlet.init(JSPServlet.java:62)
                                at jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.
                                java:1200)
                                at jrun.servlet.WebApplicationService.preloadServlets(WebApplicationServ
                                ice.java:791)
                                at jrun.servlet.WebApplicationService.postStart(WebApplicationService.ja
                                va:293)
                                at jrun.deployment.DeployerService.initModules(DeployerService.java:711)

                                at jrun.deployment.DeployerService.createWatchedDeployment(DeployerServi
                                ce.java:242)
                                at jrun.deployment.DeployerService.deploy(DeployerService.java:430)
                                at jrun.deployment.DeployerService.checkWatchedDirectories(DeployerServi
                                ce.java:179)
                                at jrun.deployment.DeployerService.run(DeployerService.java:891)
                                at jrunx.scheduler.SchedulerService.invokeRunnable(SchedulerService.java
                                :230)
                                at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j
                                ava:428)
                                at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

                                11/02 15:56:42 user FlexMxmlServlet: init
                                11/02 15:56:42 INFO Loading configuration file C:\fds2\jrun4\servers\default\the
                                riabook\WEB-INF\flex\flex-webtier-config.xml
                                11/02 15:56:43 INFO Loading configuration file C:\fds2\jrun4\servers\default\the
                                riabook\WEB-INF\flex\flex-config.xml
                                11/02 15:56:43 user FlexMxmlServlet: Starting Adobe Flex Web Tier Compiler
                                11/02 15:56:43 user FlexMxmlServlet: Adobe Flex Web Tier Compiler Build: 143451
                                11/02 15:56:43 user MessageBrokerServlet: init
                                11/02 15:56:46 user FlexSwfServlet: init
                                11/02 15:56:46 user FlexInternalServlet: init
                                11/02 15:56:46 info Deploying enterprise application "JRun 4.0 Internal J2EE Com
                                ponents" from: file:/C:/fds2/jrun4/lib/jrun-comp.ear
                                11/02 15:56:46 info Deploying EJB "JRunSQLInvoker" from: file:/C:/fds2/jrun4/lib
                                /jrun-comp.ear
                                Server default ready (startup time: 15 seconds)
                                ****************************************************************************************** ***********************************

                                The following is the stack trace got after I click Fill button. Also the error message in the Message column becomes "Unable to invoke a fill operation on destination 'Employee' due to the following error: class com.theriabook.daoflex.DAOException:javax.naming.NameNotFoundException: No such binding: jdbc."

                                Best regards,
                                Michael

                                ****************************************************************************************** ************************************
                                11/02 16:00:16 user FileServlet: init
                                - File not found for SingletonProperties("daoflex-runtime")
                                javax.naming.NameNotFoundException: No such binding: jdbc
                                at jrun.naming.ContextManager.getBinding(ContextManager.java:680)
                                at jrun.naming.ContextManager.getBinding(ContextManager.java:686)
                                at jrun.naming.ContextManager.getObject(ContextManager.java:690)
                                at jrun.naming.ContextManager.lookup(ContextManager.java:423)
                                at jrun.naming.JRunNamingContext.lookup(JRunNamingContext.java:526)
                                at jrun.naming.JRunNamingContext.lookup(JRunNamingContext.java:495)
                                at javax.naming.InitialContext.lookup(InitialContext.java:351)
                                at com.theriabook.daoflex.JDBCConnection.getDataSource(JDBCConnection.ja
                                va:49)
                                at com.theriabook.daoflex.JDBCConnection.getConnection(JDBCConnection.ja
                                va:59)
                                at com.theriabook.datasource.EmployeeDataServiceDAO.getEmployees(Employe
                                eDataServiceDAO.java:30)
                                at com.theriabook.datasource.EmployeeAssembler.getEmployees(EmployeeAsse
                                mbler.java:15)
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                                java:39)
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                                sorImpl.java:25)
                                at java.lang.reflect.Method.invoke(Method.java:585)
                                at flex.data.adapters.JavaAdapter.invokeFillOperation(JavaAdapter.java:7
                                67)
                                at flex.data.adapters.JavaAdapter.invoke(JavaAdapter.java:198)
                                at flex.messaging.services.MessageService.serviceMessage(MessageService.
                                java:138)
                                at flex.data.DataService.serviceMessage(DataService.java:309)
                                at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java
                                :548)
                                at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndp
                                oint.java:302)
                                at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(Abst
                                ractRTMPServer.java:682)
                                at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTM
                                PConnection.java:665)
                                at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
                                ker.runTask(ThreadPoolExecutor.java:643)
                                at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
                                ker.run(ThreadPoolExecutor.java:668)
                                at java.lang.Thread.run(Thread.java:595)
                                - javax.naming.NameNotFoundException: No such binding: jdbc
                                • 13. Re: FDS can't find my destination.... how to trouble shoot?
                                  seth_hodgson Level 1
                                  Hi Michael,

                                  That first exception looks like a JRun issue and perhaps the JSPServlet definition in the "Employee Flex Data Services" web app's web.xml file is incorrect.

                                  I don't know anything about FlexDAO but that second stack trace looks like their DAO is expecting certain datasources to be defined in your app server.

                                  Best,
                                  Seth
                                  • 14. Re: FDS can't find my destination.... how to trouble shoot?
                                    usbeck
                                    Hi,

                                    I have met the same problem, following the tuto on this page :
                                    http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=00000138 .html > Getting Started with Flex 2 > Lessons > Use the Data Management Service

                                    We followed exactly the lesson and we got the error "No destination 'Anything' exists in service flex.data.DataService"
                                    Actually our problem came from the project creation, to succed the lesson, the location for the flex data service serveur must be defined like that :
                                    Root folders : C:\fds2\jrun4\servers\default\samples
                                    Root URL : http://localhost:8700/samples/

                                    If you use the default folders all is not at the same level and that trigger the 'No destination' error.


                                    PS : if you want to do the tuto, don't forget to read the additionnal information provided by a flex develloper here : Getting Started with Flex 2 > Lessons > Use the Data Management Service > Build a distributed application with the Java adapter > View the samples.contact.Contact class
                                    • 15. Re: FDS can't find my destination.... how to trouble shoot?
                                      Anatole Tartakovsky
                                      Flex requires destination defined and referenced via chain starting at compilation flex-config.xml before you compile application. Simpliest way to verify that flex compiled your destination into the client application is to use -keep-generated_actionscript compiler switch and check destinations within generated/...FlexInit...as
                                      Thank you,
                                      Anatole