Debuging Blazeds in Flex Builder

Hi all,
Im not sure if anyone else has posted this but thought id
quickly go through how to setup Flex Builder 3 (standalone) and
blazeds (turnkey version that comes with a tomcat server) so that
you can debug both Java and your Flex Project inside Flex Builder
at the same time.
1) Install all the plugins needed to be able to code Java in
Flex Builder 3. Go to Help >> Sofware Updates >> Find
and Install >> Search for new Features and install. Check
"Europa Discovery Site" and click next. Under Java Development
check "Java Development Tools". Click finish and follow the rest of
the instructions to install the plugin and restart Flex Builder
when asked to do so.
2) Create a New java project. File >> New >> Java
>> Java Project. Write blazeds-server (or whatever you want)
under Project Name. Select "create project from existing source"
and choose the WEB-INF folder under
C:\blazeDS\tomcat\webapps\samples\WEB-INF (i unziped my blazeds
turnkey into C:\blazeDS as you can see). Click finish.
3)Create a Remote Java Application. In the Flex Development
Perspective, go to Run >> Debug >> Other. Right Click
on "Remote Java Application" and choose New. Choose a name for your
debug profile. Browse for the project choose the blazeds-server
project you created earlier. Choose Standard (Socket Attach)
connection type. Host=localhost, Port=1044. In the common tab check
"Debug" so that it displays under your favorites. Click apply and
close.
4) Modify catalina.bat. Open catalina.bat in notepad, located
under blazeDS/tomcat/bin. Find and set the following lines as
follows:
set JPDA_TRANSPORT=dt_socket
set JPDA_ADDRESS=1044
save it
5) If you havnt created a Flex Project for your blazeds
follow the instructions here:
http://www.adobe.com/devnet/livecycle/articles/blazeds_gettingstarted_03.html
6) start your server by running (i use cygwin) ./catalina.bat
jpda start
7) you can now set break points in the java code in blazeds
and then choose the debug profile from the debug drop down (you
have to be in the "Debug" prespective to see it in the favorites).
Then run your flex app.
Now youre debuging both java and flex inside Flex Builder at
the same time.....yeeepee dee dudaaaa.
/Eric

Very helpful! Should be placed in the blazeDS docs!
Chris

