History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SQL-26
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Bob Swift
Reporter: Imtiaz B Syed
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Confluence SQL Plugin

SQL plugin Not working with confluence2.6.0 in JBoss Application Server

Created: 23/Oct/07 01:14 AM   Updated: 19/Mar/08 07:57 PM
Component/s: SQL macro
Affects Version/s: 3.3.0
Fix Version/s: None

Time Tracking:
Original Estimate: 4 days
Original Estimate - 4 days
Remaining Estimate: 4 days
Remaining Estimate - 4 days
Time Spent: Not Specified
Remaining Estimate - 4 days

Environment:
OS: Linux
Application Server: JBoss
Confluence Version: 2.6.0

Labels:


 Description  « Hide
Sql macro is not working properly in convluence v2.6.0 which is under JBoss App server where as the same is working with confluence v2.5.4 / v2.5.6.
Where as the version of confluence v2.6.0 under Tomcat 5.5 is working perfectly without any issues. The only problem is with v2.6.0 under JBoss.

Example query:

{sql:datasource=ConfluenceDS}
SELECT SPACENAME, 'syed' as NAME FROM SPACES;{sql}

And the exception it throws is as follow:

sql: Unexpected program error: java.sql.SQLException: Column '' not found.
SELECT SPACENAME, 'syed' as NAME FROM SPACES;



 All   Comments   Work Log   Change History   FishEye   Crucible   Related Builds      Sort Order: Ascending order - Click to sort in descending order
Tom Mitchell - 04/Nov/07 11:19 AM - edited
I just upgraded to Confluence 2.6 running on Debian Sarge, MySql 5. I was previously on 2.5.x and had some working SQL macros running. Upon upgrading to 2.6 they broke.

I was able to narrow the issue to the use of 'as x'. In other words, 'select name from foo' would work where 'select name as MyName from foo' would not.

One exception I did find: I am able to 'select localtime(sample_date) as Date' without problems.

I hope this helps.


Bob Swift - 13/Dec/07 07:35 AM
I think you have sql statement problems. For example, there is not a column called 'syed' in the SPACES table. Make sure you can run your sql directly against your database to correct syntax problems. For instance, if select * from spaces works, then its not a problem with the sql macro. Another thing to note is that if you change databases, the sql may need to be modified to the database specific conventions.

Bob Swift - 19/Mar/08 07:57 PM
Is this still a problem or not?