ebean-orm-tools / ebean-idea-enhancer

Ebean enhancer for IntelliJ Idea that uses javaagent
Apache License 2.0
1 stars 0 forks source link

running Wilfly with the enhancer enabled results in errors #3

Open jalvaren opened 4 years ago

jalvaren commented 4 years ago

Using IntelliJ 2019.2 Ultimate, with this new version of the enhancer, results in error when running a wildfly application. Inspecting the logs I suspect is because of the javaagent option. Also If I manually install the 11.39.1 enhancer, it works as usual

Below I include the console output for reference.

=============================================================================== D:\redacted\tools\wildfly-12.0.0.Final\bin\standalone.bat Calling "D:\redacted\tools\wildfly-12.0.0.Final\bin\standalone.conf.bat" "JAVA_OPTS already set in environment; overriding default settings with values: -javaagent:D:\redacted\tools\IntelliJ\config\plugins\ebean-idea\lib\ebean-agent-11.44.1.jar " Setting JAVA property to "C:\Program Files\Java\jdk1.8.0_192\bin\java"

"C:\Program Files\Java\jdk1.8.0_192\bin\java.exe" -Dfile.encoding=windows-1252 -classpath "D:\redacted\tools\wildfly-12.0.0.Final\bin\client\jboss-client.jar;D:\redacted\tools\wildfly-12.0.0.Final\modules\system\layers\base\org\jboss\as\controller-client\main\wildfly-controller-client-4.0.0.Final.jar;D:\redacted\tools\wildfly-12.0.0.Final\modules\system\layers\base\org\jboss\as\protocol\main\wildfly-protocol-4.0.0.Final.jar;D:\redacted\tools\wildfly-12.0.0.Final\modules\system\layers\base\org\jboss\threads\main\jboss-threads-2.3.1.Final.jar;D:\redacted\tools\wildfly-12.0.0.Final\modules\system\layers\base\org\jboss\dmr\main\jboss-dmr-1.5.0.Final.jar;D:\redacted\tools\wildfly-12.0.0.Final\modules\system\layers\base\org\wildfly\security\elytron-private\main\wildfly-elytron-1.2.2.Final.jar;C:\Users\redacted\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\192.5728.98\lib\platform-api.jar;C:\Users\redacted\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\192.5728.98\lib\util.jar;C:\Users\redacted\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\192.5728.98\plugins\JavaEE\lib\javaee-impl.jar;C:\Users\redacted\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\192.5728.98\plugins\JBoss\lib\specifics\wildfly11-specifics.jar;C:\Users\redacted\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\192.5728.98\plugins\JBoss\lib\specifics\jboss7-specifics.jar" com.intellij.javaee.oss.process.JavaeeProcess 57590 com.intellij.javaee.oss.jboss.agent.WildFly11Agent

[2019-09-20 08:36:29,446] Artifact customerRewards:war exploded: Waiting for server connection to start artifact deployment... Detected server admin port: 9990 Detected server http port: 8080 JBoss Bootstrap Environment

JBOSS_HOME: "D:\redacted\tools\wildfly-12.0.0.Final"

JAVA: "C:\Program Files\Java\jdk1.8.0_192\bin\java"

JAVA_OPTS: "-Dprogram.name=standalone.bat -javaagent:D:\redacted\tools\IntelliJ\config\plugins\ebean-idea\lib\ebean-agent-11.44.1.jar "

===============================================================================

WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager Sep 20, 2019 8:36:30 PM org.jboss.msc.service.ServiceContainerImpl INFO: JBoss MSC version 1.3.2.Final Sep 20, 2019 8:36:30 PM org.jboss.threads.Version INFO: JBoss Threads version 2.3.1.Final Sep 20, 2019 8:36:30 PM org.jboss.as.server.ApplicationServerService start INFO: WFLYSRV0049: WildFly Full 12.0.0.Final (WildFly Core 4.0.0.Final) starting Sep 20, 2019 8:36:32 PM org.jboss.as.controller.AbstractOperationContext executeStep ERROR: WFLYCTL0013: Operation ("parallel-extension-add") failed - address: ([]) java.lang.RuntimeException: WFLYCTL0079: Failed initializing module org.jboss.as.logging at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:115) at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:982) at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:726) at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:450) at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1408) at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:495) at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:470) at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:432) at org.jboss.as.server.ServerService.boot(ServerService.java:427) at org.jboss.as.server.ServerService.boot(ServerService.java:386) at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:372) at java.lang.Thread.run(Thread.java:748) Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: WFLYLOG0078: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property "java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager" at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:107) ... 11 more Caused by: java.lang.IllegalStateException: WFLYLOG0078: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property "java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager" at org.jboss.as.logging.LoggingExtension.initialize(LoggingExtension.java:166) at org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:131) at org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:104) at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:144) at org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:127) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378) at java.lang.Thread.run(Thread.java:748) at org.jboss.threads.JBossThread.run(JBossThread.java:485)

Sep 20, 2019 8:36:32 PM org.jboss.as.server.ServerService$4 logExit FATAL: WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details. Disconnected from server

rbygrave commented 4 years ago

Caused by: java.lang.IllegalStateException: WFLYLOG0078: The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be used. To use JBoss Log Manager you must add the system property "java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager"

Have you done this ?

jalvaren commented 4 years ago

no, I havent. If the enhancement is disabled from the build menu it starts normally, but of course the enhancement is missing and the app deployments fails afterwards.

I think it shouldn't be necessary to manually change a configuration in the App server just to enable a plugin used in an IDE to create a deployable package.

rbygrave commented 4 years ago

Maybe but the goal is to diagnose what the failure is. There isn't anything in that stack for io.ebean ... so we don't know much about this issue yet.

On Tue, 24 Sep 2019 at 11:50, jalvaren notifications@github.com wrote:

no, I havent. If the enhancement is disabled from the build menu it starts normally, but of course the enhancement is missing and the app deployments fails afterwards.

I think it shouldn't be necessary to manually change a configuration in the App server just to enable a plugin used in an IDE to create a deployable package.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ebean-orm-tools/ebean-idea-enhancer/issues/3?email_source=notifications&email_token=AABTATK4HGPMWBKEC7QFFRLQLFI53A5CNFSM4IY4LMN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7MTJXA#issuecomment-534328540, or mute the thread https://github.com/notifications/unsubscribe-auth/AABTATLVNPPJ4AO5HRHTYNTQLFI53ANCNFSM4IY4LMNQ .

rbygrave commented 4 years ago

There is no change to the logging. Not clear what the issue is or change here.

@jalvaren ... do you have any more information? Have you turned on the logging to see if any error is logged etc?

Note that you can put the ebean-agent jar in a $HOME/.ebean directory ... turn off the enhancer and then turn it on ... and then the IntelliJ plugin will use the agent from that directory rather than the one that comes with the plugin.

You could use the above to perhaps narrow down the last version of the agent that works? (and hence maybe the change in the agent that wildfly isn't happy with).

Thanks, Rob.

jalvaren commented 4 years ago

the last version of the plugin that works is 11.39.1 then every build breaks the wildfly integration, so i suspect is related to the plugin now using -javaagent to run.

In the meantime, I have manually downgraded the plugin to keep working with ebean