在 NetBeans6.9 中运行 Oracle XE 和 glass Fish 服务器
如果 oracle.exe 正在运行,则 Glassfish 服务器会出现错误并且不会启动。
我尝试更改 Glassfish 服务器的端口号,但这没有帮助。
我想在 Java Web 应用程序中使用 Oracle 10g 数据库,这需要 Glassfish 服务器,所以我将不胜感激任何解决方案。
If oracle.exe is running, then the Glassfish server gives an error and does not start.
I have tried to change the port number of the Glassfish server but this does not help.
I want to use the Oracle 10g database in a Java web application which would require the Glassfish server, so I would be grateful for any solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Oracle XE 的 XML DB (XDB) 嵌入式 HTTP 侦听器可能与 Glassfish 的 HTTP 端口发生冲突。
您需要更改默认端口 8080 以避免冲突。
更改 Oracle XE 的 HTTP 侦听器端口
这记录在 Oracle XE 文档。必须执行以下步骤:
SQLPLUS /NOLOG
(在不登录的情况下启动 SQLPlus)CONNECT SYSTEM/password
(以 SYSTEM 身份连接;您需要提供适当的密码)EXEC DBMS_XDB.SETHTTPPORT(nnnn);
(将新端口值替换为nnnn)。更改 Glassfish 实例的 HTTP 侦听器端口
这里假设使用 Glassfish 3.1。您可以使用 asadmin 执行此操作,通过在 asadmin 中使用类似于以下内容的命令:
set server.http-service.http-listener.http-listener-1.port=nnnn
您需要将新的端口号。
您还可以从位于
$GLASSFISH_INSTALL/glassfish/domains/domain1/config/domain.xml
的 Glassfish 域配置文件中修改端口值。您需要编辑“http-listener-1”条目并将端口从 8080 更改为另一个值:It is likely that the Oracle XE's embedded HTTP listener for XML DB (XDB) is having a conflict with the HTTP Port of Glassfish.
You'll need to change the port of either from the default of 8080 to avoid the conflict.
Changing Oracle XE's HTTP listener port
This is documented in the Oracle XE documentation. The following steps have to be performed:
SQLPLUS /NOLOG
(Launch SQLPlus without logging in)CONNECT SYSTEM/password
(connect as SYSTEM; you'll need to provide the appropriate password)EXEC DBMS_XDB.SETHTTPPORT(nnnn);
(Substitute the new port value to nnnn).Changing the Glassfish instance's HTTP listener port
This assumes Glassfish 3.1. You can do this using asadmin, by a command similar to the following in asadmin:
set server.http-service.http-listener.http-listener-1.port=nnnn
You'll need to substitute the new port number.
You may also modify the value of the value of the port from the Glassfish domain configuration file at
$GLASSFISH_INSTALL/glassfish/domains/domain1/config/domain.xml
. You'll need to edit the entry for "http-listener-1" and change the port from 8080 to another value: