You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Mohammad Nour El-Din <no...@gmail.com> on 2006/10/26 08:32:48 UTC

Problems while debugging SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of openejb-ejbd server component

Hi all...

I was trying to dig and debug into the
SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of the
openejb-ejbd server component from Eclipse, but I receive an
IllegalStateException while the InstantDbTestDatabase is starting as it
looks-up for "client/tools/DatabaseHome", but the look-up fails cause this
home is not in the JNDI, and while I am debugging I didn't see this home
added to the JNDI, so please help if I am missing something here.

Thanks
- Mohammad

Re: Problems while debugging SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of openejb-ejbd server component

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hi Jacek...

I still have the same problem, and I made sure of all required jars and
classes, but this isn't the real problem, I am trying to debug this test
case because I am working on OPENEJB-282 and I fixed a part of it, but the
tests of openejb-ejbd still fails, specially the ones that run the remote
test clients not the local ones because there is still someplace in the code
that throws RemoteException while the test cases expects RemoveException, so
I had to debug the test case to know from where else RemoteException is
thrown, so if you know the reason of this behaviour or how I can make the
test case debugable on Eclipse it will be so helpful for me :)

Thanks
- Mohammad


On 10/26/06, Mohammad Nour El-Din <no...@gmail.com> wrote:

>
>
> On 10/26/06, Jacek Laskowski <ja...@laskowski.net.pl> wrote:
> >
> > On 10/26/06, Mohammad Nour El-Din <nour.mohammad@gmail.com > wrote:
> >
> > > But the problem is not a missing Class\Jar file, the JNDI name is not
> > found.
> >
> > <guess>
> > Don't you think that the name is not bound just because of missing
> > class/jar? When a bean is not found, why would its home intf be bound?
> > OpenEJB doesn't know about it at all, and thus no entry in jndi.
> > </guess>
>
>
> Ok I will give it another try, I hope this is the whole problem, thanks :)
>
> Jacek
> >
> > --
> > Jacek Laskowski
> > http://www.jaceklaskowski.pl
> >
>
>

Re: Problems while debugging SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of openejb-ejbd server component

Posted by Mohammad Nour El-Din <no...@gmail.com>.
On 10/26/06, Jacek Laskowski <ja...@laskowski.net.pl> wrote:
>
> On 10/26/06, Mohammad Nour El-Din <no...@gmail.com> wrote:
>
> > But the problem is not a missing Class\Jar file, the JNDI name is not
> found.
>
> <guess>
> Don't you think that the name is not bound just because of missing
> class/jar? When a bean is not found, why would its home intf be bound?
> OpenEJB doesn't know about it at all, and thus no entry in jndi.
> </guess>


Ok I will give it another try, I hope this is the whole problem, thanks :)

Jacek
>
> --
> Jacek Laskowski
> http://www.jaceklaskowski.pl
>

Re: Problems while debugging SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of openejb-ejbd server component

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 10/26/06, Mohammad Nour El-Din <no...@gmail.com> wrote:

> But the problem is not a missing Class\Jar file, the JNDI name is not found.

<guess>
Don't you think that the name is not bound just because of missing
class/jar? When a bean is not found, why would its home intf be bound?
OpenEJB doesn't know about it at all, and thus no entry in jndi.
</guess>

Jacek

-- 
Jacek Laskowski
http://www.jaceklaskowski.pl

Re: Problems while debugging SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of openejb-ejbd server component

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hi Jacek...

On 10/26/06, Jacek Laskowski <ja...@laskowski.net.pl> wrote:
>
> On 10/26/06, Mohammad Nour El-Din <no...@gmail.com> wrote:
>
> > I was trying to dig and debug into the
> > SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of the
> > openejb-ejbd server component from Eclipse, but I receive an
> > IllegalStateException while the InstantDbTestDatabase is starting as it
> > looks-up for "client/tools/DatabaseHome", but the look-up fails cause
> this
> > home is not in the JNDI, and while I am debugging I didn't see this home
> > added to the JNDI, so please help if I am missing something here.
>
> Does it work while being runned outside Eclipse? If so, I'd suspect it


Yes it does

fails because of missing classes/jars in Eclipse (that are available
> when outside).


But the problem is not a missing Class\Jar file, the JNDI name is not found.

Jacek
>
> --
> Jacek Laskowski
> http://www.jaceklaskowski.pl
>

Re: Problems while debugging SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of openejb-ejbd server component

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 10/26/06, Mohammad Nour El-Din <no...@gmail.com> wrote:

> I was trying to dig and debug into the
> SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of the
> openejb-ejbd server component from Eclipse, but I receive an
> IllegalStateException while the InstantDbTestDatabase is starting as it
> looks-up for "client/tools/DatabaseHome", but the look-up fails cause this
> home is not in the JNDI, and while I am debugging I didn't see this home
> added to the JNDI, so please help if I am missing something here.

Does it work while being runned outside Eclipse? If so, I'd suspect it
fails because of missing classes/jars in Eclipse (that are available
when outside).

Jacek

-- 
Jacek Laskowski
http://www.jaceklaskowski.pl

Re: Problems while debugging SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of openejb-ejbd server component

Posted by Mohammad Nour El-Din <no...@gmail.com>.
On 10/27/06, Jacek Laskowski <ja...@laskowski.net.pl> wrote:
>
> On 10/27/06, Mohammad Nour El-Din <no...@gmail.com> wrote:
>
> > Thanks for all these advices, I could reach to the point I wanted but
> with
> > my own way ;), but thanks for clarifying these points to me :)
>
> Could you describe what you did? We'd be better off knowing it before
> other users ask about it again, wouldn't we? They'll get the right
> answer right away (quite contrary to what you experienced ;-))


