No subject
Thu Mar 18 12:11:26 PST 2004
"application" context, I don't seem to be able to retrieve data from the
expresso tables.
The error tells me that when using the DBObject, the context is changed
from "default" to "application", and even when using
setDataContext("default"), I'm getting the following error:
What went wrong:
- The Controller object called
"com.jcorporate.expresso.services.controller.DBMaint" reported a
problem.
- The problem reported was "Nested exception message:Nested exception
message:Unable to execute statement: SELECT EmailValCode, Passwd,
AccountStatus, LoginName, UserName, RegComplete, UpdateDate, CreateDate,
RegDomId, EMail, ExpUid FROM USERSTABLE ORDER BY LoginName
(com.jcorporate.expresso.services.dbobj.DefaultUserInfo, db/context
'application'):ERROR: Relation "userstable" does not exist "
- No error number was specified.
You are logged in as 'Admin' in database/context 'default'
I hope you can sched some light on this
Edward Devos
The information transmitted by this e-mail message is intended solely
for the use of the person to whom or entity to which it is addressed.
The message may contain information that is privileged and confidential.
Disclosure, dissemination, distribution, review, retransmission to,
other use of or taking any action in reliance upon this information by
anyone other than the intended recipient is prohibited. If you are not
the intended recipient, please do not disseminate, distribute or copy
this communication, by e-mail or otherwise. Instead, please notify us
immediately by return e-mail (including the original message with your
reply) and then delete and discard all copies of the message.
Although we have taken precautions to minimize the risk of transmitting
viruses we nevertheless advise you to carry out your own virus checks on
any attachment to this message. We accept no liability for any loss or
damage caused by viruses.
_______________________________________________
Opensource mailing list
Opensource at jcorporate.com
http://mail.jcorporate.com/mailman/listinfo/opensource
Archives: http://mail.jcorporate.com/pipermail/opensource/
The information transmitted by this e-mail message is intended solely for
the use of the person to whom or entity to which it is addressed. The
message may contain information that is privileged and confidential.
Disclosure, dissemination, distribution, review, retransmission to, other
use of or taking any action in reliance upon this information by anyone
other than the intended recipient is prohibited. If you are not the intended
recipient, please do not disseminate, distribute or copy this communication,
by e-mail or otherwise. Instead, please notify us immediately by return
e-mail (including the original message with your reply) and then delete and
discard all copies of the message.
Although we have taken precautions to minimize the risk of transmitting
viruses we nevertheless advise you to carry out your own virus checks on any
attachment to this message. We accept no liability for any loss or damage
caused by viruses.
------_=_NextPart_001_01C2767E.96839D80
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2654.45">
<TITLE>Re: [Opensource] Using OtherDBObject in Expresso 5.0</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>Hi All,</FONT>
</P>
<P><FONT SIZE=3D2>Thanks for the swift reply, but I'm facing the =
following problem.</FONT>
</P>
<P><FONT SIZE=3D2>I have an "engineer" table in the =
"webtrack" context and a corresponding DBObject </FONT>
<BR><FONT SIZE=3D2>(class engineer extends SecuredDBObject), in this =
DBObject I have virtual fields that reference data that is stored in =
the "default" context (where the expresso tables live) by =
means of setMultiValued() and setLookupObject()</FONT></P>
<P><FONT SIZE=3D2>Keep in mind that the "webtrack" context =
has "<hasSetupTables>false</hasSetupTables>", so =
all non application tables (expresso tables thus) are to be found in =
the "default" context, and that all "webtrack" =
DBObjects are added in the schema as follows :</FONT></P>
<P><FONT SIZE=3D2><SNIP></FONT>
<BR> <FONT =
SIZE=3D2>addDBObject(org.omini.expresso.webtrack.dbobj.Engineer.class.ge=
tName(), "webtrack");</FONT>
<BR><FONT SIZE=3D2></SNIP></FONT>
</P>
<P><FONT SIZE=3D2>so when I override the getField(), I include the =
following code :</FONT>
</P>
<P><FONT SIZE=3D2><SNIP></FONT>
<BR><FONT SIZE=3D2> if =
(fieldName.equals("FIRSTNAME") )</FONT>
<BR><FONT SIZE=3D2> {</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; RegisteredUser regUser =3D new RegisteredUser();</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; regUser.setDataContext(); // defaults to the "default" =
context</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; regUser.setField("ExpUid", =
this.getField("ID"));</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; if ( regUser.find())</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; {</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; regUser.retrieve();</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; =
//System.out.println("engineer:getField(\"Firstname\") =
:"+getField("FIRSTNAME"));</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; return =
regUser.getField("FirstName");</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; }</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; return "No Engineer FirstName Found";</FONT>
<BR><FONT SIZE=3D2> }</FONT>
<BR><FONT SIZE=3D2> else if =
(fieldName.equals("EMAIL") )</FONT>
<BR><FONT SIZE=3D2> {</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; DefaultUserInfo oneUser =3D new DefaultUserInfo();</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; oneUser.setDataContext(); //defaults to the "default" =
context</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; oneUser.setUid(this.getFieldInt("ID"));</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; </FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; if ( oneUser.find() )</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; {</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; oneUser.retrieve();</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; if ( oneUser.getEmail().length() > 0 =
)</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; {</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; =
System.out.println("oneUser.getEmail() =
:"+oneUser.getEmail());</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; return =
oneUser.getEmail();</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; }</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; }</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; return "No Engineer Email Found";</FONT>
<BR><FONT SIZE=3D2> }</FONT>
<BR><FONT SIZE=3D2></SNIP> </FONT>
</P>
<P><FONT SIZE=3D2>The problem is that when I do this, expresso is =
looking for the DefaultUserInfo ( USERSTABLE ) table in the =
"webtrack" context instead of in the "default" =
context, no matter what I set as "DataContext"</FONT></P>
<P><FONT SIZE=3D2>Best regards,</FONT>
</P>
<P><FONT SIZE=3D2>Edward Devos</FONT>
</P>
<P><FONT SIZE=3D2>GPSupport NV</FONT>
<BR><FONT SIZE=3D2>Ajuinlei 1</FONT>
<BR><FONT SIZE=3D2>9000 Gent</FONT>
<BR><FONT SIZE=3D2>+32 (0)9 269 52 52</FONT>
<BR><FONT SIZE=3D2>edward.devos at gpsupport.com</FONT>
</P>
<BR>
<BR>
<BR>
<P><FONT SIZE=3D2>""Javier Campoamor"" =
<jcampoamor at lapize.com> wrote in message =
news:<008401c2761f$2602b2d0$12001aac at Delgado>...</FONT>
<BR><FONT SIZE=3D2>Hi,</FONT>
</P>
<P><FONT SIZE=3D2>When you associate an DBObject to a database =
(context), it doesn't</FONT>
<BR><FONT SIZE=3D2>matter if you specify another context, even the =
default context, the</FONT>
<BR><FONT SIZE=3D2>DBObject always tries to search the associated =
context.</FONT>
</P>
<P><FONT SIZE=3D2>If you want to use the same DBObject in different =
contexts, you</FONT>
<BR><FONT SIZE=3D2>shouldn't associate it with a context in the Schema. =
Later, when you use</FONT>
<BR><FONT SIZE=3D2>the DBObject, you can specify the context =
dynamically.</FONT>
</P>
<P><FONT SIZE=3D2>// Marca will be linked to the TELCOMUNITY context =
(there will be an</FONT>
<BR><FONT SIZE=3D2>entry in the DBOtherMaps table for this)</FONT>
<BR> <FONT =
SIZE=3D2>addDBObject( "com.lapize.telcomunity.dbobj.Marca", =
"TELCOMUNITY"</FONT>
<BR><FONT SIZE=3D2>);</FONT>
<BR><FONT SIZE=3D2>// Telefono won't be linked to any specific =
database.</FONT>
<BR> <FONT =
SIZE=3D2>addDBObject( "com.lapize.telcomunity.dbobj.Telefono" =
);</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>Regards</FONT>
</P>
<P><FONT SIZE=3D2>Javier</FONT>
</P>
<BR>
<P><FONT SIZE=3D2> -----Mensaje original-----</FONT>
<BR><FONT SIZE=3D2>De: opensource-admin at jcorporate.com</FONT>
<BR><FONT SIZE=3D2>[<A =
HREF=3D"mailto:opensource-admin at jcorporate.com">mailto:opensource-admin@=
jcorporate.com</A>] En nombre de Devos, Edward</FONT>
<BR><FONT SIZE=3D2>Enviado el: jueves, 17 de octubre de 2002 =
15:43</FONT>
<BR><FONT SIZE=3D2>Para: 'opensource at jcorporate.com'</FONT>
<BR><FONT SIZE=3D2>Asunto: [Opensource] Using OtherDBObject in Expresso =
5.0</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>Hi All, </FONT>
<BR><FONT SIZE=3D2>I'm testing the otherDBObject method to have two =
seperate databases, one</FONT>
<BR><FONT SIZE=3D2>for expresso tables, and one for the applications =
own tables. but Im</FONT>
<BR><FONT SIZE=3D2>running into the following problem now:</FONT>
<BR><FONT SIZE=3D2>I'm logged in as Administrator in the default =
context! </FONT>
<BR><FONT SIZE=3D2>From a DBObject that is described in the schema as =
belonging to the</FONT>
<BR><FONT SIZE=3D2>"application" context, I don't seem to be =
able to retrieve data from the</FONT>
<BR><FONT SIZE=3D2>expresso tables.</FONT>
<BR><FONT SIZE=3D2>The error tells me that when using the DBObject, the =
context is changed</FONT>
<BR><FONT SIZE=3D2>from "default" to "application", =
and even when using</FONT>
<BR><FONT SIZE=3D2>setDataContext("default"), I'm getting the =
following error:</FONT>
<BR><FONT SIZE=3D2>What went wrong: </FONT>
<BR><FONT SIZE=3D2>- The Controller object called</FONT>
<BR><FONT =
SIZE=3D2>"com.jcorporate.expresso.services.controller.DBMaint"=
reported a</FONT>
<BR><FONT SIZE=3D2>problem. </FONT>
<BR><FONT SIZE=3D2>- The problem reported was "Nested exception =
message:Nested exception</FONT>
<BR><FONT SIZE=3D2>message:Unable to execute statement: =
SELECT EmailValCode, Passwd,</FONT>
<BR><FONT SIZE=3D2>AccountStatus, LoginName, UserName, RegComplete, =
UpdateDate, CreateDate,</FONT>
<BR><FONT SIZE=3D2>RegDomId, EMail, ExpUid FROM USERSTABLE ORDER BY =
LoginName</FONT>
<BR><FONT =
SIZE=3D2>(com.jcorporate.expresso.services.dbobj.DefaultUserInfo, =
db/context</FONT>
<BR><FONT SIZE=3D2>'application'):ERROR: Relation =
"userstable" does not exist " </FONT>
<BR><FONT SIZE=3D2>- No error number was specified. </FONT>
<BR><FONT SIZE=3D2>You are logged in as 'Admin' in database/context =
'default' </FONT>
<BR><FONT SIZE=3D2>I hope you can sched some light on this </FONT>
<BR><FONT SIZE=3D2>Edward Devos </FONT>
<BR><FONT SIZE=3D2>The information transmitted by this e-mail message =
is intended solely</FONT>
<BR><FONT SIZE=3D2>for the use of the person to whom or entity to which =
it is addressed.</FONT>
<BR><FONT SIZE=3D2>The message may contain information that is =
privileged and confidential.</FONT>
<BR><FONT SIZE=3D2>Disclosure, dissemination, distribution, review, =
retransmission to,</FONT>
<BR><FONT SIZE=3D2>other use of or taking any action in reliance upon =
this information by</FONT>
<BR><FONT SIZE=3D2>anyone other than the intended recipient is =
prohibited. If you are not</FONT>
<BR><FONT SIZE=3D2>the intended recipient, please do not disseminate, =
distribute or copy</FONT>
<BR><FONT SIZE=3D2>this communication, by e-mail or otherwise. Instead, =
please notify us</FONT>
<BR><FONT SIZE=3D2>immediately by return e-mail (including the original =
message with your</FONT>
<BR><FONT SIZE=3D2>reply) and then delete and discard all copies of the =
message.</FONT>
<BR><FONT SIZE=3D2>Although we have taken precautions to minimize the =
risk of transmitting</FONT>
<BR><FONT SIZE=3D2>viruses we nevertheless advise you to carry out your =
own virus checks on</FONT>
<BR><FONT SIZE=3D2>any attachment to this message. We accept no =
liability for any loss or</FONT>
<BR><FONT SIZE=3D2>damage caused by viruses.</FONT>
</P>
<BR>
<P><FONT =
SIZE=3D2>_______________________________________________</FONT>
<BR><FONT SIZE=3D2>Opensource mailing list</FONT>
<BR><FONT SIZE=3D2>Opensource at jcorporate.com</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://mail.jcorporate.com/mailman/listinfo/opensource" =
TARGET=3D"_blank">http://mail.jcorporate.com/mailman/listinfo/opensource=
</A></FONT>
<BR><FONT SIZE=3D2>Archives: <A =
HREF=3D"http://mail.jcorporate.com/pipermail/opensource/" =
TARGET=3D"_blank">http://mail.jcorporate.com/pipermail/opensource/</A></=
FONT>
</P>
<P><I><FONT SIZE=3D2>The information transmitted by this e-mail message =
is intended solely for the use of the person to whom or entity to which =
it is addressed. The message may contain information that is privileged =
and confidential. Disclosure, dissemination, distribution, =
review, retransmission to, other use of or taking any action in =
reliance upon this information by anyone other than the intended =
recipient is prohibited. If you are not the intended recipient, please =
do not disseminate, distribute or copy this communication, by e-mail or =
otherwise. Instead, please notify us immediately by return e-mail =
(including the original message with your reply) and then delete and =
discard all copies of the message.</FONT></I></P>
<P><I><FONT SIZE=3D2>Although we have taken precautions to minimize the =
risk of transmitting viruses we nevertheless advise you to carry out =
your own virus checks on any attachment to this message. We accept no =
liability for any loss or damage caused by viruses.</FONT></I></P>
</BODY>
</HTML>
------_=_NextPart_001_01C2767E.96839D80--
More information about the Opensource
mailing list