Re: creating a second database connection
Re: creating a second database connection
- Subject: Re: creating a second database connection
- From: Theodore Petrosky <email@hidden>
- Date: Thu, 23 Aug 2012 12:37:53 -0700 (PDT)
so i am having a problem.
db1 is a postgresql db on machine1
db2 is an oracle db on machine2
I have a framework for each model and I am importing the frameworks into a newly created D2W wonder app.
If I start the app with either framework, I get a 'good' app that can query the database in question.
However, if I have both frameworks the app starts but if I try to access the oracle data it blows up.
it look like (from the logs) that with both frameworks in the path, postgresqlplugin is being used. Hence oracle bites the dust.
what should the property file look like for these frameworks?
connection dict from the property file of db1 (postgresql)
# Connection Dictionary
dbConnectURLGLOBAL=jdbc:postgresql://localhost/asfreelancedb?capitalizeTypenames=true&zeroDateTimeBehavior=convertToNull
dbConnectUserGLOBAL=admin
dbConnectPasswordGLOBAL=4004
dbConnectPluginGLOBAL=PostgresqlPlugIn
# dbConnectDriverGLOBAL=org.postgresql.Driver
dbEOPrototypesEntityGLOBAL=EOJDBCPostgresqlPrototypes
connection dict from the property file of db2 (oracle)
# Connection Dictionary
dbConnectURLGLOBAL=jdbc:oracle:thin:@10.1.3.250:1521/XE
dbConnectUserGLOBAL=user
dbConnectPasswordGLOBAL=as4004
Interesting on the home tab search all I see all the correct columns in the search all popups. But if I click the "find" button on a table that lives in the oracle db it blows up with:
NFO er.transaction.adaptor.Exceptions - Database Exception occured: ERROR: relation "job" does not exist
Position: 1240at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
postgresql???
I am sure I am missing something simple.
Ted
--- On Thu, 8/23/12, Amedeo Mantica <email@hidden> wrote:
> From: Amedeo Mantica <email@hidden>
> Subject: Re: creating a second database connection
> To: "Tim Worman" <email@hidden>
> Cc: "Theodore Petrosky" <email@hidden>, "email@hidden" <email@hidden>
> Date: Thursday, August 23, 2012, 2:52 PM
> Theoretically table names could be
> same. You can have table name different from entity name.
> Btw there is a bug in wo 5.4.3 that may cause issues in
> cross database relationship, but for read only should work
> with no issues.
>
> Amedeo
>
> Sent from my iPhone
>
> On 23/ago/2012, at 20:28, Tim Worman <email@hidden>
> wrote:
>
> > +1
> >
> > It just works. You simply can't have entities with the
> same name. I have two different databases as well as JNDI
> entities.
> >
> > Tim
> > UCLA GSE&IS
> >
> > On Aug 22, 2012, at 9:50 PM, Cheong Hee (Gmail) <email@hidden>
> wrote:
> >
> >> The simplest way is to create two eomodel and set
> their connection dictiionary respectively. It will
> then transparent to you when do fetching.
> >> No worry b'cos it is wo.
> >>
> >> ----- Original Message ----- From: "Theodore
> Petrosky" <email@hidden>
> >> To: <email@hidden>
> >> Cc: <email@hidden>
> >> Sent: Thursday, August 23, 2012 9:55 AM
> >> Subject: Re: creating a second database connection
> >>
> >>
> >>> I hadn't even thought of JasperReports yet.
> but, I could probably create a 'special EO', copy the
> attributes that I want to report on. and print this third
> EO.
> >>>
> >>> or as you said pass the second EO as a
> parameter object and use a sub report. i was doing that for
> my to-many relations.
> >>>
> >>> My issue was I couldn't image how to connect to
> two different databases at the same time. It appears this is
> the easier of the difficult parts.
> >>>
> >>>
> >>> Ted
> >>>
> >>> --- On Wed, 8/22/12, email@hidden
> <email@hidden>
> wrote:
> >>>
> >>>> From: email@hidden
> <email@hidden>
> >>>> Subject: Re: creating a second database
> connection
> >>>> To: "Theodore Petrosky" <email@hidden>
> >>>> Cc: "Amedeo Mantica" <email@hidden>,
> "Paul Yu" <email@hidden>, "email@hidden"
> <email@hidden>
> >>>> Date: Wednesday, August 22, 2012, 7:21 PM
> >>>> Jasper Reports? You can't use two
> >>>> data sources in the same report, you will
> have to use
> >>>> sub-reports.
> >>>>
> >>>> Envoyé de mon iPhone
> >>>>
> >>>> Le 2012-08-22 à 19:19, "Theodore Petrosky"
> <email@hidden>
> >>>> a écrit :
> >>>>
> >>>>> db two is to read only. I want to munge
> together a
> >>>> report. I'll try the two models and see how
> it works out. it
> >>>> just sounds too simple.
> >>>>>
> >>>>> Ted
> >>>>>
> >>>>>
> >>>>> --- On Wed, 8/22/12, Paul Yu <email@hidden>
> >>>> wrote:
> >>>>>
> >>>>>> From: Paul Yu <email@hidden>
> >>>>>> Subject: Re: creating a second
> database connection
> >>>>>> To: "Amedeo Mantica" <email@hidden>
> >>>>>> Cc: "email@hidden"
> >>>> <email@hidden>
> >>>>>> Date: Wednesday, August 22, 2012,
> 6:28 PM
> >>>>>> But cross model joins would be an
> >>>>>> issue?
> >>>>>>
> >>>>>> Sent from my iPad
> >>>>>>
> >>>>>> On Aug 22, 2012, at 4:09 PM, Amedeo
> Mantica <email@hidden>
> >>>>>> wrote:
> >>>>>>
> >>>>>>> Just create two eomodels
> >>>>>>>
> >>>>>>> Sent from my iPhone
> >>>>>>>
> >>>>>>> On 22/ago/2012, at 21:55,
> Theodore Petrosky
> >>>> <email@hidden>
> >>>>>> wrote:
> >>>>>>>
> >>>>>>>> I have an app that captures
> data on events
> >>>> and
> >>>>>> writes this to my postgresql
> database.
> >>>>>>>>
> >>>>>>>> I have other data that
> lives in an Oracle
> >>>> database
> >>>>>> that I need to query to merge with
> to create a
> >>>> report.
> >>>>>>>>
> >>>>>>>> like (data from PG) + (data
> from Oracle) =
> >>>>>> myReport.
> >>>>>>>>
> >>>>>>>> I have no experience trying
> to connect to a
> >>>> second
> >>>>>> database in an app. Are there any
> examples of doing
> >>>> this?
> >>>>>>>>
> >>>>>>>> Please, I have no idea
> where to start.
> >>>>>>>>
> >>>>>>>> Ted
> >>>>
> _______________________________________________
> >>>>>>>> Do not post admin requests
> to the list.
> >>>> They will
> >>>>>> be ignored.
> >>>>>>>> Webobjects-dev mailing
> list
> >>>> (email@hidden)
> >>>>>>>> Help/Unsubscribe/Update
> your Subscription:
> >>>>>>>>
> >>>>>>>> This email sent to email@hidden
> >>>>
> _______________________________________________
> >>>>>>> Do not post admin requests to
> the list. They
> >>>> will be
> >>>>>> ignored.
> >>>>>>> Webobjects-dev mailing list
> >>>> (email@hidden)
> >>>>>>> Help/Unsubscribe/Update your
> Subscription:
> >>>>>>>
> >>>>>>> This email sent to email@hidden
> >>>>>>
> _______________________________________________
> >>>>>> Do not post admin requests to the
> list. They will
> >>>> be
> >>>>>> ignored.
> >>>>>> Webobjects-dev mailing list (email@hidden)
> >>>>>> Help/Unsubscribe/Update your
> Subscription:
> >>>>>>
> >>>>>> This email sent to email@hidden
> >>>>>
> >>>>>
> _______________________________________________
> >>>>> Do not post admin requests to the list.
> They will be
> >>>> ignored.
> >>>>> Webobjects-dev mailing list (email@hidden)
> >>>>> Help/Unsubscribe/Update your
> Subscription:
> >>>>>
> >>>>> This email sent to email@hidden
> >>>
> >>>
> _______________________________________________
> >>> Do not post admin requests to the list. They
> will be ignored.
> >>> Webobjects-dev mailing list
> (email@hidden)
> >>> Help/Unsubscribe/Update your Subscription:
> >>>
> >>> This email sent to email@hidden
> >>
> >> _______________________________________________
> >> Do not post admin requests to the list. They will
> be ignored.
> >> Webobjects-dev mailing list (email@hidden)
> >> Help/Unsubscribe/Update your Subscription:
> >>
> >> This email sent to email@hidden
> >
> >
> > _______________________________________________
> > Do not post admin requests to the list. They will be
> ignored.
> > Webobjects-dev mailing list (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
> > This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden