Your code appears to be incomplete. Can you post the module as is? It looks like there is no binding to the String serverAddress that is causing the problem. Look into the use of bindConstant() in the Guice docs.
Dhanji. On Wed, Sep 1, 2010 at 12:52 AM, Al Tice <[email protected]> wrote: > I am new to Guice. I am currently trying to inject a service > dependency and continue to get the following error. Any help would be > appreciated. Thanks. > > com.google.inject.internal.ComputationExcep > tion: com.google.inject.internal.ComputationException: > com.google.inject.interna > l.cglib.core.CodeGenerationException: > java.lang.reflect.InvocationTargetExceptio > n-->null > > I basically have a server class. > @Inject > public PostServiceImpl( String serverAddress) { > this.serverAddress; > } > > I am not sure > > @Inject > public Inquiry(ContactDAO contactDAO, PostService postService) { > > this.contactDAO = contactDAO; > this.postService = postService; > > } > > And in the contextlistener file. > > bind(PostService.class).to(PostServiceImpl.class); > > -- > You received this message because you are subscribed to the Google Groups > "google-guice" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-guice%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-guice?hl=en. > > -- You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.
