You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mauro2java2011 <ma...@gmail.com> on 2016/11/21 10:00:04 UTC

test of simple-stateful example not working into netbeans

hi. i would try to test a ejb stateful from tomee examples
so into netbeans i have:

setted a server tomee
created a web project

inserted the ejb statefull from tomee example

tried the testfrom the example   but not working.


i have added a my class into source test named MyTest.java

used the @Inject for get the ejb 

added a debug brekpoint at line 65. 
the variable counterA at line 65 is all times null.

Also whit a lookup with all named JNDI that tomee print into the consolle
during the deploy when i test it output all time not found into jndi name
global/simplestatefull/Counter

note: i would use the embedded EJBContainer and not arquillan for get the
test plus simple and speed.
tank you in advance


my github project: 
https://github.com/maurojava/simple-stateful

nb: i have also tried to add to  test classpath all jars inside the
tomee/lib but not working)
Mauro



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/test-of-simple-stateful-example-not-working-into-netbeans-tp4680604.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: test of simple-stateful example not working into netbeans

Posted by gilbertoca <gi...@gmail.com>.
You can use this template project[1]. Just remove the others server's plugin,
keeping the tomee one.
From there you can start putting some tests using
@RunWith(EJBContainerRunner.class) class[2].

[1] https://github.com/gilbertoca/jsf-sandbox
[2]
https://rmannibucau.wordpress.com/2014/04/24/ejbcontainerrunner-or-test-with-ejbcontainer-easily/



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/test-of-simple-stateful-example-not-working-into-netbeans-tp4680604p4680611.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: test of simple-stateful example not working into netbeans

Posted by mauro2java2011 <ma...@gmail.com>.
I do not use maven

Il 21/Nov/2016 13:19, "Romain Manni-Bucau [via TomEE & OpenEJB]" <
ml-node+s979440n4680607h92@n4.nabble.com> ha scritto:

> Maven? It is supported by default on netbeans
>
> Le 21 nov. 2016 12:18, "mauro2java2011" <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4680607&i=0>> a écrit :
>
> > But wherevi have facile on setup ?
> >
> > Il 21/Nov/2016 11:25, "Romain Manni-Bucau [via TomEE & OpenEJB]" <
> > [hidden email] <http:///user/SendEmail.jtp?type=node&node=4680607&i=1>>
> ha scritto:
> >
> > Hi Mauro,
> >
> > this https://github.com/apache/tomee/tree/master/examples/
> simple-stateful
> > works. This sounds like a project setup issue.
> >
> > Side note: your project is not runnable cause it depends on netbeans
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://blog-rmannibucau.rhcloud.com> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <https://github.com/
> > rmannibucau>
> > |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> > <https://javaeefactory-rmannibucau.rhcloud.com>
> >
> > 2016-11-21 11:00 GMT+01:00 mauro2java2011 <[hidden email]
> > <http:///user/SendEmail.jtp?type=node&node=4680605&i=0>>:
> >
> > > hi. i would try to test a ejb stateful from tomee examples
> > > so into netbeans i have:
> > >
> > > setted a server tomee
> > > created a web project
> > >
> > > inserted the ejb statefull from tomee example
> > >
> > > tried the testfrom the example   but not working.
> > >
> > >
> > > i have added a my class into source test named MyTest.java
> > >
> > > used the @Inject for get the ejb
> > >
> > > added a debug brekpoint at line 65.
> > > the variable counterA at line 65 is all times null.
> > >
> > > Also whit a lookup with all named JNDI that tomee print into the
> consolle
> > > during the deploy when i test it output all time not found into jndi
> name
> > > global/simplestatefull/Counter
> > >
> > > note: i would use the embedded EJBContainer and not arquillan for get
> the
> > > test plus simple and speed.
> > > tank you in advance
> > >
> > >
> > > my github project:
> > > https://github.com/maurojava/simple-stateful
> > >
> > > nb: i have also tried to add to  test classpath all jars inside the
> > > tomee/lib but not working)
> > > Mauro
> > >
> > >
> > >
> > > --
> > > View this message in context: http://tomee-openejb.979440.
> > > n4.nabble.com/test-of-simple-stateful-example-not-working-
> > > into-netbeans-tp4680604.html
> > > Sent from the TomEE Users mailing list archive at Nabble.com.
> > >
> >
> >
> > ------------------------------
> > If you reply to this email, your message will be added to the discussion
> > below:
> > http://tomee-openejb.979440.n4.nabble.com/test-of-simple-
> > stateful-example-not-working-into-netbeans-tp4680604p4680605.html
> > To unsubscribe from test of simple-stateful example not working into
> > netbeans, click here
> > <http://tomee-openejb.979440.n4.nabble.com/template/
> NamlServlet.jtp?macro=
> > unsubscribe_by_code&node=4680604&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY2
> > 9tfDQ2ODA2MDR8LTExMTcxODc2MjU=>
> > .
> > NAML
> > <http://tomee-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://tomee-openejb.979440.
> > n4.nabble.com/test-of-simple-stateful-example-not-working-into-netbeans-
> > tp4680604p4680606.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://tomee-openejb.979440.n4.nabble.com/test-of-simple-
> stateful-example-not-working-into-netbeans-tp4680604p4680607.html
> To unsubscribe from test of simple-stateful example not working into
> netbeans, click here
> <http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4680604&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDQ2ODA2MDR8LTExMTcxODc2MjU=>
> .
> NAML
> <http://tomee-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://tomee-openejb.979440.n4.nabble.com/test-of-simple-stateful-example-not-working-into-netbeans-tp4680604p4680608.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: test of simple-stateful example not working into netbeans

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Maven? It is supported by default on netbeans