Similar Messages

  • Debug Java in Flex Builder?

    hi, i installed WTP in Flex Builder, then i set up a project that launches Tomcat, but when i get a display of the .swf file i've created in my Flex project i either get a blank screen, or part of my code is displayed in the page, no actual flex stuff. Does anyone know of any OBVIOUS gotchas that i might be overlooking that will enable me to debug the POJOS i'm using through BlazeDS using Flex Builder? i would appreciate ANY help! thanks!

    您好!
         我来自中国,姓:龙,QQ:331828177
         我英语不是很懂,只能大概知道说的是flex配置问题.我也正学习java和as3希望有您的帮助.谢谢!

  • How to setup Blazeds with Flex builder 3

    I need to setup Blazeds with Flex builder 3. Can anyone help me out regarding this?

    Very helpful! Should be placed in the blazeDS docs!
    Chris

  • Researching to use Blazeds with spring. I can use blazeds with flex builder 3.

    I would like to know, If i can use balzeds 4 with flex builder 3.
    I have all my applications on flex builder 3 with web services.
    Trying to convert to blazeds with spring.

    Yes, it is very much possible. I have done the integration, please check the steps in my post.
    http://sixtyfourarts.blogspot.com/2009/05/gae-integration-with-blazeds-in-eclipse.html

  • 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

  • Flex Builder 3 Debugger hanging unit tests

    If I try to run my Unit Tests in debug mode from Flex Builder 3, FF and IE just hang until I cancel the debugger.  Is this expected?

    Nope. I developed the whole core in debug mode of Flex Builder 3, so I know it works there.
    Mike

  • How to use Flex builder with blazeds and JBoss

    Following the instructions it is pretty easy to set up a project to work with the turnkey tomcat. However, I am having problems with JBoss because the app has to be deployed as a .war file. I can create a war file manually and depoly it no problem. How do I get flex builder to deploy to a war file? I want to be able to debug in flex builder and run at the click of a button.

    Hi,<br /> I am trying to configure BlazeDS with JBOSS Application Server.<br /> I have downloaded BlazeDS binary version - blazeds_bin_3-0-0-544.zip from Adobe. But in the installation steps, it says that copy blazeds.war, samples.war and console.war into <JBOSS_HOME>/server/default/deploy folder. But in this zip, it contains only blazeds.war file only. I have copied it to <JBOSS_HOME>/server/default/deploy folder.<br /><br />I have restarted JBoss. I didn't get any error. But when i give <br /> http://localhost:8080/blazeds ... i am always getting "Page not found 404" error.<br /><br />Please help me, if you have detailed steps to configure BlazeDS on JBoss.<br /><br />Thanks for your time.

  • Flex Builder 3 Beta 3 Debugging not working with latest Flash Player Debug

    First to emphasize that never had such issues with Flex
    Builder 2 Beta 2 and Flash Player 9.0.47 Debug version.
    I downloaded Flex Builder 3 Beta 3 and installed it. Then
    trying to debug any Flex app (old or newly created) does not work.
    I don’t get any errors, but after some research I saw
    it’s nagging up on trying to connect to the Flash Player
    debug version.
    1. Uninstalled old versions of Flash Player (FP).
    2. Downloaded latest debug version of FP 9 (9.0.115) and
    installed it both for IE and Opera (Netscape-compatible).
    3. Installed Flex Builder 3 Beta 3.
    4. Created a simple Flex app.
    5. Ran it in debug mode.
    6. Showed a small window with title “Progress
    Information” and a progress + text: Waiting for Flash Player
    to connect to debugger…
    7. Two minutes later I got the error: “Failed to
    connect; session timed out. Ensure that: 1. You compiled your Flash
    application with debugging on. 2. You are running the debugger
    version of Flash Player.”
    Any idea what is wrong? I tried to download an older debug
    version but then FB 3 Beta 3 raises the error it’s expecting
    version 9.0.115. I searched to download FB3 Beta 2 (because I
    deleted it after downloading Beta 3) but unfortunately Adobe did
    their best to wipe it out from their links.
    Any help is welcome.
    System Specs:
    Windows Vista Ultimate
    Flex Builder 3 Beta 3 Standalone
    JRE 1.6 Update 3
    -Dimitar

    Hi Dimitar,
    Did you close all the browsers (and applications which use
    Flash Player) when you install Flex Builder 3 Beta 3 or Flash
    Player? You can try manually installing it from <FB install
    location>/player/ directory. Here're some
    installation/unintallation instructions of Flash Player:
    http://labs.adobe.com/wiki/index.php/Flex_3:Release_Notes#Installing_Flex_SDK_3_Beta_3
    thanks,
    Sharon

  • Turn Off Debugging in Flex Builder

    Forgive me if this is a stupid question... I'm using Flex
    Builder 2.0.1 and everytime I build my project it creates the
    *debug.swf files. I even have the "-debug=false " option specified
    in the "Additional Compiler Arguments"... I also notice that it
    seems that my project is being compiled twice (?!) because when I
    have coding errors the same error is displayed twice.
    I'm trying the really optimize the speed of the build process
    and am sure that by preventing Flex from creating the debug files
    will chop off at least a few seconds.
    Thank you!

    Forgive me if this is a stupid question... I'm using Flex
    Builder 2.0.1 and everytime I build my project it creates the
    *debug.swf files. I even have the "-debug=false " option specified
    in the "Additional Compiler Arguments"... I also notice that it
    seems that my project is being compiled twice (?!) because when I
    have coding errors the same error is displayed twice.
    I'm trying the really optimize the speed of the build process
    and am sure that by preventing Flex from creating the debug files
    will chop off at least a few seconds.
    Thank you!

  • Pass query string in Flex Builder debug?

    Hi,
    I'm trying to figure out how to launch a debug session while passing query strings in Flex Builder. If I open up the Debug dialog, and uncheck "Use Defaults" and attempt to add my query string to the Debug Path text field, Flex Builder states that "The file cannot be found to launch".  How do I pass a query string to debug in a SWF with Flex Builder?
    Thank you.

    If I understood your question correctly.
    go to html-template/index.template.html and add the query string there and everything you run the app the query string should be there.
    Hope this helps,
    BaBo,

  • Why does Flash/Flex Builder 4 Premium downgrade to Standard when I install Flash Player Debug?

    Why does Flash/Flex Builder 4 Premium downgrade to Standard when I install Flash Player Debug?
    I installed a corporate install of Flex/Flash Builder 4 Premium, and verified that it was the Premium version was installed.  The Start Page said that Flash Player was needed to display the text, so I installed Flash Player 10 Debug -- first download link from here:
    http://www.adobe.com/support/flashplayer/downloads.html
    When I then started Flex Builder 4, the splash screen showed Premium, but as soon as the Start Page was visible, it showed "FB Adobe Flash Builder 4 Standard" --- Help | About showed Standard, and the splash screen from then on showed Standard.
    A Google search showed a work around for this, but it requires a license for Premium, which I don't have because our corporate install has it built-in:
    http://bloginblack.de/2010/05/adobe-master-collection-cs5-breaks-flash-builder-4-premium-a nd-how-to-fix-it/
    1. Anyone know how to resolve this?
    2. Can Adobe fix this?
    Thanks!

    I had similar problem. I was involved in Flash Builder prerelease program and few months later I installed Adobe CS5 Master Collection. After that I had a same situation.  Best thing was, my Flash Builder Beta was Premium version but acted like Standard, and FB from CS5 was Standard but acted like Premium. I removed CS5 and beta version of CS5. used CS5 Cleaning Fix and then reinstalled my apps.
    I was lucky that I didn't have many big projects involved in FB beta or CS5 workspaces, I heard some guys had problems with migrated workspace configurations but I don't know what was the problem.

  • Flex builder 3 debug and autocomplete problems

    I have been working with Adobe Flex Builder for building Flash applications over a year. Recently I tried a few beta SDKs - 3.4 and 4.0. After playing arround with these SDKs and returning to a stable one (3.2) - Flex builder started causing some problems with autocomplete and debugging:
    Autocomplete - when selecting class members from autocomplete - it usually clears all standard library import statements from the class. I started copying and remarking these import statements for retrieving them back after they are deleted.
    Debug - it won't stop on most breakpoints (it used to before changing SDKs). Mostly it ignores my breakpoints.
    I would love to hear any ideas about the cause and possible solution to these problems.
    Tal Yaniv

    I think the problem you are experiencing is this one:
    http://subclipse.tigris.org/issues/show_bug.cgi?id=511
    You probably have Subclipse 1.2.4 installed, which is the
    latest official release. But the new release based on Subversion
    1.5 has been in development for over a year. It will be version
    1.4.0 and probably released next week when Subversion 1.5 is
    released.

  • Debugging with External Browser and Flex Builder

    Hi
    I have Flex application that requires you login first in IE
    before you can have access to it (ouside the application)
    I would like to debug this application but when I start the
    application from Flex Builder , it is always opening new IE window
    How to attach Flex builder debug session to an existing IE
    session (that was authenticated already)
    I tried going to Window/Preferences/Web Browser and tell it
    to use 'External IE Browser' but that did not work
    any help is appreciated
    Thanks
    Kasem

    Hi Kasem,
    If you go to the launch configuration dialog for your
    project, you can set the launch URL to any URL you want -- you can
    set it to point to your login page.
    The quickest way to get to the launch config dialog is to
    click the Run or Debug toolbar button, and then CONTROL-click on
    the launch configuration you want to edit, But you can also get to
    it from the Run menu.

  • [svn] 4917: Fix FB-16914: Flex Builder swallows some ADL errors if you click Run instead of Debug.

    Revision: 4917
    Author: [email protected]
    Date: 2009-02-10 13:55:43 -0800 (Tue, 10 Feb 2009)
    Log Message:
    Fix FB-16914: Flex Builder swallows some ADL errors if you click Run instead of Debug.
    Also, some debugger code cleanup.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/FB-16914
    Modified Paths:
    flex/sdk/trunk/modules/debugger/src/java/flash/tools/debugger/ILaunchNotification.java
    flex/sdk/trunk/modules/debugger/src/java/flash/tools/debugger/SessionManager.java
    flex/sdk/trunk/modules/debugger/src/java/flash/tools/debugger/concrete/PlayerSessionManag er.java
    flex/sdk/trunk/modules/debugger/src/java/flash/tools/debugger/concrete/ProcessListener.ja va

    it's a beta. it stunk. but they put it out for review which helps Adobe and others. But never treat those products as stuff to base your serious work around. Flex3 is stable. FB4 is 90% reliable. Things are still broken in it.
    btw if it was a leading university why in the world would they base it around a Beta that was buggy or was that your decision ?
    now, since I helped, please give me my 5 or 10 points.

  • Source Not Found in Flex Builder Debug

    Flex Builder 2 with CF App Wizard error.
    I'm getting a souce not found message and this error in Flex
    Builder 2. Anyone else see this? Says to Edit Source Lookup Path???
    Thanks,
    Don
    [SWF] /DA8/Constellation/CxI/bin/CxI-debug.swf - 1,087,677
    bytes after decompression
    [RPC Fault faultString="Send failed"
    faultCode="Client.Error.MessageSend"
    faultDetail="Channel.Connect.Failed error
    NetConnection.Call.Failed: HTTP: Status 404"]
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\dev\enterprise_gmc\framework s\mx\rpc\AbstractInvoker.as:192
    at
    mx.rpc::Responder/fault()[C:\dev\enterprise_gmc\frameworks\mx\rpc\Responder.as:56]
    at
    mx.rpc::AsyncRequest/fault()[C:\dev\enterprise_gmc\frameworks\mx\rpc\AsyncRequest.as:107]
    at
    mx.messaging::ChannelSet/mx.messaging:ChannelSet::faultPendingSends()[C:\dev\enterprise_g mc\frameworks\mx\messaging\ChannelSet.as:962]
    at
    mx.messaging::ChannelSet/channelFaultHandler()[C:\dev\enterprise_gmc\frameworks\mx\messag ing\ChannelSet.as:710]
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at
    mx.messaging::Channel/mx.messaging:Channel::connectFailed()[C:\dev\enterprise_gmc\framewo rks\mx\messaging\Channel.as:736]
    at
    mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingChannel::connectFailed ()[C:\dev\enterprise_gmc\frameworks\mx\messaging\channels\PollingChannel.as:203]
    at
    mx.messaging.channels::AMFChannel/mx.messaging.channels:AMFChannel::statusHandler()[C:\de v\enterprise_gmc\frameworks\mx\messaging\channels\AMFChannel.as:294]

    Can you post sample code that shows this issue?
    BaBo,

Maybe you are looking for