You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Frank <fa...@hotmail.com> on 2007/02/14 17:31:50 UTC

Re: OutOfMemoryErrors (solved)

Hi Andrus,

I bumped the JVM up to 512m
This resolved my issue.
I also removed AS400 fields not needed in my query to help reduce memory 
requirements.

Regards,

Frank 


Re: OutOfMemoryErrors (solved)

Posted by Michael Gentry <bl...@gmail.com>.
That's still a lot of records to return from a query, but sometimes
you need that, too.  Increasing the memory is probably appropriate,
then.

/dev/mrg


On 2/15/07, Frank <fa...@hotmail.com> wrote:
> My query returned less than 2700 records.
> My schema was large, about 190 fields.
>
> I trimmed this down to about 5 and increased the JVM.
>
> Regards,
>
> Frank
> ----- Original Message -----
> From: "Michael Gentry" <bl...@gmail.com>
> To: <us...@cayenne.apache.org>
> Sent: Thursday, February 15, 2007 9:27 AM
> Subject: Re: OutOfMemoryErrors (solved)
>
>
> > Bumping the heap size up is probably fine, but I also suspect Frank
> > might be trying to read in too much data given his previous postings
> > using LIKE expressions.  He may be getting back tens of thousands of
> > rows, if not more.  Perhaps his application requires that, though.
> >
> > /dev/mrg
> >
> >
> > On 2/15/07, Andrus Adamchik <an...@objectstyle.org> wrote:
> >> You are being too picky. Why is this not a solution? Default 64m heap
> >> size for the JVM is not enough for most applications nowadays ;-)
> >>
> >> Andrus
> >>
> >>
> >> On Feb 15, 2007, at 2:47 AM, Juergen Saar wrote:
> >>
> >> > This is a workaround, but not a solution ...
> >> >
> >> > -sorry-
> >> > --- Juregen ---
> >> >
> >> > 2007/2/14, Frank <fa...@hotmail.com>:
> >> >>
> >> >> Hi Andrus,
> >> >>
> >> >> I bumped the JVM up to 512m
> >> >> This resolved my issue.
> >> >> I also removed AS400 fields not needed in my query to help reduce
> >> >> memory
> >> >> requirements.
> >> >>
> >> >> Regards,
> >> >>
> >> >> Frank
> >> >>
> >> >>
> >>
> >>
> >
>

Re: OutOfMemoryErrors (solved)

Posted by Frank <fa...@hotmail.com>.
My query returned less than 2700 records.
My schema was large, about 190 fields.

I trimmed this down to about 5 and increased the JVM.

Regards,

Frank
----- Original Message ----- 
From: "Michael Gentry" <bl...@gmail.com>
To: <us...@cayenne.apache.org>
Sent: Thursday, February 15, 2007 9:27 AM
Subject: Re: OutOfMemoryErrors (solved)


> Bumping the heap size up is probably fine, but I also suspect Frank
> might be trying to read in too much data given his previous postings
> using LIKE expressions.  He may be getting back tens of thousands of
> rows, if not more.  Perhaps his application requires that, though.
> 
> /dev/mrg
> 
> 
> On 2/15/07, Andrus Adamchik <an...@objectstyle.org> wrote:
>> You are being too picky. Why is this not a solution? Default 64m heap
>> size for the JVM is not enough for most applications nowadays ;-)
>>
>> Andrus
>>
>>
>> On Feb 15, 2007, at 2:47 AM, Juergen Saar wrote:
>>
>> > This is a workaround, but not a solution ...
>> >
>> > -sorry-
>> > --- Juregen ---
>> >
>> > 2007/2/14, Frank <fa...@hotmail.com>:
>> >>
>> >> Hi Andrus,
>> >>
>> >> I bumped the JVM up to 512m
>> >> This resolved my issue.
>> >> I also removed AS400 fields not needed in my query to help reduce
>> >> memory
>> >> requirements.
>> >>
>> >> Regards,
>> >>
>> >> Frank
>> >>
>> >>
>>
>>
>

