I've been exploring connection pooling for an external database, but I'm struggling to use it. I'm running XWiki 6.3 on a Ubuntu server. In /etc/xwiki/context.xml I have
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<!-- JDBC datasource for myDB -->
<Resource name="jdbc/mydbds"
auth="Container"
type="javax.sql.DataSource"
username="dbuser"
password="dbpass"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql:alertdb"
maxActive="10"
maxIdle="4" />
</Context>
And I have a symlink to this at /usr/lib/xwiki/WEB-INF/context.xml
I'm trying to test that I can access this with a Groovy script. I'm not entirely sure of the correct approach here, but the most successful I've got it with
{{groovy}}
import groovy.sql.Sql
import javax.naming.Context
import javax.naming.InitialContext
import javax.sql.DataSource
Context ctx = new InitialContext();
DataSource dataSource = (DataSource) ctx.lookup("jdbc/mydbds");
def sql = new Sql(dataSource)
{{/groovy}}
However this fails with
javax.naming.NameNotFoundException: Name [jdbc/mydbds] is not bound in this Context. Unable to find [jdbc].
Would anyone be able to tell me whether this is the right sort of way to be going about using a JNDI resource, and what's wrong with my implementation?
Just want to apologize if this has been asked already, but I was not able to
find this in the archive.
I have a new instance of XWiki install and everything is working fine, but I
am having issue with the "Reset my password" link at the login page. It
send the email out fine, but when I click on the link, it takes me to the
xwiki with the error message: "Wrong Parameters. Back to the password reset
page". I searched the internet and I come up empty, is there a setting I
forgot to setup? Please let me know. Thanks.
--
View this message in context: http://xwiki.475771.n2.nabble.com/Wrong-parameter-for-password-reset-tp7593…
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hello all,
I'm hoping someone can give me a suggestion to save my skin. When I was
brand new to xwiki I quickly created an application for "ticketing" using
AppWithinMinutes because it seemed like the easiest way for a newbie to
create an application. In doing so I created a form which had several
controls on it (e.g.. around 20 or so). In order to maintain business logic
I wrote EXTENSIVE JavaScript which enforces business rules and prevents a
save (basically cancelling the postback through JavaScript) if they aren't
met. Admittedly this isn't that great of a solution as now I'm having
problems with JavaScript failures (mostly with other libraries being loaded
with xwiki which prevents my JavaScript from running) which then allow the
pages to be saved despite validation failures.
What I'm hoping is that there is some way to "shim" some server side code in
using an event listener, or some sort of "before save" event in velocity or
groovy that can evaluate the submitted page and prevent a save if the
business logic rules are broken.
I don't really have the luxury of re-writing or refactoring the solution
I've written because it's in production at this point and works 95% of the
time, but I definitely need to do more in relation to validation since
broken rules cause downstream impacts to other applications relying on clean
data.
So, any help is GREATLY appreciated. I have seen this
http://platform.xwiki.org/xwiki/bin/view/DevGuide/Creating+a+form+with+valid
ation+and+tooltips and reviewed it, but I can't really figure out how I
would use it with an existing page or with AppWithinMinutes.
Also, I already have an event listener configured which does some stuff that
I might be able to use for this purpose.. but I think those events
(DocumentCreatedEvent() and DocumentUpdatedEvent()) happens AFTER the save
and I haven't really been able to find a way to "block" the save if it does
happen before anyway..
I would need to invoke validation on save and update of documents too.. I'm
hoping there might be some way of adding code to the AppWithinMinutes
generated page that can do some post save validation and stop the save if it
fails.
So help !!! :)
I would like to customize the solr schema.xml and solrconfig.xml used
for our instance of xwiki (enterprise 6.1) to provide some additional
fields and to customize (and enforce) search behaviors.
My first attempt at modifying xwiki's data/solr/xwiki/conf/*.xml seemed
successful at first, but after xwiki restarts the solr index appeared
flawed in some way (all search gave zero results) even after full index
rebuilds.
I see clues in xwiki.properties that custom solr config dirs and even
external solr instances are supported, but have not found any specific
documentation. I'm not certain the above implies that solr configuration
customization is supported. Is it possible and, if so, is there any
general guidance on utilizing custom schemas or external solrs?
Thanks,
Mike
Hello,I have a docClass with some properties and use a linked Sheet to display my data.On this thread http://xwiki.475771.n2.nabble.com/Help-with-custom-display-td508630.htmlI saw we can get this value in "custom display" field of docClass properties.- $name = the name of the displayed field
- $prefix = a prefix for the form field
- $object = the displayed object
- $type = the intended display mode (view, edit, hidden, search...)
- $value = the property value
I try to have same value from mydocSheet (in particulary prefix the id of the field in edit form)
There Velocity code in my docSheet:
#set($class = $doc.getObject('MySpace.docClass').xWikiClass)
#foreach($prop in $class.properties)
* "$prop.Name" * $prop.?????? How to obtain the prefix ??? * $object (it doesn't matter) * $xcontext.action * $doc.getValue($prop.Name)
$prop.prettyName $doc.display($prop.getName())
#end
#break
If any have an (or many) idea how I can obtain this prefix in my Sheet
(If not I can concanet MySpace.docClass_0_$prop.Name but I'm not sure about _0_)
Thxs
Pascal B
Hi,
I'd like to create a new panel and place it in the sidebar of every wiki in
my wiki farm. Is there a way to automatically make panels that I create for
the main wiki available to subwikis, or do I have to manually copy them
over?
Thanks,
Jamal
--
View this message in context: http://xwiki.475771.n2.nabble.com/Creating-a-panel-for-all-wikis-tp7593806.…
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hello xWikiers,
I’ve just registered to the mailing list and I’m pleased to introduce you the site http://apice.unibo.it,
developed by the APICe Research Group, which belong to The Department of Information Engineering and Computer Science (DISI)
of University of bologna, Italy.
The site is up since 2007, starting from xwiki 1.1.
Since then it has been migrated step by step and is now powered by xwiki 2.1.2.
It’s my aim to migrate to latest version, but I’m stuck in the middle of the process,
because of a problem during migration to 2.2.6 with the rendering of the comments, attachments, history and Information
Here's what happens:
http://apice.unibo.it/xwiki/bin/download/Sandbox/WebHome/bug226.jpg
As can be seen, I use a cloned test site to simulate every upgrade task;
I’ve injected some debug code in the docextra.vm template (as in attachmentsinline.vm)
To solve the bug, I’m focusing on docextra.vm template: the $doc and the $tdoc variables are “undefined”
when the *inline.vm template are called inside the javascrit,
with document.observe or Event.observe that run XWiki.displayDocExtra("${extraAnchor}", "${extraTemplate}", false);
for instance ${extraAnchor} = “attachments”, ${extraTemplate} = “attachmentsinline.vm”
From the log it’s clear that this is the problem ($tdoc variable is “undefined”) because I find in the log:
https://test.apice.unibo.it/xwiki/bin/view/Publications/undefined?xpage=xpa…
instead the correct url should be, for example:
https://test.apice.unibo.it/xwiki/bin/view/Publications/BioSac2012?xpage=xp…
that actually works!
I do not can understand why The $doc and the $tdoc variable is “undefined” at runtime…
Any suggestion?
Thank you very much
Nazzareno Pompei
PS: I’m experiencing a problem with import page too, is it entangled?
http://apice.unibo.it/xwiki/bin/download/Sandbox/WebHome/importBug.png
--------------------------------------------------------------------------------------------+
Ing. Nazzareno Pompei
DISI - Dipartimento di Informatica: Scienze ed Ingegneria
e-mail :nazzareno.pompei@unibo.it
Tel. : +39 0547339205 Fax. : +39 0547339208
Il presente messaggio ed i suoi allegati devono intendersi
di tipo confidenziale ad uso esclusivo dei suoi destinatari.
Il mittente declina ogni responsabilità in caso di intercettazione o modifica.
In caso di ricezione per errore del messaggio, si prega di cancellarlo,
di distruggerne ogni copia e di darne opportuno avviso al mittente.
--------------------------------------------------------------------------------------------+
Is there a "right" way to make a LiveTable refresh?
I have a page that includes a LiveTable to show the results of a query on an external database, and a form triggers an AJAX call to modify the database (e.g., insert a new row). I'd like the AJAX call to include an action within OnSuccess to make the LiveTable refresh to show these modifications.
http://xwiki.475771.n2.nabble.com/Proposal-Hightlight-applied-filters-in-li…
and
http://jira.xwiki.org/browse/XWIKI-5100
appear to discuss something of this kind, but I couldn't find any instructions. The closest thing was a line in livetable.js
https://github.com/xwiki/xwiki-platform/blob/4f92c9fc4dc9d4bb7b42a54f3e289f…
where it looks like a refresh is triggered on event "xwiki:livetable:mylivetable:filtersChanged". I have tried calling
document.fire('xwiki:livetable:mylivetable:filtersChanged');
from within a javascript function, but this did not appear to make the "mylivetable" LiveTable update. Could anyone direct me further?
Thanks,
Bryn
Hello everyone!
I have a problem with frames on my xwiki (http://dafedin.myxwiki.org) . Look screenshot in attachment. I have updated wiki but it's dont helps. Help me!
with respect? Dmytro
С уважением,
Дмитрий Федин
dafedin(a)mail.ru
Hi All,
i have a working groovy script which is:
I use a class and add an object to a document. Everytime a object is
attached i look for it with the query and do something with the objects. the
strange thing is that i try to port it to a service to java. where i get in
groovy an title of the document it is NOT given in java.
The java code of the service
I didn't get it. Did i do something wrong? i never get a title of the
document. I can read the document, the object of the document, but i did not
get the title. I tried also to get translated documents because i use locals
de and en. But even there i get the title back.
You know why?
Regards,
Matthias
--
View this message in context: http://xwiki.475771.n2.nabble.com/Empty-Document-Title-tp7593748.html
Sent from the XWiki- Users mailing list archive at Nabble.com.