Sure I will, but when I am finished with this Jira so I can describe the
whole scenario :).

Jacek
>
> --
> Jacek Laskowski
> http://www.jaceklaskowski.pl
>

Re: Problems while debugging SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of openejb-ejbd server component

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 10/27/06, Mohammad Nour El-Din <no...@gmail.com> wrote:

> Thanks for all these advices, I could reach to the point I wanted but with
> my own way ;), but thanks for clarifying these points to me :)

Could you describe what you did? We'd be better off knowing it before
other users ask about it again, wouldn't we? They'll get the right
answer right away (quite contrary to what you experienced ;-))

Jacek

-- 
Jacek Laskowski
http://www.jaceklaskowski.pl

Re: Problems while debugging SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of openejb-ejbd server component

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hi Dave and Jacek...

Thanks for all these advices, I could reach to the point I wanted but with
my own way ;), but thanks for clarifying these points to me :)

Thanks
- Mohammad


On 10/26/06, Jacek Laskowski <ja...@laskowski.net.pl> wrote:

> On 10/26/06, David Blevins <da...@visi.com> wrote:
>
> > I've commented these "hack" classes so hopefully no one will be
> > confused again.
>
> Thanks!
>
> Jacek
>
> --
> Jacek Laskowski
> http://www.jaceklaskowski.pl
>

Re: Problems while debugging SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of openejb-ejbd server component

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 10/26/06, David Blevins <da...@visi.com> wrote:

> I've commented these "hack" classes so hopefully no one will be
> confused again.

Thanks!

Jacek

-- 
Jacek Laskowski
http://www.jaceklaskowski.pl

Re: Problems while debugging SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of openejb-ejbd server component

Posted by David Blevins <da...@visi.com>.
On Oct 26, 2006, at 12:55 PM, Jacek Laskowski wrote:

> On 10/26/06, David Blevins <da...@visi.com> wrote:
>
>> You can just run the RemoteiTest class instead of that other one.
>>
>> http://svn.apache.org/repos/asf/incubator/openejb/trunk/openejb3/
>> server/openejb-ejbd/src/test/java/org/apache/openejb/RemoteiTest.java
>>
>> There's a comment at the top of that class that describes the VM
>> param you must pass to run the test from your IDE.  Obviously, you'll
>> need to update the path to be something other than "/Users/
>> dblevins/...."
>>
>> Similarly of you want to run the itests on just the openejb-core, you
>> can run this class:
>>
>> http://svn.apache.org/repos/asf/incubator/openejb/trunk/openejb3/
>> container/openejb-core/src/test/java/org/apache/openejb/iTest.java
>
> Another only-a-few-knowing OpenEJB gem. The wonder of open source -
> want more? Take a look at the sources! Thanks Dave for sharing that
> with us so we, mortals, know more now ;-)

It would have been more obvious if we didn't have to have those  
"Surefire Hack" classes, then you'd only be looking at the actual  
test class which has the actual comment "do this for your IDE".  But  
at some point Surefire decided it wasn't going to run anything that  
wasn't an immediate subclass of TestCase even if your parent's parent  
was TestCase or your class was assignable to TestCase.

I've commented these "hack" classes so hopefully no one will be  
confused again.

-David


Re: Problems while debugging SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of openejb-ejbd server component

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 10/26/06, David Blevins <da...@visi.com> wrote:

> You can just run the RemoteiTest class instead of that other one.
>
> http://svn.apache.org/repos/asf/incubator/openejb/trunk/openejb3/
> server/openejb-ejbd/src/test/java/org/apache/openejb/RemoteiTest.java
>
> There's a comment at the top of that class that describes the VM
> param you must pass to run the test from your IDE.  Obviously, you'll
> need to update the path to be something other than "/Users/
> dblevins/...."
>
> Similarly of you want to run the itests on just the openejb-core, you
> can run this class:
>
> http://svn.apache.org/repos/asf/incubator/openejb/trunk/openejb3/
> container/openejb-core/src/test/java/org/apache/openejb/iTest.java

Another only-a-few-knowing OpenEJB gem. The wonder of open source -
want more? Take a look at the sources! Thanks Dave for sharing that
with us so we, mortals, know more now ;-)

Jacek

-- 
Jacek Laskowski
http://www.jaceklaskowski.pl

Re: Problems while debugging SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of openejb-ejbd server component

Posted by David Blevins <da...@visi.com>.
On Oct 25, 2006, at 11:32 PM, Mohammad Nour El-Din wrote:

> Hi all...
>
> I was trying to dig and debug into the
> SomeoneBrokeSurefireAndThisIsADirtyHackForItTest test case of the
> openejb-ejbd server component from Eclipse, but I receive an
> IllegalStateException while the InstantDbTestDatabase is starting  
> as it
> looks-up for "client/tools/DatabaseHome", but the look-up fails  
> cause this
> home is not in the JNDI, and while I am debugging I didn't see this  
> home
> added to the JNDI, so please help if I am missing something here.

You can just run the RemoteiTest class instead of that other one.

http://svn.apache.org/repos/asf/incubator/openejb/trunk/openejb3/ 
server/openejb-ejbd/src/test/java/org/apache/openejb/RemoteiTest.java

There's a comment at the top of that class that describes the VM  
param you must pass to run the test from your IDE.  Obviously, you'll  
need to update the path to be something other than "/Users/ 
dblevins/...."

Similarly of you want to run the itests on just the openejb-core, you  
can run this class:

http://svn.apache.org/repos/asf/incubator/openejb/trunk/openejb3/ 
container/openejb-core/src/test/java/org/apache/openejb/iTest.java

-David