Re: OutOfMemoryErrors (solved)

Posted by Michael Gentry <bl...@gmail.com>.
Bumping the heap size up is probably fine, but I also suspect Frank
might be trying to read in too much data given his previous postings
using LIKE expressions.  He may be getting back tens of thousands of
rows, if not more.  Perhaps his application requires that, though.

/dev/mrg


On 2/15/07, Andrus Adamchik <an...@objectstyle.org> wrote:
> You are being too picky. Why is this not a solution? Default 64m heap
> size for the JVM is not enough for most applications nowadays ;-)
>
> Andrus
>
>
> On Feb 15, 2007, at 2:47 AM, Juergen Saar wrote:
>
> > This is a workaround, but not a solution ...
> >
> > -sorry-
> > --- Juregen ---
> >
> > 2007/2/14, Frank <fa...@hotmail.com>:
> >>
> >> Hi Andrus,
> >>
> >> I bumped the JVM up to 512m
> >> This resolved my issue.
> >> I also removed AS400 fields not needed in my query to help reduce
> >> memory
> >> requirements.
> >>
> >> Regards,
> >>
> >> Frank
> >>
> >>
>
>

Re: OutOfMemoryErrors (solved)

Posted by Andrus Adamchik <an...@objectstyle.org>.
You are being too picky. Why is this not a solution? Default 64m heap  
size for the JVM is not enough for most applications nowadays ;-)

Andrus


On Feb 15, 2007, at 2:47 AM, Juergen Saar wrote:

> This is a workaround, but not a solution ...
>
> -sorry-
> --- Juregen ---
>
> 2007/2/14, Frank <fa...@hotmail.com>:
>>
>> Hi Andrus,
>>
>> I bumped the JVM up to 512m
>> This resolved my issue.
>> I also removed AS400 fields not needed in my query to help reduce  
>> memory
>> requirements.
>>
>> Regards,
>>
>> Frank
>>
>>


Re: OutOfMemoryErrors (solved)

Posted by Juergen Saar <ju...@jsaar.org>.
This is a workaround, but not a solution ...

-sorry-
--- Juregen ---

2007/2/14, Frank <fa...@hotmail.com>:
>
> Hi Andrus,
>
> I bumped the JVM up to 512m
> This resolved my issue.
> I also removed AS400 fields not needed in my query to help reduce memory
> requirements.
>
> Regards,
>
> Frank
>
>

Re: How do I retrieve a record with two fields for PK

Posted by Juergen Saar <ju...@jsaar.org>.
*** RTFM ***

*objectForPK<file:///home/saar/docs/cayenne_1.1/api/cayenne/org/objectstyle/cayenne/DataObjectUtils.html#objectForPK%28org.objectstyle.cayenne.access.DataContext,%20java.lang.Class,%20java.util.Map%29>
*(DataContext<file:///home/saar/docs/cayenne_1.1/api/cayenne/org/objectstyle/cayenne/access/DataContext.html>
context,
java.lang.Class dataObjectClass, java.util.Map pk)


2007/2/14, Frank <fa...@hotmail.com>:
>
> Hello,
>
> I have this defined:
> DataContext context = DataContext.getThreadDataContext();
> Bsypemp emp = null;
> emp = (Bsypemp) DataObjectUtils.objectForPK(context, Bsypemp.class, id);
>
> my problem is that the PK consists of two fields EMHSP# & EMEMP
>
> What is the correct syntax for getting a record?
>
> Thanks
>
> Frank
>

How do I retrieve a record with two fields for PK

Posted by Frank <fa...@hotmail.com>.
Hello,

I have this defined:
DataContext context = DataContext.getThreadDataContext();     
Bsypemp emp = null;
emp = (Bsypemp) DataObjectUtils.objectForPK(context, Bsypemp.class, id);

my problem is that the PK consists of two fields EMHSP# & EMEMP

What is the correct syntax for getting a record?

Thanks

Frank