首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >快速入门:ejb-remote-client:线程"main“中出现异常java.lang.NoClassDefFoundError: org/jboss/logging/Logger

快速入门:ejb-remote-client:线程"main“中出现异常java.lang.NoClassDefFoundError: org/jboss/logging/Logger
EN

Stack Overflow用户
提问于 2017-03-04 15:56:54
回答 1查看 156关注 0票数 0

我想部署ejb-remote的quickstart的项目在wildfly上运行,服务器端的hash run correctlly.Althougn客户端可以编译,执行"mvn exec:exec“命令时不能成功,任何人都可以帮助我please.sorry我不能上传图片

代码语言:javascript
复制
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

--> ">http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0

代码语言:javascript
复制
<parent>
    <groupId>org.wildfly.quickstarts</groupId>
    <artifactId>ejb-remote</artifactId>
    <version>11.0.0-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
</parent>
<artifactId>ejb-remote-client</artifactId>
<packaging>jar</packaging>
<name>${qs.name.prefix} ejb-remote - client</name>
<description>This project demonstrates how to access an EJB from a remote client; this is the client POM file</description>

<dependencies>

    <!-- Include the ejb client jars -->
    <dependency>
        <groupId>org.wildfly</groupId>
        <artifactId>wildfly-ejb-client-bom</artifactId>
        <version>10.0.0.Final</version>
        <type>pom</type>
        <scope>compile</scope>
    </dependency>

    <!-- We depend on the EJB remote business interfaces of this application -->
    <dependency>
        <groupId>org.wildfly.quickstarts</groupId>
        <artifactId>ejb-remote-server-side</artifactId>
        <version>${project.version}</version>
        <type>ejb-client</type>
    </dependency>

    <!-- TODO remove-->
    <dependency>
        <groupId>org.jboss.modules</groupId>
        <artifactId>jboss-modules</artifactId>
    </dependency>

    <!-- https://mvnrepository.com/artifact/jboss/jboss-common-client -->
</dependencies>

<build>
    <plugins>

        <!-- Add the maven exec plug-in to allow us to run a java program
            via maven -->
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>${version.exec.plugin}</version>

            <executions>
                <execution>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                </execution>
            </executions>

            <configuration>
                <executable>java</executable>
                <workingDirectory>${project.build.directory}/exec-working-directory</workingDirectory>
                <arguments>
                    <argument>-classpath</argument>
                    <classpath></classpath>
                    <argument>org.jboss.as.quickstarts.ejb.remote.client.RemoteEJBClient</argument>
                </arguments>
                <!--<detail>true</detail>-->
            </configuration>

        </plugin>
        <!-- build standalone exe jar -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
                <archive>
                    <manifest>
                        <mainClass>org.jboss.as.quickstarts.ejb.remote.client.RemoteEJBClient</mainClass>
                    </manifest>
                </archive>
            </configuration>
        </plugin>
    </plugins>

</build>

EN

回答 1

Stack Overflow用户

发布于 2017-03-14 22:08:30

不知道这个pom.xml的意图是什么,但它现在看起来已经坏了。

快速解决方案:

1)添加对jboss-logging的依赖:

代码语言:javascript
复制
<dependency>
    <groupId>org.jboss.logging</groupId>
    <artifactId>jboss-logging</artifactId>
    <scope>compile</scope>
</dependency>

2)修改jboss-modules依赖的作用域进行编译:

代码语言:javascript
复制
<dependency>
    <groupId>org.jboss.modules</groupId>
    <artifactId>jboss-modules</artifactId>
    <scope>compile</scope>
</dependency>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42593637

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档