I have problems binding objects to JNDI during a unit test. Seems that
the jndi server is not running correctly. This error occurs when i run a single unit test suite. Does someone have an idea? The configuration seems similar to a normal run. Exception: javax.naming.ServiceUnavailableException Message: null ---- cause --------------------------------------------------------------------- Exception: java.rmi.ConnectException Message: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect ---- cause --------------------------------------------------------------------- Exception: java.net.ConnectException Message: Connection refused: connect ---- stack trace --------------------------------------------------------------- java.net.ConnectException: Connection refused: connect -- |
Sascha,
I found this thread that deals with the same issue: http://forum.springsource.org/showthread.php?33711-RMI-invocation-attempts-connecting-to-127-0-0-1 And explanation on the subject via this thread: http://docs.oracle.com/javase/1.4.2/docs/guide/rmi/faq.html#nethostname I trust this will help. Regards, Pierre Op 26 april 2012 09:57 schreef Sascha Rodekamp < [hidden email]> het volgende: > I have problems binding objects to JNDI during a unit test. Seems that > the jndi server is not running correctly. > This error occurs when i run a single unit test suite. > > Does someone have an idea? The configuration seems similar to a normal run. > > Exception: javax.naming.ServiceUnavailableException > Message: null > ---- cause > --------------------------------------------------------------------- > Exception: java.rmi.ConnectException > Message: Connection refused to host: 127.0.0.1; nested exception is: > java.net.ConnectException: Connection refused: connect > ---- cause > --------------------------------------------------------------------- > Exception: java.net.ConnectException > Message: Connection refused: connect > ---- stack trace > --------------------------------------------------------------- > java.net.ConnectException: Connection refused: connect > -- > |
Hm yes i also read this post (first google entry) :-) But i didn't
found an explanation why it works for the "normal" ofbiz start and not for a test run. IMHO it's not an general issue, it's related to the test-container configuration. 2012/4/26 Pierre Smits <[hidden email]>: > Sascha, > > I found this thread that deals with the same issue: > http://forum.springsource.org/showthread.php?33711-RMI-invocation-attempts-connecting-to-127-0-0-1 > > And explanation on the subject via this thread: > http://docs.oracle.com/javase/1.4.2/docs/guide/rmi/faq.html#nethostname > > I trust this will help. > > Regards, > > Pierre > > > Op 26 april 2012 09:57 schreef Sascha Rodekamp < > [hidden email]> het volgende: > >> I have problems binding objects to JNDI during a unit test. Seems that >> the jndi server is not running correctly. >> This error occurs when i run a single unit test suite. >> >> Does someone have an idea? The configuration seems similar to a normal run. >> >> Exception: javax.naming.ServiceUnavailableException >> Message: null >> ---- cause >> --------------------------------------------------------------------- >> Exception: java.rmi.ConnectException >> Message: Connection refused to host: 127.0.0.1; nested exception is: >> java.net.ConnectException: Connection refused: connect >> ---- cause >> --------------------------------------------------------------------- >> Exception: java.net.ConnectException >> Message: Connection refused: connect >> ---- stack trace >> --------------------------------------------------------------- >> java.net.ConnectException: Connection refused: connect >> -- >> -- Sascha Rodekamp Visit the new german OFBiz Blog: http://www.ofbiz.biz Lynx-Consulting GmbH Johanniskirchplatz 6 D-33615 Bielefeld http://www.lynx.de |
Ok got it. When i use the default portand add the host in the test
configuration (0.0.0.0:1099) everything works as expected. Is it ok to configure JNDI/ RMI in test with port 1099 ? 2012/4/26 Sascha Rodekamp <[hidden email]>: > Hm yes i also read this post (first google entry) :-) But i didn't > found an explanation why it works for the "normal" ofbiz start and not > for a test run. > IMHO it's not an general issue, it's related to the test-container > configuration. > > 2012/4/26 Pierre Smits <[hidden email]>: >> Sascha, >> >> I found this thread that deals with the same issue: >> http://forum.springsource.org/showthread.php?33711-RMI-invocation-attempts-connecting-to-127-0-0-1 >> >> And explanation on the subject via this thread: >> http://docs.oracle.com/javase/1.4.2/docs/guide/rmi/faq.html#nethostname >> >> I trust this will help. >> >> Regards, >> >> Pierre >> >> >> Op 26 april 2012 09:57 schreef Sascha Rodekamp < >> [hidden email]> het volgende: >> >>> I have problems binding objects to JNDI during a unit test. Seems that >>> the jndi server is not running correctly. >>> This error occurs when i run a single unit test suite. >>> >>> Does someone have an idea? The configuration seems similar to a normal run. >>> >>> Exception: javax.naming.ServiceUnavailableException >>> Message: null >>> ---- cause >>> --------------------------------------------------------------------- >>> Exception: java.rmi.ConnectException >>> Message: Connection refused to host: 127.0.0.1; nested exception is: >>> java.net.ConnectException: Connection refused: connect >>> ---- cause >>> --------------------------------------------------------------------- >>> Exception: java.net.ConnectException >>> Message: Connection refused: connect >>> ---- stack trace >>> --------------------------------------------------------------- >>> java.net.ConnectException: Connection refused: connect >>> -- >>> > > > > -- > > Sascha Rodekamp > Visit the new german OFBiz Blog: http://www.ofbiz.biz > Lynx-Consulting GmbH > Johanniskirchplatz 6 > D-33615 Bielefeld > http://www.lynx.de -- Sascha Rodekamp Visit the new german OFBiz Blog: http://www.ofbiz.biz Lynx-Consulting GmbH Johanniskirchplatz 6 D-33615 Bielefeld http://www.lynx.de |
To complete my previous thoughts: The port 1099 is hard coded in the
jndiservers.xml and jndi.properties. That means when changing the RMI and JNDI port in the *-containers.xml file the jndiservers.xml and jndi.properties should also be changed. 2012/4/26 Sascha Rodekamp <[hidden email]>: > Ok got it. When i use the default portand add the host in the test > configuration (0.0.0.0:1099) everything works as expected. > > Is it ok to configure JNDI/ RMI in test with port 1099 ? > > > 2012/4/26 Sascha Rodekamp <[hidden email]>: >> Hm yes i also read this post (first google entry) :-) But i didn't >> found an explanation why it works for the "normal" ofbiz start and not >> for a test run. >> IMHO it's not an general issue, it's related to the test-container >> configuration. >> >> 2012/4/26 Pierre Smits <[hidden email]>: >>> Sascha, >>> >>> I found this thread that deals with the same issue: >>> http://forum.springsource.org/showthread.php?33711-RMI-invocation-attempts-connecting-to-127-0-0-1 >>> >>> And explanation on the subject via this thread: >>> http://docs.oracle.com/javase/1.4.2/docs/guide/rmi/faq.html#nethostname >>> >>> I trust this will help. >>> >>> Regards, >>> >>> Pierre >>> >>> >>> Op 26 april 2012 09:57 schreef Sascha Rodekamp < >>> [hidden email]> het volgende: >>> >>>> I have problems binding objects to JNDI during a unit test. Seems that >>>> the jndi server is not running correctly. >>>> This error occurs when i run a single unit test suite. >>>> >>>> Does someone have an idea? The configuration seems similar to a normal run. >>>> >>>> Exception: javax.naming.ServiceUnavailableException >>>> Message: null >>>> ---- cause >>>> --------------------------------------------------------------------- >>>> Exception: java.rmi.ConnectException >>>> Message: Connection refused to host: 127.0.0.1; nested exception is: >>>> java.net.ConnectException: Connection refused: connect >>>> ---- cause >>>> --------------------------------------------------------------------- >>>> Exception: java.net.ConnectException >>>> Message: Connection refused: connect >>>> ---- stack trace >>>> --------------------------------------------------------------- >>>> java.net.ConnectException: Connection refused: connect >>>> -- >>>> >> >> >> >> -- >> >> Sascha Rodekamp >> Visit the new german OFBiz Blog: http://www.ofbiz.biz >> Lynx-Consulting GmbH >> Johanniskirchplatz 6 >> D-33615 Bielefeld >> http://www.lynx.de > > > > -- > > Sascha Rodekamp > Visit the new german OFBiz Blog: http://www.ofbiz.biz > Lynx-Consulting GmbH > Johanniskirchplatz 6 > D-33615 Bielefeld > http://www.lynx.de -- Sascha Rodekamp Visit the new german OFBiz Blog: http://www.ofbiz.biz Lynx-Consulting GmbH Johanniskirchplatz 6 D-33615 Bielefeld http://www.lynx.de |
Sascha,
The settings in test-containers.xml were upped +1 to ensure that testing would take place (and not fail) in environments, where the port could already in use by other systems. Having rmi and jndi ports set hard coded in other locations would be against having them set in ofbiz-container.xml and test-container.xml. Regards, Pierre Op 26 april 2012 13:11 schreef Sascha Rodekamp < [hidden email]> het volgende: > To complete my previous thoughts: The port 1099 is hard coded in the > jndiservers.xml and jndi.properties. > > That means when changing the RMI and JNDI port in the *-containers.xml > file the jndiservers.xml and jndi.properties should also be changed. > > 2012/4/26 Sascha Rodekamp <[hidden email]>: > > Ok got it. When i use the default portand add the host in the test > > configuration (0.0.0.0:1099) everything works as expected. > > > > Is it ok to configure JNDI/ RMI in test with port 1099 ? > > > > > > 2012/4/26 Sascha Rodekamp <[hidden email]>: > >> Hm yes i also read this post (first google entry) :-) But i didn't > >> found an explanation why it works for the "normal" ofbiz start and not > >> for a test run. > >> IMHO it's not an general issue, it's related to the test-container > >> configuration. > >> > >> 2012/4/26 Pierre Smits <[hidden email]>: > >>> Sascha, > >>> > >>> I found this thread that deals with the same issue: > >>> > http://forum.springsource.org/showthread.php?33711-RMI-invocation-attempts-connecting-to-127-0-0-1 > >>> > >>> And explanation on the subject via this thread: > >>> > http://docs.oracle.com/javase/1.4.2/docs/guide/rmi/faq.html#nethostname > >>> > >>> I trust this will help. > >>> > >>> Regards, > >>> > >>> Pierre > >>> > >>> > >>> Op 26 april 2012 09:57 schreef Sascha Rodekamp < > >>> [hidden email]> het volgende: > >>> > >>>> I have problems binding objects to JNDI during a unit test. Seems that > >>>> the jndi server is not running correctly. > >>>> This error occurs when i run a single unit test suite. > >>>> > >>>> Does someone have an idea? The configuration seems similar to a > normal run. > >>>> > >>>> Exception: javax.naming.ServiceUnavailableException > >>>> Message: null > >>>> ---- cause > >>>> --------------------------------------------------------------------- > >>>> Exception: java.rmi.ConnectException > >>>> Message: Connection refused to host: 127.0.0.1; nested exception is: > >>>> java.net.ConnectException: Connection refused: connect > >>>> ---- cause > >>>> --------------------------------------------------------------------- > >>>> Exception: java.net.ConnectException > >>>> Message: Connection refused: connect > >>>> ---- stack trace > >>>> --------------------------------------------------------------- > >>>> java.net.ConnectException: Connection refused: connect > >>>> -- > >>>> > >> > >> > >> > >> -- > >> > >> Sascha Rodekamp > >> Visit the new german OFBiz Blog: http://www.ofbiz.biz > >> Lynx-Consulting GmbH > >> Johanniskirchplatz 6 > >> D-33615 Bielefeld > >> http://www.lynx.de > > > > > > > > -- > > > > Sascha Rodekamp > > Visit the new german OFBiz Blog: http://www.ofbiz.biz > > Lynx-Consulting GmbH > > Johanniskirchplatz 6 > > D-33615 Bielefeld > > http://www.lynx.de > > > > -- > > Sascha Rodekamp > Visit the new german OFBiz Blog: http://www.ofbiz.biz > Lynx-Consulting GmbH > Johanniskirchplatz 6 > D-33615 Bielefeld > http://www.lynx.de > |
Free forum by Nabble | Edit this page |