Xwiki.org sandbox: you don't normally get programming rights (admin rights don't guarantee programming rights on the .org sites). Someone on the xwiki team will have to open and save the page for you in order to test it.
If it's a local xwiki instance that's also causing the problem, I'm not sure. Accessing mysql databases seems to work fine for me for my own local databases. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Your XEN ICT Team - Ricardo Rodriguez Sent: 01 November 2007 11:54 To: XWiki Users Subject: Re: [xwiki-users] Adding a document in XWiki.org Esbach, Brandon wrote: > First thing to check: > Are you logged in as admin or a standard user? And do you definitely have > programming rights if you're a standard user? > > Checked! I have been running the scripts as an admin user. > Second thing to check: > Could be an older version of Groovy in xwiki than what you're testing with in > your scripts. I know this sort of scripting worked fine back with the Beta > v1.0 of xwiki (haven't had the need for such scripts since), as I had to make > use of it. I am using XWiki 1.2-milestone-1.5235. I've tried to substitute groovy-all-1.0-jsr-06.jar by the groovy-all-1.0.jar embeddable jar coming with the binary distribution I'm installed here but it seems that it won't be that easy. I get the same results: no row is printed for iterations. Any idea? As far as I've understood Harikrishnan has succeed at accessing MySQL databases others than XWiki one. Please, could you get the following script working? <% import groovy.sql.Sql; println "This is a sample to access epec in *mire*" def sendSQL = Sql.newInstance("jdbc:mysql://mire.environmentalchange.net/epec", "epec_ReadOnly", "epec_ReadOnly", "com.mysql.jdbc.Driver") sendSQL.eachRow("SELECT * FROM epec.spot s") {row ->println "${row.code}"} %> Here the output I get in XWiki: This is a sample to access epec in mire Here the output I get in Groovy Console: This is a sample to access epec in *mire* AGÑ BAG BLA BDX BPA BUI CAD CDL CPD LUZ MII MIM PDC PNV PVO PZC QXI SUA ACB SVT I get an error while trying the access XWiki.org Sandbox to test the code... javax.servlet.ServletException: com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading document XWiki.XWikiPreferences Any new idea will be welcome!!! Thanks! -- Ricardo Rodríguez Your XEN ICT Team _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
