Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3457042
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:48:43+00:00 2026-05-18T09:48:43+00:00

Ok so I’m making a simple web app using the technologies from the topic,

  • 0

Ok so I’m making a “simple” web app using the technologies from the topic, recently I found http://www.adobe.com/devnet/flex/articles/flex_hibernate.html so I’m following it and I try to apply it to my app, the only difference being I’m working on a Mac and I’m using MAMP for the database (so no command line for me).

The thing is I’m having some trouble with retrieving/connecting to the database.

I have the remoting-config.xml, persistance.xml, a News.java class (my Entity), a NewsService.java class, a News.as class – all just like in the tutorial. I have of course this line in one of my .mxmls:

<mx:RemoteObject id="loaderService" destination="newsService" result="handleLoadResult(event)" fault="handleFault(event)" showBusyCursor="true" />

And my remoting-config.xml looks like this (well part of it):

<destination id="newsService">

    <properties><source>com.gamelist.news.NewsService</source></properties>

</destination>

NewsService has a method:

    public List<News> getLatestNews() {
    EntityManagerFactory emf = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT);
    EntityManager em = emf.createEntityManager();
    Query findLatestQuery = em.createNamedQuery("news.findLatest");
    List<News> news = findLatestQuery.getResultList();
    return news;
}

And the named query is in the News class:

@Entity
@Table(name="GLT_NEWS")
@NamedQueries({
@NamedQuery(name="news.findLatest", query="from GLT_NEWS order by new_date_added limit 5 ") 
})

The handledLoadResult looks like this:

    private function handleLoadResult(ev:ResultEvent):void {
        newsList = ev.result as ArrayCollection;
        newsRecords = newsList.length;
    }

Where:

[Bindable]
private var newsList:ArrayCollection = new ArrayCollection();

But when I try to trigger:

loaderService.getLatestNews();

nothing happens, newsList is empty.

Few things I need to point out:
1) as I said I didn’t install mysql manually, but I’m using MAMP (yes, the server’s running), could this cause some trouble?
2) I already have a “gladm” database and I have a “GLT_NEWS” table with all the fields, is this bad?

Basically the question is how am I suppose to debug this thing so I can find the mistake I’m making? I know that loadData() is executed (did a trace()), but I have no idea what happens with loaderService.getLatestNews()…

@EDIT: ok so I see I’m getting an error in the “fault handler” which says

"Error: Client.Error.MessageSend - Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8080/WebContent/messagebroker/amf' - "

@EDIT2: Ok i solved the problem, as it turns out my ContextRoot was incorrect, the funny thing is I couldn’t edit it by going to Project properties->Flex Server as it was uneditable! I had to find the .flexProject file and edit it (obviously my Flex Navigator didn’t show it and by accident I noticed it was being filtered).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T09:48:44+00:00Added an answer on May 18, 2026 at 9:48 am

    To answer your question as to, in general, debug this monster…here is what I do.

    1. Set break points in my Java code

    2. Start up the Java application server with the appropriate debug JVM properties set (e.g. -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n)

    3. From Eclipse, I attach a remote debugger to the app server on the default port 8000. The Java Debugger will open up when a break point is hit.

    4. Set breakpoints in my Flex application (or one of its modules).

    5. From Eclipse (with Flash Builder) I launch a debug configuration for my Flex app. The Flex Debugger will open up when a break point is hit.

    At this point I have two debuggers open and everything work great. Two other things I do:

    a) extend the transaction system timeout, so it doesn’t get trigger while I am sitting there think for a few minutes

    b) use Charles Proxy (in reverse proxy mode) inbetween the client and server to watch the AMF traffic and view payloads, etc.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.