获取服务器日志错误-更早
return myEmployeeArray.map(employee => {
const {earn } = employee
earn.map(field => field.abbreviation)
myDesiredObject = { fieldA: employee.abbreviation....fieldE:field.abbreviation}
}
更改后更新
您会遇到kubectl get no
,这是该应用程序正常运行并需要正确部署的另一个软件包。
13:31:25,905 INFO [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011401: Read persistence.xml for testJpaUnit
13:31:27,731 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "test.war")]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"test.war#testJpaUnit\".__FIRST_PHASE__ is missing [jboss.naming.context.java.testDataSource]"]}
我试图从4.2-> 4.3更改休眠的entitymanager jar,并搜索了stackoverflow类似的答案和jboss文档。但没有帮助。
deployment.internal.ear
-更新
11:30:08,028 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:/testDataSource]
11:30:31,216 INFO [org.jboss.as.jpa] (MSC service thread 1-6) JBAS011401: Read persistence.xml for testJpaUnit
11:30:33,921 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 50) JBAS011409: Starting Persistence Unit (phase 1 of 2) Service 'test.war#testJpaUnit'
11:30:33,966 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 50) HHH000204: Processing PersistenceUnitInfo [
name: testJpaUnit
...]
11:30:34,313 INFO [org.hibernate.Version] (ServerService Thread Pool -- 50) HHH000412: Hibernate Core {4.3.7.Final}
11:30:34,314 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 50) HHH000206: hibernate.properties not found
11:30:34,318 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 50) HHH000021: Bytecode provider name : javassist
11:30:54,858 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."test.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."test.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "test.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_144]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_144]
Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.service.ServiceBeanImpl with ClassLoader ModuleClassLoader for Module "deployment.internal.ear:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
... 5 more
Caused by: java.lang.NoClassDefFoundError: org/hibernate/StatelessSession
at java.lang.Class.getDeclaredMethods0(Native Method) [rt.jar:1.8.0_144]
at java.lang.Class.privateGetDeclaredMethods(Unknown Source) [rt.jar:1.8.0_144]
at java.lang.Class.getDeclaredMethods(Unknown Source) [rt.jar:1.8.0_144]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:65) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
... 10 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.StatelessSession from [Module "deployment.internal.ear:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
... 15 more
11:30:54,904 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "test.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"test.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"test.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"test.war\"
Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.service.ServiceBeanImpl with ClassLoader ModuleClassLoader for Module \"deployment.internal.ear:main\" from Service Module Loader
Caused by: java.lang.NoClassDefFoundError: org/hibernate/StatelessSession
Caused by: java.lang.ClassNotFoundException: org.hibernate.StatelessSession from [Module \"deployment.internal.ear:main\" from Service Module Loader]"}}
11:30:55,022 INFO [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "test.war" (runtime-name : "test.war")
11:30:55,022 INFO [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "internal.ear" (runtime-name : "internal.ear")
11:30:55,027 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."test.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."test.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "test.war"
11:30:55,239 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
11:30:55,239 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
11:30:55,239 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: WildFly 8.2.0.Final "Tweek" started (with errors) in 609354ms - Started 237 of 294 services (1 services failed or missing dependencies, 92 services are lazy, passive or on-demand)
11:30:56,582 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 2) JBAS011410: Stopping Persistence Unit (phase 1 of 2) Service 'test.war#testJpaUnit'
11:31:03,510 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment test.war (runtime-name: test.war) in 6930ms
11:31:03,715 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018558: Undeployed "test.war" (runtime-name: "test.war")
11:31:03,716 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."test.war".POST_MODULE
请帮助我将Web应用程序部署到wildfly服务器。
更新
persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<!-- A JPA Persistence Unit -->
<persistence-unit name="testJpaUnit">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<non-jta-data-source>java:/testDataSource</non-jta-data-source>
<!-- JPA entities must be registered here -->
<class>com.test.DemoClass</class>
<class>com.test.DummyClass</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<property name="hibernate.hbm2ddl.auto" value="none"/>
<property name="hibernate.show_sql" value="false" />
</properties>
</persistence-unit>
</persistence>
PS 我没有共享不相关的日志,并且由于IP而更改了某些类的名称。像changes to standalone.xml
答案 0 :(得分:0)
根据您从standalone.xml
共享的数据库配置,您的Wildfly服务器上没有创建名为testDataSource
的数据源。在您的wildfly服务器上创建名称为testDataSource
的非jta数据源。创建数据源后,您将能够部署应用程序。
答案 1 :(得分:0)
我使用了Ant + ivy构建方法来解决此问题。 Wildlfly造成的战争中存在目录结构问题。请遵循上面的评论以进一步了解此问题和解决方案阶段。
此外,如果您想在eclipse中为蚂蚁设置自动构建,请按照上面给定的链接进行操作。
谢谢阿披耶。