You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Chappuis Vincent <vc...@idbsoft.ch> on 2001/03/22 17:09:39 UTC

java.lang.IllegalAccessError to BaseMyClassPeer from MyProjectMyClassPeer

Hi all !

Context :
I use tdk 1.1a.11.
In development, I use JVM 1.2.2 from IBM. In exploitation, I use JVM 1.2.2
from Sun.

Exception description :
All is OK with JVM 1.1.2 IBM.
But, with JVM 1.2.2 Sun, an exception occure : "IllegalAccessError to
BaseMyClassPeer form MyProjectMyClassPeer.
the code compilation don't display any warining or error. The exception
occure when the program is running.

Structure :
I have a class 'MyProjectMyClassPeer' which extends 'MyClassPeer'. (the two
are 'public')
(MyClassPeer extends BaseMyClassPeer as you know).

Mesures :
I tried to force BaseMyClassPeer at PUBLIC and it works !

Question :
By default Torque generate BaseMyClassPeer without 'pulbic' visibility. So,
I don't want to force this class at 'public'.
Furthermore, I have exactly the same structure for other classes and it
works.
I compared the flow and the sturcture with the classes which work. No diff.
at the flow level and the structure are the same with the difference close
that it is other 'BaseClasses' call.

Does anybody already have same problem ?
if yes how resolve it without set public visibility to BaseMyClassPeer ?
else any idea ?

Regards



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: java.lang.IllegalAccessError to BaseMyClassPeer from MyProjectMyClassPeer

Posted by John McNally <jm...@collab.net>.
I am not sure of the utility of extending MyClassPeer, you cannot
override static methods.  It is only possible to override methods in
BaseMyClassPeer because all methods in BaseMyClassPeer make forward
reference to MyClassPeer.

If you are just adding functionality, why not put it into MyClassPeer,
that is its purpose?

John McNally

Chappuis Vincent wrote:
> 
> Hi,
> 
> I never make any direct reference to a torque generated BaseXXX class. I
> access though XXX.
> 'MyProjcectMyClassPeer' extents 'MyClassPeer' and not BaseMyClassPeer !!
> 
> Forgiveness, I was perhaps not very clear.
> 
> ----- Original Message -----
> From: "John McNally" <jm...@collab.net>
> To: <tu...@jakarta.apache.org>
> Sent: Thursday, March 22, 2001 8:52 PM
> Subject: Re: java.lang.IllegalAccessError to BaseMyClassPeer from
> MyProjectMyClassPeer
> 
> > Do not under any circumstance make any direct reference to a torque
> > generated BaseXXX class.  All access should be made through XXX.  Why
> > are you seeing a need to do this?  The BaseXXX classes are meant to be
> > "hidden".  Think of XXX and BaseXXX java files as the additional methods
> > vs. generated code of the same class.  The BaseXXX code has just been
> > moved to a different file to allow it to be easily updated.
> >
> > John McNally
> >
> >
> > Chappuis Vincent wrote:
> > >
> > > Hi all !
> > >
> > > Context :
> > > I use tdk 1.1a.11.
> > > In development, I use JVM 1.2.2 from IBM. In exploitation, I use JVM
> 1.2.2
> > > from Sun.
> > >
> > > Exception description :
> > > All is OK with JVM 1.1.2 IBM.
> > > But, with JVM 1.2.2 Sun, an exception occure : "IllegalAccessError to
> > > BaseMyClassPeer form MyProjectMyClassPeer.
> > > the code compilation don't display any warining or error. The exception
> > > occure when the program is running.
> > >
> > > Structure :
> > > I have a class 'MyProjectMyClassPeer' which extends 'MyClassPeer'. (the
> two
> > > are 'public')
> > > (MyClassPeer extends BaseMyClassPeer as you know).
> > >
> > > Mesures :
> > > I tried to force BaseMyClassPeer at PUBLIC and it works !
> > >
> > > Question :
> > > By default Torque generate BaseMyClassPeer without 'pulbic' visibility.
> So,
> > > I don't want to force this class at 'public'.
> > > Furthermore, I have exactly the same structure for other classes and it
> > > works.
> > > I compared the flow and the sturcture with the classes which work. No
> diff.
> > > at the flow level and the structure are the same with the difference
> close
> > > that it is other 'BaseClasses' call.
> > >
> > > Does anybody already have same problem ?
> > > if yes how resolve it without set public visibility to BaseMyClassPeer ?
> > > else any idea ?
> > >
> > > Regards
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: java.lang.IllegalAccessError to BaseMyClassPeer from MyProjectMyClassPeer

