• Post Reply Bookmark Topic Watch Topic
  • New Topic

CDI Question and jar

 
peter wong ka chon
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to all, I have create the a Java class library project from Netbeans which produces a jar file in order to enforce module design of the application.

In module A, this is a module used for database access related functionality.
In this module A, I have used of CDI concepts which this bean will then used in some other web project.

Questions :

I have a parent class annotated with @Default qualifier and derived class annotated with @Informal qualifer.
Then i will used it like this
@Inject @Informal DerivedClass obj;

Is this implementation correct ?

In this module A, i have use of this library but could not find the jar file. Any idea where to find it?
Where is the javax.inject.Qualifier and javax.enterprise.inject.Default jar ?


Please help.


Thanks.
 
peter wong ka chon
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help me.
 
Piotr Nowicki
Ranch Hand
Posts: 611
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter,

How are you executing your module with the CDI?

The CDI packages should be available in one of the CDI implementation either delivered by your application server or by concrete implementation (like Weld) in your classpath.

Do you have any of those in your classpath?

Cheers!
 
peter wong ka chon
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pedro Kowalski wrote:Hi Peter,

How are you executing your module with the CDI?

The CDI packages should be available in one of the CDI implementation either delivered by your application server or by concrete implementation (like Weld) in your classpath.

Do you have any of those in your classpath?

Cheers!


The module is consists of CDI implementation and used by another web project deploy in Glassfish web server. When i used the module from web project, it throws exception when deploying.

The exception is unsatisifed dependecies type with @default blah blah blah from weld.

Please help.

 
Piotr Nowicki
Ranch Hand
Posts: 611
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess that these "@Default blah blah blah" as well as some piece of your code will be relevant in this case...
 
peter wong ka chon
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pedro Kowalski wrote:I guess that these "@Default blah blah blah" as well as some piece of your code will be relevant in this case...


Any solution to that ?

Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!