- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用gradle构建文件和Benjamin Muschko(https://github.com/bmuschko/gradle-cargo-plugin)的Gradle Cargo插件在远程JBoss 5.1.0.GA容器上部署war文件。
在一个非常简单的项目上启动cargoDeployRemote任务时,我遇到java.lang.ClassNotFoundException:org.jnp.interfaces.NamingContextFactory。
about Cargo deployment on a JBoss 5.1.0.GA using Maven plugin帖子帮助我设置了依赖项。
例如,缺少的类NamingContextFactory也在jboss-as-varia依赖项内定义。显然,我必须缺少一些东西。
该项目只是具有以下Gradle脚本的文件夹,仅此而已。
我必须补充一点,我从Linux虚拟机内部运行构建脚本,运行ArchLinux的virtualbox guest虚拟机运行,并且我想远程部署在主机上运行的JBoss 5.1.0.GA服务器上。我可以从访客通过网关地址(10.0.2.2)访问JBoss,所以我想这不是这里的问题。
我试图提供最简单的gradle构建文件来显示此问题。
关于如何进行这项工作的任何线索?任何帮助表示赞赏。
这是我的build.gradle文件:
apply plugin: 'war'
apply plugin: 'com.bmuschko.cargo'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.bmuschko:gradle-cargo-plugin:2.1.1'
}
}
repositories {
mavenCentral()
dependencies {
providedCompile 'org.jboss.jbossas:jboss-as-jbossas-remoting:5.1.0.GA'
providedCompile 'org.jboss.jbossas:jboss-as-client:5.1.0.GA'
providedCompile 'org.jboss.jbossas:jboss-as-varia:5.1.0.GA'
providedCompile 'org.jboss.integration:jboss-profileservice-spi:5.1.0.GA'
}
}
cargo {
containerId = 'jboss51x'
port = 8080
remote {
username = "admin"
password = "admin"
hostname = "10.0.2.2"
}
deployable {
context = 'myawesomewebapp'
}
}
Executing task ':cargoDeployRemote' (up-to-date check took 0.002 secs) due to: Task.upToDateWhen is false. Container ID = jboss51x Deployable artifacts = [/home/gerald/testapp/build/libs/testapp.war] Starting action 'deploy' for remote container 'JBoss 5.1.x' on 'http://10.0.2.2:8080' Container properties = [:] :cargoDeployRemote FAILED :cargoDeployRemote (Thread[Daemon worker Thread 14,5,main]) completed. Took 0.588 secs.
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':cargoDeployRemote'. org.codehaus.cargo.container.ContainerException: Failed to create deployer with implementation class org.codehaus.cargo.container.jboss.JBoss51xRemoteDeployer for the parameters (container [id = [jboss51x]], deployer type [remote]).
Caused by: org.codehaus.cargo.container.ContainerException: Failed to create deployer with implementation class org.codehaus.cargo.container.jboss.JBoss51xRemoteDeployer for the parameters (container [id = [jboss51x]], deployer type [remote]).
at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:156)
at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory.createImplementation(AbstractIntrospectionGenericHintFactory.java:93)
at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:140)
at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createDeployer(DefaultDeployerFactory.java:160)
at org.codehaus.cargo.ant.CargoTask.executeActions(CargoTask.java:758)
at org.codehaus.cargo.ant.CargoTask.execute(CargoTask.java:577)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
... 70 more
Caused by: java.lang.reflect.InvocationTargetException
at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createInstance(DefaultDeployerFactory.java:244)
at org.codehaus.cargo.generic.deployer.DefaultDeployerFactory.createInstance(DefaultDeployerFactory.java:42)
at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:150)
... 77 more
Caused by: org.codehaus.cargo.util.CargoException: Cannot locate the JBoss connector classes! Make sure the required JBoss JARs (or Maven dependencies) are in CARGO's classpath.
More information on: http://cargo.codehaus.org/JBoss+Remote+Deployer
at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:161)
at org.codehaus.cargo.container.jboss.JBoss51xRemoteDeployer.<init>(JBoss51xRemoteDeployer.java:41)
... 80 more
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1366)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068)
at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.<init>(JBoss5xRemoteDeployer.java:156)
... 81 more
最佳答案
我发现以下资源的答案:
apply plugin: 'ear'
apply plugin: 'com.bmuschko.cargo'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.bmuschko:gradle-cargo-plugin:2.2.1'
}
}
repositories {
//Order of repositories is significant and will effect finding of jaas module
maven {
name = "JBoss Deprecated Maven Repository"
url = "https://repository.jboss.org/nexus/content/repositories/deprecated"
}
maven {
url 'https://repository.jboss.org/nexus/content/groups/public/'
}
maven {
name = "JBoss.org third party releases repository"
url = "https://repository.jboss.org/nexus/content/repositories/thirdparty-releases"
}
mavenCentral()
jcenter()
}
dependencies {
// My app specific modules taken out from here
def cargoVersion = '1.4.5'
cargo "org.codehaus.cargo:cargo-core-uberjar:$cargoVersion",
"org.codehaus.cargo:cargo-ant:$cargoVersion"
cargo 'org.jboss.jbossas:jboss-as-jbossas-remoting:5.1.0.GA'
cargo 'org.jboss.jbossas:jboss-as-client:5.1.0.GA'
cargo 'org.jboss.jbossas:jboss-as-varia:5.1.0.GA'
cargo 'org.jboss.integration:jboss-profileservice-spi:5.1.0.GA'
}
cargo {
containerId = 'jboss51x'
port = 8009
remote {
hostname = project.hostname
username = project.username
password = project.password
}
}
关于gradle - Gradle + Cargo + JBoss 5.1 = java.lang.ClassNotFoundException:org.jnp.interfaces.NamingContextFactory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30572740/
我正在创建一个 java 企业应用程序,它使用 activemq 将消息发送到独立的队列代理。 我目前通过 jndi 查找保持对长期资源的访问,这种查找非常有效。我想通过 ActiveMQ 连接工厂和
这是我的代码: SpeakerRemote.java package test; import javax.ejb.Remote; @Remote public interface SpeakerRe
大家好,我在 Jboss-as-7.1.1 中遇到了一些问题。我正确部署但是当我从客户端发送请求时出现错误。我正在使用 Jboss-7.1.1,部署文件夹是 standalone/deployment
我正在尝试使用gradle构建文件和Benjamin Muschko(https://github.com/bmuschko/gradle-cargo-plugin)的Gradle Cargo插件在远
我正在尝试将我的应用程序从jboss 3.2迁移到wildfly..当我尝试部署我的ear文件时,我收到以下异常.. Can't get data source due to JNDI failure
我是一名优秀的程序员,十分优秀!