WELD-001318 Не удается разрешить неоднозначную зависимость между. , , в GlassFish 4

1

Я потерял в основном все утро, пытаясь понять, что не так с моей заявкой, не успев.

Я нашел здесь похожие вопросы, но я не смог найти ответ на мою проблему.

сначала здесь Список ошибок GlassFish 4 ist показывает wenn Я запускаю свое приложение:

SEVERE: критическая ошибка во время развертывания: org.jboss.weld.exceptions.AmbiguousResolutionException: WELD-001318 Не удается разрешить двусмысленную зависимость между [Managed Bean [класс com.sun.faces.flow.FlowDiscoveryCDIHelper] с квалификаторами [@Default @Named @Any ], Managed Bean [класс com.sun.faces.flow.FlowDiscoveryCDIHelper] с квалификаторами [@Default @Named @Any]] на org.jboss.weld.manager.BeanManagerImpl.resolve(BeanManagerImpl.java:1130) на org.jboss.weld.el.AbstractWeldELResolver.lookup(AbstractWeldELResolver.java:107) в org.jboss.weld.el.AbstractWeldELResolver.getValue(AbstractWeldELResolver.java:96) в javax.el.CompositeELResolver.getValue(CompositeELResolver.java:188) в com.sun.faces.el.DemuxCompositeELResolver._getValue (DemuxCompositeELResolver.java:176) в com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) в com.sun.el.parser.AstIdentifier.getValue( AstIdentifier.java:116) в com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226) at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50) в com.sun.faces.application.ApplicationAssociate $ PostConstructApplicationListener.loadFlows(ApplicationAssociate.java:324) в com.sun.faces.application.ApplicationAssociate $ PostConstructApplicationListener.processEvent(ApplicationAssociate.java:300) в javax.faces.event.SystemEvent.processListener(SystemEvent.java:108) в com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187) в com. sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163) в com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:296) в javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java: 739) в com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:680) в com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:253) в org.apache.catalina.core.StandardContext.contextListenerStart(Standar dContext.java:5362) в com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:743) в org.apache.catalina.core.StandardContext.start(StandardContext.java:5898) на com.sun.enterprise.web.WebModule.start(WebModule.java:691) на org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041) на org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024 ) на org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747) на com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2291) на com.sun.enterprise.web.WebContainer. loadWebModule (WebContainer.java:1937) на com.sun.enterprise.web.WebApplication.start(WebApplication.java:139) в org.glassfish.internal.data.EngineRef.start(EngineRef.java:122) на org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291) в org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352) в com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java: 497) на 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:527) в com.sun.enterprise.v3.admin.CommandRunnerImpl $ 2 $ 1.run(CommandRunnerImpl.java:523) в java.security.AccessController.doPrivileged (собственный метод) в javax.security.auth.Subject.doAs(Subject.java:356) в com.sun.enterprise.v3.admin.CommandRunnerImpl $ 2.execute(CommandRunnerImpl.java:522) в com.sun.enterprise.v3.admin.CommandRunnerImpl. doCommand (CommandRunnerImpl.java:546) в com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423) в com.sun.enterprise.v3.admin.CommandRunnerImpl.access $ 1500 (CommandRunnerImpl.java:108 ) в com.sun.enterprise.v3.admin.CommandRunnerImpl $ ExecutionContext.execute(CommandRunnerImpl.java:1761) в com.sun.enterprise.v3.admin.CommandRunnerImpl $ ExecutionContext.execute(CommandRunnerI mpl.java:1674) в 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.StaticHttpHandler.service(StaticHttpHandler.java:297) на com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246) на org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191) в org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168) в org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java: 189) at org.glassfish.grizzly.filterchain.ExecutorResolver $ 9.execute(ExecutorResolver.java:119) в org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) в org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206) в org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) в o rg.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114) в org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) в org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent( TCPNIOTransport.java:838) в org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) в org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0 (WorkerThreadIOStrategy.java:115) в org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access $ 100 (WorkerThreadIOStrategy.java:55) в org.glassfish.grizzly.strategies.WorkerThreadIOStrategy $ WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) в org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.doWork (рабочий текст) AbstractThreadPool.java:564) at org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.run(AbstractThreadPool.java:544) в java.lang.Thread.run(Thread.java:722) SEVERE: запуск контекста /filmplex7 не выполнен из-за предыдущих ошибок. SEVERE: Исключение во время очистка после запуска не удалась

Проблема в том, что у меня нет в моем приложении никакого класса com.sun.faces.flow.FlowDiscoveryCDIHelper вообще.

Я не знаю, помогает ли это, но это файл pom:

<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.glassfish</groupId>
<artifactId>movieplex7</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>

<name>movieplex7</name>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<repositories>
    <repository>
        <id>java.net</id>
        <url>https://maven.java.net/content/groups/promoted/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>javax.inject</groupId>
        <artifactId>javax.inject</artifactId>
        <version>1</version>
        <type>jar</type>
    </dependency>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>7.0-b80</version>
        <type>jar</type>
    </dependency>
    <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-common</artifactId>
        <version>2.0-m13-2</version>
        <scope>provided</scope>
    </dependency>        
    <dependency>
        <groupId>javax.batch</groupId>
        <artifactId>javax.batch-api-all</artifactId>
        <version>1.0-b10</version>        
        <scope>provided</scope>
    </dependency>

</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.1.1</version>
            <configuration>
                <failOnMissingWebXml>false</failOnMissingWebXml>
            </configuration>
        </plugin>
    </plugins>
</build>

Спасибо за любой совет

Теги:
maven
glassfish

1 ответ

0

Вы можете попробовать установить зависимость Java EE API от предоставленной области:

<dependency>
    <groupId>javax</groupId>
    <artifactId>javaee-api</artifactId>
    <version>7.0-b80</version>
    <type>jar</type>
    <scope>provided</scope>
</dependency>

.jar - тип по умолчанию. Поместите его в файл pom.xml только для других типов, таких как pom, war и т.д.

Ещё вопросы

Сообщество Overcoder
Наверх
Меню