Weblogic10、BlazeDS、FlashBuilder4、设置远程处理服务绑定时出错

发布于 2024-10-14 23:58:21 字数 4049 浏览 5 评论 0原文

我真的不知道还能尝试什么,任何帮助将不胜感激。谢谢

1)我使用的是weblogic 10,flashbuilder4 eclipse插件,一切都在windows xp上运行。

2) 我在 weblogic 10 上部署了 blazeds tomcat 示例,并能够成功将其远程服务绑定到 fb4 中的新项目 DataGrid,一切正常。

3) 然后我修改了示例以使用我自己的 java 类。在 fb4 中数据提供程序绑定的最后一步中,当我选择目标并单击完成按钮时,它显示:

“com.hello.test.ProductSearch 在指定位置不可用。尝试通过取消选择目标产品搜索来导入”

我验证类文件是否正确部署在 weblogic 和 http://localhost:7001/hello/messagebroker/amf 不显示错误。

另外,当我将相同的文件位置部署到 tomcat 时,它工作正常。总结一下: 1)BlazeDS示例在weblogic10和tomcat中都运行良好 2)我的com.hello.test.ProductSearch在tomcat中工作正常,但在weblogic10中给出上述错误。

所以看起来问题出在 weblogic 10 部署上,我只是使用默认的标准 weblogic10 部署。不知道是什么问题,已经搞了好几天了。

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

远程处理配置.xml

<adapters>
    <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/>
</adapters>



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



<destination id="productsearch">
    <properties>
        <source>com.hello.test.ProductSearch</source>
    </properties>
</destination>


服务配置.xml

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

    <default-channels>

       <channel ref="my-amf"/>

    </default-channels>

</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>
            <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>



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


ProductSearch.java

package com.hello.test;
import java.util.ArrayList;
import java.util.List;



public class ProductSearch
{
     public AttributeVO[] search()
     {
         List<AttributeVO> retList = new ArrayList<AttributeVO>();

         retList.add(new AttributeVO("one","two", "three","four"));
         retList.add(new AttributeVO("five","six", "seven","eight"));

        return retList.toArray(new AttributeVO[retList.size()]);



     }
}

AttributeVO.java

package com.hello.test;



import java.io.Serializable;



public class AttributeVO implements Serializable
{



    static final long serialVersionUID = 1L;



    private String val1;
    private String val2;
    private String val3;
    private String val4;

    public AttributeVO()
    {}

    etc... all get getter/setters

}

i am really not sure what else to try, any help will be appreciated. Thank you

1) I am using weblogic 10, flashbuilder4 eclipse plugin, everything is running off windows xp.

2) I deployed the blazeds tomcat samples on weblogic 10 and was able to successfully bind its remote-service to a new project DataGrid in fb4, everything works fine.

3) I then modified the samples to use my own java class. On the last step of the Data provider binding in fb4, when I select the destination and click on finish button it says:

"com.hello.test.ProductSearch is not available in the specified location. Try importing by unselecting the destniation productsearch"

I verified the class files are deployed properly on weblogic and http://localhost:7001/hello/messagebroker/amf doesnt show an error.

Also when i deploy the same file location to tomcat, it works fine. So to summarize:
1) BlazeDS sample works fine in both weblogic10 and tomcat
2) My com.hello.test.ProductSearch works fine in tomcat but gives above error in weblogic10.

So looks like issue is with weblogic 10 deployment, I am just using default standard weblogic10 deployment. Not sure what the problem is, been at it for days now.

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

remoting-config.xml

<adapters>
    <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/>
</adapters>



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



<destination id="productsearch">
    <properties>
        <source>com.hello.test.ProductSearch</source>
    </properties>
</destination>


services-config.xml

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

    <default-channels>

       <channel ref="my-amf"/>

    </default-channels>

</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>
            <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>



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


ProductSearch.java

package com.hello.test;
import java.util.ArrayList;
import java.util.List;



public class ProductSearch
{
     public AttributeVO[] search()
     {
         List<AttributeVO> retList = new ArrayList<AttributeVO>();

         retList.add(new AttributeVO("one","two", "three","four"));
         retList.add(new AttributeVO("five","six", "seven","eight"));

        return retList.toArray(new AttributeVO[retList.size()]);



     }
}

AttributeVO.java

package com.hello.test;



import java.io.Serializable;



public class AttributeVO implements Serializable
{



    static final long serialVersionUID = 1L;



    private String val1;
    private String val2;
    private String val3;
    private String val4;

    public AttributeVO()
    {}

    etc... all get getter/setters

}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

拒绝两难 2024-10-21 23:58:21

解决了。我使用jdk 1.6编译服务器端java,显然最新版本的blazeDS与1.6不兼容(当然它不只是告诉你,那太容易了)。

一旦我使用 jdk 1.5 重新编译,一切就正常了。

说说挫败感..

SOLVED. I compiled the server side java using jdk 1.6, apparently the latest version of blazeDS isnt compatible with 1.6 (of course it doesnt just tell you, that would be too easy).

Once i recompiled using jdk 1.5 everything worked.

Talk about frustration..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文