Le 21 nov. 2016 12:18, "mauro2java2011" <ma...@gmail.com> a écrit :

> But wherevi have facile on setup ?
>
> Il 21/Nov/2016 11:25, "Romain Manni-Bucau [via TomEE & OpenEJB]" <
> ml-node+s979440n4680605h30@n4.nabble.com> ha scritto:
>
> Hi Mauro,
>
> this https://github.com/apache/tomee/tree/master/examples/simple-stateful
> works. This sounds like a project setup issue.
>
> Side note: your project is not runnable cause it depends on netbeans
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/
> rmannibucau>
> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
>
> 2016-11-21 11:00 GMT+01:00 mauro2java2011 <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4680605&i=0>>:
>
> > hi. i would try to test a ejb stateful from tomee examples
> > so into netbeans i have:
> >
> > setted a server tomee
> > created a web project
> >
> > inserted the ejb statefull from tomee example
> >
> > tried the testfrom the example   but not working.
> >
> >
> > i have added a my class into source test named MyTest.java
> >
> > used the @Inject for get the ejb
> >
> > added a debug brekpoint at line 65.
> > the variable counterA at line 65 is all times null.
> >
> > Also whit a lookup with all named JNDI that tomee print into the consolle
> > during the deploy when i test it output all time not found into jndi name
> > global/simplestatefull/Counter
> >
> > note: i would use the embedded EJBContainer and not arquillan for get the
> > test plus simple and speed.
> > tank you in advance
> >
> >
> > my github project:
> > https://github.com/maurojava/simple-stateful
> >
> > nb: i have also tried to add to  test classpath all jars inside the
> > tomee/lib but not working)
> > Mauro
> >
> >
> >
> > --
> > View this message in context: http://tomee-openejb.979440.
> > n4.nabble.com/test-of-simple-stateful-example-not-working-
> > into-netbeans-tp4680604.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://tomee-openejb.979440.n4.nabble.com/test-of-simple-
> stateful-example-not-working-into-netbeans-tp4680604p4680605.html
> To unsubscribe from test of simple-stateful example not working into
> netbeans, click here
> <http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=
> unsubscribe_by_code&node=4680604&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY2
> 9tfDQ2ODA2MDR8LTExMTcxODc2MjU=>
> .
> NAML
> <http://tomee-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://tomee-openejb.979440.
> n4.nabble.com/test-of-simple-stateful-example-not-working-into-netbeans-
> tp4680604p4680606.html
> Sent from the TomEE Users mailing list archive at Nabble.com.

