在 NetBeans6.9 中运行 Oracle XE 和 glass Fish 服务器

发布于 2024-11-16 15:25:38 字数 171 浏览 4 评论 0原文

如果 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 技术交流群。

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

发布评论

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

评论(1

原谅我要高飞 2024-11-23 15:25:38

Oracle XE 的 XML DB (XDB) 嵌入式 HTTP 侦听器可能与 Glassfish 的 HTTP 端口发生冲突。

您需要更改默认端口 8080 以避免冲突。

更改 Oracle XE 的 HTTP 侦听器端口

这记录在 Oracle XE 文档。必须执行以下步骤:

  1. SQLPLUS /NOLOG(在不登录的情况下启动 SQLPlus)
  2. CONNECT SYSTEM/password(以 SYSTEM 身份连接;您需要提供适当的密码)
  3. 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 更改为另一个值:

<network-listeners>
    <network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
    <network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
    <network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
</network-listeners>

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:

  1. SQLPLUS /NOLOG (Launch SQLPlus without logging in)
  2. CONNECT SYSTEM/password (connect as SYSTEM; you'll need to provide the appropriate password)
  3. 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:

<network-listeners>
    <network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
    <network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
    <network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
</network-listeners>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文