Posted by Chappuis Vincent <vc...@idbsoft.ch>.
Hi,

I never make any direct reference to a torque generated BaseXXX class. I
access though XXX.
'MyProjcectMyClassPeer' extents 'MyClassPeer' and not BaseMyClassPeer !!

Forgiveness, I was perhaps not very clear.


----- Original Message -----
From: "John McNally" <jm...@collab.net>
To: <tu...@jakarta.apache.org>
Sent: Thursday, March 22, 2001 8:52 PM
Subject: Re: java.lang.IllegalAccessError to BaseMyClassPeer from
MyProjectMyClassPeer


> Do not under any circumstance make any direct reference to a torque
> generated BaseXXX class.  All access should be made through XXX.  Why
> are you seeing a need to do this?  The BaseXXX classes are meant to be
> "hidden".  Think of XXX and BaseXXX java files as the additional methods
> vs. generated code of the same class.  The BaseXXX code has just been
> moved to a different file to allow it to be easily updated.
>
> John McNally
>
>
> Chappuis Vincent wrote:
> >
> > Hi all !
> >
> > Context :
> > I use tdk 1.1a.11.
> > In development, I use JVM 1.2.2 from IBM. In exploitation, I use JVM
1.2.2
> > from Sun.
> >
> > Exception description :
> > All is OK with JVM 1.1.2 IBM.
> > But, with JVM 1.2.2 Sun, an exception occure : "IllegalAccessError to
> > BaseMyClassPeer form MyProjectMyClassPeer.
> > the code compilation don't display any warining or error. The exception
> > occure when the program is running.
> >
> > Structure :
> > I have a class 'MyProjectMyClassPeer' which extends 'MyClassPeer'. (the
two
> > are 'public')
> > (MyClassPeer extends BaseMyClassPeer as you know).
> >
> > Mesures :
> > I tried to force BaseMyClassPeer at PUBLIC and it works !
> >
> > Question :
> > By default Torque generate BaseMyClassPeer without 'pulbic' visibility.
So,
> > I don't want to force this class at 'public'.
> > Furthermore, I have exactly the same structure for other classes and it
> > works.
> > I compared the flow and the sturcture with the classes which work. No
diff.
> > at the flow level and the structure are the same with the difference
close
> > that it is other 'BaseClasses' call.
> >
> > Does anybody already have same problem ?
> > if yes how resolve it without set public visibility to BaseMyClassPeer ?
> > else any idea ?
> >
> > Regards
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: java.lang.IllegalAccessError to BaseMyClassPeer from MyProjectMyClassPeer

Posted by John McNally <jm...@collab.net>.
Do not under any circumstance make any direct reference to a torque
generated BaseXXX class.  All access should be made through XXX.  Why
are you seeing a need to do this?  The BaseXXX classes are meant to be
"hidden".  Think of XXX and BaseXXX java files as the additional methods
vs. generated code of the same class.  The BaseXXX code has just been
moved to a different file to allow it to be easily updated.

John McNally


Chappuis Vincent wrote:
> 
> Hi all !
> 
> Context :
> I use tdk 1.1a.11.
> In development, I use JVM 1.2.2 from IBM. In exploitation, I use JVM 1.2.2
> from Sun.
> 
> Exception description :
> All is OK with JVM 1.1.2 IBM.
> But, with JVM 1.2.2 Sun, an exception occure : "IllegalAccessError to
> BaseMyClassPeer form MyProjectMyClassPeer.
> the code compilation don't display any warining or error. The exception
> occure when the program is running.
> 
> Structure :
> I have a class 'MyProjectMyClassPeer' which extends 'MyClassPeer'. (the two
> are 'public')
> (MyClassPeer extends BaseMyClassPeer as you know).
> 
> Mesures :
> I tried to force BaseMyClassPeer at PUBLIC and it works !
> 
> Question :
> By default Torque generate BaseMyClassPeer without 'pulbic' visibility. So,
> I don't want to force this class at 'public'.
> Furthermore, I have exactly the same structure for other classes and it
> works.
> I compared the flow and the sturcture with the classes which work. No diff.
> at the flow level and the structure are the same with the difference close
> that it is other 'BaseClasses' call.
> 
> Does anybody already have same problem ?
> if yes how resolve it without set public visibility to BaseMyClassPeer ?
> else any idea ?
> 
> Regards
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org