OpenEngSBFileModel not working

2 views
Skip to first unread message

Stefan Dösinger

unread,
Jan 9, 2012, 10:34:10 AM1/9/12
to openen...@googlegroups.com
Hi,

I'm trying to port the SCM domain(and others) to the new OpenEngSBFileModel,
but in the git connector tests I get a NullPointerException when calling
GetFile().

The crash occurs here:
Thread [main] (Suspended)
ModelProxyHandler.checkForGetterResultConversion(String) line: 165
ModelProxyHandler.handleGetMethod(Method) line: 148
ModelProxyHandler.handleInvoke(Object, Method, Object[]) line: 78
ModelProxyHandler(AbstractOpenEngSBInvocationHandler).invoke(Object,
Method, Object[]) line: 55
(I cut the stacktrace down a bit, I can send the full stacktrace if needed).

The crashing line is: Object obj = doObjectConversion(entry.getValue(), true);
The value member of the OpenEngSBModelEntry is null. According to my
debugging, setValue() is never called. The type is java.io.File, which seems
correct.

Note that this is happening in the unit tests. I'll port the other domains and
connectors needed to make use of this in the OpenCIT to see if it's a test-
specific problem, but this will take a while.

You can find the code at https://github.com/stefand/openengsb-connector-git in
the "filemodel" branch. You'll also need the filemodel branch of
https://github.com/stefand/openengsb-domain-scm .

Cheers,
Stefan

signature.asc

Felix Mayerhuber

unread,
Jan 9, 2012, 5:09:30 PM1/9/12
to OpenEngSB developer discussion
hmmm ... strange thing. My testcases which use File objects are
working. Could you please create an issue for that and write exactly
your steps what you've done with the OpenEngSBFileModel there? I will
have a look ASAP.

Kind regards,
Felix
>  signature.asc
> < 1 KBAnzeigenHerunterladen

Stefan Dösinger

unread,
Jan 10, 2012, 8:08:37 AM1/10/12
to openen...@googlegroups.com, Felix Mayerhuber
Hi,

Sure, I'll file an issue for this. Where are your test cases? I was looking
for them in the openengsb-framework code(by grepping for OpenEngSBFileModel),
but couldn't find any.

Stefan

signature.asc

Felix Mayerhuber

unread,
Jan 10, 2012, 9:06:19 AM1/10/12
to OpenEngSB developer discussion
Hi,

They are in the itests. But I didn't use this object itself, but
another model which has a file object as model entry. Itests/exam/
EDBIT.java -> testFileSaving_shouldWork()

I will have a look at it :-)

Kind regards,
Felix
> > > athttps://github.com/stefand/openengsb-connector-gitinthe "filemodel"
> > > branch. You'll also need the filemodel branch
> > > ofhttps://github.com/stefand/openengsb-domain-scm.
>
> > > Cheers,
> > > Stefan
>
> > >  signature.asc
> > > < 1 KBAnzeigenHerunterladen
>
>
>
>  signature.asc
> < 1 KBAnzeigenHerunterladen

Stefan Dösinger

unread,
Jan 10, 2012, 10:38:09 AM1/10/12
to openen...@googlegroups.com, Felix Mayerhuber
Hi,

I haven't filed a bug yet, I did some more testing. The issue also happens in
the real running system, not just the unit tests.

For debugging I wrote the FileModel object to stdout and got this:
{ FIle == null, file == null, fIle == /tmp/repository3166875042965212197 }

Could the cause of all this be a typo? aka OPENENGSB-2608?

Cheers,
Stefan

signature.asc

Felix Mayerhuber

unread,
Jan 10, 2012, 10:57:16 AM1/10/12
to OpenEngSB developer discussion
Hi,

you are right, I'm 99% sure that this is the problem. I will test it
today, but I'm positive that this typo also causes the
nullpointerexception and the disfunction of the model.

Kind regards,
Felix
>  signature.asc
> < 1 KBAnzeigenHerunterladen

Felix Mayerhuber

unread,
Jan 10, 2012, 11:04:34 AM1/10/12
to OpenEngSB developer discussion
Ok, even tested it. The problem is the typo -.-. When the typo is
fixed, it works.

Kind regards,
Felix

On 10 Jan., 16:57, Felix Mayerhuber <felix.mayerhu...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages