将WildFly应用程序服务器与NetBeans IDE一起使用 [英] Using the WildFly application server with NetBeans IDE

查看:115
本文介绍了将WildFly应用程序服务器与NetBeans IDE一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我习惯于一直使用GlassFish服务器。我正在将一个Java EE应用程序从GlassFish(4.0)迁移到WildFly 8.1.0 final。

I was accustomed to using GlassFish server all the times. I'm migrating a Java EE application from GlassFish (4.0) to WildFly 8.1.0 final.

我尝试使用服务器的这个插件,因为服务器没有内置的插件。

I tried using WildFly 8.1.0 final on NetBeans 8.0 using this plugin for the server, since there was no built-in plugin for the server.

与GlassFish不同,即使启用了IDE上的部署保存选项,也未部署应用程序以保存项目数据。该应用程序导致非常奇怪/未知/异常的问题。例如,这个问题充满了(仅仅)其中一些问题。

Unlike GlassFish, the application is however, not deployed on saving project data even though the deploy on save option on the IDE is enabled. The application leads to very strange/unknown/unusual problems. For example, this question is full of (merely) some of those problems.

我将NetBeans升级到8.0.1(使用JSF到2.2.8-02),它有一个内置的WildFly-Plugin,但它也带来了与以前版本的IDE无关的所有差异。

I upgraded NetBeans to 8.0.1 (with JSF to 2.2.8-02) which has a built-in WildFly-Plugin but it also brought all most no difference anyway than the previous version of the IDE.

此评论中

In this comment of a bug report, it is mentioned that a fix was made by changing/adding some XML corresponding to a JDBC driver as follows,

<driver name="mysql" module="com.mysql">
  <xa-datasource-class>
    com.mysql.jdbc.jdbc2.optional.MysqlDataSource
  </xa-datasource-class>
</driver>

我还对 standalone-full.xml进行了此更改档案。这个特殊部分如下所示。

I also made this change to the standalone-full.xml file. This particular part looks like as follows.

<subsystem xmlns="urn:jboss:domain:datasources:2.0">
    <datasources>
        <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
            <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
            <driver>h2</driver>
            <security>
                <user-name>sa</user-name>
                <password>sa</password>
            </security>
        </datasource>

        <datasource jta="false" jndi-name="java:/jdbc/project_datasource" pool-name="project_datasource" enabled="true" use-ccm="false">
            <connection-url>jdbc:mysql://localhost:3306/projectdb</connection-url>
            <driver-class>com.mysql.jdbc.Driver</driver-class>
            <driver>mysql</driver>
            <pool>
                <min-pool-size>5</min-pool-size>
                <max-pool-size>15</max-pool-size>
            </pool>
            <security>
                <user-name>root</user-name>
                <password>root</password>
            </security>
            <validation>
                <validate-on-match>false</validate-on-match>
                <background-validation>false</background-validation>
            </validation>
            <statement>
                <share-prepared-statements>false</share-prepared-statements>
            </statement>
        </datasource>
        <drivers>
            <driver name="h2" module="com.h2database.h2">
                <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
            </driver>
            <driver name="mysql" module="com.mysql">
                <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlDataSource</xa-datasource-class>
            </driver>
        </drivers>
    </datasources>
</subsystem>

但都是徒劳的。这样做并没有什么新内容。

But all in vain. Doing so made nothing new.

无论如何,现在可以在NetBeans中使用WildFly(8.1.0或更高版本,无论何时可用)(可能通过在某处进行某些更改) )?

Anyway, is it possible to use WildFly (8.1.0 or higher, whenever available) with NetBeans for now (maybe by making somewhere some changes)?

现在看来,我几乎离开了WildFly。是吗? :)

It appears that I'm almost left with staying away with WildFly for now. Is it? :)

我不确切知道插件是否有问题。可能会有所不同。

更新:

我遇到这种情况至少花了三周时间。所以,请不要认为我在这里写的所有内容都是错误/无意义的,如果你不能在一瞬间重现相同的事情(如链接问题 - 包括罢工文本) - 我只是不能再说些什么。

It took me at least three weeks to encounter this situation. So, please do not think that the entire thing I wrote here is wrong/meaningless, if you could not reproduce the same thing just within a moment (as mentioned in the linked question - including the strike-through text) - I just cannot say anything more about it.

其中一个可重现的事情:如果对现有应用程序进行了一些更改,则应用程序不会(自动)部署到服务器,如果这些更改已保存(更不用说在IDE中启用了部署在保存选项) - 但这只是一个最简单的事情,即使发生得不正确也无法依赖。

One of the reproducible things : if some changes to an existing application are made, the application is not (automatically) deployed to the server, if those changes are saved (not to mention that the deploy on save option is enabled in the IDE) - but that's just one simplest thing and cannot be relied upon, even though happens correctly.

显然插件不会以一种它应该与IDE交互/通信的方式(正确地说,例如,当使用GlassFish Server时)。

Apparently the plugin does not interact/communicate with the IDE in a way that it should (as happens correctly, when using GlassFish Server, for example).

推荐答案

只是一个警告,因为我错过了这个并且正在撕裂我的头发在这上面。
Wildfly默认使用端口9990进行调试管理,但是如果您有Nvidia设备会导致问题,因为Nvidia网络服务也使用9990。

Just a warning, as I missed this and was tearing my hair out on this. Wildfly uses port 9990 for debug management as default, this however causes a problem if you have an Nvidia device as the Nvidia network service also uses 9990.

To修复它,我已经停止了Nvidia网络服务(在任务管理器中),我的Netbeans(8.1)现在可以连接到wildfly服务器,不再摔倒。

To fix it, I've stopped the Nvidia network service (In task manager) and my Netbeans (8.1) can now connect to the wildfly server and no longer falls over.

您还可以更改wildfly使用的端口,以阻止冲突。如果您使用的是standalone.xml文件,请更改以下行:

You can also change the ports that wildfly uses, to stop the conflict. If you are using the standalone.xml file, change the following line:

<socket-binding name="management-http"
    interface="management"
    port="${jboss.management.http.port:9990}"/>

并根据您的选择更改端口号。现在,在NetBeans中,当您选择添加服务器并转到实例属性时,请确保将管理端口设置为与在配置文件中设置的相同。我选择了9991并且到目前为止没有任何问题。

And change the port number to your choosing. Now in NetBeans, when you choose to add the server and get to the Instance Properties, make sure you set the management port to the same as what you have set in the config file. I chose 9991 and had no issues so far.

(我在这里发布,因为这是我在搜索修复问题时不断提出的第一个结果)

(I posted here as this was the first result I kept coming to when searching for fixing the issue)

这篇关于将WildFly应用程序服务器与NetBeans IDE一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