Example not working

47 views
Skip to first unread message

Ken

unread,
Feb 29, 2012, 3:43:13 PM2/29/12
to Empire
Hi,

I am trying to get started with Empire using the bundled example. I
have never used an EntityManager before, so there is a lot of new
stuff for me there.

When trying to run the example I run into the problem that find()
doesn't return Book, but rather BookImpl.

So, after this line

Book aBook = aManager.find(Book.class, URI.create("urn:x-
domain:oreilly.com:product:9780596514129.IP"));

aBook is an instance of BookImpl and calls like aBook.getTitle() work,
but return null.

There weren't any hints that anybody else had this problem, so I am
wondering what exactly goes wrong on my machine.

Does anyone have an idea?

I am using Empire 0.7.


Regards,

Ken

Mike Grove

unread,
Feb 29, 2012, 5:01:36 PM2/29/12
to empir...@googlegroups.com
On Wed, Feb 29, 2012 at 3:43 PM, Ken <keng...@gmail.com> wrote:
> Hi,
>
> I am trying to get started with Empire using the bundled example. I
> have never used an EntityManager before, so there is a lot of new
> stuff for me there.
>
> When trying to run the example I run into the problem that find()
> doesn't return Book, but rather BookImpl.

That's expected.

>
> So, after this line
>
> Book aBook = aManager.find(Book.class, URI.create("urn:x-
> domain:oreilly.com:product:9780596514129.IP"));
>
> aBook is an instance of BookImpl and calls like aBook.getTitle() work,
> but return null.

That is not.

What version of Empire do you have? I just ran the example on HEAD
and it worked fine from my IDE. How are you running the code? What
is your classpath?

Cheers,

Mike

Ken

unread,
Mar 2, 2012, 3:35:18 AM3/2/12
to Empire
Hi,

Thanks for the quick reply.

I was using 0.7.

It's working now. I downloaded trunk and, I think more importantly,
switched back to Java 6, from Java 7.


Regards,

Ken

On Feb 29, 11:01 pm, Mike Grove <m...@clarkparsia.com> wrote:
Reply all
Reply to author
Forward
0 new messages