At the moment I'm running PostgreSQL in a windows enviroment, and I 
encountered an error after the updater 2. I suspect the same error could 
happen on Linux.
My conf:

Windows XP Home
PostgreSQL 7.3 with Cygwin
CFMX Updater 2
Apache 2.0.44
pgjdbc2.jar

PostgreSQL Error:  ERROR:  Option 'xactisolevel' is not recognized

Example of query:

<cfset goodToGo = 1>
        <cftransaction action="BEGIN">  
                <cftry>
                        <cfquery name="qry_ins" datasource="simple_test">
                        INSERT INTO seriale(campo) VALUES('test - test')
                        </cfquery>
                
                        <cfcatch type="Database">
                                <cfset goodToGo = 0>
                        </cfcatch>
                </cftry>
        <cfif goodToGo>
                <cftransaction action="COMMIT"/>                
        <cfelse>
                <cftransaction action="ROLLBACK"/>
        </cfif>
</cftransaction>


CF ERROR:
The system has attempted to use an undefined value, which usually indicates 
a programming error, either in your code or some system code.
Null Pointers are another name for undefined values.    
The error occurred in D:\www\Trash\cfmx_pg.cfm: line 12
        
10 : <cftransaction action="BEGIN">
11 : <cftry>
12 : <cfquery name="qry_ins" datasource="simple_test">
13 : INSERT INTO seriale(campo) VALUES('test - test')
14 : </cfquery> 


java.lang.NullPointerException
        at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:61)
        at org.postgresql.Connection.ExecSQL(Connection.java:398)
        at org.postgresql.Connection.ExecSQL(Connection.java:381)
        at org.postgresql.Connection.setTransactionIsolation(Connection.java:984)
        at jrun.sql.JRunConnection.setTransactionIsolation(JRunConnection.java:526)
        at jrun.sql.JRunConnection.clean(JRunConnection.java:238)
        at jrun.sql.pool.JDBCPool.returnConnection(Unknown Source)
        at jrun.sql.pool.JDBCPool.connectionErrorOccurred(Unknown Source)
        at jrun.sql.JRunConnection.sendErrorEvent(JRunConnection.java:336)
        at jrun.sql.JRunConnection.getTransactionIsolation(JRunConnection.java:550)
        at 
jrun.sql.JRunConnectionHandle.getTransactionIsolation(JRunConnectionHandle.java:150)
        at coldfusion.tagext.sql.TransactionTag.verifyDataSrc(Unknown Source)
        at coldfusion.tagext.sql.QueryTag.validate(Unknown Source)
        at coldfusion.tagext.sql.QueryTag.doStartTag(Unknown Source)
        at cfcfmx_pg2ecfm1404785979.runPage(D:\www\Trash\cfmx_pg.cfm:12)
        at coldfusion.runtime.CfJspPage.invoke(Unknown Source)
        at coldfusion.tagext.lang.IncludeTag.doStartTag(Unknown Source)
        at coldfusion.filter.CfincludeFilter.invoke(Unknown Source)
        at coldfusion.filter.ApplicationFilter.invoke(Unknown Source)
        at coldfusion.filter.PathFilter.invoke(Unknown Source)
        at coldfusion.filter.LicenseFilter.invoke(Unknown Source)
        at coldfusion.filter.ExceptionFilter.invoke(Unknown Source)
        at coldfusion.filter.BrowserDebugFilter.invoke(Unknown Source)
        at coldfusion.filter.ClientScopePersistenceFilter.invoke(Unknown Source)
        at coldfusion.filter.BrowserFilter.invoke(Unknown Source)
        at coldfusion.filter.GlobalsFilter.invoke(Unknown Source)
        at coldfusion.filter.DatasourceFilter.invoke(Unknown Source)
        at coldfusion.CfmServlet.service(Unknown Source)
        at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
        at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
        at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:241)
        at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
        at 
jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:198)
        at 
jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:348)
        at 
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
        at 
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:294)
        at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

----------------------------------------


Solution: removing the last </cftransaction> everythings work, but:
1) Do you confirm this behaviour in Linux?
2) Reading the manual I think the correct syntax is the same as my query. 
In any case, it works well in CF 5 and in CFMX with Updater 1
3) What do you suggest me to do?
a) Rewrote all query. The cftransaction syntax has changed.
b) This is a bug. Wait updater 3
c) This is a PostgreSQL problem on windows or with the JDBC driver.
Regards
--------------------------------------------------
FABIO SERRA - faser(at)faser.net
PGP available
--------------------------------------------------


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=14
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=14
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.14
                                

Reply via email to