0

After stumbling my way through setting up a BlazeDS service, I was finally able to get the list of services through the Flex Builder Data/Services Wizzard. However when testing any of the services, I get the Error popup of

> "InvocationTargetException:There was an error while invoking the
> operation. Check your operation inputs or server code and try invoking
> the operation again. 
> 
> Reason: java.io.FileNotFoundException:
> http://127.0.0.1:8080/portlets-0.0.1-SNAPSHOT/messagebroker/amf/

I could not find anyone else with a similar issue, and am unfamiliar with services setup. Below are my configurations. Any help would be greatly appreciated.

I can post config files if it will help, i was getting improper code format errors trying to insert them in this single post.

This service I am testing does not reach the function in the server, it is throwing this error before getting that far...

I have also noticed that I cannot run the flex application through a web browser using the standard run configuration in eclipse as it tries to target:

[http://127.0.0.1:8080/portlets-0.0.1-SNAPSHOT/messagebroker/amf/FlexMissionsOverview/MissionsPortlet.html][1]

Which throws a 404 error on tomcat since the file does not exist there. Are these possibly connected?

Any help would be greatly appreciated.

Added Details based on feedback:

Yes, the project name is "FlexMissionsOverview" with a Base Flex Application Called "MissionsPortlet"(.mxml).

The webapp is deployed to "webapps/portlets-0.0.1-SNAPSHOT/"

Compiler settings below:

-services "C:\liferay\liferay-portal-6.1.1-ce-ga2\tomcat-7.0.27\webapps\portlets-0.0.1-SNAPSHOT\WEB-INF\flex\services-config.xml" -locale en_US -show-deprecation-warnings=false -show-binding-warnings=false

Note: I am setting my project back up to where I had gotten to by the time of this post, if anything changes I will make another edit.

services-config.xml

<?xml version="1.0" encoding="UTF-8"?>
<services-config>

    <services>
        <service-include file-path="remoting-config.xml" />
        <service-include file-path="proxy-config.xml" />
        <service-include file-path="messaging-config.xml" />        
    </services>

    <factories>
        <factory id="spring" class="flex.samples.factories.SpringFactory"/>
    </factories>



    <services>
        <service id="remoting-service" class="flex.messaging.services.RemotingService">
            <adapters>
                <adapter-definition id="java-object"
                    class="flex.messaging.services.remoting.adapters.JavaAdapter"
                    default="true" />
            </adapters>
            <default-channels>
                <channel ref="my-amf" />
            </default-channels>
        </service>
    </services>

    <channels>
        <channel-definition id="my-amf"
            class="mx.messaging.channels.AMFChannel">
            <endpoint
                url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"
                class="flex.messaging.endpoints.AMFEndpoint" />
            <properties>
                <add-no-cache-headers>false</add-no-cache-headers>
                <polling-enabled>false</polling-enabled>
            </properties>
        </channel-definition>
    </channels>

    <logging>
        <!-- You may also use flex.messaging.log.ServletLogTarget -->
        <target class="flex.messaging.log.ConsoleTarget" level="Error">
            <properties>
                <prefix>[BlazeDS] </prefix>
                <includeDate>false</includeDate>
                <includeTime>false</includeTime>
                <includeLevel>true</includeLevel>
                <includeCategory>false</includeCategory>
            </properties>
            <filters>
                <pattern>Endpoint.</pattern>
                <pattern>Service.</pattern>
                <pattern>Configuration</pattern>
            </filters>
        </target>
    </logging>

</services-config>

Pointing to the file directly on the tomcat server seems to work fine for testing the Flex Application via Eclipse, but I am still getting the same "FileNotFoundException" When trying to test the BlazeDS Services in the Data/Services Wizard in FlashBuilder.

Is there any indication of what the FileNotFoundException is coming from when trying to test the services? It may be some of the config information, but I am not positive, since I am used to these Exceptions saying what file it could not find.

The only class that I have in my project that is referenced above is the two listener classes, the other classes I believe come from my maven dependencies.

8
  • Can you add the flex compiler options here? Also, what is the folder name of the project in the server?
    – Zeus
    Jan 30, 2014 at 23:14
  • FlexMissionsOverview/MissionsPortlet.html is this the project name/proeject start files?
    – Zeus
    Jan 30, 2014 at 23:14
  • @Zeus I have added the requested details above.
    – cbradsh1
    Feb 1, 2014 at 2:28
  • Aalso passtee d serices-conf file. Try to clean buid the proj. Compiler options look ok
    – Zeus
    Feb 1, 2014 at 3:06
  • You have to change the run configuration manually. and point it to 127.0.0.1:8080/portlets-0.0.1-SNAPSHOT/MissionPortlet.html
    – Zeus
    Feb 1, 2014 at 3:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.