I can't get quarkus CDI to work when using a gradle composite build
Gradle 8
Quarkus 2.16.2.Final
Here is my super simple DI code.
First, the Bean I want to inject in the library:
//file: libraries/auth/src/main/kotlin/com/bean/example/auth/AuthTokenProvider.kt
package com.bean.example.auth
import javax.enterprise.context.ApplicationScoped
#ApplicationScoped
class AuthTokenProvider() {
val myToken = "so secure"
}
Second, the service I wish to inject the bean into:
//file: services/quarkus-service/src/main/kotlin/com/bean/example/AuthTokenConsumer.kt
package com.bean.example
import com.bean.example.auth.AuthTokenProvider
import javax.enterprise.context.ApplicationScoped
#ApplicationScoped
class AuthTokenConsumer(val tokenProvider: AuthTokenProvider) {
fun main(): String {
return tokenProvider.myToken
}
}
This will fail either when trying to run the app, or when trying to run the included test
//file: services/quarkus-service/src/test/kotlin/com/bean/example/AuthTokenConsumerTest.kt
package com.bean.example
import io.quarkus.test.junit.QuarkusTest
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import javax.inject.Inject
#QuarkusTest
class AuthTokenConsumerTest {
#Inject lateinit var consumer: AuthTokenConsumer
#Test
fun testFn () {
assertEquals("so secure", consumer.tokenProvider.myToken)
assertEquals("so secure", consumer.main())
}
}
The test fails with the following error:
> Task :services:quarkus-service:test
AuthTokenConsumerTest > testFn() FAILED
java.lang.RuntimeException at QuarkusTestExtension.java:625
Caused by: java.lang.RuntimeException at AugmentActionImpl.java:335
Caused by: io.quarkus.builder.BuildException at Execution.java:123
Caused by: javax.enterprise.inject.spi.DeploymentException at BeanDeployment.java:1223
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException at Beans.java:440
1 test completed, 1 failed
> Task :services:quarkus-service:test FAILED
FAILURE: Build failed with an exception.
Here's the stacktrace for the error:
java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type com.bean.example.auth.AuthTokenProvider and qualifiers [#Default]
- java member: com.bean.example.AuthTokenConsumer():tokenProvider
- declared on CLASS bean [types=[com.bean.example.AuthTokenConsumer, java.lang.Object], qualifiers=[#Default, #Any], target=com.bean.example.AuthTokenConsumer]
at io.quarkus.arc.processor.BeanDeployment.processErrors(BeanDeployment.java:1223)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:288)
at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:148)
at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:526)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at java.base/java.lang.Thread.run(Thread.java:1589)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type com.bean.example.auth.AuthTokenProvider and qualifiers [#Default]
- java member: com.bean.example.AuthTokenConsumer():tokenProvider
- declared on CLASS bean [types=[com.bean.example.AuthTokenConsumer, java.lang.Object], qualifiers=[#Default, #Any], target=com.bean.example.AuthTokenConsumer]
at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:440)
at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:539)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:276)
... 11 more
at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:625)
at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:696)
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.api.extension.InvocationInterceptor.interceptTestClassConstructor(InvocationInterceptor.java:73)
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:62)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestClassConstructor(ClassBasedTestDescriptor.java:363)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateTestClass(ClassBasedTestDescriptor.java:310)
at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateTestClass(ClassTestDescriptor.java:79)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:286)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$4(ClassBasedTestDescriptor.java:278)
at java.base/java.util.Optional.orElseGet(Optional.java:364)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$5(ClassBasedTestDescriptor.java:277)
at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:31)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:105)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:104)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:68)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$2(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:90)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:110)
at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:90)
at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:85)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:62)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
at jdk.proxy1/jdk.proxy1.$Proxy2.stop(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Caused by: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type com.bean.example.auth.AuthTokenProvider and qualifiers [#Default]
- java member: com.bean.example.AuthTokenConsumer():tokenProvider
- declared on CLASS bean [types=[com.bean.example.AuthTokenConsumer, java.lang.Object], qualifiers=[#Default, #Any], target=com.bean.example.AuthTokenConsumer]
at io.quarkus.arc.processor.BeanDeployment.processErrors(BeanDeployment.java:1223)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:288)
at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:148)
at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:526)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at java.base/java.lang.Thread.run(Thread.java:1589)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type com.bean.example.auth.AuthTokenProvider and qualifiers [#Default]
- java member: com.bean.example.AuthTokenConsumer():tokenProvider
- declared on CLASS bean [types=[com.bean.example.AuthTokenConsumer, java.lang.Object], qualifiers=[#Default, #Any], target=com.bean.example.AuthTokenConsumer]
at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:440)
at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:539)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:276)
... 11 more
at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:335)
at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:252)
at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:60)
at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:222)
at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:592)
at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:640)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$12(ClassBasedTestDescriptor.java:395)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:395)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:211)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:84)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148)
... 49 more
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type com.bean.example.auth.AuthTokenProvider and qualifiers [#Default]
- java member: com.bean.example.AuthTokenConsumer():tokenProvider
- declared on CLASS bean [types=[com.bean.example.AuthTokenConsumer, java.lang.Object], qualifiers=[#Default, #Any], target=com.bean.example.AuthTokenConsumer]
at io.quarkus.arc.processor.BeanDeployment.processErrors(BeanDeployment.java:1223)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:288)
at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:148)
at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:526)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at java.base/java.lang.Thread.run(Thread.java:1589)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type com.bean.example.auth.AuthTokenProvider and qualifiers [#Default]
- java member: com.bean.example.AuthTokenConsumer():tokenProvider
- declared on CLASS bean [types=[com.bean.example.AuthTokenConsumer, java.lang.Object], qualifiers=[#Default, #Any], target=com.bean.example.AuthTokenConsumer]
at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:440)
at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:539)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:276)
... 11 more
at io.quarkus.builder.Execution.run(Execution.java:123)
at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:160)
at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:331)
... 60 more
Caused by: javax.enterprise.inject.spi.DeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type com.bean.example.auth.AuthTokenProvider and qualifiers [#Default]
- java member: com.bean.example.AuthTokenConsumer():tokenProvider
- declared on CLASS bean [types=[com.bean.example.AuthTokenConsumer, java.lang.Object], qualifiers=[#Default, #Any], target=com.bean.example.AuthTokenConsumer]
at io.quarkus.arc.processor.BeanDeployment.processErrors(BeanDeployment.java:1223)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:288)
at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:148)
at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:526)
at java.base#19.0.1/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base#19.0.1/java.lang.reflect.Method.invoke(Method.java:578)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at java.base#19.0.1/java.lang.Thread.run(Thread.java:1589)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type com.bean.example.auth.AuthTokenProvider and qualifiers [#Default]
- java member: com.bean.example.AuthTokenConsumer():tokenProvider
- declared on CLASS bean [types=[com.bean.example.AuthTokenConsumer, java.lang.Object], qualifiers=[#Default, #Any], target=com.bean.example.AuthTokenConsumer]
at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:440)
at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:539)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:276)
... 11 more
I have included beans.xml under META-INF, as well as ran the Jandex plugin in the build, to no avail.
Here's the project structure:
Here are the build files:
library gradle.settings.kts:
pluginManagement {
repositories {
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories { mavenCentral() }
}
// == Define the inner structure of this component ==
rootProject.name = "libraries"
include(
"auth",
)
library build.gradle.kts:
plugins {
kotlin("jvm") version "1.7.22"
`java-library`
id("org.kordamp.gradle.jandex") version "1.1.0"
}
dependencies {
implementation("io.quarkus:quarkus-arc:2.16.2.Final")
}
group = "com.bean.example"
Service gradle.settings.kts
pluginManagement {
repositories {
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories { mavenCentral() }
}
includeBuild("../libraries")
// == Define the inner structure of this component ==
rootProject.name = "services"
include(
"quarkus-service",
)
Service build.gradle.kts
plugins {
kotlin("jvm") version "1.7.22"
id("io.quarkus") version "2.16.2.Final"
id("org.kordamp.gradle.jandex") version "1.1.0"
}
dependencies {
implementation(enforcedPlatform("io.quarkus.platform:quarkus-bom:2.16.2.Final"))
implementation("com.bean.example:auth")
implementation("io.quarkus:quarkus-core:2.16.2.Final")
implementation("io.quarkus:quarkus-arc:2.16.2.Final")
implementation("io.quarkus:quarkus-kotlin:2.16.2.Final")
implementation("io.quarkus:quarkus-resteasy-reactive-jackson:2.16.2.Final")
testImplementation("io.quarkus:quarkus-junit5:2.16.2.Final")
}
group = "com.bean.example"
version = "1.0"
tasks.compileTestKotlin {
dependsOn("jandex")
}
Minimal Reproduction Repo
https://github.com/jcjolley/quakus-cdi-failure-example
Any help you can provide would be greatly appreciated. I'm trying to migrate a large project off of buildSrc to this
I already have the generated code in my spring webflux project, but when a run, its throw me an exception that "openapi.yaml" file does not exists. I searched this file and he is in the resource folder of the generated project(generated by openapi). As you can see, HomeController get this file with the classpath:/openapi.yaml in the Resource attribute declaration.
I'm just making this question because this is an error of a generated class, and i dont know if this should happen or not.
The resource declaration
#Value("classpath:/openapi.yaml")
private Resource openapi;
HomeController class
package org.openapitools.configuration;
import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.core.io.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.util.StreamUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.ServerResponse;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.nio.charset.Charset;
import static org.springframework.web.reactive.function.server.RequestPredicates.GET;
import static org.springframework.web.reactive.function.server.RouterFunctions.route;
/**
* Home redirection to OpenAPI api documentation
*/
#Controller
public class HomeController {
private static YAMLMapper yamlMapper = new YAMLMapper();
#Value("classpath:/openapi.yaml")
private Resource openapi;
#Bean
public String openapiContent() throws IOException {
try(InputStream is = openapi.getInputStream()) {
return StreamUtils.copyToString(is, Charset.defaultCharset());
}
}
#GetMapping(value = "/openapi.yaml", produces = "application/vnd.oai.openapi")
#ResponseBody
public String openapiYaml() throws IOException {
return openapiContent();
}
#GetMapping(value = "/openapi.json", produces = "application/json")
#ResponseBody
public Object openapiJson() throws IOException {
return yamlMapper.readValue(openapiContent(), Object.class);
}
#Bean
RouterFunction<ServerResponse> index() {
return route(
GET("/"),
req -> ServerResponse.temporaryRedirect(URI.create("swagger-ui/index.html?url=../openapi.json")).build()
);
}
}
The error recivied.
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-10-16 00:23:12.728 ERROR 30601 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'openapiContent' defined in class path resource [org/openapitools/configuration/HomeController.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.String]: Factory method 'openapiContent' threw exception; nested exception is java.io.FileNotFoundException: class path resource [openapi.yaml] cannot be opened because it does not exist
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:655) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:483) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:62) ~[spring-boot-2.3.4.RELEASE.jar:2.3.4.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) ~[spring-boot-2.3.4.RELEASE.jar:2.3.4.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) ~[spring-boot-2.3.4.RELEASE.jar:2.3.4.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.3.4.RELEASE.jar:2.3.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.3.4.RELEASE.jar:2.3.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) ~[spring-boot-2.3.4.RELEASE.jar:2.3.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.3.4.RELEASE.jar:2.3.4.RELEASE]
at com.gabriel.forum.ForumApplication.main(ForumApplication.java:10) ~[main/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.String]: Factory method 'openapiContent' threw exception; nested exception is java.io.FileNotFoundException: class path resource [openapi.yaml] cannot be opened because it does not exist
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.String]: Factory method 'openapiContent' threw exception; nested exception is java.io.FileNotFoundException: class path resource [openapi.yaml] cannot be opened because it does not exist
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:650) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE]
... 20 common frames omitted
Caused by: java.io.FileNotFoundException: class path resource [openapi.yaml] cannot be opened because it does not exist
Caused by: java.io.FileNotFoundException: class path resource [openapi.yaml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180) ~[spring-core-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.openapitools.configuration.HomeController.openapiContent(HomeController.java:36) ~[main/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.9.RELEASE.jar:5.2.9.RELEASE]
... 21 common frames omitted
> Task :ForumApplication.main() FAILED
Execution failed for task ':ForumApplication.main()'.
> Process 'command '/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
The resource folder and the project structure.
I found a solution.
Just add a config option in your build.gralde or pom.xml "interfaceOnly": "true".
That configuration will generate only the interfaces and classes that you declared in the inputSpec file, and the HomeController will no longer exists to seek the openapi.yml file.
That solution is only for spring webflux projects.
Heres is the config options in gradle syntax:
configOptions = [
dateLibrary: "java8",
reactive: "true",
"interfaceOnly": "true"
]
Maven syntax:
<configOptions>
<reactive>true</reactive>
<java8>true</java8>
<interfaceOnly>true</interfaceOnly>
</configOptions>
I am beginner in Kotlin. I am getting the following exception while doing following:
kotlinc sample.kt -include-runtime -d sample.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError:
org/jetbrains/kotlin/preloading/Preloader : Unsupported major.minor
version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Code
fun main(args: Array<String>){
var a : Int
a = getLength("Hello")
println("length of word is $a")
}
fun getLength(word : Any) : Int? {
if (word !is String) return null
return word.length
}
And kotlin version is Kotlin version 1.2.21-release-88 (JRE 1.7.0_79-b15)
JDK version which was used to build sample.jar is built with java version newr than one which you're using to compile kotlin file.
You have 2 ways:
Rebuild sample jar with your current version of JDK
Update JDK on your computer and try compiling again
Install an updated JDK, Go to File > Project Structure. Select the newer JDK version.
Then you'll be ready to go.
I'm new to oozie and\ trying to install minioozie to test the workflows in oozie. I tried to follow the steps present in apache site http://oozie.apache.org/docs/3.3.1/ENG_MiniOozie.html
I did the following steps:
git clone git://github.com/apache/oozie.git
mvn clean install -DskipTests -DtestJarSimple -X
The above statement fails with compile errors.
Stack Trace:
[INFO] Compiling 5 source files to /Users/skreddy/oozie/sharelib/pig/target/test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[56,43] cannot find symbol
symbol: class ActionExecutorTestCase
public class TestPigActionExecutor extends ActionExecutorTestCase {
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[119,12] cannot find symbol
symbol : class Context
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[138,36] cannot find symbol
symbol : class Context
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[77,8] cannot find symbol
symbol : variable super
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[74,4] method does not override or implement a method from a supertype
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[82,8] cannot find symbol
symbol : variable super
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[83,8] cannot find symbol
symbol : method setSystemProperty(java.lang.String,java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[80,4] method does not override or implement a method from a supertype
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[91,8] cannot find symbol
symbol : method assertEquals(java.util.List<java.lang.Class>,java.util.List<java.lang.Class>)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[94,34] cannot find symbol
symbol : method getJobTrackerUri()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[95,32] cannot find symbol
symbol : method getNameNodeUri()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[102,54] cannot find symbol
symbol : method getTestUser()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[105,29] cannot find symbol
symbol : method createBaseWorkflow(org.apache.oozie.util.XConfiguration,java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[109,8] cannot find symbol
symbol : class Context
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[109,30] cannot find symbol
symbol : class Context
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[112,53] cannot find symbol
symbol : method getFsTestCaseDir()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[113,8] cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[114,8] cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[115,8] cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[116,8] cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[122,24] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[125,54] cannot find symbol
symbol : method getTestUser()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[128,55] cannot find symbol
symbol : method getFsTestCaseDir()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[128,8] cannot find symbol
symbol : variable SharelibUtils
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[130,29] cannot find symbol
symbol : method createBaseWorkflow(org.apache.oozie.util.XConfiguration,java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[135,19] cannot find symbol
symbol : class Context
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[143,28] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[144,26] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[149,8] cannot find symbol
symbol : method assertNotNull(java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[150,8] cannot find symbol
symbol : method assertNotNull(java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[151,8] cannot find symbol
symbol : method assertNotNull(java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[160,31] cannot find symbol
symbol : method getTestGroup()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[168,8] cannot find symbol
symbol : method assertNotNull(org.apache.hadoop.mapred.RunningJob)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[174,8] cannot find symbol
symbol : class Context
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[178,8] cannot find symbol
symbol : method assertTrue(boolean)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[180,8] cannot find symbol
symbol : method sleep(int)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[215,8] cannot find symbol
symbol : class Context
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[218,8] cannot find symbol
symbol : method assertTrue(boolean)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[221,30] cannot find symbol
symbol : method getTestUser()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[222,76] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[224,8] cannot find symbol
symbol : method assertTrue(boolean)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[231,8] cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[233,8] cannot find symbol
symbol : method assertNotNull(java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[237,8] cannot find symbol
symbol : method assertTrue(boolean)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[241,8] cannot find symbol
symbol : method assertTrue(boolean)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[245,8] cannot find symbol
symbol : method assertTrue(boolean)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[255,8] cannot find symbol
symbol : class Context
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[258,8] cannot find symbol
symbol : method assertTrue(boolean)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[265,8] cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[267,8] cannot find symbol
symbol : method assertNotNull(java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[268,8] cannot find symbol
symbol : method assertNotSame(java.lang.String,java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[270,8] cannot find symbol
symbol : method assertTrue(boolean)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[281,8] cannot find symbol
symbol : method setSystemProperty(java.lang.String,java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[285,8] cannot find symbol
symbol : class Context
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[288,8] cannot find symbol
symbol : method assertTrue(boolean)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[297,8] cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[298,8] cannot find symbol
symbol : method assertNull(java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[307,8] cannot find symbol
symbol : class Context
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[310,8] cannot find symbol
symbol : method assertTrue(boolean)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[313,30] cannot find symbol
symbol : method getTestUser()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[314,76] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[316,8] cannot find symbol
symbol : method assertFalse(boolean)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[323,8] cannot find symbol
symbol : method assertEquals(java.lang.String,java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[324,8] cannot find symbol
symbol : method assertNotNull(java.lang.String)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[328,32] cannot find symbol
symbol : class Predicate
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[334,8] cannot find symbol
symbol : method sleep(int)
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[357,24] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[359,31] cannot find symbol
symbol : method getAppPath()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[364,33] cannot find symbol
symbol : method getFsTestCaseDir()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[365,34] cannot find symbol
symbol : method getFsTestCaseDir()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[373,34] cannot find symbol
symbol : method getJobTrackerUri()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[374,32] cannot find symbol
symbol : method getNameNodeUri()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[385,24] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[387,31] cannot find symbol
symbol : method getFsTestCaseDir()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[388,50] cannot find symbol
symbol : method getTestCaseDir()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[390,26] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[393,31] cannot find symbol
symbol : method getAppPath()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[398,33] cannot find symbol
symbol : method getFsTestCaseDir()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[399,34] cannot find symbol
symbol : method getFsTestCaseDir()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[407,34] cannot find symbol
symbol : method getJobTrackerUri()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[408,32] cannot find symbol
symbol : method getNameNodeUri()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[424,29] cannot find symbol
symbol : method getFsTestCaseDir()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[427,40] cannot find symbol
symbol : method getAppPath()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[427,8] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[429,8] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[432,40] cannot find symbol
symbol : method getAppPath()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[432,8] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[434,8] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[437,40] cannot find symbol
symbol : method getAppPath()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[437,8] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[439,8] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[442,40] cannot find symbol
symbol : method getAppPath()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[442,8] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[444,8] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[447,40] cannot find symbol
symbol : method getAppPath()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[447,8] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[449,8] cannot find symbol
symbol : method getFileSystem()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[452,40] cannot find symbol
symbol : method getJobTrackerUri()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[453,38] cannot find symbol
symbol : method getNameNodeUri()
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[ERROR] /Users/skreddy/oozie/sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/TestPigActionExecutor.java:[469,8] cannot find symbol
symbol : class Context
location: class org.apache.oozie.action.hadoop.TestPigActionExecutor
[INFO] 100 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Oozie Main ................................. SUCCESS [1.150s]
[INFO] Apache Oozie Client ............................... SUCCESS [4.165s]
[INFO] Apache Oozie Hadoop 1.1.1.oozie-4.1.0-SNAPSHOT .... SUCCESS [0.233s]
[INFO] Apache Oozie Hadoop Distcp 1.1.1.oozie-4.1.0-SNAPSHOT SUCCESS [0.184s]
[INFO] Apache Oozie Hadoop 1.1.1.oozie-4.1.0-SNAPSHOT Test SUCCESS [0.283s]
[INFO] Apache Oozie Hadoop 2.2.0.oozie-4.1.0-SNAPSHOT .... SUCCESS [0.418s]
[INFO] Apache Oozie Hadoop 2.2.0.oozie-4.1.0-SNAPSHOT Test SUCCESS [0.336s]
[INFO] Apache Oozie Hadoop Distcp 2.2.0.oozie-4.1.0-SNAPSHOT SUCCESS [0.170s]
[INFO] Apache Oozie Hadoop 0.23.5.oozie-4.1.0-SNAPSHOT ... SUCCESS [0.340s]
[INFO] Apache Oozie Hadoop 0.23.5.oozie-4.1.0-SNAPSHOT Test SUCCESS [0.310s]
[INFO] Apache Oozie Hadoop Distcp 0.23.5.oozie-4.1.0-SNAPSHOT SUCCESS [0.181s]
[INFO] Apache Oozie Hadoop Libs .......................... SUCCESS [0.063s]
[INFO] Apache Oozie Hbase 0.94.2.oozie-4.1.0-SNAPSHOT .... SUCCESS [0.181s]
[INFO] Apache Oozie Hbase Libs ........................... SUCCESS [0.044s]
[INFO] Apache Oozie HCatalog 0.5.0.oozie-4.1.0-SNAPSHOT .. SUCCESS [0.308s]
[INFO] Apache Oozie HCatalog 0.6.0.oozie-4.1.0-SNAPSHOT .. SUCCESS [0.282s]
[INFO] Apache Oozie HCatalog Libs ........................ SUCCESS [0.069s]
[INFO] Apache Oozie Share Lib Oozie ...................... SUCCESS [1.256s]
[INFO] Apache Oozie Share Lib HCatalog ................... SUCCESS [0.553s]
[INFO] Apache Oozie Core ................................. SUCCESS [18.624s]
[INFO] Apache Oozie Docs ................................. SUCCESS [0.619s]
[INFO] Apache Oozie Share Lib Pig ........................ FAILURE [0.386s]
[INFO] Apache Oozie Share Lib Hive ....................... SKIPPED
[INFO] Apache Oozie Share Lib Sqoop ...................... SKIPPED
[INFO] Apache Oozie Share Lib Streaming .................. SKIPPED
[INFO] Apache Oozie Share Lib Distcp ..................... SKIPPED
[INFO] Apache Oozie WebApp ............................... SKIPPED
[INFO] Apache Oozie Examples ............................. SKIPPED
[INFO] Apache Oozie Share Lib ............................ SKIPPED
[INFO] Apache Oozie Tools ................................ SKIPPED
[INFO] Apache Oozie MiniOozie ............................ SKIPPED
[INFO] Apache Oozie Distro ............................... SKIPPED
The problem occurs with both oozie.4.0.0 and oozie.4.0.1
Apparently, the core test-jar (oozie-core-4.0.0-tests.jar) does not include all the needed classes. Adding a few classes in the core/pom.xml solved the problem:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
<configuration>
<includes>
<include>**/XFsTestCase.class</include>
<include>**/XTestCase.class</include>
<include>**/XTestCase$*.class</include>
<include>**/Mini*.class</include>
<include>**/MainTestCase.class</include>
<include>**/SharelibUtils.class</include>
<include>**/ActionExecutorTestCase.class</include>
<include>**/ActionExecutorTestCase$Context.class</include>
<include>**/MapperReducer*Test.class</include>
<include>**/LauncherMainTester.class</include>
<include>**/Test*ActionExecutor.class</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
It could be a bug in Maven with JDK7: http://jira.codehaus.org/browse/MCOMPILER-158 Try to increase your maven-compiler-plugin to 3.1
You can see in the pom.xml that they use version 2.3.2. They set the Java version to 1.6 but maybe it is not enough.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
</plugin>
I got a couple of .jar, say EasyEjbNode1.jar and EasyEjbNode2.jar. EasyEjbNode1.jar wants to invoke a session bean from EasyEjbNode2.jar, which has been, previously, succesfully deployed. Here is the code of the session bean, in EasyEjbNode1, who want to invoke the session bean from EasyEjbNode2:
`
import java.util.Properties;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import edu.pezzati.node2.RemoteNode2;
#Stateless
public class SessionNode1 implements RemoteNode1 {
#EJB(name="java:global/SessionNode2!edu.pezzati.node2.RemoteNode2")
RemoteNode2 rn2;
#Override
public String getNodeName() {
return "node1 ";
}
#Override
public String getRemoteNodeName() {
return "node1 "+rn2.getNodeName();
}
}
`
and here is the content of EasyEjbNode1.jar/META-INF/MANIFEST.MF:
Manifest-Version: 1.0
Dependencies: deployment.EasyEjbNode2.jar
Sadly, something goes wrong:
10:40:04,725 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."EasyEjbNode1.jar".INSTALL: org.jbos.msc.service.StartException in service jboss.deployment.unit."EasyEjbNode1.jar".INSTALL: Failed to process phase INSTALL of deployment "EasyEjbNode1.jar"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_26]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_26]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_26]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:
JBAS014544: No EJB found with interface of type 'edu.pezzati.node2.RemoteNode2' for binding java:global/EasyEjbNode2/SessionNode2!edu.pezzati.node2.RemoteNode2
at org.jboss.as.ejb3.deployment.processors.EjbInjectionSource.getResourceValue(EjbInjectionSource.java:88)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.addJndiBinding(ModuleJndiBindingProcessor.java:249)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor$1.handle(ModuleJndiBindingProcessor.java:194)
at org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:54)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.processClassConfigurations(ModuleJndiBindingProcessor.java:162)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:155)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
TIA.
I managed by myself. The problem was just a stupid mistake. Replace
#EJB(name="java:global/SessionNode2!edu.pezzati.node2.RemoteNode2")
with
#EJB(lookup="java:global/SessionNode2!edu.pezzati.node2.RemoteNode2")
this works for me. I can succesfully invoke SessionNode2's services from SessionNode1, which is placed in a different jar.