It wasn't null in my code that called the OJB code.  This code has been
working fine in 0.9.7.    If the xml needed to change for some reason,
it might have caused this.  I'm passing in a string of a variable that
is defined in my table.   Whether OJB properly connects a "Field"
to that table is where the problem may be.   It did in the past without
any problem.   I have a hard time telling exactly what changed between
these two versions.

Thanks,

Dave
At 01:49 PM 12/30/2002 +0100, Armin Waibel wrote:
Hi David,

the sequence generator implementation now only generate
id's for fields declared in the repository.
I think you got this NullPointerException, because SM get a
'null' field:

<snip SequenceManagerHelper>
public static String buildSequenceName(
PersistenceBroker brokerForClass, FieldDescriptor field)
    {
48--->!!! ClassDescriptor cldTargetClass = field.getClassDescriptor();
                String seqName = field.getSequenceName();
.....
</snip>

So check your code if the given FiledDescriptor wasn't null.

HTH

regards,
Armin

----- Original Message -----
From: "David Forslund" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Monday, December 30, 2002 1:33 AM
Subject: Re: problems with ojb 0.9.8


> I'm trying to upgrade from 0.9.7 to 0.9.8 and am having some problems
that
> I don't understand yet.
>
> I'm getting the warning about not finding an autoincrement attribute
for a
> class.  I'm not sure when
> I have to have an autoincrement attribute, but the primarykey for the
class
> I'm using is a varchar
> so that autoincrement doesn't seem appropriate.
>
> Subsequently, I get an null pointer exception error in the
> SequenceManagerHelper that I don't understand:
> java.lang.NullPointerException
>          at
>
org.apache.ojb.broker.util.sequence.SequenceManagerHelper.buildSequenceN
ame(SequenceManagerHelper.java:48)
>          at
>
org.apache.ojb.broker.util.sequence.SequenceManagerHiLoImpl.getUniqueId(
SequenceManagerHiLoImpl.java:49)
>          at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getUniqueId(Persist
enceBrokerImpl.java:2258)
>          at
>
org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.getUniqueId(D
elegatingPersistenceBroker.java:242)
>          at
> gov.lanl.Database.OJBDatabaseMgr.getNextSeq(OJBDatabaseMgr.java:582)
>          at
>
gov.lanl.COAS.AbstractObservationValue_.<init>(AbstractObservationValue_
.java:54)
>          at gov.lanl.COAS.Empty_.<init>(Empty_.java:31)
>
> I'm pretty sure that it is being called correctly from my code (which
works
> fine in 0.9.7), but it is failing now.
>
> An unrelated warning in a different application is that OJB says I
should
> use addLike() for using LIKE, but it
> seems to use the right code anyway.  Is this just a deprecation issue?
I
> don't see why it bothers
> to tell me this, if it can figure what to do anyway.
>
> Thanks,
>
> Dave
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to