You are viewing a plain text version of this content. The canonical link for it is here.
Posted to photark-dev@incubator.apache.org by Subash Chaturanga <su...@gmail.com> on 2011/07/20 19:52:33 UTC

Problem regarding GenericFaceRecognitionTestCase.

Hi all,

I have added a JUnit test case to invoke the Generic Face Recognition
services . The test
case org.apache.photark.face.facebook.test.GenericFaceRecognitionTestCase, is
under @Ignore. Because there is some issue which I couldn't figured out. So
it will be great if that can be checked and try to figure out what the issue
is.
The problem can be an issue with the way I approach to invoke a typical SCA
component from a Java class.

FYI: This test case is under the revision 1145680 in phot-ark trunk.

Regards
-- 
Subash Chaturanga
Department of Computer Science & Engineering
University of Moratuwa
Sri Lanka

Blog -  http://subashsdm.blogspot.com/
Twitter - http://twitter.com/subash89

Re: Problem regarding GenericFaceRecognitionTestCase.

Posted by Luciano Resende <lu...@gmail.com>.
On Thu, Jul 21, 2011 at 5:42 AM, Subash Chaturanga <su...@gmail.com> wrote:
> On Thu, Jul 21, 2011 at 11:39 AM, Luciano Resende <lu...@gmail.com>wrote:
>
>> On Wed, Jul 20, 2011 at 12:52 PM, Subash Chaturanga <su...@gmail.com>
>> wrote:
>> > Hi all,
>> >
>> > I have added a JUnit test case to invoke the Generic Face Recognition
>> > services . The test
>> > case
>> org.apache.photark.face.facebook.test.GenericFaceRecognitionTestCase, is
>> > under @Ignore. Because there is some issue which I couldn't figured out.
>> So
>> > it will be great if that can be checked and try to figure out what the
>> issue
>> > is.
>> > The problem can be an issue with the way I approach to invoke a typical
>> SCA
>> > component from a Java class.
>> >
>> > FYI: This test case is under the revision 1145680 in phot-ark trunk.
>> >
>> > Regards
>> > --
>> > Subash Chaturanga
>> > Department of Computer Science & Engineering
>> > University of Moratuwa
>> > Sri Lanka
>> >
>> > Blog -  http://subashsdm.blogspot.com/
>> > Twitter - http://twitter.com/subash89
>> >
>>
>> Couple things I noticed :
>>
>> - Missing node-impl dependency with test scope
>> - Missing composite file in the project (which is the sac
>> contribution). The web.composite is only used for the webapp module
>> and not visible for the jar
>>
>>
>> I fixed these issues, the test now runs if you remove the @Ignore, but
>> then there is a NPE in the service implementation as the
>> defaultFaceClient does not seem to be initialized.
>>
>> Please let me know if you can make some progress now.
>>
>>
> I was looking on it. And the code breaks from the line under   @BeforeClass
>
> node.start();
>
> But the service init happens in the test case from the line
>
>       FaceRecognitionService defaultFaceClient =
>
> (FaceRecognitionService)node.getService(FaceRecognitionService.class,
> "FaceRecognitionService");
>
>  which is seems correct as getService arguments are correct. Still couldn't
> figure out what the issue is.
>
> Regards
>
>>

That is true, but the cause is really when it reaches the code inside
FaceRecognitionServiceImpl.detectFromUrls because the
defaultFaceClient never gets intialized. What's the plan to get
initialized ?

BTW, the following code :
     FaceRecognitionService defaultFaceClient =
            (FaceRecognitionService)node.getService(FaceRecognitionService.class,
"FaceRecognitionService");

It's only retrieving a reference to a Tuscany/SCA service. It does not
initialize anything inside of the service, which should responsibility
of the service, etc

-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Re: Problem regarding GenericFaceRecognitionTestCase.

Posted by Subash Chaturanga <su...@gmail.com>.
On Thu, Jul 21, 2011 at 11:39 AM, Luciano Resende <lu...@gmail.com>wrote:

> On Wed, Jul 20, 2011 at 12:52 PM, Subash Chaturanga <su...@gmail.com>
> wrote:
> > Hi all,
> >
> > I have added a JUnit test case to invoke the Generic Face Recognition
> > services . The test
> > case
> org.apache.photark.face.facebook.test.GenericFaceRecognitionTestCase, is
> > under @Ignore. Because there is some issue which I couldn't figured out.
> So
> > it will be great if that can be checked and try to figure out what the
> issue
> > is.
> > The problem can be an issue with the way I approach to invoke a typical
> SCA
> > component from a Java class.
> >
> > FYI: This test case is under the revision 1145680 in phot-ark trunk.
> >
> > Regards
> > --
> > Subash Chaturanga
> > Department of Computer Science & Engineering
> > University of Moratuwa
> > Sri Lanka
> >
> > Blog -  http://subashsdm.blogspot.com/
> > Twitter - http://twitter.com/subash89
> >
>
> Couple things I noticed :
>
> - Missing node-impl dependency with test scope
> - Missing composite file in the project (which is the sac
> contribution). The web.composite is only used for the webapp module
> and not visible for the jar
>
>
> I fixed these issues, the test now runs if you remove the @Ignore, but
> then there is a NPE in the service implementation as the
> defaultFaceClient does not seem to be initialized.
>
> Please let me know if you can make some progress now.
>
>
I was looking on it. And the code breaks from the line under   @BeforeClass

node.start();

But the service init happens in the test case from the line

       FaceRecognitionService defaultFaceClient =

(FaceRecognitionService)node.getService(FaceRecognitionService.class,
"FaceRecognitionService");

 which is seems correct as getService arguments are correct. Still couldn't
figure out what the issue is.

Regards

>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/
>



-- 
Subash Chaturanga
Department of Computer Science & Engineering
University of Moratuwa
Sri Lanka

Blog -  http://subashsdm.blogspot.com/
Twitter - http://twitter.com/subash89

Re: Problem regarding GenericFaceRecognitionTestCase.

Posted by Luciano Resende <lu...@gmail.com>.
On Wed, Jul 20, 2011 at 12:52 PM, Subash Chaturanga <su...@gmail.com> wrote:
> Hi all,
>
> I have added a JUnit test case to invoke the Generic Face Recognition
> services . The test
> case org.apache.photark.face.facebook.test.GenericFaceRecognitionTestCase, is
> under @Ignore. Because there is some issue which I couldn't figured out. So
> it will be great if that can be checked and try to figure out what the issue
> is.
> The problem can be an issue with the way I approach to invoke a typical SCA
> component from a Java class.
>
> FYI: This test case is under the revision 1145680 in phot-ark trunk.
>
> Regards
> --
> Subash Chaturanga
> Department of Computer Science & Engineering
> University of Moratuwa
> Sri Lanka
>
> Blog -  http://subashsdm.blogspot.com/
> Twitter - http://twitter.com/subash89
>

Couple things I noticed :

- Missing node-impl dependency with test scope
- Missing composite file in the project (which is the sac
contribution). The web.composite is only used for the webapp module
and not visible for the jar


I fixed these issues, the test now runs if you remove the @Ignore, but
then there is a NPE in the service implementation as the
defaultFaceClient does not seem to be initialized.

Please let me know if you can make some progress now.


-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/