壹佰网|ERP100 - 企业信息化知识门户

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2577|回复: 4

为什么我POST一个document时却出现了no application server found 错误

[复制链接]
发表于 2006/4/20 14:40:25 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622  。

您需要 登录 才可以下载或查看,没有帐号?注册

x
看了看代码,如下:
public boolean postIt()
        {
                if (!isValidAction(ACTION_Post)
                        || m_document == null)
                        return false;
                try
                {
                        //        Should work on Client and Server
                        InitialContext ctx = CConnection.get().getInitialContext(true);
                        ServerHome serverHome = (ServerHome)ctx.lookup (ServerHome.JNDI_NAME);
                        if (serverHome != null)
                        {
                                Server server = serverHome.create();
                                if (server != null)
                                {
                                        String error = server.postImmediate(Env.getCtx(),
                                                m_document.getAD_Client_ID(),
                                                m_document.get_Table_ID(), m_document.get_ID(),
                                                true, m_document.get_TrxName());
                                        m_document.get_Logger().config("Server: " + error == null ? "OK" : error);
                                        return error == null;
                                }
                        }
                        else
                                m_document.get_Logger().config("NoServerHome");
                }
                catch (Exception e)
                {
                        m_document.get_Logger().config("(ex) " + e.getMessage());
                }
                return false;
        }        //        postIt
但是实际上我在源码中找不到org.compiere.interfaces.ServerHome和org.compiere.interfaces.Server的源码
发表于 2006/4/20 16:07:37 | 显示全部楼层
這是個ServerHome , Server 是EJB的接口
你有沒有啟動JBoss ?
 楼主| 发表于 2006/4/21 09:49:59 | 显示全部楼层

解决了,原来是我的应用服务器端口不正确,现在可以正确过帐了

 楼主| 发表于 2006/4/21 09:51:57 | 显示全部楼层
但是org.compiere.interfaces.ServerHome和org.compiere.interfaces.Server为什么不提供源代码呢,仅仅提供了编译后的Interfaces.jar
发表于 2006/4/21 10:00:08 | 显示全部楼层
源代码是用xdoclet自动生成的。你编译过就会有。
可以看一下serverroot下的build.xml

只是些接口声明,不需要写,EJB开发一般都会这么做。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|手机版|壹佰网 ERP100 ( 京ICP备19053597号-2 )

Copyright © 2005-2012 北京海之大网络技术有限责任公司 服务器托管由互联互通
手机:13911575376
网站技术点击发送消息给对方83569622   广告&合作 点击发送消息给对方27675401   点击发送消息给对方634043306   咨询及人才点击发送消息给对方138011526

GMT+8, 2025/11/29 03:35 , Processed in 0.012506 second(s), 14 queries , File On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表