TLD扫描时,提供的资源ejb jar不存在

问题描述 投票:0回答:1

我在 Glassfish 7 中运行项目时遇到问题。

这是我的 POM 的一部分:

<dependencies>
.
.
.
<dependency>
            <groupId>com.mycompany</groupId>
            <artifactId>merocare-ejb</artifactId>
            <version>1.0-SNAPSHOT</version>
            <type>ejb</type>
        </dependency>
        <dependency>
            <groupId>com.mycompany</groupId>
            <artifactId>merocare-web</artifactId>
            <version>1.0-SNAPSHOT</version>
            <type>war</type>
        </dependency>
</dependencies>


<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <source>17</source>
                    <target>17</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <modules>
                        <webModule>
                            <groupId>com.mycompany</groupId>
                            <artifactId>merocare-web</artifactId>
                            <unpack>true</unpack>
                        </webModule>
                        <ejbModule>
                            <groupId>com.mycompany</groupId>
                            <artifactId>merocare-ejb</artifactId>
                            <unpack>true</unpack>
                        </ejbModule>
                    </modules>
                </configuration>
            </plugin>
        </plugins>
    </build>
    

每当我运行该应用程序时,它都会工作,但我会在日志文件中看到以下内容:

PWC6351: In TLD scanning, the supplied resource file:/home/asgar/glassfish7/glassfish/domains/domain1/generated/ejb/merocare-ear/com.mycompany-merocare-ejb-1.0-SNAPSHOT.jar does not exist
java.io.FileNotFoundException: /home/asgar/glassfish7/glassfish/domains/domain1/generated/ejb/merocare-ear/com.mycompany-merocare-ejb-1.0-SNAPSHOT.jar (Is a directory)
    at java.base/java.io.RandomAccessFile.open0(Native Method)
    at java.base/java.io.RandomAccessFile.open(RandomAccessFile.java:344)
    at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:259)
    at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:213)
    at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1476)
    at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1441)
    at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:718)
    at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:252)
    at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:181)
    at java.base/java.util.jar.JarFile.<init>(JarFile.java:346)
    at java.base/sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:103)
    at java.base/sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:72)
    at java.base/sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:168)
    at java.base/sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:131)
    at java.base/sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:92)
    at org.glassfish.wasp.runtime.TldScanner.scanJar(TldScanner.java:560)
    at org.glassfish.wasp.runtime.TldScanner.scanJars(TldScanner.java:458)
    at org.glassfish.wasp.runtime.TldScanner.scanTlds(TldScanner.java:269)
    at org.glassfish.wasp.runtime.TldScanner.onStartup(TldScanner.java:193)
    at org.apache.catalina.core.StandardContext.callServletContainerInitializers(StandardContext.java:4539)
    at com.sun.enterprise.web.WebModule.callServletContainerInitializers(WebModule.java:637)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4447)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:551)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:935)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:917)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:644)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1795)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1483)
    at com.sun.enterprise.web.WebApplication.start(WebApplication.java:88)
    at org.glassfish.internal.data.EngineRef.start(EngineRef.java:97)
    at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:262)
    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:353)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:535)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:259)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:459)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:570)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:566)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/javax.security.auth.Subject.doAs(Subject.java:376)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:565)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:596)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:588)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/javax.security.auth.Subject.doAs(Subject.java:376)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:587)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1478)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1847)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1723)
    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:535)
    at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:222)
    at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:150)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:425)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:144)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:174)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:153)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:196)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:88)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:246)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:178)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:118)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:96)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:51)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:510)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:82)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:83)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:101)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:535)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:515)
    at java.base/java.lang.Thread.run(Thread.java:840)
|#]

我正在使用 JSF4、Glassfish 7 和 JDK 17

deployment glassfish filenotfoundexception
1个回答
0
投票

嗨,我也有同样的警告。你找到解决办法了吗?

© www.soinside.com 2019 - 2024. All rights reserved.