Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

'flex.messaging.services.HTTPProxyService' error

Avatar

Former Community Member

Hi,

I have met below error in using lcds 2.5.1....

how can i fix this error ?

i have already update commons-http.jar file. but same....

thanks,

flex.messaging.config.ConfigurationException: Unable to create service 'flex.messaging.services.HTTPProxyService' for 'proxy-service' due to the following error: org/apache/commons/httpclient/HostConfiguration.ANY_HOST_CONFIGURATION.

            at flex.messaging.config.MessagingConfiguration.createServices(MessagingConfiguration.java:202)

            at flex.messaging.config.MessagingConfiguration.configureBroker(MessagingConfiguration.java:84)

            at flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:105)

            at jeus.servlet.loader.ServletReloader.doInitInstance(ServletReloader.java:70)

            at jeus.servlet.loader.PrivateReloader.initInstance(PrivateReloader.java:155)

            at jeus.servlet.loader.PrivateReloader.getInstance(PrivateReloader.java:114)

            at jeus.servlet.loader.ServletReloader.getServlet(ServletReloader.java:49)

            at jeus.servlet.engine.ServletWrapper.loadOnStartup(ServletWrapper.java:100)

            at jeus.servlet.engine.ServletManager.doPreloadServlets(ServletManager.java:428)

            at jeus.servlet.engine.ServletManager.preloadServlets(ServletManager.java:391)

            at jeus.servlet.engine.Context.preloadServlets(Context.java:1129)

            at jeus.servlet.engine.Context.doStart(Context.java:1018)

            at jeus.servlet.engine.Context.execStart(Context.java:835)

            at jeus.management.j2ee.WebModule.preStart(WebModule.java:396)

            at jeus.management.j2ee.J2EEManagedObject.start(J2EEManagedObject.java:860)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)

2 Replies

Avatar

Former Community Member

Do you have the proxy-service defined in the services-config.xml?

Steve

Avatar

Former Community Member

here is our configuration...

Service-Config.xml

--------------------------

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

<factories>
  <factory id="springServiceFactory" class="das.fw.flex.SpringServiceFactory" />
</factories>

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

    <security>
        <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
        <!-- Uncomment the correct app server
        <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
        <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
        <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
        -->
        <security-constraint id="basic-read-access">
            <auth-method>Basic</auth-method>
            <roles>
                <role>guests</role>
                <role>accountants</role>
                <role>employees</role>
                <role>managers</role>
            </roles>
        </security-constraint>
    </security>

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

        <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
            <endpoint uri="https://{server.name}:9100/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
        </channel-definition>

        <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
            <endpoint uri="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
            <properties>
                <polling-enabled>true</polling-enabled>
                <polling-interval-seconds>8</polling-interval-seconds>
            </properties>
        </channel-definition>

        <channel-definition id="my-rtmp" class="mx.messaging.channels.NetConnectionChannel">
            <endpoint uri="rtmp://{server.name}:2038" class="flex.messaging.endpoints.RTMPEndpoint"/>
            <properties>
  <block-rtmpt-polling-clients>true</block-rtmpt-polling-clients>
                <idle-timeout-minutes>60</idle-timeout-minutes>
                <!--<client-to-server-maxbps>100K</client-to-server-maxbps>
                <server-to-client-maxbps>100K</server-to-client-maxbps>-->
                <!-- for deployment on WebSphere, must be mapped to a WorkManager available in the web application's jndi context.
                <websphere-workmanager-jndi-name>java:comp/env/wm/MessagingWorkManager</websphere-workmanager-jndi-name>
                -->
            </properties>
        </channel-definition>

        <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">
            <endpoint uri="http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
        </channel-definition>

        <channel-definition id="my-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
            <endpoint uri="https://{server.name}:9100/{context.root}/messagebroker/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
        </channel-definition>
    </channels>

    <logging>
        <target class="flex.messaging.log.ConsoleTarget" level="Error">
            <properties>
                <prefix>[Flex] </prefix>
                <includeDate>false</includeDate>
                <includeTime>false</includeTime>
                <includeLevel>false</includeLevel>
                <includeCategory>false</includeCategory>
            </properties>
            <filters>
                <pattern>Endpoint.*</pattern>
                <pattern>Service.*</pattern>
                <pattern>Configuration</pattern>
            </filters>
        </target>
    </logging>

    <system>
        <redeploy>
            <enabled>true</enabled>
            <watch-interval>20</watch-interval>
            <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
            <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
            <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
            <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
            <watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>
            <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
        </redeploy>
    </system>

</services-config>

Proxy-Config.xml

-------------------------

<?xml version="1.0" encoding="UTF-8"?>
<service id="proxy-service"
    class="flex.messaging.services.HTTPProxyService"
    messageTypes="flex.messaging.messages.HTTPMessage,flex.messaging.messages.SOAPMessage">

    <properties>
        <connection-manager>
            <max-total-connections>100</max-total-connections>
            <default-max-connections-per-host>2</default-max-connections-per-host>
        </connection-manager>
        <allow-lax-ssl>true</allow-lax-ssl>
    </properties>

    <adapters>
        <adapter-definition id="http-proxy" class="flex.messaging.services.http.HTTPProxyAdapter" default="true"/>
        <adapter-definition id="soap-proxy" class="flex.messaging.services.http.SOAPProxyAdapter"/>
    </adapters>

    <default-channels>
        <channel ref="my-http"/>
        <channel ref="my-amf"/>
    </default-channels>

    <destination id="DefaultHTTP">
    </destination>

</service>