Java ee / WildFly - вызов компонента из веб-модуля - PullRequest
0 голосов
/ 28 января 2020

Я пытаюсь вызвать Bean-компонент из сервлета в модуле EJB (который я назвал «Core») с аннотацией

@EJB
private DoSomethingLocal doSomething;

, но у меня появляется такой результат, когда я пытаюсь развернуть EAR

22:44:08,502 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0003: Processing weld deployment FeNiX-EAR-1.0-SNAPSHOT.ear
22:44:08,542 INFO  [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0003: Processing weld deployment FeNiX-WebApp-1.0-SNAPSHOT.war
22:44:08,543 INFO  [org.jboss.weld.deployer] (MSC service thread 1-7) WFLYWELD0003: Processing weld deployment FeNiX-Core-1.0-SNAPSHOT.jar
22:44:08,546 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-7) WFLYEJB0473: JNDI bindings for session bean named 'TestBean' in deployment unit 'subdeployment "FeNiX-Core-1.0-SNAPSHOT.jar" of deployment "FeNiX-EAR-1.0-SNAPSHOT.ear"' are as follows:

    java:global/FeNiX-EAR-1.0-SNAPSHOT/FeNiX-Core-1.0-SNAPSHOT/TestBean!fnx_core.entities.TestBean
    java:app/FeNiX-Core-1.0-SNAPSHOT/TestBean!fnx_core.entities.TestBean
    java:module/TestBean!fnx_core.entities.TestBean
    ejb:FeNiX-EAR-1.0-SNAPSHOT/FeNiX-Core-1.0-SNAPSHOT/TestBean!fnx_core.entities.TestBean
    java:global/FeNiX-EAR-1.0-SNAPSHOT/FeNiX-Core-1.0-SNAPSHOT/TestBean
    java:app/FeNiX-Core-1.0-SNAPSHOT/TestBean
    java:module/TestBean

22:44:08,546 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-7) WFLYEJB0473: JNDI bindings for session bean named 'doSomething' in deployment unit 'subdeployment "FeNiX-Core-1.0-SNAPSHOT.jar" of deployment "FeNiX-EAR-1.0-SNAPSHOT.ear"' are as follows:

    java:global/FeNiX-EAR-1.0-SNAPSHOT/FeNiX-Core-1.0-SNAPSHOT/doSomething!fnx_core.entities.DoSomethingLocal
    java:app/FeNiX-Core-1.0-SNAPSHOT/doSomething!fnx_core.entities.DoSomethingLocal
    java:module/doSomething!fnx_core.entities.DoSomethingLocal
    ejb:FeNiX-EAR-1.0-SNAPSHOT/FeNiX-Core-1.0-SNAPSHOT/doSomething!fnx_core.entities.DoSomethingLocal
    java:global/FeNiX-EAR-1.0-SNAPSHOT/FeNiX-Core-1.0-SNAPSHOT/doSomething
    java:app/FeNiX-Core-1.0-SNAPSHOT/doSomething
    java:module/doSomething

22:44:08,603 WARN  [org.jboss.as.ejb3] (MSC service thread 1-3) WFLYEJB0131: EJB fnx_core.entities.doSomething should not have a final or static method (t)
22:44:08,774 INFO  [io.smallrye.metrics] (MSC service thread 1-2) MicroProfile: Metrics activated
22:44:08,971 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 129) WFLYUT0021: Registered web context: '/' for server 'default-server'
22:44:09,396 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0016: Replaced deployment "FeNiX-EAR-1.0-SNAPSHOT.ear" with deployment "FeNiX-EAR-1.0-SNAPSHOT.ear"
22:44:09,396 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."FeNiX-WebApp-1.0-SNAPSHOT.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "FeNiX-WebApp-1.0-SNAPSHOT.war"

Что я должен сделать, чтобы это работало?

1 Ответ

0 голосов
/ 29 января 2020

Журналы что-то говорят, ошибка говорит дерьмо, так что похоже, что у вас есть опечатка, я ваш код. Так почисти и собери все части УША

...