Blazeds Start

Hi friends
               i have basic idea of web application in java.till now i have use web services and Http services in flex to communicate with jsp pages.Can any body Guides me step by step how to configure Blazeds Server with my simple flex application.i just want to know how we communicates through Blazeds Sever.Please guide me Step by step for simple application .
Thanks And regards
  Vineet Osho

<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Geneva; font-size: 11px; ">hi, <br><br><i>had download blazeds 5 minutes ago.</i> <br><br><i>want to start the server and try this : (mac os x terminal)</i> <br><br>"cd" in the bin directory <br><br>"./catalina.sh run" to start the server <br><br>but I get this error: <br><br>Exception in thread "main" java.lang.NoClassDefFoundError: Folder/tomcat/conf/logging/properties <br>Caused by: java.lang.ClassNotFoundException: Folder.tomcat.conf.logging.properties <br>at java.net.URLClassLoader$1.run(URLClassLoader.java:200) <br>at java.security.AccessController.doPrivileged(Native Method) <br>at java.net.URLClassLoader.findClass(URLClassLoader.java:188) <br>at java.lang.ClassLoader.loadClass(ClassLoader.java:316) <br>at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288) <br>at java.lang.ClassLoader.loadClass(ClassLoader.java:251) <br>at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) <br><br>how can I solve this problem?? <br><br>greetz from berlin / germany</span><rte_text></rte_text><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Geneva; font-size: 8pt; "><br></span></div><br /><hr />Über den Eingang von Hotmail Nachrichten per SMS informiert werden? <a href='http://redirect.gimas.net/?n=M0901HMMobile' target='_new'>Klicke hier!</a>

