当我突然在git中更改分支时,此错误突然出现,尝试添加和删除glassfish,对其进行清理,并且在我的耳朵中也有@stateless和ejb-jar.xml。
我不使用maven
注意:
1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or
message-driven bean.
2. EJB3 entity beans (@Entity) are POJOs and please package them as library jar.
3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven, @Singleton), please check server.log to see whether the annotations were processed properly.. Please see server.log for more details.
服务器日志:
在org.glassfish.ejb.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:147) 在org.glassfish.ejb.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:112) 在com.sun.enterprise.deployment.BundleDescriptor.visit(BundleDescriptor.java:625) 在org.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl.visit(EjbBundleDescriptorImpl.java:757) 在com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:121) 在com.sun.enterprise.deployment.BundleDescriptor.visit(BundleDescriptor.java:625) 在com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:703) 在com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:248) 在com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:232) 在org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:193) 在org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:227) 在org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96) 在com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:881) 在com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:821) 在com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:377) 在com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219) 在org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491) 在com.sun.enterprise.v3.admin.CommandRunnerImpl $ 2 $ 1.run(CommandRunnerImpl.java:539) 在com.sun.enterprise.v3.admin.CommandRunnerImpl $ 2 $ 1.run(CommandRunnerImpl.java:535) 在java.security.AccessController.doPrivileged(本机方法) 在javax.security.auth.Subject.doAs(Subject.java:360) 在com.sun.enterprise.v3.admin.CommandRunnerImpl $ 2.execute(CommandRunnerImpl.java:534) 在com.sun.enterprise.v3.admin.CommandRunnerImpl $ 3.run(CommandRunnerImpl.java:565) 在com.sun.enterprise.v3.admin.CommandRunnerImpl $ 3.run(CommandRunnerImpl.java:557) 在java.security.AccessController.doPrivileged(本机方法) 在javax.security.auth.Subject.doAs(Subject.java:360) 在com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556) 在com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464) 在com.sun.enterprise.v3.admin.CommandRunnerImpl.access $ 1300(CommandRunnerImpl.java:109) 在com.sun.enterprise.v3.admin.CommandRunnerImpl $ ExecutionContext.execute(CommandRunnerImpl.java:1846) 在com.sun.enterprise.v3.admin.CommandRunnerImpl $ ExecutionContext.execute(CommandRunnerImpl.java:1722) 在com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534) 在com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224) 在org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189) 在com.sun.enterprise.v3.services.impl.ContainerMapper $ HttpHandlerCallable.call(ContainerMapper.java:459) 在com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) 在org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206) 在org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180) 在org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) 在org.glassfish.grizzly.filterchain.ExecutorResolver $ 9.execute(ExecutorResolver.java:119) 在org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283) 在org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) 在org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132) 在org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111) 在org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) 在org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536) 在org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) 在org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access $ 100(WorkerThreadIOStrategy.java:56) 在org.glassfish.grizzly.strategies.WorkerThreadIOStrategy $ WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)中 在org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.doWork(AbstractThreadPool.java:591) 在org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.run(AbstractThreadPool.java:571) 在java.lang.Thread.run(Thread.java:748)
我的application.xml
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_7.xsd" id="Application_ID" version="7">
<display-name>AdrenaApp</display-name>
<module>
<ejb>AdrenaEJBMst.jar</ejb>
</module>
<module>
<web>
<web-uri>AdrenaWeb.war</web-uri>
<context-root>AdrenaWeb</context-root>
</web>
</module>
</application>