[jboss-user] [Beginner's Corner] - Re: 5.1.0.GA - Problems with Dependency Injection

Pasquale Imbemba do-not-reply at jboss.com
Tue Apr 12 08:32:17 EDT 2011


Pasquale Imbemba [http://community.jboss.org/people/pi4630] created the discussion

"Re: 5.1.0.GA - Problems with Dependency Injection"

To view the discussion, visit: http://community.jboss.org/message/599504#599504

--------------------------------------------------------------
Hi Wolfgang, 

unfortunately, it did not work. Here it was I tried:

>From the JMX Console, I got the String for @Depends:

> @Depends(value="jboss.j2ee:jar=GVCC.jar,name=GvccBean,service=EJB3")

I've put that in the SLSB (1) that tries to make a DI on the other SLSB (2).

I've stopped JBoss AS, deleted the respective jars and deployed first SLSB (2), i.e. the one without dependency. I then read the String on the JMX Console. When I deploy the jar containing SLSB(1), I get the following msg on the console:


> ERROR  http://community.jboss.org/message/599504#599504 Re: 5.1.0.GA - Problems with Dependency Injection Error installing to Start: name=jboss.j2ee:jar=AnagraficaUnificata.jar,name=AnaUniEJB,service=EJB3 state=Create
> java.lang.NullPointerException


and, further 
> ERROR  http://community.jboss.org/message/599504#599504 Re: 5.1.0.GA - Problems with Dependency Injection Error installing to Start: name=jboss.j2ee:jar=AnagraficaUnificata.jar,name=AnaUniEJB,service=EJB3 state=Create
> java.lang.NullPointerException
> ...
> Caused by: java.lang.RuntimeException: javax.naming.NameNotFoundException: env not bound
> 

I use eclipse IDE, the build path is project independent. Instead, I've copied & pasted the packages from Project 2 (JAR2 = SLSB2) containing the interfaces of SLSB2 into Project 1 (JAR1 = SLSB1). It's just for a proof of concept, I guess one can use maven to manage such dependencies in production use.

Thanks for caring,
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/599504#599504]

Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110412/14f94cd3/attachment.html 


More information about the jboss-user mailing list