Re: test of simple-stateful example not working into netbeans

Posted by mauro2java2011 <ma...@gmail.com>.
But wherevi have facile on setup ?

Il 21/Nov/2016 11:25, "Romain Manni-Bucau [via TomEE & OpenEJB]" <
ml-node+s979440n4680605h30@n4.nabble.com> ha scritto:

Hi Mauro,

this https://github.com/apache/tomee/tree/master/examples/simple-stateful
works. This sounds like a project setup issue.

Side note: your project is not runnable cause it depends on netbeans


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau>
|
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-11-21 11:00 GMT+01:00 mauro2java2011 <[hidden email]
<http:///user/SendEmail.jtp?type=node&node=4680605&i=0>>:

> hi. i would try to test a ejb stateful from tomee examples
> so into netbeans i have:
>
> setted a server tomee
> created a web project
>
> inserted the ejb statefull from tomee example
>
> tried the testfrom the example   but not working.
>
>
> i have added a my class into source test named MyTest.java
>
> used the @Inject for get the ejb
>
> added a debug brekpoint at line 65.
> the variable counterA at line 65 is all times null.
>
> Also whit a lookup with all named JNDI that tomee print into the consolle
> during the deploy when i test it output all time not found into jndi name
> global/simplestatefull/Counter
>
> note: i would use the embedded EJBContainer and not arquillan for get the
> test plus simple and speed.
> tank you in advance
>
>
> my github project:
> https://github.com/maurojava/simple-stateful
>
> nb: i have also tried to add to  test classpath all jars inside the
> tomee/lib but not working)
> Mauro
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/test-of-simple-stateful-example-not-working-
> into-netbeans-tp4680604.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>


------------------------------
If you reply to this email, your message will be added to the discussion
below:
http://tomee-openejb.979440.n4.nabble.com/test-of-simple-
stateful-example-not-working-into-netbeans-tp4680604p4680605.html
To unsubscribe from test of simple-stateful example not working into
netbeans, click here
<http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4680604&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDQ2ODA2MDR8LTExMTcxODc2MjU=>
.
NAML
<http://tomee-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://tomee-openejb.979440.n4.nabble.com/test-of-simple-stateful-example-not-working-into-netbeans-tp4680604p4680606.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: test of simple-stateful example not working into netbeans

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Mauro,

this https://github.com/apache/tomee/tree/master/examples/simple-stateful
works. This sounds like a project setup issue.

Side note: your project is not runnable cause it depends on netbeans


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-11-21 11:00 GMT+01:00 mauro2java2011 <ma...@gmail.com>:

> hi. i would try to test a ejb stateful from tomee examples
> so into netbeans i have:
>
> setted a server tomee
> created a web project
>
> inserted the ejb statefull from tomee example
>
> tried the testfrom the example   but not working.
>
>
> i have added a my class into source test named MyTest.java
>
> used the @Inject for get the ejb
>
> added a debug brekpoint at line 65.
> the variable counterA at line 65 is all times null.
>
> Also whit a lookup with all named JNDI that tomee print into the consolle
> during the deploy when i test it output all time not found into jndi name
> global/simplestatefull/Counter
>
> note: i would use the embedded EJBContainer and not arquillan for get the
> test plus simple and speed.
> tank you in advance
>
>
> my github project:
> https://github.com/maurojava/simple-stateful
>
> nb: i have also tried to add to  test classpath all jars inside the
> tomee/lib but not working)
> Mauro
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/test-of-simple-stateful-example-not-working-
> into-netbeans-tp4680604.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>