FYI https://issues.apache.org/jira/browse/OPENEJB-2025

hope it helps your case

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/5/17 Romain Manni-Bucau <[email protected]>

> PS:
>
> @Stateless(name = "beanPlainInput")
> @EJB(beanInterface = AreeInput.class, beanName = "beanPlainInput", name =
> "plaininput")
>
> works too
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/5/17 Romain Manni-Bucau <[email protected]>
>
>> you forgot  to add PlainInput in @Classes in the test
>>
>> @Classes({ GreetingService.class, PlainInput.class })
>>
>> then you get this warning:
>>
>> WARNING - Unresolved ejb reference "java:comp/env/plaininput" with
>> ejb-link "beanPlainInput" in bean "PlainInput".  Will attempt resolution
>> again at runtime.
>>
>> then i think your @EJB is wrong, why not:
>>
>> @EJB(beanInterface = AreeInput.class, beanName = "PlainInput", name =
>> "plaininput") // beanName seems wrong in your sample
>>
>> then in embedded mode you can't use comp/env as in web mode eveywhere, it
>> is valid in ejbs (add @Singleton to GreetingService to check it)
>>
>>
>>
>>  *Romain Manni-Bucau*
>> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>> *Blog: 
>> **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
>> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>> *Github: https://github.com/rmannibucau*
>>
>>
>>
>> 2013/5/17 Caroline <[email protected]>
>>
>>> I used your simple-webservice example to produce an example where I'm
>>> looking for a PlainInput that is in one of the packages. Eventually I will
>>> want to load a .jar from my local TomEE.
>>>
>>> https://www.dropbox.com/s/c9wc0grl4reqolz/simple-rest.zip?v=1rw-
>>>
>>>
>>> Op vrijdag 17 mei 2013, om 13:59 heeft Romain Manni-Bucau [via OpenEJB]
>>> het volgende geschreven:
>>>
>>> > think the easier will be for you to share a project with a test (can
>>> be an
>>> > url to call) showing it fails
>>> >
>>> > the only constraint is: if it doesnt shout (no exception etc...) it
>>> means
>>> > it works
>>> >
>>> > *Romain Manni-Bucau*
>>> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>>> > *Blog: **http://rmannibucau.wordpress.com/*<
>>> http://rmannibucau.wordpress.com/>
>>> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>>> > *Github: https://github.com/rmannibucau*
>>> >
>>> >
>>> >
>>> > 2013/5/17 Caroline <[hidden email]
>>> (/user/SendEmail.jtp?type=node&node=4663032&i=0)>
>>> >
>>> > > @Romain:
>>> > >
>>> > > 1) Ok i fixed my pom.xml
>>> > > 2) I see. I apologize for not having a clue (yet).
>>> > > I replaced the body of refreshEJB() with:
>>> > > AreeInput input = (AreeInput) new
>>> > > InitialContext().lookup("java:comp/env/plaininput");
>>> > >
>>> > > and annotated the PlainInput as:
>>> > > @Stateless
>>> > > @EJB(beanInterface = AreeInput.class, beanName = "beanPlainInput",
>>> name =
>>> > > "plaininput")
>>> > > public class PlainInput implements AreeInput{..}
>>> > >
>>> > > I get javax.ejb.EJBException: javax.naming.NameNotFoundException:
>>> Name
>>> > > [comp/env/plaininput] is not bound in this Context. Unable to find
>>> [comp].
>>> > >
>>> > > I'll read up on how the .lookup("java:comp/env/...") urls work,
>>> right now.
>>> > >
>>> > > @John:
>>> > > No, I want this webapp on my local TomEE to load a certain class
>>> (which is
>>> > > an implementation of one of my webapp interfaces) from a jar I will
>>> put in
>>> > > a
>>> > > folder on my TomEE AFTER webapp deployment.
>>> > >
>>> > > I hope that's clear.
>>> > >
>>> > >
>>> > >
>>> > > --
>>> > > View this message in context:
>>> > >
>>> http://openejb.979440.n4.nabble.com/EJBContainer-No-provider-definition-found-tp4663028p4663031.html
>>> > > Sent from the OpenEJB User mailing list archive at Nabble.com (
>>> http://Nabble.com).
>>> > >
>>> >
>>> >
>>> > If you reply to this email, your message will be added to the
>>> discussion below:
>>> http://openejb.979440.n4.nabble.com/EJBContainer-No-provider-definition-found-tp4663028p4663032.html
>>> > To unsubscribe from EJBContainer No provider definition found, click
>>> here (
>>> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4663028&code=Y2Fyb2xpbmUudmFuLmRlbi5oYXV3ZUBnbWFpbC5jb218NDY2MzAyOHwxNzgxOTg5MTAw
>>> ).
>>> > NAML (
>>> http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
>>> )
>>>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://openejb.979440.n4.nabble.com/EJBContainer-No-provider-definition-found-tp4663028p4663035.html
>>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>>
>>
>>
>

Reply via email to