[flexcoders] Re: BlazeDS - Unknown destination error - SOLVED

2008-02-20 Thread Geoffrey
I honestly don't know how I fixed it.  I reinstalled Apache, and the 
Flex 3 Eclipse plugin.  Then ripped out every instance of Flex 2 I 
could find except for the flex-bootstrap-2.0.1.jar file (if I did 
that, nothing worked).

Now I can receive a message published from our J2EE server.

Thanks to Jeff for the help.

Geoff
--- In flexcoders@yahoogroups.com, Geoffrey [EMAIL PROTECTED] wrote:

 I'm less than thrilled with BlazeDS right now.  running their 
canned 
 examples is no problem, but try to integrate it into your app and 
 it's a bitch!  Our environment is Eclipse 3.2.2, Apache Tomcat 
 5.5.20, Flex Builder 3 Plug-in, Maven 2.0.5, WST 1.something.
 
 Regarding Point 1 below, I fixed my compiler argument.  For the 
main 
 Flex application, I navigated to the Flex Compiler properties and 
 entered -services C:\workspace-blazeDS\flex\src\main\webapp\WEB-
 INF\flex\services-config.xml -locale en_US for my Additional 
 Compiler Arguments.  Previously, I had it pointing to a different 
 workspace.
 
 On that same screen I see a warning: Project is being compiled 
with 
 Flex 3.0, but server has Flex 2.0.1.  How do I check what version 
 of Flex the server is using?  I've gone through and removed all 
Flex 
 2.0.1 related jars, but I seem to need the flex-bootstrap-
2.0.1.jar 
 or else I get a bunch of errors upon server startup.  Is this why 
 I'm getting the warning message above?  Is this why I can't seem 
to 
 pass messages with BlazeDS?  Is there a flex-bootstrap-3.0.jar?  
Not 
 in the flex 3 distribution that I have.
 
 It was real nice of Adobe to clue us into the fact that BlazeDS 
 requires Flex3.  The only reason that I know this is because 
someone 
 else had some problems and Jesse Warden found out from one of the 
 Flex engineers that Flex 2.0.1 does not support BlazeDS.  What 
other 
 requirements are there that we don't know about?
 
 Sorry if I'm being harsh, but I've been screwing around with this 
 for the last WEEK and can't get it to work.  It shouldn't be this 
 difficult.
 
 
 --- In flexcoders@yahoogroups.com, Jeff Vroom jvroom@ wrote:
 
  Sorry for the terse description - it's been a little busy here!
  
   
  
  For Point 1, the stuff you have there looks like the server 
itself 
 is
  starting up fine.   The issue is that when you compile your SWF, 
 the
  tool you use to compile your SWF also should refer to the
  services-config.xml file.  If you are using flex builder, there 
is 
 a
  setting for that in your project properties.   If you are 
 requesting the
  MXML file directly from the browser (where the server compiles 
the 
 mxml
  file to produce the SWF), this is in your flex-config.xml file.  
 If you
  are compiling using ant or the command line compiler there is a
  -services option to the compiler.   
  
   
  
  For Point 2, since you do not set the channelSet property on 
your
  Consumer component, you need to follow the step in point 1.  
There 
 is
  another option where the client downloads the configuration for 
 your
  destination from the server when it connects.  But for that to 
 work, you
  need to specify the URL to the server so it can connect in the 
 first
  place.  You do that with the channelSet property.  
  
   
  
  For Point 3, you can see this by adding the MXML tag:
  
   
  
   mx:TraceTarget/
  
   
  
  If you are using the debug player, you'll see some diagnostics 
in 
 the
  flashlog.txt file.  That gets buried in the user's home 
directory 
 on
  windows under application data/macromedia/flash player/logs.  
Make 
 sure
  you have the debug player though since the release player 
