从Eclipse插件或嵌入式Maven插件启动Glassfish时,我一直在间歇性地面对异常。
我确实知道它必须与我的项目有关,但不幸的是我找不到太多,除了清理项目和目标文件夹并再试一次(甚至不能解决问题)。
启动目标:
clean install embedded-glassfish:run
Maven插件配置:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
<debug>true</debug>
<verbose>true</verbose>
<fork>true</fork>
<maxmem>1024</maxmem>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.glassfish.embedded</groupId>
<artifactId>maven-embedded-glassfish-plugin</artifactId>
<version>3.1.2.2</version>
<configuration>
<goalPrefix>embedded-glassfish</goalPrefix>
<app>target/${project.build.finalName}.war</app>
<name>project</name>
<precompileJsp>true</precompileJsp>
<port>8080</port>
<autoCreate>true</autoCreate>
<debug>true</debug>
<echo>false</echo>
<contextRoot>project</contextRoot>
<autoDelete>true</autoDelete>
</configuration>
<dependencies>
<dependency>
<groupId>org.glassfish.main.common</groupId>
<artifactId>simple-glassfish-api</artifactId>
<version>4.0</version>
</dependency>
<dependency>
<groupId>org.glassfish.main.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>4.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
间歇性例外:
org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-001408 Unsatisfied dependencies for type [IterableProvider<InjectionResolver<Object>>] with qualifiers [@Default] at injection point [[BackedAnnotatedParameter] Parameter 2 of [BackedAnnotatedConstructor] @Inject org.glassfish.jersey.internal.inject.JerseyClassAnalyzer(@Named ClassAnalyzer, IterableProvider<InjectionResolver<Object>>)]
有没有人知道发生了什么?
谢谢!