dwadadfdfdfdf 2013-11-13 14:28
浏览 1886

Jboss7 里面 com.sun.proxy.$Proxy0 cannot be cast to com.ejb.impl.HelloWorldImpl

Hashtable jndiProperties = new Hashtable();
jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

 try {
    Context  initial=new InitialContext(jndiProperties);
    Object hello=
            initial.lookup
            ("ejb:/hello/HelloWorldImpl!com.ejb.HelloWorld");

    HelloWorldImpl ho=(HelloWorldImpl)hello;
    System.out.print(ho.Hello(""));

出现错误如题。。麻烦大神指点一下。我刚学EJB.

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 有赏,i卡绘世画不出
    • ¥15 如何用stata画出文献中常见的安慰剂检验图
    • ¥15 c语言链表结构体数据插入
    • ¥40 使用MATLAB解答线性代数问题
    • ¥15 COCOS的问题COCOS的问题
    • ¥15 FPGA-SRIO初始化失败
    • ¥15 MapReduce实现倒排索引失败
    • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
    • ¥15 找一位技术过硬的游戏pj程序员
    • ¥15 matlab生成电测深三层曲线模型代码