doesn't 
 output
  trace information.  You can also get to this property directly in
  actionscript with:
  
   
  
 import flex.messaging.config.ServerConfig;
  
   
  
   
  
 
  
   
  
 trace(ServerConfig.xml);
  
   
  
  Jeff
  
   
  
  
  
  From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On
  Behalf Of Geoffrey
  Sent: Thursday, February 14, 2008 1:37 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: BlazeDS - Unknown destination error
  
   
  
  I hate to say it, but I don't know how to do any of that.
  
  -- Point 1 --
  [point] your compiler at the services-config.xml which defines 
 those
  destinations
  Here are a couple lines of debug output from the console. I 
think 
 I'm
  pointing to the correct config files.
  [Flex] [Configuration] BlazeDS - Community Edition: 3.0.0.353
  [Flex] [Configuration] Endpoint my-streaming-amf created with
  security: None
  [Flex] [Startup.Destination] Destination with id 'userTopic' is
  ready (startup time: '0' ms)
  [Flex] [Startup.Service] Service with id 'message-service' is 
ready
  (startup time: '0' ms)
  [Flex] [Startup.MessageBroker] MessageBroker with 
id '__default__'
  is ready (startup time: '407' ms)
  So to me, that part of the configuration is correct.
  
  -- Point 2 --
  define a channel set on the client and set

[flexcoders] Re: BlazeDS - Unknown destination error

2008-02-14 Thread Geoffrey
I hate to say it, but I don't know how to do any of that.

-- Point 1 --
[point] your compiler at the services-config.xml which defines those
destinations
Here are a couple lines of debug output from the console.  I think I'm
pointing to the correct config files.
  [Flex] [Configuration] BlazeDS - Community Edition: 3.0.0.353
  [Flex] [Configuration] Endpoint my-streaming-amf created with
security: None
  [Flex] [Startup.Destination] Destination with id 'userTopic' is
ready (startup time: '0' ms)
  [Flex] [Startup.Service] Service with id 'message-service' is ready
(startup time: '0' ms)
  [Flex] [Startup.MessageBroker] MessageBroker with id '__default__'
is ready (startup time: '407' ms)
So to me, that part of the configuration is correct.


-- Point 2 --
define a channel set on the client and set the channelSet property on
your service

This is my code in main.mxml to define my consumer:
  mx:Consumer id=userConsumer destination=userTopic
message=onUsersFeed(event)/

And the corresponding code in AS to subscribe to the destination.
public function onCreationComplete():void
{   
  // Subscribe to destination
  userConsumer.subscribe();
}

Am I doing something wrong here?  I basically took this from one of
the BlazeDS samples.


-- Point 3 --
You can see what destinations are getting compiled into your app via
the static variable:  flex.messaging.config.ServerConfig.xml
I don't know how to access this variable.  Is this a Java variable?


Thanks for the help, and sorry for me being so dense.
Geoff


--- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote:

 Make sure that either you are pointing your compiler at the
 services-config.xml which defines those destinations or you need to
 define a channel set on the client and set the channelSet property on
 your service.  
 
  
 
 You can see what destinations are getting compiled into your app via the
 static variable:  flex.messaging.config.ServerConfig.xml.   That should
 be a subset of the info from services-config.xml if you are compiling
 stuff in.
 
  
 
 Jeff
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Geoffrey
 Sent: Thursday, February 14, 2008 11:28 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] BlazeDS - Unknown destination error
 
  
 
 I'm trying to get BlazeDS working with our existing Flex application.
 When the application starts and tried to subscribe to a publisher, I
 get the following error:
 
 [MessagingError message='Unknown destination 'userTopic'.']
 at mx.messaging.config::ServerConfig$/getChannelSet()
 [C:\dev\enterprise_bali\frameworks\mx\messaging\config\ServerConfig.as:2
 24]
 ...
 
 I have the topic defined in my messaging-config.xml file like this:
 destination id=userTopic/destination
 
 Not really sure what the deal is. I've converted our app to use the
 Flex 3 plugin for Eclipse, and that seems OK (not sure if I really
 needed to do this). The only thing I see is that the properties of
 the main flex project say Project is being compiled with Flex 3.0,
 but server has Flex 2.0.1 in the Flex Compiler section. Ummm, say what?
 
 Any help would be appreciated.





RE: [flexcoders] Re: BlazeDS - Unknown destination error

2008-02-14 Thread Jeff Vroom
Sorry for the terse description - it's been a little busy here!

 

