You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by hwaastad <he...@waastad.org> on 2014/08/18 09:33:09 UTC
ApplicationComposer and Deltaspike 1.0
Hi,
I'm trying to get a test going using ApplicationComposer.
However it fails with this:
SEVERE - CDI Beans module deployment failed
java.lang.IllegalStateException: Could not find beans for Type=class
org.apache.deltaspike.core.impl.scope.window.WindowBeanHolder and
qualifiers:[]
any clues?
It's a pretty simple project testing configproperty.
In standard embedded test it's working OK.
br hw
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-and-Deltaspike-1-0-tp4671240.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: ApplicationComposer and Deltaspike 1.0
Posted by Mark Struberg <st...@yahoo.de>.
Hi Astah!
I’m pretty good at DeltaSpike so to say, but I somehow lost the context.
You are talking about an error in tomee but your log clearly shows you are working with WebSphere?
> com.ibm.ws.container.service.state.StateChangeException:
Maybe you mixed up the paste?
Do you mind to explain me your current problem and I might be able to help (regardless of TomEE or WAS).
LieGrue,
strub
> Am 02.03.2015 um 08:06 schrieb astha <ga...@gmail.com>:
>
> Hi hwaastad
> I am also facing the same error in my code.Can you please help me how you
> solve this problem.
>
> I made two maven project.
> 1)Config project->build a jar
> 2)Appg project->add the jar file of Config project as maven dependency in
> this project & deploy the war of Appg project on Weblogic Server
>
> I made 2 custom annotation(Config & ConfigInfo) and has configuration
> factory class(which has method @produces getConfiguration(InjectionPoint p))
> for getting configuration property from the properties file.I am injecting
> this annotation in my second project Appg(in my @stateless class).
> @Inject
> @Config
> @ConfigInfo(file = "configuration.properties", name = "username")
> public String username;
>
> But When I run this on server I got this error->
> ERROR ] Api type [java.lang.String] is not found with the qualifiers
> Qualifiers: [@com.appg.config.properties.Config()]
> for injection into Field Injection Point, field name : responseFile, Bean
> Owner : [MockNotifClient, Name:null, WebBeans Type:MANAGED, API
> Types:[com.appg.client.GClient,com.appg.client.HClient,com.appg.client.MockNotifClient,java.lang.Object],
> Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]]
>
> [ERROR ] CWWKZ0002E: An exception occurred while starting the application
> . The exception message was:
> com.ibm.ws.container.service.state.StateChangeException:
> javax.enterprise.inject.UnsatisfiedResolutionException: Api type
> [java.lang.String] is not found with the qualifiers
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-and-Deltaspike-1-0-tp4671240p4673920.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
Re: ApplicationComposer and Deltaspike 1.0
Posted by astha <ga...@gmail.com>.
Hi hwaastad
I am also facing the same error in my code.Can you please help me how you
solve this problem.
I made two maven project.
1)Config project->build a jar
2)Appg project->add the jar file of Config project as maven dependency in
this project & deploy the war of Appg project on Weblogic Server
I made 2 custom annotation(Config & ConfigInfo) and has configuration
factory class(which has method @produces getConfiguration(InjectionPoint p))
for getting configuration property from the properties file.I am injecting
this annotation in my second project Appg(in my @stateless class).
@Inject
@Config
@ConfigInfo(file = "configuration.properties", name = "username")
public String username;
But When I run this on server I got this error->
ERROR ] Api type [java.lang.String] is not found with the qualifiers
Qualifiers: [@com.appg.config.properties.Config()]
for injection into Field Injection Point, field name : responseFile, Bean
Owner : [MockNotifClient, Name:null, WebBeans Type:MANAGED, API
Types:[com.appg.client.GClient,com.appg.client.HClient,com.appg.client.MockNotifClient,java.lang.Object],
Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]]
[ERROR ] CWWKZ0002E: An exception occurred while starting the application
. The exception message was:
com.ibm.ws.container.service.state.StateChangeException:
javax.enterprise.inject.UnsatisfiedResolutionException: Api type
[java.lang.String] is not found with the qualifiers
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-and-Deltaspike-1-0-tp4671240p4673920.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: ApplicationComposer and Deltaspike 1.0
Posted by Romain Manni-Bucau <rm...@gmail.com>.
http://svn.apache.org/repos/asf/tomee/tomee/trunk/container/openejb-core/src/test/java/org/apache/openejb/testing/AppComposerJarsTest.java
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2014-08-18 22:34 GMT+02:00 hwaastad <he...@waastad.org>:
> +1 for @Jars :-)
>
> I'll happily help testing :-)
>
> br hw
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-and-Deltaspike-1-0-tp4671240p4671269.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
Re: ApplicationComposer and Deltaspike 1.0
Posted by hwaastad <he...@waastad.org>.
+1 for @Jars :-)
I'll happily help testing :-)
br hw
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-and-Deltaspike-1-0-tp4671240p4671269.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: ApplicationComposer and Deltaspike 1.0
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Well I don't use Maven resolver with AppComposer but
JarLocation.jarLocation(AClassFromTheJar.class) which gives you the
jar path and you can add it in AppModule as jars. We can think to add
@Jars as we added @Classes
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2014-08-18 22:00 GMT+02:00 hwaastad <he...@waastad.org>:
> Hmm,
> have you got any example on using a resolver for app composer?
>
> I might take back my comments on arquillian.
>
> I just added omnifaces (or any other cdi enabled library) and the search for
> classes starts again......phew!
>
> br hw
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-and-Deltaspike-1-0-tp4671240p4671267.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
Re: ApplicationComposer and Deltaspike 1.0
Posted by hwaastad <he...@waastad.org>.
Hmm,
have you got any example on using a resolver for app composer?
I might take back my comments on arquillian.
I just added omnifaces (or any other cdi enabled library) and the search for
classes starts again......phew!
br hw
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-and-Deltaspike-1-0-tp4671240p4671267.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: ApplicationComposer and Deltaspike 1.0
Posted by Romain Manni-Bucau <rm...@gmail.com>.
well you can do the same (adding jar to be scanned) but:
1) you loose part of interest of AppComposer
2) it uses internal and we don't guarantee any stability on it
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2014-08-18 21:39 GMT+02:00 hwaastad <he...@waastad.org>:
> That's it.
> Thanks a lot!!
>
> I'm trying to keep away from arquillian as much as I can :-)
>
> Yeah, I checked:
> File[] libs =
> Maven.resolver().loadPomFromFile("pom.xml").resolve("org.apache.deltaspike.core:deltaspike-core-impl:1.0.1").withoutTransitivity().as(File.class);
>
> And its working fine.
>
> No, right now Im trying to keep my rest testing using ApplicationComposer
> and embedded openejb (JUNIT container rules etc) for my strict ejb's. Adding
> Arquillian to the mix just frustrates my fellow programmers :-)
>
> br hw
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-and-Deltaspike-1-0-tp4671240p4671265.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
Re: ApplicationComposer and Deltaspike 1.0
Posted by hwaastad <he...@waastad.org>.
That's it.
Thanks a lot!!
I'm trying to keep away from arquillian as much as I can :-)
Yeah, I checked:
File[] libs =
Maven.resolver().loadPomFromFile("pom.xml").resolve("org.apache.deltaspike.core:deltaspike-core-impl:1.0.1").withoutTransitivity().as(File.class);
And its working fine.
No, right now Im trying to keep my rest testing using ApplicationComposer
and embedded openejb (JUNIT container rules etc) for my strict ejb's. Adding
Arquillian to the mix just frustrates my fellow programmers :-)
br hw
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-and-Deltaspike-1-0-tp4671240p4671265.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: ApplicationComposer and Deltaspike 1.0
Posted by Romain Manni-Bucau <rm...@gmail.com>.
did you add the producer?
* DefaultConfigPropertyProducer
BTW using arquillian (openejb embedded adapter) allows you to add
deltaspike jars directly:
http://svn.apache.org/repos/asf/tomee/tomee/trunk/examples/deltaspike-configproperty/src/test/java/org/superbiz/deltaspike/config/ConfigTest.java
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2014-08-18 14:53 GMT+02:00 hwaastad <he...@waastad.org>:
> Sure,
> I did inclusion while your reply was in the air :-)
>
> By extending and testing:
> return new
> Class<?>[]{TestService.class,WindowBeanHolder.class,WindowIdHolder.class,ConversationBeanHolder.class,ViewAccessBeanHolder.class,ViewAccessBeanAccessHistory.class,ViewAccessViewHistory.class};
>
> OK, one step further.
> Now injection fails:
> SEVERE - CDI Beans module deployment failed
> org.apache.webbeans.exception.inject.DeploymentException:
> javax.enterprise.inject.UnsatisfiedResolutionException: Api type
> [java.lang.String] is not found with the qualifiers
> Qualifiers:
> [@org.apache.deltaspike.core.api.config.ConfigProperty(defaultValue=org.apache.deltaspike.NullValueMarker,
> name=destination)]
> for injection into Field Injection Point, field name : destination, Bean
> Owner : [TestService, Name:null, WebBeans Type:ENTERPRISE, API
> Types:[java.io.Serializable,org.waastad.containertesting.service.TestService,java.lang.Object],
> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
>
> hw
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-and-Deltaspike-1-0-tp4671240p4671250.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
Re: ApplicationComposer and Deltaspike 1.0
Posted by hwaastad <he...@waastad.org>.
Sure,
I did inclusion while your reply was in the air :-)
By extending and testing:
return new
Class<?>[]{TestService.class,WindowBeanHolder.class,WindowIdHolder.class,ConversationBeanHolder.class,ViewAccessBeanHolder.class,ViewAccessBeanAccessHistory.class,ViewAccessViewHistory.class};
OK, one step further.
Now injection fails:
SEVERE - CDI Beans module deployment failed
org.apache.webbeans.exception.inject.DeploymentException:
javax.enterprise.inject.UnsatisfiedResolutionException: Api type
[java.lang.String] is not found with the qualifiers
Qualifiers:
[@org.apache.deltaspike.core.api.config.ConfigProperty(defaultValue=org.apache.deltaspike.NullValueMarker,
name=destination)]
for injection into Field Injection Point, field name : destination, Bean
Owner : [TestService, Name:null, WebBeans Type:ENTERPRISE, API
Types:[java.io.Serializable,org.waastad.containertesting.service.TestService,java.lang.Object],
Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
hw
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-and-Deltaspike-1-0-tp4671240p4671250.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: ApplicationComposer and Deltaspike 1.0
Posted by Romain Manni-Bucau <rm...@gmail.com>.
WindowBeanHolder? ;)
AppComposer doesnt use classpath so you need to build the app yourself,
even libraries
Le 18 août 2014 14:32, "hwaastad" <he...@waastad.org> a écrit :
> Hi,
> No I've not added any DS beans.
> Which beans are you thinking of?
>
> Just by adding core-api/core-impl(runtime) results in this error.
>
> br hw
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-and-Deltaspike-1-0-tp4671240p4671247.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>
Re: ApplicationComposer and Deltaspike 1.0
Posted by hwaastad <he...@waastad.org>.
Hi,
No I've not added any DS beans.
Which beans are you thinking of?
Just by adding core-api/core-impl(runtime) results in this error.
br hw
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-and-Deltaspike-1-0-tp4671240p4671247.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: ApplicationComposer and Deltaspike 1.0
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Did you add deltaspike beans in app?
Le 18 août 2014 09:33, "hwaastad" <he...@waastad.org> a écrit :
> Hi,
> I'm trying to get a test going using ApplicationComposer.
>
> However it fails with this:
>
> SEVERE - CDI Beans module deployment failed
> java.lang.IllegalStateException: Could not find beans for Type=class
> org.apache.deltaspike.core.impl.scope.window.WindowBeanHolder and
> qualifiers:[]
>
> any clues?
>
> It's a pretty simple project testing configproperty.
> In standard embedded test it's working OK.
>
> br hw
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-and-Deltaspike-1-0-tp4671240.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>