Hello,
Is the Sql Plugin broken with Xwiki 2.2.5 ?
=>
1) I have added the xwiki-plugin-sql-1.5.jar file under WEB-INF/lib
2) I have updated xwiki.cfg with:
#-# List of active plugins.
xwiki.plugins=\
com.xpn.xwiki.monitor.api.MonitorPlugin,\
com.xpn.xwiki.plugin.skinx.JsSkinExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.JsSkinFileExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.CssSkinExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.CssSkinFileExtensionPlugin,\
com.xpn.xwiki.plugin.feed.FeedPlugin,\
com.xpn.xwiki.plugin.ldap.LDAPPlugin,\
com.xpn.xwiki.plugin.google.GooglePlugin,\
com.xpn.xwiki.plugin.flickr.FlickrPlugin,\
com.xpn.xwiki.plugin.mail.MailPlugin,\
com.xpn.xwiki.plugin.packaging.PackagePlugin,\
com.xpn.xwiki.plugin.query.QueryPlugin,\
com.xpn.xwiki.plugin.svg.SVGPlugin,\
com.xpn.xwiki.plugin.charts.ChartingPlugin,\
com.xpn.xwiki.plugin.fileupload.FileUploadPlugin,\
com.xpn.xwiki.plugin.image.ImagePlugin,\
com.xpn.xwiki.plugin.userdirectory.UserDirectoryPlugin,\
com.xpn.xwiki.plugin.usertools.XWikiUserManagementToolsImpl,\
com.xpn.xwiki.plugin.zipexplorer.ZipExplorerPlugin,\
com.xpn.xwiki.plugin.autotag.AutoTagPlugin,\
com.xpn.xwiki.plugin.lucene.LucenePlugin,\
com.xpn.xwiki.plugin.diff.DiffPlugin,\
com.xpn.xwiki.plugin.rightsmanager.RightsManagerPlugin,\
com.xpn.xwiki.plugin.jodatime.JodaTimePlugin,\
com.xpn.xwiki.plugin.scheduler.SchedulerPlugin,\
com.xpn.xwiki.plugin.mailsender.MailSenderPlugin,\
com.xpn.xwiki.plugin.activitystream.plugin.ActivityStreamPlugin, \
com.xpn.xwiki.plugin.watchlist.WatchListPlugin, \
com.xpn.xwiki.wysiwyg.server.plugin.WysiwygPlugin, \
com.xpn.xwiki.plugin.tag.TagPlugin, \
ua.gradsoft.xwikisql.SqlPlugin
and
#---------------------------------------
# Sql Plugin behavior parameters
xwikisql.logSql=1
xwikisql.throwExceptions=1
3) I have created context.xml under META-INF with:
<Context>
<Resource name = "jdbc/NC" auth = "Container"
type = "javax.sql.DataSource"
driverClassName = "com.mysql.jdbc.Driver"
url = "jdbc:mysql://192.168.1.1:3306/NC"
username = "nc"
password = "nc"
maxActive = "30"
maxIdle = "20000"
maxWait = "120" />
</Context>
4) I have updated web.xml under WEB-INF with:
<resource-ref>
<description>NC DB Connection</description>
<res-ref-name>jdbc/NC</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
I know I can query this database from Xwiki because a groovy script with an
explicit declaration of the database, driver, user password etc and using
the very same query will dump a table.
5) I have updated log4j.properties under WEB-INF/classes with
## Activate Sql Plugin Loggging
log4j.logger.ua.gradsoft.xwikisql=debug
Then, after restarting Tomcat6, when I try:
{{velocity}}
#set ($mydb=$xwiki.sql.getDabase("jdbc/NC"))
#set ($rs=$mydb.executeQuery("select ID from TABLE"))
returned $rs.getNRows()
#set ($Message = "Why can't I get to the DB ?")
velocity message is $Message
{{/velocity}}
All I get is:
returned $rs.getNRows()
velocity message is Why can't I get to the DB ?
And in my xwiki.log I cannot see any error messages related to the sql
plugin. It's all looking like the sql plugin is totally ignored !!!
Can you tell me what I did wrong ?
Many thanks for your help,
Regards,
Christophe,
I am getting something strange happening with my xwiki install, when users
register i get a post on my buzz account. does anyone know why this would be
happening? i don't get emails so i don't know how it could be happening.
maybe it build in some rss feed or something?
thanks in advance.
rob munro.
Hi Ryszard,
If you want to query external URLs you will need to proxy the requests. The "url" parameter is limited by browsers same origin policy. To proxy the request you can have a result page with a groovy script that makes the HTTP requests to the external URL and outputs it. It has a performance cost, though, since it means 2 requests where you would do only one with an internal URL.
Another alternative is to make the livetable support JSON with padding technique (http://en.wikipedia.org/wiki/JSON#JSONP) ; it's not very complex, it just needs an alternative method to fetch the data (instead of AJAX request) + an option to activate this method. Though it's a bit touchy security-wise, not sure we would want to have this available by default (but could be discussed).
Jerome.
----- "Ryszard Łach" <rylach(a)gmail.com> wrote:
> Hi!
> Does anybody know how to display some external data using LiveTable
> macro? I
> can see in doc, that there is an 'url' alternative datasource
> (alternative
> to className and resultsPage), but I cannot find any examples using
> it.
>
> I've tried to write to the text file the JSON output used by the
> macro, then
> I put the file on some http server and try to use its url in macro
> invocation, but it does not work.
>
> TIA,
>
> R.
>
> --
> "First they ignore you. Then they laugh at you. Then they
> fight you. Then you win." - Mohandas Gandhi.
> _______________________________________________
> users mailing list
> users(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
Hi,
With the Bulletin Board Application, all the first posts has always the same
date and time (2009/06/15 15:30). Is there anybody who have an idea of where
I can correct this little problem?
Thanks
Regards
Ben
--
View this message in context: http://xwiki.475771.n2.nabble.com/Bulletin-Board-Creation-date-tp5040497p50…
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi!
Does anybody know how to display some external data using LiveTable macro? I
can see in doc, that there is an 'url' alternative datasource (alternative
to className and resultsPage), but I cannot find any examples using it.
I've tried to write to the text file the JSON output used by the macro, then
I put the file on some http server and try to use its url in macro
invocation, but it does not work.
TIA,
R.
--
"First they ignore you. Then they laugh at you. Then they
fight you. Then you win." - Mohandas Gandhi.
Hello everybody!
I need a few help about HQL issues.
1) I have own class XWiki, and make query with sorting results by the class
properties values, BUT not only one property. I wrote:
#set ($hql = ", BaseObject as obj, StringProperty as prop where
obj.name=doc.fullName and obj.className='XWiki.ProjectClass' and obj.name
not like '%ClassTemplate' and obj.id=prop.id.id and
prop.id.name='ProjectName' order by prop.value asc")
this code greatly works, but sorting by only one property 'ProjectName'. How
I can include in HQL query 2 sorting criterias (second "inside" first)?
2) My code order data by property values, but first always stay property
values starting with alphabetical symbols and only second - values starting
with numbers. For example: "ADSL", "DFR", "5SQL", "9ROOT". It is normal for
HQL? Can I change this? It is better for me, if values starting with numbers
will stay in a first positions ...
Thanks beforehand!
Eugen
--
View this message in context: http://xwiki.475771.n2.nabble.com/Questions-about-HQL-and-order-by-issues-t…
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hello,
Trying the following with XWiki syntax 2.0:
=== TEST MACRO ===
(% id="table3" %)
| |X |Y |Z
|Q1|1.2|3.4|1.3
|Q2|4.5|3.4|2.3
|Q3|1.2|4.5|9.0
|Q4|3.4|1.2|1.2
{{chart type="bar" params="table:table3;range:B2-D5;series:columns;"
title="Chart Test" width="320" height="240"/}}
=== TEST CHART MACRO WITH DYNAMIC TABLE ===
{{python}}
print "(%id='table4'%)"
print "| |X |Y |Z"
print "|Q1|1.2|3.4|1.3"
print "|Q2|4.5|3.4|2.3"
print "|Q3|1.2|4.5|9.0"
print "|Q4|3.4|1.2|1.2"
{{/python}}
{{chart type="bar" params="table:table4;range:B2-D5;series:columns;"
title="Chart Test" width="320" height="240"/}}
----------------------------------------------
... I get a graph for the TEST MACRO section but an error
'org.xwiki.rendering.macro.MacroExecutionException: Unable to find a
macthing data table.' For the TEST CHART MACRO WITH DYNAMIC TABLE.
Since the result of the python is inserted in the back into the wiki page, I
thought (dreamt actually) that the chart macro would be able to use those
outputs.
What have I done here and how can I make this work, basically charting the
output of an xwiki script ?
Thanks for your help,
Regards,
Christophe,
Hello all,
The partially completed invitation application is up and running on the incubator.
http://incubator.myxwiki.org/xwiki/bin/view/InvitationMail/
Right now the actual sending of the email is disabled until we can decide who's allowed to send.
Anyone who's a member of myxwiki.org ( http://www.myxwiki.org/bin/register/XWiki/Register ) can test out the
functionality, acting as a user or as an administrator.
Even though the email isn't sent, you can still try accepting, rejecting, or reporting your messages as spam.
If you report your message as spam (and click confirm) you will not be able to send any more mail unless you
use the "view as an administrator" page.
The main page (above) has open commenting so you can voice your opinion there or in response to this message
and help expand and clarify the "todo" list. I'm anxious to hear good ideas and criticism.
Caleb
Hi everybody!
I started to try xwiki classes creation. And I have a question.
At a page of each classes, existing "Class sheet" and "Class template". And
for the "Class sheet" existing description "...You can also choose different
presentations for the viewing and for the editing modes...". How I can do
this? I need, that viewing presentation contain not only class properties
fields and also some other things (text, links, etc) and these additional
things should present ONLY in a viewing mode. How I can do this?
Unfortunately, it is not clearly for me ...
Thanks beforehand!
Eugen
--
View this message in context: http://xwiki.475771.n2.nabble.com/Class-Sheet-different-presentations-for-t…
Sent from the XWiki- Users mailing list archive at Nabble.com.
This is sort of a random shot, just hoping someone has implemented something similar before. There is a C++ API used to securely connect to and query a database. The database is maintained by IT, so I need to go through this API rather than directly accessing the database (in which case I would use JDBC with groovy).
I was wondering if there is a way to write groovy bindings for C++ functions. I know this can be done with Java for C++ (JNI/Jace/etc), but does anyone have any experience doing such a thing with groovy or in a wiki context?
Thanks,
-Mike
_________________________________________________________________
Hotmail is redefining busy with tools for the New Busy. Get more from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:…