Similar Messages

  • Using databases and container events?

    I'm having trouble finding documents show how one should use databases and listen for container events? I'm using Berkley Java DB. I'll need all my remote object to have access to the database. How do I pass that in? Custom adapters? Also, when Tomcat shuts down I need to close the database, how would this be down? Custom adapters? So I may be answering my own question, but I'm asking cause I really don't see anything in the documentation that points this out. It really looks like I'd be using singletons and factories for this. I could register a Servlet or Servlet Context to listen for Tomcat events, but I figured it couldn't hurt to ask others using Blaze, as I'm very new to it. Thanks.

    So how would you tell Blaze to use this? Is there something you put into the config file? My thoughts on all this is to use PicoContainer to manage all services then create an adapter to inject all resources when creating remote objects. But this seems a little heavy if Blaze can do all this for me. The adapter seems like the injection point to me. Is that not what it's used for? Or is using it like that bad practice under Blaze? I've read all I can find on Blaze, so either it's missing docs, or I'm not finding them all. If I'm missing them, by all means let me know where to go. I don't want to ask questions that are already answered in documents else where.
    On Tue, May 20, 2008 at 10:51 AM, Mete Atamel <
    [email protected]> wrote:
    A new message was posted by Mete Atamel in
    General Discussion --
      Using databases and container events?
    I think it's mainly in JavaDocs but here's a sample I have where I check to make sure the HSQLDB is running as the BlazeDS starts up:
    import java.sql.Connection;
    import java.sql.SQLException;
    import flex.messaging.config.ConfigMap;
    import flex.messaging.services.AbstractBootstrapService;
    public class DatabaseCheckService extends AbstractBootstrapService
        // This is called right before server starts up.
        public void initialize(String id, ConfigMap properties)
            Connection c = null;
            try
                // Check that the database is running...
                c = ConnectionHelper.getConnection();
                // ... if yes return
                return;
            catch (SQLException e)
                System.out.println("DB is not running!");
            finally
                ConnectionHelper.close(c);
    // This is called as server is starting.
        public void start()
            // No-op
    // This is called as server is stopping.
        public void stop()
            // No-op
    View/reply at
    Using databases and container events?
    Replies by email are OK.
    Use the
    unsubscribe form to cancel your email subscription.
    "All that is necessary for the triumph of evil is that good men do nothing." - Edmund Burke

  • How does a RemoteObject find its destination?

    I am new to Flex. I am a long time Java/C++/C developer so my head won't explode if we get technical.
    I am trying to figure out how a RemoteObject finds it's destination with just a simple reference as "SomeDestId" configured on BlazeDS the app server.
    From the client side I am used to getting a reference to some Registry like JNDI or whatever by stating which host and port to use or a URI or something more absolute. I am aware that the flash player has a sandbox so we can dispense with the host, we know what it has to be. But my question is. How does the swf file or the context of the flex app know where my BlazeDS is rooted in my J2EE app server if I don't tell it?
    What am I missing? I have looked at the example code and have read the developer pdf but nobody talks about this.
    Does BlazeDS start listing on a well known port other than the application server's port?
    If not how is my flex program supposed to know what port BlazeDS is on?
    Anyone know how this automagic works? Because I can't find it in the docs.
    Does my SWF file need to be deployed from within the BlazeDS deployment if so I have missed where in the documentation this is stated.

    Ok folks, I am aware of the channel sets and end points. These are configured in BlazeDS, the server side of this client/server arrangement. Everybody fixates on this server config. I got that.
    But the client side is what I am fixated on.
    Let us view the flash player as a virtual machine. More importantly a virtual machine that is not the same virtual machine that BlazeDS is running in which is running in a J2EE app server somewhere in the universe (hopefully in the same domain) but elsewhere in that domain EXACT location unknown to the client VM. Unless somebody has told the CLIENT where BlazeDS (the server) is somehow or some where.
    From everybody's perspective there seems to be no separation in terms of Client/Server because all I get is its done on the server side config.
    The client is asking it's virtual machine to return a reference to a RemoteObject at destination="LahDeeDah" not LahDeeDah@somehost:someport:somepath or what ever syntax you would care to use. This implies that "LahDeeDah" is registered in some kind of hashing registry that knows something about where BlazeDS is located and that it even exists.
    How does the CLIENT swf program find this registry if I compile it in some IDE like Eclipse that is not aware that BlazeDS even exists somewhere? Remember, Channels and EndPoints are all configured on the server not in the CLIENT.
    You folks keep talking about how to configure the server side. I want to know what mechanism allows the client to get access to this server side configuration. Remember this conf.xml is on the server not in my IDE or in the src that creates my SWF file.
    As to an earlier post someone eluded to BlazeDS compiling the SWF file. No where in the docs did I see anything that said you MUST compile your src with BlazeDS and NOT some IDE like Flex Builder 3 which is what I am using.
    Did I miss this somewhere? Or was this info supposed to be handed down through divine revalation?
    Oh I give up! I'll just tear into the src and figure it out myself. It should be in the RemoteObject hierarchy.

  • Getting started with Flex Builder, BlazeDS and Eclipse

    Hi,
    I'm a java developer looking at RIA for the first time. I'm really excited about BlazeDS and object remoting, but I can't get a working dev environment together. I'm assuming I should use Flex Builder for the client code, Eclipse Europa for the java webapp code, and deploy from both IDEs into the BlazeDS-equipped turnkey-Tomcat. I haven't found a tutorial explaining how to deploy a new webapp with this setup.
    The turnkey-Tomcat sample app works fine. Trouble starts when I try to create  a new project in Flex Builder. I don't understand the 'debug' deployment that Flex Builder does. Why are there 2 versions of my app, the regular and the debug versions? What is exactly the project structure that I'm supposed to have in Tomcat?
    The specific error I encounter when trying to deploy a new Flex project is this:
    [MessagingError message='Destination 'productService' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']
    I do have a default channel configured for my environment in services-config:
    And I do have a valid destination configured in remoting-config (I'm mostly interested in object remoting):
                test.ProductService
    Here's the client code:
    What am I doing wrong? Where can I get help on these specific topics? Also, does anyone have an Ant build file that would automate this sort of deployment?
    Thanks!

    Hi Peter,<br />I don't have problems passing JavaBeans to Flex. For collections, I used DataGrid, it displayed my collection seamlessly, except I don't get column headers, just a column index number. For receiving a single JavaBean, I had a little more trouble, until I tried to display it with a DataGrid: it displayed a single row that represented my data, with each java property name used as a column header, and object attributes were displayed as 'object'. These 2 experiences led me to these conclusions:<br />- for the collection, Flex converted each element into an ordered list of attributes<br />- for the single bean, Flex converted it into a hierarchy of Maps of attributes<br /><br />I didn't create a Flex value object. Flex is doing it automatically,very much like in JavaScript/JSON: dynamic objects.<br /><br />Here's the remote object markup:<br /><br /><!-- We target the remote Java object through BlazeDS gateway: --><br />     <mx:RemoteObject id="myRemoteObject" destination="productService" <br />                          fault="Alert.show(event.fault.faultString, 'Error');"><br />          <mx:method name="getProductsCount" result="setProductsCount(event)"><br />               <mx:arguments><br />                    <arg1>{productSC}</arg1><br />               </mx:arguments><br />          </mx:method><br />          <mx:method name="getProducts"><br />          <!-- search params are wrapped in a model, ProductSC (will be converted to a Map on <br />                the server side by BlazeDS): --><br />               <mx:arguments><br />                    <arg1>{productSC}</arg1><br />                    <!-- This works because we declared these to be Bindable: --><br />                    <arg2>{pager.pageSize}</arg2><br />                    <arg3>{pager.currentPage}</arg3><br />               </mx:arguments><br />          </mx:method><br />          <mx:method name="getProduct" result="goToView()"><br />          <!--<mx:method name="getProduct">--><br />               <mx:arguments><br />                    <arg1>{selectedRecordId}</arg1><br />               </mx:arguments><br />          </mx:method><br />     </mx:RemoteObject><br /><br />And here's the dataGrid that displays the bean collection:<br /><br /><mx:DataGrid id="myDataGrid" <br />                               dataProvider="{myRemoteObject.getProducts.lastResult}" <br />                               change="selectRecord();"<br />                               width="100%" height="100%" ><br />               </mx:DataGrid><br /><br />Let me know how it goes, I'd be glad to assist if I can.<br />Miguel

  • [svn:bz-trunk] 17299: BLZ-555: Bad version number in . class when starting JBoss 5.x with latest BlazeDS app

    Revision: 17299
    Revision: 17299
    Author:   [email protected]
    Date:     2010-08-12 05:36:37 -0700 (Thu, 12 Aug 2010)
    Log Message:
    BLZ-555: Bad version number in .class when starting JBoss 5.x with latest BlazeDS app
    The "testdata" package has been compiled using JDK 1.6. When you try to run on application server that uses JDK 1.5, it will give the above error. Removed this test related package from the aspectjweaver-1.6.5.jar.
    Checkintests: PASS
    Ticket Links:
        http://bugs.adobe.com/jira/browse/BLZ-555
        http://bugs.adobe.com/jira/browse/aspectjweaver-1
    Modified Paths:
        blazeds/trunk/lib/spring/aspectjweaver-1.6.5.jar

    andre.ramaciotti wrote:And I'm not sure if you should put that & after exec awesome. It works fine here without it.
    No & after entries in .xinitrc . You've commented out the awesome entry.

  • [newbie] problem to start blazeds

    hi,
    i had download blazeds 5 minutes ago.
    i want to start the server and try this : (mac os x terminal)
    "cd" in the bin directory
    "./catalina.sh run" to start the server
    but I get this error:
    Exception in thread "main" java.lang.NoClassDefFoundError: Folder/tomcat/conf/logging/properties
    Caused by: java.lang.ClassNotFoundException: Folder.tomcat.conf.logging.properties
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
    how can I solve this problem??
    greetz from berlin / germany

    <span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Geneva; font-size: 11px; ">hi, <br><br><i>had download blazeds 5 minutes ago.</i> <br><br><i>want to start the server and try this : (mac os x terminal)</i> <br><br>"cd" in the bin directory <br><br>"./catalina.sh run" to start the server <br><br>but I get this error: <br><br>Exception in thread "main" java.lang.NoClassDefFoundError: Folder/tomcat/conf/logging/properties <br>Caused by: java.lang.ClassNotFoundException: Folder.tomcat.conf.logging.properties <br>at java.net.URLClassLoader$1.run(URLClassLoader.java:200) <br>at java.security.AccessController.doPrivileged(Native Method) <br>at java.net.URLClassLoader.findClass(URLClassLoader.java:188) <br>at java.lang.ClassLoader.loadClass(ClassLoader.java:316) <br>at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:288) <br>at java.lang.ClassLoader.loadClass(ClassLoader.java:251) <br>at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) <br><br>how can I solve this problem?? <br><br>greetz from berlin / germany</span><rte_text></rte_text><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Geneva; font-size: 8pt; "><br></span></div><br /><hr />Über den Eingang von Hotmail Nachrichten per SMS informiert werden? <a href='http://redirect.gimas.net/?n=M0901HMMobile' target='_new'>Klicke hier!</a>

  • Debugging Deserialization Errors Between AIR and BlazeDS on ColdFusion using ORM

    Now that I am using CF + ORM for most of my Flex and AIR projects, I've had a much more difficult time with the deserialization of objects from AS to CF. The errors thrown by BlazeDS are not helpful at all, and not indicative of the true issue. cfgatewayadapter.jar is a closed source, and make it even more difficult, because it is the culprit in these issues. These issues can sometimes take a full day or two to resolve because the only way I've seen to debug is to start removing code line by line until the thing works. Huge waste of time.
    The problem stems from the fact that during deserlization CF barfs when something doesnt match. Instead of throwing a useful error, it proclaims the CFC doesnt exist serverside. The developer then has to go through each componenty property-by-property to try to determine where the problem is.
    What we need is something more specific to what the actual problem is. I've not found an adequate way to debug this, and it's causing me to seriously considering changing the backend to Groovy + Granite so I can get the control I need. Really, Adobe just needs to open up the source on cfgatewayadapter or put some time into refining it so that it throws accurate errors.
    Examing the error below, one would think that the CFC does not exist. However, if you run the same examples from CFML and pass it an instance of StreamProvider it works fine.
    [BlazeDS]Error deserializing client message.
    coldfusion.runtime.CfJspPage$NoSuchTemplateException: Could not find the ColdFusion component or interface StreamProvider.
            at coldfusion.flash.messaging.io.ColdFusionPropertyProxy.createInvokable(ColdFusionPropertyP roxy.java:132)
            at coldfusion.flash.messaging.io.ColdFusionPropertyProxy.createInstance(ColdFusionPropertyPr oxy.java:93)
            at coldfusion.flash.messaging.io.amf.CFAMF3Input.cfreadScriptObject(CFAMF3Input.java:524)
            at coldfusion.flash.messaging.io.amf.CFAMF3Input.readScriptObject(CFAMF3Input.java:250)
            at coldfusion.flash.messaging.io.amf.CFAMF3Input.cfreadObjectValue(CFAMF3Input.java:138)
            at coldfusion.flash.messaging.io.amf.CFAMF3Input.cfreadObject(CFAMF3Input.java:88)
            at coldfusion.flash.messaging.io.amf.CFAMF3Input.cfreadJavaArray(CFAMF3Input.java:748)
            at coldfusion.flash.messaging.io.amf.CFAMF3Input.cfreadBodyAsJavaArray(CFAMF3Input.java:110)
            at coldfusion.flash.messaging.io.amf.CFAMF3Input.cfreadBodyAsJavaArray(CFAMF3Input.java:102)
            at coldfusion.flash.messaging.io.amf.CFAMF3Input.readScriptObjectInternal(CFAMF3Input.java:3 95)
            at coldfusion.flash.messaging.io.amf.CFAMF3Input.readScriptObject(CFAMF3Input.java:246)
            at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:152)
            at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:130)
            at flex.messaging.io.amf.Amf0Input.readObjectValue(Amf0Input.java:123)
            at flex.messaging.io.amf.Amf0Input.readArrayValue(Amf0Input.java:359)
            at flex.messaging.io.amf.Amf0Input.readObjectValue(Amf0Input.java:127)
            at flex.messaging.io.amf.Amf0Input.readObject(Amf0Input.java:94)
            at flex.messaging.io.amf.AmfMessageDeserializer.readObject(AmfMessageDeserializer.java:227)
            at flex.messaging.io.amf.AmfMessageDeserializer.readBody(AmfMessageDeserializer.java:206)
            at flex.messaging.io.amf.AmfMessageDeserializer.readMessage(AmfMessageDeserializer.java:126)
            at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:145)
            at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:291)
            at coldfusion.flash.messaging.CFAMFEndPoint.service(CFAMFEndPoint.java:295)
            at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:353)
            at coldfusion.flex.ColdFusionMessageBrokerServlet.service(ColdFusionMessageBrokerServlet.jav a:114)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
            at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
            at coldfusion.filter.FlashRequestControlFilter.doFilter(FlashRequestControlFilter.java:71)
            at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
            at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
            at jrun.servlet.FilterChain.service(FilterChain.java:101)
            at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
            at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
            at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
            at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
            at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
            at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
            at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
            at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
            at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    [BlazeDS]Deserializing AMF/HTTP request
    Version: 3
      (Message #0 targetURI=null, responseURI=/3)
        (Array #0)
          [0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage')
            source = "com.mediaslurp.remoting.ProviderServiceProxy"
            operation = "savePendingProvider"
            timeToLive = 0
            body = (Array #1)
              [0] =
    [BlazeDS]Serializing AMF/HTTP response
    Version: 3
      (Message #0 targetURI=/3/onStatus, responseURI=)
        (Typed Object #0 'flex.messaging.messages.ErrorMessage')
          headers = (Object #1)
          rootCause = (Typed Object #2 'coldfusion.runtime.CfJspPage$NoSuchTemplateException')
            rootCause = null
            message = "Could not find the ColdFusion component or interface StreamProvider."
            localizedMessage = "Could not find the ColdFusion component or interface StreamProvider."
            detail = "Ensure that the name is correct and that the component or interface exists."
            cause = null
            missingFileName = "StreamProvider"
            type = "Application"
          body = null
          correlationId = null
          faultDetail = null
          faultString = "Error deserializing client message."
          clientId = null
          timeToLive = 0.0
          destination = null
          timestamp = 1.295530026739E12
          extendedData = null
          faultCode = "Client.Packet.Encoding"
          messageId = "6C6E6657-430C-12E6-8B58-E33F7A6D59DC"

    does MySQL work by itself? did you try connecting to your
    databases with
    phpMyAdmin or alike?
    also, make sure you do not have several
    mysql-connector-xxxxxx.***.bin
    (whatever their names are, you know, the jdbc driver files)
    of different
    versions - make sure there is only ONE, preferably the latest
    one,
    anywhere on your server. remove any other ones.
    if i remember correctly, the exception you get in the error
    is usually
    caused by incorrect/old mysql connector drivers...
    Azadi Saryev
    Sabai-dee.com
    Vientiane, Laos
    http://www.sabai-dee.com

  • Messaging working in BlazeDS deployed on Windows Tomcat but failing in Tomcat deployed on Ubuntu

    I have been going round and round on this for days. I have no idea how to solve it. Everything works fine in windows but now I have to move to Ubuntu. I set up a streaming server with BlazeDS which is messaging to my clients great when my war is in tomcat 7 on windows but is failing in tomcat 7 on Ubuntu.
    I see my client connect to BlazeDS on Ubuntu. The DEBUG messages print out that I have a client subscribed. It says that I have one FlexSession for an id and one client subscribed to streaming-amf. Then, a few seconds later, it says that the client sent a duplicate request "streaming-amf recieved a duplicate sreaming connection request from, FlexClient with id ... Faulting request."
    Next the log files print out that there are no streaming clients for the FlexSession and no streaming clients for the endpoint streaming-amf.
    This is the same software that works fine in the Windows Tomcat container but is not in Ubuntu Tomcat even though the WAR is exactly the same. In case it helps, my config files and calls are below:
    messaging-config.xml
        <destination id="sp-streamingchannel">   
                           <properties>
                <network>
                    <session-timeout>0</session-timeout>
                    <throttle-inbound policy="ERROR" max-frequency="50"/>
                    <throttle-outbound policy="REPLACE" max-frequency="500"/>
                </network>
                <server>
                    <allow-subtopics>true</allow-subtopics>
                    <subtopic-separator>.</subtopic-separator>
                    <max-cache-size>1000</max-cache-size>
                    <message-time-to-live>0</message-time-to-live>
                    <durable>true</durable>
                </server>
            </properties>
                <channels>
                 <channel ref="streaming-amf"/>           
                </channels>
               <adapter ref="SPStreamingAdapter"/>
               </destination>
    services-conf.xml
        <channel-definition id="streaming-amf" class="mx.messaging.channels.StreamingAMFChannel">
                  <endpoint url="http://localhost:8080/SP-Web-1.0/messagebroker/spamf" class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
                        <properties>
                            <idle-timeout-minutes>0</idle-timeout-minutes>
                            <max-streaming-clients>150</max-streaming-clients>                      
                            <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis>
                                  <user-agent-settings>
                          <user-agent match-on="MSIE" kickstart-bytes= "2048"  max-streaming-connections-per-session="2"/> 
                          <user-agent match-on="Firefox" kickstart-bytes="0"  max-streaming-connections-per-session="4"/>
                          <user-agent match-on="AdobeAIR" kickstart-bytes="2048" max-streaming-connections-per-session="2" />
                </user-agent-settings>
                        </properties>
              </channel-definition>
    The calls in Flex:
    public var channelDest:String = "http://98.193.212.138:8080/SP-Web-1.0/messagebroker/spamf";
    private var channelName:String = "streaming-amf";
    channelSet = new ChannelSet();
    channel = new StreamingAMFChannel(channelName, channelDest);
    var c:StreamingAMFChannel = new StreamingAMFChannel();
    channelSet.addChannel(channel);
    channel.connect(channelSet);
    consumer = new Consumer();
    consumer.destination  = "sp-streamingchannel";
    consumer.channelSet = channelSet;
    consumer.subtopic = "table." + tableID;
    consumer.subscribe();
    Why would this work fine on one server but fail on the other? Thanks so much for any help you can offer.
    While it may not be releavnt to this question, I do have remoting working fine with BlazeDS on both systems. When my app starts, the user has to log in. All of that is done with BlazeDS and is working fine on both Win and Ubuntu. I only have a problem when it comes to streaming with BlazeDS as is shown above.

    I have been going round and round on this for days. I have no idea how to solve it. Everything works fine in windows but now I have to move to Ubuntu. I set up a streaming server with BlazeDS which is messaging to my clients great when my war is in tomcat 7 on windows but is failing in tomcat 7 on Ubuntu.
    I see my client connect to BlazeDS on Ubuntu. The DEBUG messages print out that I have a client subscribed. It says that I have one FlexSession for an id and one client subscribed to streaming-amf. Then, a few seconds later, it says that the client sent a duplicate request "streaming-amf recieved a duplicate sreaming connection request from, FlexClient with id ... Faulting request."
    Next the log files print out that there are no streaming clients for the FlexSession and no streaming clients for the endpoint streaming-amf.
    This is the same software that works fine in the Windows Tomcat container but is not in Ubuntu Tomcat even though the WAR is exactly the same. In case it helps, my config files and calls are below:
    messaging-config.xml
        <destination id="sp-streamingchannel">   
                           <properties>
                <network>
                    <session-timeout>0</session-timeout>
                    <throttle-inbound policy="ERROR" max-frequency="50"/>
                    <throttle-outbound policy="REPLACE" max-frequency="500"/>
                </network>
                <server>
                    <allow-subtopics>true</allow-subtopics>
                    <subtopic-separator>.</subtopic-separator>
                    <max-cache-size>1000</max-cache-size>
                    <message-time-to-live>0</message-time-to-live>
                    <durable>true</durable>
                </server>
            </properties>
                <channels>
                 <channel ref="streaming-amf"/>           
                </channels>
               <adapter ref="SPStreamingAdapter"/>
               </destination>
    services-conf.xml
        <channel-definition id="streaming-amf" class="mx.messaging.channels.StreamingAMFChannel">
                  <endpoint url="http://localhost:8080/SP-Web-1.0/messagebroker/spamf" class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
                        <properties>
                            <idle-timeout-minutes>0</idle-timeout-minutes>
                            <max-streaming-clients>150</max-streaming-clients>                      
                            <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis>
                                  <user-agent-settings>
                          <user-agent match-on="MSIE" kickstart-bytes= "2048"  max-streaming-connections-per-session="2"/> 
                          <user-agent match-on="Firefox" kickstart-bytes="0"  max-streaming-connections-per-session="4"/>
                          <user-agent match-on="AdobeAIR" kickstart-bytes="2048" max-streaming-connections-per-session="2" />
                </user-agent-settings>
                        </properties>
              </channel-definition>
    The calls in Flex:
    public var channelDest:String = "http://98.193.212.138:8080/SP-Web-1.0/messagebroker/spamf";
    private var channelName:String = "streaming-amf";
    channelSet = new ChannelSet();
    channel = new StreamingAMFChannel(channelName, channelDest);
    var c:StreamingAMFChannel = new StreamingAMFChannel();
    channelSet.addChannel(channel);
    channel.connect(channelSet);
    consumer = new Consumer();
    consumer.destination  = "sp-streamingchannel";
    consumer.channelSet = channelSet;
    consumer.subtopic = "table." + tableID;
    consumer.subscribe();
    Why would this work fine on one server but fail on the other? Thanks so much for any help you can offer.
    While it may not be releavnt to this question, I do have remoting working fine with BlazeDS on both systems. When my app starts, the user has to log in. All of that is done with BlazeDS and is working fine on both Win and Ubuntu. I only have a problem when it comes to streaming with BlazeDS as is shown above.

  • Problem in Blazeds with Jboss Clustering ( Mod_JK with SSL )

    Hi,
         We are running our flex application in jboss clustering environment with the help of Apache mod_jk(Apache Web server as front end with mod_ssl enabled). We are using the SecureAMFChannel as we deploy the application in SSL. We use the RemoteObject for communicating with Java.
    The Application is running fine when we have only one node of JBoss. But once we add one more node to the cluster the application throws the following exception .
    Duplicate HTTP-based FlexSession error: A request for FlexClient 'FDCA49A7-9317-4D8A-881F-9248B1136E7A' arrived over a new FlexSession 'C9C563B8266A03C2207C00796CD7DFF1', but FlexClient is already associated with  FlexSession '8A328320F5C530D55E94568996A1B552', therefore it cannot be associated with the new session.
    As I am maintaing the session in the server, I need to use the JBoss cluster for session replication. I heard that flex clustering is not needed as we have mod_jk and it will do all the stuff for us.
    I checked with simple application without any session data also then too I faced the same problem.
    After the very first login, I can see 2 session created simultaneously and destroyed. I checked the application whether it calls twice before the session is created, but it is calling only once.
    Also when application connects with server2 and if I down the server2 my flex application throws the error that the server is not found, It is not detecting the other server.But it works once I refresh the browser.
    Application Environment Details
    JBoss 6
    Blaze Ds 4.5
    Apache Web server 2.2.21
    Mod_JK   1.2.32
    Mod_SSL 2.8.31
    Thanks,
    Suresh T
    I enabled the sticky session in Mod_jk .
    It is working when the connection is not secure(http) in both apache web server and jboss web server ). But when the connection is https the above problem is happening .
    Message was edited by: suresh.thirumurugan

    Hi,
     Thanks for your info.
      It worked for me as well.
    Thanks,
    Prasad
    On 6/26/08,
    Matthieu Labour <
    [email protected]> wrote:
    A new message was posted by Matthieu Labour in
    Configuration and Getting Started Discussion --
      Problem with configuring BlazeDS with JBOSS
    You might want to download the following tutorial
    http://sebastien-arbogast.com/2008/04/10/flex-spring-and-blazeds-the-full-stack/
    it works on jboss
    Best
    Matt
    View/reply at
    Problem with configuring BlazeDS with JBOSS
    Replies by email are OK.
    Use the
    unsubscribe form to cancel your email subscription.

  • What are the advantages to using BlazeDS or Granite?

    We have decided to use Flex3 to upgrade our UI. We have heard
    good things about using Granite Data Services, but it requires jdk5
    or higher, and the same for BlazeDS.
    We are currently using Websphere 6.0 and are discussing our
    environment options: replace Websphere with JBoss 4.2 (Sun jdk6),
    upgrade to Websphere 6.1 (IBM jdk5), or keep the current Websphere
    6.0 (IBM jdk4). The concerns are upgrade cost, and time to develop
    and qa any changes to the environment.
    We would like to get some feedback on pros and cons of using
    Flex with these three environments. If we stay with jdk4, will we
    spend nn% more time writing code that could have been done out of
    the box with Granite? Are there improvements with memory, speed,
    etc. using Flex with a later version of the jdk? Will development
    time be shorter with a later version of the jdk? What are the
    advantages and disadvantages of using Flex with WebSphere versus
    JBoss?
    Thanks for your input!

    BBM and PIN messages are messages sent from one BlackBerry to another.  The message is composed by the sender and goes through RIM's secure server before being delivered to the recipient.  They are only available to BlackBerry users.
    The thing I like about them is how you can see if they've been received by the recipient.  Once the message reaches the recipient's phone, you'll notice a small 'D' at the start of your message.  This means it's been delivered.  When the recipient opens the message, that 'D' will switch to an 'R', for 'read'.  So now you know that it's actually been received by the recipient.
    One more great thing about these messages is that there is no limit to length.  As you're probably aware, most carriers limit text messages to 160 characters; not so with these messages, they can be much longer.
    BBM and PIN messages are the same type of message, but with PIN messages you're limited to just that one contact receiving it.  With BBM, you can have many contacts in on a chat or you can broadcast a message to many contacts at once.
    I hope that explains things for you. 
    - If my response has helped you, please click "Options" beside my post and mark it as solved. Clicking the "thumbs up" icon near the bottom of my response would also be appreciated.

  • Flex and BlazeDS Compile for Deployement

    Hi,
    I've been following the Flex + BlazeDS tutorial on the Message Service from adobe to start learning working with blazeds. Everything worked out great on the local server of course but I got stuck when it came to moving the files to a remote server. I've looked around quite a lot and found out it's because the compiler feeds the services-config.xml upon compile and at lease in my case won't take and external file. The solution everyone has been posting on the net is writing the channels in actionscript within flex and feedin it the valid endpoint that would be found in the xml configuration file. That's all nice and dandy but everyone has been talking and showing examples of this being done for RemoteObject and I haven't managed to find any examples for Messaging.
    Can anyone help me out with an example on how to deploy my application to a server? (either by coding the channels in AS or otherwise) The application itself is pretty basic...
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
          xmlns:s="library://ns.adobe.com/flex/spark"
          xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="200" minHeight="480" creationComplete="consumer.subscribe()" width="250" currentState="EnterName">
    <fx:Script>
      <![CDATA[
       import mx.messaging.events.MessageEvent;
       import spark.events.TextOperationEvent;
      ]]>
    </fx:Script>
    <s:states>
      <s:State name="Chat"/>
      <s:State name="EnterName"/>
    </s:states>
    <fx:Declarations>
      <s:Producer id="producer" destination="chat"/>
      <s:Consumer id="consumer" destination="chat" message="messageHandler(event.message)"/>
    </fx:Declarations>
    <fx:Script>
      <![CDATA[
       import mx.messaging.messages.AsyncMessage;
       import mx.messaging.messages.IMessage;
       private function send():void{
        var message:IMessage = new AsyncMessage();
        message.body.chatMessage = user.text + ":" + " " + msg.text;
        producer.send(message);
        msg.text = "";
       private function messageHandler(message:IMessage):void{
        log.text += message.body.chatMessage + "\n";
      ]]>
    </fx:Script>
    <s:Panel title="Chat" width="100%" height="100%">
      <s:TextArea id="log" height="377" x="10" y="10" width="228" includeIn="Chat"/>
      <mx:ControlBar width="246" height="52" x="1" y="395" includeIn="Chat">
       <s:TextInput id="msg" width="100%" enter="send()"/>
       <s:Button label="Send B" click="send()"/>
       </mx:ControlBar>
      <s:TextInput includeIn="EnterName" x="60" y="177" id="user" />
      <s:Button includeIn="EnterName" x="87" y="207" label="Start Chat" id="chat" click="chat_clickHandler(event)"/>
      <s:Label includeIn="EnterName" x="57" y="157" text="Please Enter Your Name"/>
      </s:Panel>
    </s:Applicatio>
    And besides that in the messaging-config.xml file on the server a destination with the id="chat" is created and that's it.
    Any help or pointing in the right direction will be greatly appreciated.
    Thank you,
    Nick

    Update:
    Ok...I finally figured out that by replacing the tokens in the services-config.xml file with the physical address of the server everything works.
    Anyway...this means the application needs to be compiled everytime it is moved to a new server or even a different folder on the same server for that matter. Is there any way to pass the {server.name}, {server.port} and {context.root} tokens to the application at runtime for messaging?
    Thanks,

  • Getting started with Flex ...

    Hi All,
    I've been looking a Flex over the last couple of weeks and have managed to setup a couple of basic projects that can read data from a mySQL database etc...  However when it comes to understanding some of the more advanced frameworks and options to use with Flex it starts to get very overwhelming.
    Does anyone have any pointers/suggestions for good material (online or books etc) to start with Flex.  I come from an Oracle Forms development background and in terms of setting up an application with a connection to a database Oracle Forms seems to a lot simplier than building a Flex database application (although the functionality of Oracle Forms as a lot more limited than Flex/Flash).
    I have taken a look at a the book Enterprise Development with Flex: Best Practices for RIA Developers (Adobe Dev Lib)http://www.amazon.com/Enterprise-Development-Flex-Practices-Developers/dp/059615416X/ref=s r_1_6?s=books&ie=UTF8&qid=1319581262&sr=1-6 by Yakov Fain, Victor Rasputnis and Anatole Tartakovsky (Mar 30, 2010), however the very first code example in the book appears to be dated and I'm having trouble getting it to work and finding the appropriately dated source files for the example project.
    I have also taken a quick look at Adobe Flex 4.5 Fundamentals: Training from the Source by Michael Labriola and Jeff Tapper (Aug 5, 2011) which appears to be a bit more recent, however I am not sure how much is covered regarding database connections to databases like mySQL and Oracle.
    Any suggestions on the best learning materials available would be really helpful.  At the moment it feels like I need to be an expert in Flex, MXML, ActionScript, Java, Spring, Hibernate, AMF, Maven, BlazeDS etc etc just to be able to create a simple database centric application (aarrgghh).
    Ideally I would love to be able to find a recent tutorial that goes through the building a relatively advanced Flex database centric application, that includes information about building a database based login/authentication system (without having to use PHP), and database controlled/stored main menu system and a system for modular sub tabs/screens/programs within a main application.
    Regards,
    Leigh.

    Thanks everyone for the replies.  I guess I'm a bit lazy when it comes to reading up on a technology I am not familiar with :-) .  What makes things worse is the Oracle Forms Builder IDE is very highly coupled to the Oracle database and therefore there is no requirement to know or understand the language or technology under hood (other than PL/SQL), Oracle takes care of that within the IDE and the Forms Java Bean (deployed by default with a middleware installation of Oracle application server).
    @dwaynie Started working through the Flex in a week video training yesterday.  Its really good and probably the best place for me to start as it goes over a lot of the assumed knowledge regarding Flex, MXML and AS (stuff I have probably glossed over up until now)
    @Mansuro noticed that spring has a dedicated page on the Flex/Flash plaform site so I'll probably look into this more down the track.  I guess the thing I am little confused about is that there are many examples online that integrate Spring + Hibernate + Maven + Java etc etc, I guess each framework has different features that the others don't and therefore all can be used at once, or does each one offer a completely different service?  More reading is required here I think.

  • Error in BlazeDS 4 clustering (jgroups 2.4.1)

    Hi,
    I'm trying to upgrade from BlazeDS 3.2 to BlazeDS 4 with clustering jgroups configuration jgroups (2.4.1)
    Here's my jgroups-tcp.xml file :
    jgroups-tcp.xml
    <config>
    <TCP bind_addr="server1" start_port="8080" loopback="true" enable_diagnostics="false" />
    <TCPPING timeout="3000" initial_hosts="server1[8080], server1[8080]" port_range="3" num_initial_members="2" />
    <MERGE2 min_interval="10000" max_interval="20000" />
    <FD timeout="6000" max_tries="4" />
    <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false" />
    <pbcast.NAKACK gc_lag="100" retransmit_timeout="600,1200,2400,4800" />
    <pbcast.STABLE stability_delay="1000" desired_avg_gossip="20000" down_thread="false" max_bytes="0" up_thread="false" />
    <pbcast.GMS print_local_addr="true" join_timeout="5000" join_retry_timeout="2000" shun="true" />
    </config>
    when I'm starting server2,  I'm getting following error (witch i don't have with BlazeDS 3.2 ):
    Catalina.out
    BlazeDS]09/03/2010 14:53:59.600 Error handling message pushed from cluster: java.lang.ClassCastException: org.jgroups.stack.IpAddress cannot be cast to java.lang.String
    Exception=java.lang.ClassCastException: org.jgroups.stack.IpAddress cannot be cast to java.lang.String
            at flex.messaging.services.messaging.SubscriptionManager.getMessageClient(SubscriptionManage r.java:736)
            at flex.messaging.services.messaging.SubscriptionManager.addSubscriber(SubscriptionManager.j ava:453)
            at flex.messaging.services.messaging.SubscriptionManager.addSubscriber(SubscriptionManager.j ava:438)
            at flex.messaging.services.MessageService.subscribeFromPeer(MessageService.java:822)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at flex.messaging.cluster.JGroupsCluster$ServiceOperationHandler.handleBroadcast(JGroupsClus ter.java:797)
            at flex.messaging.cluster.JGroupsCluster.handle(JGroupsCluster.java:560)
            at org.jgroups.blocks.MessageDispatcher.handle(MessageDispatcher.java:608)
            at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:650)
            at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:535)
            at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:358)
            at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:775)
            at org.jgroups.JChannel.up(JChannel.java:1091)
            at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:377)
            at org.jgroups.stack.ProtocolStack.receiveUpEvent(ProtocolStack.java:393)
            at org.jgroups.stack.Protocol.passUp(Protocol.java:538)
            at org.jgroups.protocols.pbcast.GMS.up(GMS.java:771)
            at org.jgroups.stack.UpHandler.run(Protocol.java:60)
    I know there is an existing issue(but I don't know it) in LDCS (june 2010) but I don't see anything about Blaze DS...
    What's possible to do?
    Best Regards
    Tehem

    Hi Techies,
    I got resolved this reported issue on blazeds.
    The issue was in the BlazeDS version 4.0.0.14931. To point out exactly, the jar file which had this issue in was flex-messaging-core.jar
    You can download the latest blazeds version "4.0.1.21287" from the below mentioned link and use the flex-messaging-core.jar. This version has the classcast exception issue fixed while casting org.jgroups.stack.IpAddress to string in "SubscriptionManager.java:736"
    http://flexorg.wip3.adobe.com/blazeds/4.x/21287/blazeds-bin-4.0.1.21287.zip
    Regards
    Balamurugan

  • Running a Flash Builder 4.5 Mobile BlazeDS Application on the Device

    I've been developing a Flex Mobile application in a Flash Builder 4.5 mobile project.  The project uses a java/blazeds server, which is a spring application using the spring blazeds integration. I created the project with the Root URL property in Flex Server settings set to localhost (http://localhost:8080/myServerApp), and all has worked well.  I'm now trying to run the application on a usb connected android device, and am getting a warning that the device can't access my localhost location.  I changed localhost in the Root URL property to the ip of my workstation on the local wifi network the device and workstation are connected to (say http://10.0.0.2:8080/myServerApp), and receive the following error stack:
    ArgumentError: Error #2004: One of the parameters is invalid.  url: 'http:'
              at flash.net::NetConnection/connect()
              at mx.messaging.channels::NetConnectionChannel/internalConnect()[E:\dev\4.5.1\frameworks\pro jects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:240]
              at mx.messaging.channels::AMFChannel/internalConnect()[E:\dev\4.5.1\frameworks\projects\rpc\ src\mx\messaging\channels\AMFChannel.as:307]
              at mx.messaging::Channel/connect()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\messaging\Cha nnel.as:884]
              at mx.messaging::ChannelSet/connectChannel()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\mes saging\ChannelSet.as:1707]
              at mx.messaging::ChannelSet/reconnectChannel()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\m essaging\ChannelSet.as:1809]
              at flash.utils::Timer/_timerDispatch()
              at flash.utils::Timer/tick()
    When I change the root url back to localhost, the error persists, and the only way to recover is to start a new project.  Am I doing something stupid or what?  Any help is greatly appreciated.
    Jay

    Hi,
    Looks like a debug build of your application was submitted.
    You have to "Export Release" a build of your application specifically for App store submission. Look at Step 4, sub-step 3 in "Package for distribution".
    Can you confirm if you picked "Final release package for app store" in "Export Release Build"?
    -Anirudh

  • Apache HTTPd + 2 Tomcats with BlazeDS

    The web architecture that we have is quite simple, it is a single Apache HTTPd server that is communicating with 2 Tomcat servers using mod_jk. The configuration is made so one Tomcat is in a waiting state in case the other Tomcat server crashes (or bounce).
    How can I configure BlazeDS to support this configuration? Is sharing the HTTPSession between the two Tomcats enough for BlazeDS?
    I would like the simplest solution possible, I know about BlazeDS clustering possibilities with JGroups but it seems not adapted to multi-environments (DEV/QA/PROD) sites because we have to configure stuff inside the web app.
    In short, do BlazeDS only need HTTPSession sharing between Tomcats or is there some other requirements?

    As far as my understanding goes there should be no reason to use JGroups unless you are using messaging.
    If you are storing session data on the server you will need to using Tomcat clustering other wise you shouldn't even need that.
    We are using a similar setup with HTTPd and multiple JBoss servers for high availability/scalability. We are not using messaging so we didn't configure JGroups. We don't have JBoss clustering enabled because we don't have any data to replicate between the JBoss nodes.
    I have run several load tests using JMeter and everything runs happily when JBoss nodes are added or removed under load.
    Something to note if you are using recent builds of BlazeDS and you want to run 2 or more Tomcat servers concurrently you will need to enable Sticky Sessions with mod_jk and Tomcat other wise recent builds of BlazeDS may start throwing exceptions. This change was introduced to prevent subsequent client requests from needlessly creating new sessions. As it turns out this is a bit of an issue when doing loadbalancing unless Sticky Sessions are used.
    Hope some of that information helps,
    Lance

Maybe you are looking for

  • Automatic Goods Issue for Goods Receipt (Purchase Order).

    Hi, Experts - I have some newbee problem. I have to create ZMIGO to behave like follows: 1. User enters all necessary data (like in MIGO) and posts document. 2. System creates automatic Goods Issue document based on data entered in 1. (above). I doub

  • Bose series 2 bluetooth issue

    i have the bose bluetooth and the issue im having is sometimes i can play music and it comes through the ear piece and other times no matter what i do it wontplay not sure whats up or if there is a fix for this.. anyone else expiercing this issue wit

  • Searching for a file in java

    What I am trying to do is not very uncommon. I want to open a file in it's default application (or at least in a common one.) Mainly I am currently thinking either HTML files or PDF's. What I was wondering is how to search for a file and get its dire

  • How do you convert a jar file into a java file,  ?

    how do you convert a jar file into a java file ? I am new to Java ,but have a little experience in C++ and Visual Basic. I want to edit and maybe create my own mobile games that are written or converted into jar files. At the moment I am using Java N

  • MIDP 2.0: Positioning the caret

    Deep joy. On the Sun emulator, I can position the text insertion caret into a text field by calling setText( String) on that field. However, when I deliver the MIDlet onto the device using IBM's j9 MIDP2.0 implementation, it doesn't work. I've read t