For Point 1, the stuff you have there looks like the server itself is
starting up fine.   The issue is that when you compile your SWF, the
tool you use to compile your SWF also should refer to the
services-config.xml file.  If you are using flex builder, there is a
setting for that in your project properties.   If you are requesting the
MXML file directly from the browser (where the server compiles the mxml
file to produce the SWF), this is in your flex-config.xml file.  If you
are compiling using ant or the command line compiler there is a
-services option to the compiler.   

 

For Point 2, since you do not set the channelSet property on your
Consumer component, you need to follow the step in point 1.  There is
another option where the client downloads the configuration for your
destination from the server when it connects.  But for that to work, you
need to specify the URL to the server so it can connect in the first
place.  You do that with the channelSet property.  

 

For Point 3, you can see this by adding the MXML tag:

 

 mx:TraceTarget/

 

If you are using the debug player, you'll see some diagnostics in the
flashlog.txt file.  That gets buried in the user's home directory on
windows under application data/macromedia/flash player/logs.  Make sure
you have the debug player though since the release player doesn't output
trace information.  You can also get to this property directly in
actionscript with:

 

   import flex.messaging.config.ServerConfig;

 

 

   

 

   trace(ServerConfig.xml);

 

Jeff

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Geoffrey
Sent: Thursday, February 14, 2008 1:37 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: BlazeDS - Unknown destination error

 

I hate to say it, but I don't know how to do any of that.

-- Point 1 --
[point] your compiler at the services-config.xml which defines those
destinations
Here are a couple lines of debug output from the console. I think I'm
pointing to the correct config files.
[Flex] [Configuration] BlazeDS - Community Edition: 3.0.0.353
[Flex] [Configuration] Endpoint my-streaming-amf created with
security: None
[Flex] [Startup.Destination] Destination with id 'userTopic' is
ready (startup time: '0' ms)
[Flex] [Startup.Service] Service with id 'message-service' is ready
(startup time: '0' ms)
[Flex] [Startup.MessageBroker] MessageBroker with id '__default__'
is ready (startup time: '407' ms)
So to me, that part of the configuration is correct.

-- Point 2 --
define a channel set on the client and set the channelSet property on
your service

This is my code in main.mxml to define my consumer:
mx:Consumer id=userConsumer destination=userTopic
message=onUsersFeed(event)/

And the corresponding code in AS to subscribe to the destination.
public function onCreationComplete():void
{ 
// Subscribe to destination
userConsumer.subscribe();
}

Am I doing something wrong here? I basically took this from one of
the BlazeDS samples.

-- Point 3 --
You can see what destinations are getting compiled into your app via
the static variable: flex.messaging.config.ServerConfig.xml
I don't know how to access this variable. Is this a Java variable?

Thanks for the help, and sorry for me being so dense.
Geoff

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Jeff Vroom [EMAIL PROTECTED] wrote:

 Make sure that either you are pointing your compiler at the
 services-config.xml which defines those destinations or you need to
 define a channel set on the client and set the channelSet property on
 your service. 
 
 
 
 You can see what destinations are getting compiled into your app via
the
 static variable: flex.messaging.config.ServerConfig.xml. That should
 be a subset of the info from services-config.xml if you are compiling
 stuff in.
 
 
 
 Jeff
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Geoffrey
 Sent: Thursday, February 14, 2008 11:28 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] BlazeDS - Unknown destination error
 
 
 
 I'm trying to get BlazeDS working with our existing Flex application.
 When the application starts and tried to subscribe to a publisher, I
 get the following error:
 
 [MessagingError message='Unknown destination 'userTopic'.']
 at mx.messaging.config::ServerConfig$/getChannelSet()

[C:\dev\enterprise_bali\frameworks\mx\messaging\config\ServerConfig.as:2
 24]
 ...
 
 I have the topic defined in my messaging-config.xml file like this:
 destination id=userTopic/destination
 
 Not really sure what the deal is. I've converted our app to use the
 Flex 3 plugin for Eclipse, and that seems OK (not sure if I really
 needed to do this). The only thing I see