Using WildFly 9.x with NetBeans 8.1

天大地大妈咪最大 提交于 2019-12-01 14:01:45

问题


A part of this question. In attempt to using WildFly 9.0.2 final with NetBeans IDE 8.1 (the final release), some serious consequences are still seen.

The IDE (the integrated plugin) never auto-deploys the application even though the "Deploy on Save" option on the IDE is enabled (checked / turned on). This always happens correctly while using GlassFish Server.

It was already reported and its status is "RESOLVED FIXED" for NetBeans 8.0 but it is difficult to rely upon (sorry).

I have migrated the most part of a relatively sizable Java EE application from GlassFish 4.1 to WildFly 9.0.2 final including things like JDBC realm and JAAS. Once the application is deployed on the server, it goes perfectly fine but it always requires hard-deploying the application whenever some changes are made to the application. Hard-deploying the application, when one or a few changes are made to an XHTML/JSP file (which is frequently needed) really causes the "memory overflow" issue in a very short time. This happens within a moment while using GlassFish Server.

Stopping and restarting the server also causes serious issues periodically but pretty much often (almost always), especially when the server is attempted to be stopped without undeploying the application from the server in which case, it causes the following exception to be thrown (stopping the server after undeploying the application in turn requires the application to be deployed all over again from scratch which is a hard, time consuming process).

16:45:32,218 INFO  [org.jboss.as.server] (management-handler-thread - 20) WFLYSRV0211: Suspending server
16:45:32,234 INFO  [org.jboss.as.protocol] (Remoting "om-f6b0ea3ad206:MANAGEMENT" task-7) WFLYPRT0057:  cancelled task by interrupting thread Thread[management-handler-thread - 20,5,management-handler-thread]
16:45:32,234 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 20) WFLYCTL0190: Step handler org.jboss.as.server.operations.ServerShutdownHandler$1@1cd3b8b for operation {"operation" => "shutdown","operation-headers" => {"caller-type" => "user","access-mechanism" => "NATIVE"},"address" => undefined} at address [] failed handling operation rollback -- java.lang.NullPointerException: java.lang.NullPointerException
    at org.hornetq.ra.inflow.HornetQActivation.teardown(HornetQActivation.java:417)
    at org.hornetq.ra.inflow.HornetQActivation.stop(HornetQActivation.java:312)
    at org.hornetq.ra.HornetQResourceAdapter.endpointDeactivation(HornetQResourceAdapter.java:185)
    at org.jboss.jca.core.rar.EndpointImpl.deactivate(EndpointImpl.java:260)
    at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.deactivate(MessageDrivenComponent.java:251)
    at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.access$100(MessageDrivenComponent.java:61)
    at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent$1.preSuspend(MessageDrivenComponent.java:87)
    at org.jboss.as.server.suspend.SuspendController.suspend(SuspendController.java:72)
    at org.jboss.as.server.operations.ServerShutdownHandler$1$1.handleResult(ServerShutdownHandler.java:134)
    at org.jboss.as.controller.AbstractOperationContext$Step.invokeResultHandler(AbstractOperationContext.java:1401)
    at org.jboss.as.controller.AbstractOperationContext$Step.handleResult(AbstractOperationContext.java:1381)
    at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1332)
    at org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1292)
    at org.jboss.as.controller.AbstractOperationContext$Step.access$300(AbstractOperationContext.java:1180)
    at org.jboss.as.controller.AbstractOperationContext.finishStep(AbstractOperationContext.java:937)
    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:885)
    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:601)
    at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:354)
    at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:330)
    at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1183)
    at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:362)
    at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:218)
    at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:201)
    at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:128)
    at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:150)
    at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:146)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:92)
    at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:146)
    at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:298)
    at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:518)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    at org.jboss.threads.JBossThread.run(JBossThread.java:320)

Once this exception is thrown, the process stopping the server goes infinitely until the following message appears in a few minutes.

Does this require some extra steps for the IDE's plugin to go in a usual way? I feel the IDE's plugin fails to communicate correctly with the server/builder.

Is there any solution/workaround?

来源:https://stackoverflow.com/questions/33892879/using-wildfly-9-x-with-netbeans-8-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!