我在Eclipse下开发了一个安装了JBoss工具的项目。当我将应用程序部署到Jboss服务器时,通过Maven提供给项目的一些helper jar文件不会复制到WEB-INF/lib文件夹中。因此,我在运行时得到一个ClassNotFound
异常。
编辑:pom.xml如下所示:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.whatever.simulators</groupId>
<artifactId>eebuildingsim</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>eebuildingsim Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<!-- begin JBoss -->
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>2.3.2.FINAL</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>jaxrs-api</artifactId>
<version>2.3.0.GA</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.1.2</version>
<scope>provided</scope>
</dependency>
<!-- end JBoss -->
<dependency>
<groupId>ro.mysite</groupId>
<artifactId>petrinetexec</artifactId>
<version>0.1.3.81</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.whatever.myAuxiliaryStuff</groupId>
<artifactId>myAuxiliaryStuff </artifactId>
<version>0.1.0.1305</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.0-m09</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.0-m09</version>
</dependency>
</dependencies>
<build>
<finalName>eebuildingsim</finalName>
</build>
工件MyAuxiliaryStuff
应该部署在WEB-INF/lib
下,jboss部署服务器下。
使用:
12:31:38,507 INFO [org.jboss.weld.deployer] (MSC service thread 1-5)
JBAS016002: Processing weld deployment mywar.war 12:31:38,522 ERROR
[org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed
to start service jboss.deployment.unit."mywar.war".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."mywar.war".POST_MODULE: Failed to process phase
POST_MODULE of deployment "mywar.war" at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119)
[jboss-as-server-7.1.1.Final.jar:7.1.1.Final] at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA] at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA] at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[rt.jar:1.7.0_05] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[rt.jar:1.7.0_05] at java.lang.Thread.run(Thread.java:722)
[rt.jar:1.7.0_05] Caused by: java.lang.NoSuchFieldError: FLOW at
com.sun.faces.flow.FlowDiscoveryCDIExtension.<clinit>(FlowDiscoveryCDIExtension.java:90)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) [rt.jar:1.7.0_05] at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[rt.jar:1.7.0_05] at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[rt.jar:1.7.0_05] at
java.lang.reflect.Constructor.newInstance(Constructor.java:525)
[rt.jar:1.7.0_05] at
org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.loadExtension(WeldPortableExtensionProcessor.java:117)
at
org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.loadAttachments(WeldPortableExtensionProcessor.java:100)
at
org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.deploy(WeldPortableExtensionProcessor.java:86)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)
[jboss-as-server-7.1.1.Final.jar:7.1.1.Final] ... 5 more
12:31:38,522 INFO [org.jboss.as.server] (DeploymentScanner-threads -
2) JBAS015870: Deploy of deployment "mywar.war" was rolled back with
failure message {"JBAS014671: Failed services" =>
{"jboss.deployment.unit.\"mywar.war\".POST_MODULE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.\"mywar.war\".POST_MODULE: Failed to process
phase POST_MODULE of deployment \"mywar.war\""}} 12:31:38,647 INFO
[org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877:
Stopped deployment mywar.war in 115ms 12:31:38,647 INFO
[org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774:
Service status report JBAS014775: New missing/unsatisfied
dependencies:
service jboss.naming.context.java.module.mywar.mywar (missing) dependents: [service
jboss.naming.context.java.module.mywar.mywar.ValidatorFactory, service
jboss.naming.context.java.module.mywar.mywar.Validator] JBAS014777:
Services which failed to start: service
jboss.deployment.unit."mywar.war".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."mywar.war".POST_MODULE: Failed to process phase
POST_MODULE of deployment "mywar.war"
12:31:38,647 ERROR [org.jboss.as.server.deployment.scanner]
(DeploymentScanner-threads - 1) {"JBAS014653: Composite operation
failed and was rolled back. Steps that failed:" => {"Operation step-2"
=> {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"mywar.war\".POST_MODULE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.\"mywar.war\".POST_MODULE: Failed to process
phase POST_MODULE of deployment \"mywar.war\""}}}}
Eclipse和插件有点挑剔。这就是我为让它发挥作用所做的。
Project -> Properties -> Deployment Assembly
Add...
Java Build Path Entries (Next >)
Maven Dependencies (Finish)
Deploy Properties面板现在应该包括一个source条目:Maven Dependecies->Deploy Path:web_inf/lib
问题内容: 通过不将数十个JAR依赖项包装到lib目录中,OSGi似乎具有一个小的可部署工件的巨大好处。但是,我找不到任何能告诉我一种简单,可靠的方式来将依赖项部署到容器的方法。例如,我有一个使用CXF和几个Spring子项目的应用程序。如果需要将此应用程序部署到新的Glassfish服务器上,那么最好的方法是确保安装所有依赖项? 我正在使用Maven, 似乎 可以使用某种方法来查看META-IN
是否有更好的方法使用Azure DevOps而不是不可变映像将web应用程序(托管在IIS windows上)部署到Azure Scaleset?我假设对于每次部署,如果管道需要创建映像,那么创建映像和部署将花费太多时间,尤其是在需要部署热修复程序的情况下。 如果部署组使用azure Scaleset,是否有人尝试过?
pom.xml我有这个用来部署 在设置中。tomcat服务器的xml我有这个 当我试图调用maven deploy时,出现了一个错误: 服务器正在运行。我试图在pom中更改tomcat插件。xml到tomcat7 maven插件,但我得到了相同的错误。据我所知,它正试图将war文件部署到http://localhost:8080/manager/ua/andrfas/SCPI/0.0.1/SCPI
我正在尝试使用Visual Studio代码将java web应用程序部署到Tomcat,我有一些问题想与大家分享。 在安装了Tomcat for Java扩展之后,我尝试部署了一个Maven Java Web项目。为此,我点击了项目的文件夹并选择了“在Tomcat服务器上运行”选项。结果是出现以下错误消息:< code >该文件夹不是在Tomcat服务器上运行的有效web应用程序。 然后,我意识
我有一个Java web应用程序,在我的jar文件中嵌入了Tomcat。我可以用Docker容器化应用程序,并用命令java-jar-myapp.jar运行它,但我不能在Heroku中运行那个容器。我尝试使用heroku CLI进行dockerize和部署,但heroku给了我一个“无法访问jarfile”的错误。 我试图通过使用heroku deploy:jar部署我的fat jar来解决这个问
我写了一个简单的Alexa skill。它使用“alexa app”作为依赖项。 当我保存并测试我的技能时,我得到以下响应 有没有可能使用这个“alexa-app”依赖项,而不将其烘焙成zip文件。为了使开发更快,我更喜欢在在线Lambda代码编辑器中使用一个文件。这有可能吗?