WOW,
nice find. Sometimes you have to really dig around for the answers.  :-)

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2003 3:29 PM
To: CF-Talk
Subject: SOLVED! (MX 6.1) postgresql.cfm not found error

Just wanted to pass the word along in case anyone else is having problems
getting postgreSQL to work properly on CFMX 6.1

I am running CFMX 6.1 on RedHat Linux 7.3 with Apache 1.3.27, using
PostgreSQL
7.2.3

I could add a PostgreSQL DSN using the "other" option from the drop down
list,
but I ran into problems when trying to edit or delete the PostgreSQL DSN I
had
created.  When I clicked on the edit icon from the CFAdmin, I get an error
as
follows:

-----------------
Error Occurred While Processing Request
File not found: /CFIDE/administrator/datasources/postgresql.cfm

Please try the following:
Enable Robust Exception Information to provide greater detail about the
source
of errors. In the Administrator, click Debugging & Logging > Debugging
Settings, and select the Robust Exception Information option.
Check the ColdFusion documentation to verify that you are using the correct
syntax.
Search the Knowledge Base to find a solution to your problem.
-----------------

I went digging into the xml that controls the Datasources for MX 6.1 and
found
something peculiar.

I downloaded the neo-query.xml file and saved it as wddx.txt on my local
server, wrote the following code real quick to look at it easier:

    <cffile action="" file="#expandPath('./wddx.txt')#"
variable="mywddx">
   
    <cfdump var="#mywddx#">

There is a structure in there that determines how each datasource type is
handled.  Here is an example of the one for MySQL:

<var name='MySQL'><struct type='coldfusion.server.ConfigMap'><var
name='url'><string>jdbc:mysql://[host]:[port]/[database]?[args]
</string></var><var name='name'><string>MySQL</string></var><var
name='handler'><string>mysql.cfm</string></var><var
name='vendor'><string>MySQL</string></var><var
name='class'><string>org.gjt.mm.mysql.Driver</string></var><var
name='port'><string>3306</string></var></struct></var>

To my surprise, I also found a struct in there describing how to handle
PostgreSQL datasources, even though this datasource does not appear in the
dropdown.  One of the keys in the struct directs CFMX to the file that
handles
all actions for that datasource type.

Here is the struct in an easier to read format for the PostgreSQL datasource

type:

    class   = org.postgresql.Driver
    handler = postgresql.cfm
    name    = PostgreSQL
    port    = 5432
    url     = jdbc:postgresql://[host]:[port]/[database]?[args]
    vendor  = PostgreSQL

Even though I configured my PostgreSQL DSN using the "other" option, CFMX
was
refering to it as a PostgreSQL DSN and tried to handle the datasource using
the postgresql.cfm template.  That was the problem!  

The fix that worked for me was to go in and change the handler string in the

WDDX to default.cfm, which is the handler for the "other" DSN types.  I
edited
the xml in vi, saved it, restarted the cfmx services, and violla!  it now
allows me to update my PostgreSQL DSNs!

If anyone has any more information they'd like to share on how the
datasource
engine works in MX 6.1, I'd love to hear it! Thanks to everyone for their
help, and to Jochem for pointing me to the xml file.

--
Josh Trefethen
Exciteworks, Inc
Expert Hosting
http://exciteworks.com <http://exciteworks.com>

------------------------------------------------------------
This mail sent through exciteworks: http://exciteworks.com/
<http://exciteworks.com/>  
  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to