I am out of the office until 11/04/2009.
I will not have access to email. For wiki assistance, please contact Kim
Dillon.
Note: This is an automated response to your message "users Digest, Vol 28,
Issue 5" sent on 11/3/09 6:00:12.
This is the only notification you will receive while this person is away.
Hello,
We are having a problem with Xwiki 2.0.2. Everything was working for a few days but now when people go to edit their pages they do not get a drop down for the Edit button. You can only click edit and it brings you to the Wysiwyg editor. If there are links to other pages in the page we are editing and when we try to save you get the below error. When you try to switch to Wiki edit mode on the right hand side you get the same error. How can we fix this?? Really need some help here. Let me know if you need more info.
Thanks
content: Exception while parsing HTML
Mike Ruocco
Network Engineer
INPUT
11720 Plaza America Drive, Suite 1200, Reston, Virginia 20190
Direct: 703+707+3506; Fax 703-707-6201
mruocco(a)input.com
http://www.input.com
This email and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email and any such files in error and that any use, dissemination, forwarding, printing or copying of this email and/or any such files is strictly prohibited. If you have received this email in error please immediately notify postmaster(a)input.com<mailto:postmaster@input.com> and destroy the original message and any such files.
{*}
Hello,
I had activated the statistics in xwiki.cfg :
xwiki.stats=1
xwiki.stats.default=1
But in the Stats space, no statistics are registered.
In the config file, we can read : "storage can be enabled/disabled by wiki
using the XWikiPreference property "statistics". What does it mean ? I don't
have any "statistics" attribute in the XWikiPreferences object.
XWiki initially installed in 1.9.2 and upgraded to 2.0.2.
Thank you for your help.
Maxime
Finally, I have a working version of the code to access the Xwiki RESTful
API.
It worked smooth on a Tomcat 6.0.14 + JDK 1.5 machine. But had to make
certain changes to the bootstrap files for JDK 1.6 as I mentioned in the
previous post. I have used the Apache HTTP HTTPClient 3.1 jar files here but
soon will upgrade that to Apache HTTPClient 4.0. The only change in the code
from the one posted at
http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI are the
lines Unmarshaller un = context.createUnmarshaller(); and the line Page page
= (Page) ((JAXBElement)
un.unmarshal(getMethod.getResponseBodyAsStream())).getValue();
The default object that getMethod returns turned out to be a JAXBElement
rather than a Page object. Hence, had to do some class casting.
A big thanks to Fabio Mancinelli & Sergiu Dumitriu for helping me out on
this one.
Just one more request though. Do we cast the
getMethod.getResponseBodyAsStream() to Tags class (if we want to retrieve a
list of pages based on their tags) or the SearchResults class (if we want to
retrieve pages returned through a page search). Even though, I cast the
getMethod.getResponseBodyAsStream to the tags class, my compiler still
throws an error for class cast exception : org.xwiki.Pages. Could someone
please post a snippet to access pages with specific tags or any other
complex querying using classes in the org.xwiki classes. Any help on this
would be greatly appreciated friends.
/*
JDK: 1.5
Tomcat: 6.0.14 (Xwiki server)
Libraries: Apache HTTPClient 3.1, JAXB 2.1, Apache Commons Logging 1.1.1 &
Apache Commons Codec 1.4
Class File Dependencies: org.xwiki package of class files generated from the
XSD file at
http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-rest/src/main/r
esources/xwiki.rest.model.xsd with the help of the XJC compiler available in
the JAXB 2.1 distribution
*/
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.List;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.methods.GetMethod;
import org.xwiki.Page;
public class Main {
public static void main(String[] args) throws JAXBException,
HttpException, IOException {
HttpClient httpClient = new HttpClient();
JAXBContext context = JAXBContext.newInstance("org.xwiki");
Unmarshaller un = context.createUnmarshaller();
GetMethod getMethod = new
GetMethod("http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/We
bHome");
getMethod.addRequestHeader("Accept", "application/xml");
httpClient.executeMethod(getMethod);
Page page = (Page) ((JAXBElement)
un.unmarshal(getMethod.getResponseBodyAsStream())).getValue();
System.out.println(page.getCreator());
System.out.println(page.getCreated());
System.out.println(page.getFullName());
System.out.println(page.getXwikiAbsoluteUrl());
}
}
Hello,
I'm a very keen and happy user of xwiki. We use it for our corporate
intranet and our users love it! I generally move directly between major
versions as soon as convenient. The factor that has the most bearing on
when we upgrade is the ease with which we can move between new versions.
I remember seeing an items relating to simpler installation. I'd like to
ask when that is scheduled to be worked on, and perhaps share some of my
experiences in upgrading and some suggestions.
I'd like to give you an idea of what has to be done to move between
versions. It's a bit long, so bear with me, but here it is:
* Download the latest xwiki xar to your local machine
* Download the latest xwiki war to the machine which will run xwiki.
* Backup the entire xwiki installation directory (the one that contains
the directories database, jetty, lucene etc), and move the old directory
aside (rename to xwiki.old)
* //We do this to easily be able to get the jetty, hsql, etc dirs back
in place//: Restore the backed up xwiki directory, thus putting the
xwiki dir back in place
* Delete the directory xwiki/webapps/xwiki
* In xwiki/webapps, create an xwiki directory
* Unzip the xwiki war in the xwiki/webapps/xwiki directory
* //Getting our corp logo back//: Copy
xwiki.old/webapps/xwiki/skins/toucan/mywiki.jpg to
xwiki/webapps/xwiki/skins/toucan/mywiki.jpg
* //Next few steps: need to merge old config with new config//: Do a
diff between xwiki.old/webapps/xwiki/WEB-INF/xwiki.cfg and
xwiki/webapps/xwiki/WEB-INF/xwiki.cfg. Update
xwiki/webapps/xwiki/WEB-INF/xwiki.cfg as needed.
* Do a diff between xwiki.old/webapps/xwiki/WEB-INF/xwiki.properties and
xwiki/webapps/xwiki/WEB-INF/xwiki.properties. Update
xwiki/webapps/xwiki/WEB-INF/xwiki.properties as needed.
* Do a diff between xwiki.old/webapps/xwiki/WEB-INF/hibernate.cfg.xml
and xwiki/webapps/xwiki/WEB-INF/hibernate.cfg.xml. Update
xwiki/webapps/xwiki/WEB-INF/hibernate.cfg.xml as needed.
* //This is the part we fear the most, for we might accidentally delete
some configuration that we need and we would need to start the whole
process again//: Start XWiki and import the default wiki xar. Be careful
of what you import - read the instructions at
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation#HUpgrading…
.
** The normally excluded pages from import are:
*** XWiki.XWikiPreferences
*** XWiki.XWikiGroups
*** XWiki.XWikiAdminGroup
*** XWiki.WebPreferences
*** XWiki.WebHome
*** XWiki.XWikiUsers
*** XWiki.XWikiAllGroup
*** XWiki.DefaultSkin
*** Main.WebHome
*** Panels.QuickLinks
*** Panels.Search
* //We customise the PDF cover//: The PDF covers files has been manually
modified. Do a diff between
xwiki.old/webapps/xwiki/templates/pdfcover.vm and
xwiki/webapps/xwiki/templates/pdfcover.vm. Merge the differences.
* //We customise the PDF footer//: The PDF footers file has been
modified by hand. Do a diff between
xwiki.old/webapps/xwiki/templates/pdffooter.vm and
xwiki/webapps/xwiki/templates/pdffooter.vm. Merge the differences.
* //We do this to be able to specify the PDF template to use in "Export
as PDF"//: The Menuitems have to be edited by hand, so that PDFs are
exported using the correct stylesheet. Do a diff between
xwiki.old/webapps/xwiki/templates/menuview.vm and
xwiki/webapps/xwiki/templates/menuview.vm. Merge the differences (there
should only be one line).As you can see, there are quite a few steps,
and it normally takes 1/2hr - 1hr to complete. Note that we will move to
MySQL eventually, but the performance of HSQL is OK ATM.
This may not be the most optimal upgrade path, so if there are any clear
improvements you can see, please let me know.
The part that needs to be improved upon the most, in my opinion, is the
"import default XAR" step because it is easy to overwrite an important
page. I would like to put in a big vote for separating information that
can be modified by the user from information that xwiki needs to be able
to operate, that comes with default xwiki. Perhaps making certain pages
"system" pages so that it is clear that if a page is modified it may
interrupt the operation of the wiki, and may be difficult to upgrade.
The next most important thing to be improved is the storage of
configuration that now sits in xwiki.cfg and xwiki.properties. This is
difficult to migrate between versions. If this was automatically
migrated between versions like the pages are, this would be much easier
to manage. At our office we have a large system written in Java and we
solved a similar problem using the Java Preferences API.
Being able to fully customise the PDF layout (not just the stylesheet)
inside xwiki, and also specify a default PDF style sheet to use during
export would be #3 on my list.
I'm interested in hearing some thoughts.
Regards,
Nigel
Hi,
I'd like to use the Grid/LiveTable components to list data and create links to edit pages for that data. I would also like to add restrictions so that only users who created that data can edit it.
>From my understanding it is not possible to restrict edits for individual xwiki class objects to only users who created that object (along with an administrator user) as edit permissions can only be set at the page level and not at the individual object level.
The solution I was thinking about was to create a new page for each record then restrict edit permissions at the page level.
This would however require me to aggregate all of the xwiki class objects on a single page so that they could be used with the grid/LiveTable component. I can't however see a way of doing this. Is this possible or is there a better way of doing this?
Thanks in advance,
Radek
Hi,
I am currently trying to set up XWiki Enterprise 1.6.1 to use JBossCache in
REPL_ASYNC mode, but I am current experiencing a few issues.
I discovered that the directory structure WEB-INF/cache/jbosscache is not
correct, so I renamed the folder jbosscache to jboss. The default.xml file
had an incorrect tag EvictionConfig instead of the correct
EvictionPolicyConfig.
After fixing the 2 minor issues (tested in LOCAL mode) mentioned above,
nothing can be stored in the cache due to serializable issue, the stack
traces:
With UseLazyDeserialization = true
2009-07-13 12:30:05,080 ERROR [STDERR] org.jboss.cache.CacheException:
java.io.NotSerializableException: Marshalled values can only wrap Objects
that are serializable! Instance of class com.xpn.xwiki.doc.XWikiD
ocument won't Serialize.
2009-07-13 12:30:05,081 ERROR [STDERR] at
org.jboss.cache.interceptors.InterceptorChain.invoke(InterceptorChain.java:227)
2009-07-13 12:30:05,081 ERROR [STDERR] at
org.jboss.cache.invocation.CacheInvocationDelegate.put(CacheInvocationDelegate.java:480)
2009-07-13 12:30:05,081 ERROR [STDERR] at
org.xwiki.cache.jbosscache.internal.JBossCacheCache.set(JBossCacheCache.java:146)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:143)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:128)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1271)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1233)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1228)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.plugin.calendar.CalendarPlugin.getCalendarEventClass(CalendarPlugin.java:84)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.plugin.calendar.CalendarPlugin.init(CalendarPlugin.java:335)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.plugin.XWikiPluginManager.initPlugin(XWikiPluginManager.java:155)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.plugin.XWikiPluginManager.addPlugin(XWikiPluginManager.java:92)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.plugin.XWikiPluginManager.addPlugins(XWikiPluginManager.java:120)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.XWiki.preparePlugins(XWiki.java:1008)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.XWiki.initXWiki(XWiki.java:727)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.XWiki.<init>(XWiki.java:655)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:315)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:386)
2009-07-13 12:30:05,081 ERROR [STDERR] at
com.xpn.xwiki.xmlrpc.XWikiReflectiveXmlRpcHandler.execute(XWikiReflectiveXmlRpcHandler.java:85)
2009-07-13 12:30:05,081 ERROR [STDERR] at
org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:43)
2009-07-13 12:30:05,081 ERROR [STDERR] at
org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:83)
2009-07-13 12:30:05,081 ERROR [STDERR] at
org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:182)
2009-07-13 12:30:05,081 ERROR [STDERR] at
org.apache.xmlrpc.webserver.XmlRpcServletServer.execute(XmlRpcServletServer.java:103)
2009-07-13 12:30:05,081 ERROR [STDERR] at
org.apache.xmlrpc.webserver.XmlRpcServlet.doPost(XmlRpcServlet.java:120)
2009-07-13 12:30:05,081 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
..............
And with UseLazyDeserialization = false
2009-07-13 12:38:57,160 ERROR [STDERR] org.jboss.cache.CacheException:
Unable to invoke method public void org.jboss.cache.RPCManagerImpl.start()
on object instance org.jboss.cache.RPCManagerImpl@1938222
2009-07-13 12:38:57,161 ERROR [STDERR] at
org.jboss.cache.util.reflect.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:127)
2009-07-13 12:38:57,161 ERROR [STDERR] at
org.jboss.cache.factories.ComponentRegistry$PrioritizedMethod.invoke(ComponentRegistry.java:932)
2009-07-13 12:38:57,161 ERROR [STDERR] at
org.jboss.cache.factories.ComponentRegistry.internalStart(ComponentRegistry.java:718)
2009-07-13 12:38:57,161 ERROR [STDERR] at
org.jboss.cache.factories.ComponentRegistry.start(ComponentRegistry.java:582)
2009-07-13 12:38:57,161 ERROR [STDERR] at
org.jboss.cache.invocation.CacheInvocationDelegate.start(CacheInvocationDelegate.java:279)
2009-07-13 12:38:57,161 ERROR [STDERR] at
org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:95)
2009-07-13 12:38:57,161 ERROR [STDERR] at
org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:79)
2009-07-13 12:38:57,161 ERROR [STDERR] at
org.xwiki.cache.jbosscache.internal.JBossCacheCache.initialize(JBossCacheCache.java:101)
2009-07-13 12:38:57,161 ERROR [STDERR] at
org.xwiki.cache.jbosscache.internal.JBossCacheCacheFactory.newCache(JBossCacheCacheFactory.java:78)
2009-07-13 12:38:57,161 ERROR [STDERR] at
com.xpn.xwiki.store.XWikiCacheStore.initCache(XWikiCacheStore.java:99)
2009-07-13 12:38:57,161 ERROR [STDERR] at
com.xpn.xwiki.store.XWikiCacheStore.initCache(XWikiCacheStore.java:84)
2009-07-13 12:38:57,161 ERROR [STDERR] at
com.xpn.xwiki.store.XWikiCacheStore.<init>(XWikiCacheStore.java:64)
2009-07-13 12:38:57,161 ERROR [STDERR] at
com.xpn.xwiki.XWiki.initXWiki(XWiki.java:679)
2009-07-13 12:38:57,161 ERROR [STDERR] at
com.xpn.xwiki.XWiki.<init>(XWiki.java:655)
2009-07-13 12:38:57,161 ERROR [STDERR] at
com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:315)
2009-07-13 12:38:57,161 ERROR [STDERR] at
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:386)
2009-07-13 12:38:57,161 ERROR [STDERR] at
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:135)
2009-07-13 12:38:57,161 ERROR [STDERR] at
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
2009-07-13 12:38:57,161 ERROR [STDERR] at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
2009-07-13 12:38:57,161 ERROR [STDERR] at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
2009-07-13 12:38:57,161 ERROR [STDERR] at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
2009-07-13 12:38:57,161 ERROR [STDERR] at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
2009-07-13 12:38:57,162 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
2009-07-13 12:38:57,162 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
2009-07-13 12:38:57,162 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
2009-07-13 12:38:57,162 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2009-07-13 12:38:57,162 ERROR [STDERR] at
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:94)
2009-07-13 12:38:57,162 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
2009-07-13 12:38:57,162 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
Has anyone ever managed to get XWiki running with a replicated cache (JBoss
or OSCache) ????
Any help is greatly appreciated.
Cheers,
Andy
Hello XWiki users,
I have worked a lot with XWiki Skins on the top of XWiki Enterprise
instances and I wanted to share my experience with you all. This is why
I created a new XWiki Skins tutorial that you can find it here:
http://dev.xwiki.org/xwiki/bin/view/Drafts/XWikiNewSkin . It would be
great if you could give me your feedback about this tutorial.
Enjoy customizing your XWiki Enterprise instances!
Raluca Stavro.
Hi Sergiu,
Thanks for taking the time out to look into the issue.
I reinstalled the XWiki instance & now have a clean XWiki instance. I
checked the xwiki/WEB-INF/lib folder and I see that the JAXB library shipped
with XWiki is JAXB2.1 (jaxb-api-2.1, jaxb-fluent-api-2.1.8,
jaxb-impl-2.1.10,jaxb-xjc-2.1.8,jaxrpc-api-1.1 & activation-1.1).
Tried accessing the URL
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome
directly from the browser.
Following is the java.lang.Linkage error that I get:
java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap
classloader, but this RI (from
jar:file:/C:/Tomcat6.0/webapps/xwiki/WEB-INF/lib/jaxb-impl-2.1.10.jar!/com/s
un/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the
endorsed directory mechanism to place jaxb-api.jar in the bootstrap
classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/)
com.sun.xml.bind.v2.model.impl.ModelBuilder.<clinit>(ModelBuilder.java:173)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.j
ava:431)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:288)
com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBCon
textImpl.java:1111)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:121)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
javax.xml.bind.ContextFinder.newInstance(Unknown Source)
javax.xml.bind.ContextFinder.find(Unknown Source)
javax.xml.bind.JAXBContext.newInstance(Unknown Source)
javax.xml.bind.JAXBContext.newInstance(Unknown Source)
org.restlet.ext.jaxrs.internal.provider.AbstractJaxbProvider.getJaxbContext(
AbstractJaxbProvider.java:63)
org.restlet.ext.jaxrs.internal.provider.AbstractJaxbProvider.marshal(Abstrac
tJaxbProvider.java:84)
org.restlet.ext.jaxrs.internal.provider.JaxbProvider.writeTo(JaxbProvider.ja
va:106)
org.restlet.ext.jaxrs.internal.wrappers.provider.SingletonProvider.writeTo(S
ingletonProvider.java:335)
org.restlet.ext.jaxrs.internal.util.JaxRsOutputRepresentation.write(JaxRsOut
putRepresentation.java:105)
com.noelios.restlet.http.HttpServerCall.writeResponseBody(HttpServerCall.jav
a:492)
com.noelios.restlet.http.HttpServerCall.sendResponse(HttpServerCall.java:428
)
com.noelios.restlet.ext.servlet.ServletCall.sendResponse(ServletCall.java:40
7)
com.noelios.restlet.http.HttpServerConverter.commit(HttpServerConverter.java
:391)
com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:148)
com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881
)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117)
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFi
lter.java:295)
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFi
lter.java:112)
Hello folks,
The REST example at
http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI seems to
be working fine to quite some extent.
I retrieved the xwiki.org Main.WebHome page in the XML format. However, the
same code returns empty result if I look for the Main.WebHome on
localhost:8080/xwiki.
Is there something that I need to enable on my localhost XWiki instance. I
see that xwiki.org has been upgraded to version 2.0.2 which is the same
version on my machine.
I am using tomcat 6.0.18 with MySql 5.
Also, the URL
http://www.xwiki.org/xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome
returns a well formed XML document.
However, the URL
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome
returns an error : XML Parsing Error: no element foundLocation:
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome Line
Number 1, Column 1: in Mozilla FF
& the error : XML document must have a top level element. Error processing
resource 'http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/... in IE8
I am retrieving XML info through the following code:
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBContext.*;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.methods.GetMethod;
import java.io.IOException;
import java.io.InputStream;
public class Main{
public static void main(String[] args) throws JAXBException, IOException {
HttpClient httpClient = new HttpClient();
JAXBContext context = JAXBContext.newInstance("org.xwiki");
Unmarshaller un = context.createUnmarshaller();
GetMethod getMethod = new
GetMethod("http://xwiki.org/xwiki/rest/wikis/xwiki/spaces/Main/pages/WebHome
");
getMethod.addRequestHeader("Accept", "application/xml");
httpClient.executeMethod(getMethod);
InputStream is = getMethod.getResponseBodyAsStream();
System.out.println(getMethod.getResponseBodyAsString());
//Page page = (Page) un.unmarshal(getMethod.getResponseBodyAsStream());
}
}
Any help would be greatly appreciated. Thank you.
Regards,
Dilipkumar Jadhav
When we try to search this is what we get. What am I missing?
Thanks for any help!
org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate
Velocity Macro for content [$xwiki.jsfx.use("uicomponents/search/search.js",
false)##
$xwiki.ssfx.use("uicomponents/search/search.css", true)##
## Disable the document extra data: comments, attachments, history...
#set($docextras = [])
#set ($rssmode = ("$!request.xpage" == 'plain'))
## ---------------
## Space filtering
## ---------------
#set($spaces = $xwiki.spaces)
#set($selectedSpace = "$!request.space")
## ---------------
## Space macros
## ---------------
#macro(spaceoption $space $selectedSpace)
<option value="${space}" #if($selectedSpace ==
$space)selected="selected"#end>$space</option>
#end
#macro(spaceselect $selectedSpace $spaces)
<select name="space" title="$msg.get('xe.search.bar.spaces.title')">
<option value="" #if($selectedSpace ==
'')selected="selected"#end>$msg.get('xe.search.bar.spaces.all')</option>
#foreach($space in $spaces)
#if (!$blacklistedSpaces.contains($space))
#spaceoption($space $selectedSpace)
#end
#end
</select>
#end
##
##
#set($text = "$!request.getParameter('text')")
#set($utext = $util.encodeURI($text))
##
{{html}}
<form action="" id="searchBar">
<div class="centered">
<input type="text" name="text" class="searchQuery #if($text == '')
defaultText#end" #if($text == '')
value="$msg.get('xe.search.bar.query.tip')" #else
value="$xwiki.getXMLEncoded(${text})" #end
title="$msg.get('xe.search.bar.query.title')"/>
#spaceselect($selectedSpace $spaces)
<input type="submit" class="searchButton"
value="$msg.get('xe.search.bar.submit')"
title="$msg.get('xe.search.bar.submit.title')"/>
</div>
</form>
{{/html}}
##
#set($space = $selectedSpace)
#set($datedlist = $util.arrayList)
#if("$!text" == '')
## No search
#else
#set($text = $text.replaceAll("'", "''").replaceAll("%", "\\%"))
#set($nbitems = 50)
## ----------------------------------------------------------------------
## Exclude Blacklisted spaces ($blacklistedSpaces is set in xwikivars.vm)
## Also exclude WebPreferences.
## ----------------------------------------------------------------------
#set ($webClause = '')
#foreach ($blacklistedSpace in $blacklistedSpaces)
#set ($webClause = "${webClause} doc.space <> '$blacklistedSpace' and")
#end
#if(!$hasAdmin && !$isAdvancedUser)
#set ($webClause = "${webClause} doc.name<>'WebPreferences' and")
#end
## -----------------------------------------------------------
## Display only a given space if $request.space is defined
## -----------------------------------------------------------
#if("$!space" != '')
#set ($webClause = "${webClause} doc.space='$space' and")
#end
#macro(addelement $item $list)
#if($xwiki.hasAccessLevel('view', $context.user,
"${context.database}:${item}"))
#set($itemdoc = $xwiki.getDocument($item))
## All items will be sorted by the date; since the list is obtained
from several queries, we can't order in the HQL.
## Prefix all item names with the date for sorting the combined
results.
#set($sdate = $xwiki.formatDate($itemdoc.date, 'yyyyMMddHHmmss'))
#set($sitem = "${sdate}${item}")
#if(!$list.contains($sitem))
#set($discard = $list.add($sitem))
#end
#end
#end
## -----------------------------------------------------------
## Search in the page names
## -----------------------------------------------------------
#set ($sql = "where $webClause upper(doc.fullName) like upper('%$!text%')
order by doc.date desc")
#foreach ($item in $xwiki.searchDocuments($sql , $nbitems, 0))
#addelement($item $datedlist)
#end
## -----------------------------------------------------------
## Search in page content
## -----------------------------------------------------------
#set ($sql = "where $webClause upper(doc.content) like upper('%$!text%')
order by doc.date desc")
#foreach ($item in $xwiki.searchDocuments($sql , $nbitems, 0))
#addelement($item $datedlist)
#end
## -----------------------------------------------------------
## Search in text fields (simple String properties)
## -----------------------------------------------------------
#set($sql= ", BaseObject as obj, StringProperty as prop where $webClause
obj.name=doc.fullName and prop.id.id = obj.id and upper(prop.value) like
upper('%$!text%')")
#foreach ($item in $xwiki.searchDocuments($sql , $nbitems, 0))
#addelement($item $datedlist)
#end
## -----------------------------------------------------------
## Search in big text fields (textarea properties)
## -----------------------------------------------------------
#set($sql= ", BaseObject as obj, LargeStringProperty as prop where
$webClause obj.name=doc.fullName and prop.id.id = obj.id and
upper(prop.value) like upper('%$!text%')")
#foreach ($item in $xwiki.searchDocuments($sql , $nbitems, 0))
#addelement($item $datedlist)
#end
#end
#set($list = $util.arrayList)
#foreach($item in $util.sort($datedlist))
## datedlist contains items prefixed with the date; strip the date from
the actual item name:
#set($ok = $list.add(0, $item.substring(14)))
#end
#if ("$!utext" != '')
#if($rssmode)
#set ($feed = $xwiki.feed.getDocumentFeed($list, $util.getHashMap()))
#set ($feedURI = $doc.getExternalURL("view"))
#set ($discard = $feed.setLink($feedURI))
#set ($discard = $feed.setUri($feedURI))
#set ($discard = $feed.setAuthor('XWiki'))
#set ($discard = $feed.setTitle($msg.get('xe.search.rss', [$text])))
#set ($discard = $feed.setDescription($msg.get('xe.search.rss',
[$text])))
#set ($discard = $feed.setLanguage($context.language))
#set ($discard =
$feed.setCopyright($xwiki.getXWikiPreference('copyright')))
$xwiki.feed.getFeedOutput($feed, $xwiki.getXWikiPreference('feed_type',
'rss_2.0'))
#else
{{include document="XWiki.Results"/}}
#if($selectedSpace == '')
#set($rssURL = $xwiki.getURL($doc.fullName, 'view',
"xpage=plain&outputSyntax=plain&text=${utext}" ))
#else
#set($rssURL = $xwiki.getURL($doc.fullName, 'view',
"xpage=plain&outputSyntax=plain&space=${selectedSpace}&text=${utext}"))
#end
{{html}}
${rssURL} $xwiki.getSkinFile( $msg.get("xe.search.rss", ["[$text]"])
{{/html}}
#set($luceneSearch = "[[Main.LuceneSearch?text=$!utext]]")
{{info}}$msg.get('xe.search.lucene.try', [$luceneSearch]){{/info}}
#end
#end
{{velocity}}]
at
org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluate(VelocityMacro.java:118)
at
org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluate(VelocityMacro.java:44)
at
org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:190)
at
org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:52)
at
org.xwiki.rendering.internal.transformation.MacroTransformation.transformOnce(MacroTransformation.java:176)
at
org.xwiki.rendering.internal.transformation.MacroTransformation.transform(MacroTransformation.java:120)
at
org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:72)
at
com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5569)
at
com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5544)
at
com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:550)
at
com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:564)
at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:475)
at sun.reflect.GeneratedMethodAccessor289.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252)
at
org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:493)
at
org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
at
org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:191)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:108)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1694)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1615)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:657)
at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:332)
at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at
org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:212)
at
org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:247)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:191)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:108)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1694)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1615)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:124)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:224)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:155)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:915)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate
content with id [velocity macro]
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:200)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
at
org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluate(VelocityMacro.java:110)
... 91 more
Caused by: org.apache.velocity.exception.MethodInvocationException:
Invocation of method 'searchDocuments' in class com.xpn.xwiki.api.XWiki
threw exception com.xpn.xwiki.XWikiException: Error number 3223 in 3:
Exception while searching documents with SQL [select distinct doc.space,
doc.name, doc.date from XWikiDocument as doc where (doc.hidden <> true or
doc.hidden is null) and upper(doc.content) like upper('%search...%') order
by doc.date desc]
Wrapped Exception: could not execute query at velocity macro[line 89, column
27]
at
org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252)
at
org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:493)
at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:282)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:191)
... 93 more
Caused by: com.xpn.xwiki.XWikiException: Error number 3223 in 3: Exception
while searching documents with SQL [select distinct doc.space, doc.name,
doc.date from XWikiDocument as doc where (doc.hidden <> true or doc.hidden
is null) and upper(doc.content) like upper('%search...%') order by doc.date
desc]
Wrapped Exception: could not execute query
at
com.xpn.xwiki.store.XWikiHibernateStore.searchDocumentsNamesInternal(XWikiHibernateStore.java:2306)
at
com.xpn.xwiki.store.XWikiHibernateStore.searchDocumentsNames(XWikiHibernateStore.java:2270)
at
com.xpn.xwiki.store.XWikiHibernateStore.searchDocumentsNames(XWikiHibernateStore.java:2751)
at
com.xpn.xwiki.store.XWikiCacheStore.searchDocumentsNames(XWikiCacheStore.java:346)
at com.xpn.xwiki.api.XWiki.searchDocuments(XWiki.java:408)
at sun.reflect.GeneratedMethodAccessor272.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
... 102 more
--
View this message in context: http://n2.nabble.com/Error-in-Xwiki-2-0-when-searching-tp3879029p3879029.ht…
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi Fabio,
>The semantics of the "query" parameter of the search method is just a
>free text that is matched agains document names or content.
>
>You cannot execute arbitrary HQL queries using the search method, nor
>there exist a method for doing so in the current XMLRPC api.
>
>-Fabio
You were absolutely right. This method only takes "free text" and searches
it through document names & content.
The results varied greatly if I changed the order of the words being passed
into the "query" parameter.
Also, I wasn't able to retrieve the URL from the search results. Only the
title could be accessed. As a result, I had to pass the top 10 results
iteratively to the getPage method to obtain the URL. The objective here was
to display search results from the XWiki into another application. The
application would pass certain query parameters to XWiki & XWiki would then
return document URLs which might be of help in the other application.
I also began fiddling with the REST api a little bit. I see that a lot of
methods in the examples at
http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI were based
on HttpClient 3.x api & the latest one is 4.0. Also, the JAXB I happen to
use is 2.1 (available in Netbeans as a default plugin). Since, I am new to
this, it will take a lot of time, effort & of course help from friends at
XWiki community to get up to date with the latest api :)
Just a question though - will the REST getMethod call for the
/wikis/{wikiName}/spaces/{spaceName}/search?q={keywords}[[&scope={name,conte
nt,title,objects}...]&number=n] resource result in the same search result as
does the internal wiki default/lucene search. My belief is it will return
the same result since we are fetching the same page.
Thanks for your help & timely response Fabio.
Hello. I'm Eduardo from Barcelona (Spain)
New wiki: "Magia a cascoporro Wiki"
Content/Motivation: To gather secret info (tricks, variations, etc.) between
a group of spanish magicians (illusionists)
And to share another kind of free info
with everybody (about magic also)
My user is : dodonpachi
Server name: magiaacascoporro.myxwiki.org (Yes, there are two "a" in a
row)
Thanks in advance. And see you soon ^_^
Eduardo.
Hi,
some questions:
1) section editing
Edit button is also displayed for unregistered users (when nobody is logged
in and has edit rights).
disabled section editing in xwiki.cfg
Edit button is still there
2) Title handling
tryed to disable it in xwiki.cfg
Get Title and Heading always but was awaiting old behavior.
Also had a problem with a long heading:
Entwicklung der empirischen Sozialforschung in Deutschland seit 1945 -
Aufgaben für die Zukunft
Head it as Title and as heading 1 (also tried heading 2).
Was always displayed twice (title + heading). Is there a length restriction
for the title.
Thanks
hel.
-----
semantic-web.hel.at
hel(a)hel.at
--
View this message in context: http://n2.nabble.com/xwiki-2-0-issues-tp3729506p3729506.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hello friends,
I need a little help here with the XWiki XmlRpc API. I am able to connect to
my xwiki instance using the Swizzle Confluence.
However, I am currently able to only view contents of a particular page
which I supply to the getPage() method.
I would like to build a client which could fetch a list of pages based on
hql queries (which XWiki supports internally).
Could someone please guide me to a search method that could be used here
(eg. search(query, maxinterval) ).
I've tried pushing queries such as search("where doc.creator='XWiki.Admin",
10) but this results into an empty result list.
It was mentioned on the
http://platform.xwiki.org/xwiki/bin/view/Features/XMLRPC that XWiki
implements the most important part of the Confluence
<http://confluence.atlassian.com/display/DOC/Remote+API+Specification>
XML-RPC API including Pages: retrieval, rendering, creation, history,
update, search and removal. Could someone please please guide me as to what
I might be doing wrong here. As always, any help would be much appreciated.
import org.codehaus.swizzle.confluence.SpaceSummary;
import org.codehaus.swizzle.confluence.Confluence;
import java.util.HashMap;
import java.util.List;
import java.util.Vector;
public class ConfluenceExample {
public static void main(String[] args) throws Exception {
String username = "Admin";
String password = "admin";
String endpoint = "http://127.0.0.1:8080/xwiki/xmlrpc/confluence";
Confluence confluence = new Confluence(endpoint);
confluence.login(username, password);
String sql = "where doc.creator='XWiki.Admin'";
List searches = confluence.search(sql, 10);
System.out.println(searches.size());
}
}
Regards,
Dilipkumar Jadhav
Hi
I just realized that I have a bunch of new users all created with the
same first and last name. I saw one with the same name 'Kunstkamera'
being created also on the XWiki.org (or at least I thought so).
Any idea what is going on.
Is there someone trying to spam XWiki's and is there anything to be of
concern as an administrator?
Which leads me to another concern:
Every Import of the Enterprise XAR file is reseting the Admin
password to the default.
Is there anyway to prevent that because in the heat of the upgrade
procedure that gets easily overlooked ?
Cheers - Andy
Hi Everyone,
New to XWiki and we're trying to come up with a migration strategy. Our old
wiki is an ancient version of moinmoin.
We can develop a file parser for the old moinmoin documents on the
filesystem quite easily. The syntax to XWiki is similar, so a couple of
regexes will have the conversion process underway. We're not really
concerned with preserving the wiki history, although that would be nice.
The big problem is, how do we load the pages into XWiki? Is there a
webservice or some sort of API for XAR files available?
Thank you!
--
View this message in context: http://n2.nabble.com/Trying-to-create-migration-path-from-moinmoin-to-xwiki…
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi
I upgraded to 2.0.2 without a problem (http://madplanet.com/xwiki).
The only issue I encountered so far is that I am not able to change
the 'Color Theme' in the Administration -> Presentation even though I
use the Colibri skin as my default skin.
This does not work for the entire Wiki nor for a particular Space.
That said I can access the Color Themes in the ColorThemes space and
the look and feel looks right.
Any idea why?
Thanks - Andy
Thanks for your response Guillaume & Sergiu.
I changed the ColorTheme space to be viewable by Guests. That did resolve
the original issue.
And it happened just in time :)
I recently transitioned not only from MediaWiki to XWiki, but an older
computer running Windows Vista (Ultimate x64) to my present PC, operating on
Windows 7 (Ultimate x64). The reasons for the change and system specs
should, I believe, be irrelevant in this case for the following reasons:
* I was able to install XWiki for All Users without a hitch
* XWiki runs perfectly while logged into the Administrator (aka, the hidden
"Super Administrator") account
Therein, however, is the problem: XWiki runs only in the Administrator
account. The MS-DOS Prompt reads as such while in the Admin-account...
------------------------------------------------------------------------------------------
2009-10-27 14:41:20.279: :INFO: Logging to STDERR via
org.mortbay.log.StdErrLog
2009-10-27 14:41:20.419: :INFO: jetty-6.1.21
2009-10-27 14:41:20.450: :INFO: Deploy C:\Program Files (x86)\XWiki
Enterprise\jetty\contexts\root.xml ->
org.mortbay.jetty.webapp.WebAppContext@7546c1d4(/,C:\Program Files
(x86)\XWiki Enterprise\jetty/../webapps/root)
2009-10-27 14:41:20.466: :INFO: Deploy C:\Program Files (x86)\XWiki
Enterprise\jetty\contexts\xwiki.xml ->
org.mortbay.jetty.webapp.WebAppContext@785f8172</xwiki,C:\Program Files
(x86)\XWiki Enterprise\jetty/../webapps/xwiki)
2009-10-27 14:41:23.196: :INFO: Opened C:\Program Files (x86)\XWiki
Enterprise\jetty\logs\2009_10_27.request.log
2009-10-27 14:41:23.211: :INFO: Started SelectChannelConnector@0.0.0.0:8080
2009-10-27 14:41:23.084 [http://lochalhost:8080/xwiki/bin/view/Main/WebHome]
INFO .AbstractXWikiMigrationManager - No storage migration required since
current version is [15429]
------------------------------------------------------------------------------------------
...yet, when I switch to my personal account (the only other one on the
system, having been that which was created during the OS-installation and
thus, also listed in the Administrator user-group), it reads...
------------------------------------------------------------------------------------------
2009-10-27 14:41:38.512: :INFO: Logging to STDERR via
org.morbay.log.StdErrLog
2009-10-27 14:51:38.673: :INFO: jetty-6.1.21
2009-10-27 14:51:38.718: :INFO: Deploy C:\Program Files (x86)\XWiki
Enterprise\jetty\contexts\root.xml ->
org.mortbay.jetty.webapp.WebAppContext@5492bbba(/,C:\Program Files
(x86)\XWiki Enterprise\jetty/../webapps/root)
2009-10-27 14:51:38.725: :INFO: Deploy C:\Program Files (x86)\XWiki
Enterprise\jetty\contexts\xwiki.xml ->
org.mortbay.jetty.webapp.WebAppContext@6d62dbb6(/xwiki,C:\Program Files
(x86)\XWiki Enterprise\jetty/../webapps/xwiki)
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: xwiki.log (Access is denied)
at java.io.FileOutputStream.openAppend(Native Method)
at.java.io.FileOutputStream.<init>(Unkown Source)
at.java.io.FileOutputStream.<init>(Unkown Source)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
at
org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:165)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)
at
org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
at
org.apache.log4j.config.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
at
org.apache.log4j.config.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
at
org.apache.log4j.config.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
at
org.apache.log4j.config.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
at
org.apache.log4j.config.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441)
at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:468)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at
org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4Logger.java:289)
at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:109)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1116)
at
org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:914)
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:604)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:336)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:310)
at org.apache.commons.logging.impl.LogFactory.getLog(LogFactory.java:685)
at
org.xwiki.component.logging.CommonsLoggingLogger.<init>(CommonsLoggingLogger.java:38)
at
org.xwiki.component.embed.EmbedableComponentManager.initialize(EmbedableComponentManager.java:67)
at
org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:52)
at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mortbay.start.Main.invokeMain(Main.java:194)
at org.mortbay.start.Main.start(Main.java:534)
at org.mortbay.start.Main.start(Main.java:441)
at org.mortbay.start.Main.main(Main.java:119)
2009-10-27 14:51:41.849: :WARN: failed
org.mortbay.jetty.NCSARequestLog@75c45731: java.io.FileNotFoundException:
C:\Program Files (x86)\XWiki Enterprise\jetty\logs\2009_10_27.request.log
(Access is denied)
2009-10-27 14:51:41.850: :WARN: failed RequestLogHandler@2d388e5e:
java.io.FileNotFoundException: C:\Program Files (x86)\XWiki
Enterprise\jetty\logs\2009_10_27.request.log (Access is denied)
2009-10-27 14:51:41.854: :WARN: failed HandlerCollection@5c0ad483:
java.io.FileNotFoundException: C:\Program Files (x86)\XWiki
Enterprise\jetty\logs\2009_10_27.request.log (Access is denied)
2009-10-27 14:51:41.854: :WARN: Error starting handlers
java.io.FileNotFoundException: C:\Program Files (x86)\XWiki
Enterprise\jetty\logs\2009_10_27.request.log (Access is denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at
org.mortbay.util.RolloverFileOutputStream.setFile(RolloverFileOutputStream.java:243)
at
org.mortbay.util.RolloverFileOutputStream.<init>(RolloverFileOutputStream.java:164)
at org.mortbay.jetty.NCSARequestLog.doStart(NCSARequestLog.java:428)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:117)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mortbay.start.Main.invokeMain(Main.java:194)
at org.mortbay.start.Main.start(Main.java:534)
at org.mortbay.start.Main.start(Main.java:441)
at org.mortbay.start.Main.main(Main.java:119)
2009-10-27 14:41:41.897: :INFO: Started SelectChannelConnector@0.0.0.0:8080
------------------------------------------------------------------------------------------
...whereas attempting to run the start_wiki.bat file via the "Run as
Administrator" right-click option leads to...
------------------------------------------------------------------------------------------
Unable to access jarfile jetty/start.jar
------------------------------------------------------------------------------------------
...directing my browser (Firefox 3.5.3) to the appropriate page leads to:
ACTUAL WEBPAGE (http://lochalhost:8080/xwiki/bin/view/Main/WebHome) DISPLAY:
HTTP ERROR: 404
Problem accessing /xwiki/bin/view/Main/WebHome. Reason:
NOT_FOUND
Powered by Jetty://
To the best of my knowledge, this is clearly an issue of account
permissions, however, given that my knowledge of Java is (at best) cursory,
I am appealing to anyone who can lend a hand. I'm quite willing to supply
any other information that is dubbed necessary.
NOTE: The same results are obtained whether UAC is on or off. The same also
applies after having switched the program ownership permission to my
personal account.
--
View this message in context: http://n2.nabble.com/Windows-7-Account-Renders-XWiki-Inoperable-tp3903667p3…
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hello all,
Background: We're trying to build a searchable user directory of XWiki users
where people can be searched by specialty. The deal here is that each user
who contributes to the wiki is good at something and we wanted other users
to be able to find contributors by their specialty in case they need some
help.
XWiki Feature: We are using the livetable user directory example provided on
the xwiki.org website & it works great. However, users are adding their
specialty through the tags on their own profile pages. This too is
searchable using the livetable macro option to enable a tagcloud.
Concern/Issue: Our user base is currently a few hundred and is expected to
grow rapidly soon. Each user has some tags to add to his profile which leads
to a lot of tags in the tagcloud right above the livetable. Also, the page
loading has become very slow since the entire tag cloud is loading along
with the livetable.
Possible Solution: Could it be possible to use the ajax suggest to type in
these "specialty" tags rather than display an entire tag cloud on the
livetable page. The single tag textbox would provide the search criteria to
the livetable document filtering process. Alternatively, could someone
please help me with the search query for pulling up pages with
XWiki.XWikiUsers objects by using values of XWiki.Tags objects on the same
document. I've looked up queries for hql searches & unable to find one which
crosses multiple classes . Most queries are searches based on objects of one
class only. (Can we have 2 BaseObjects, let's say obj1 & obj2 to represent
the two different object types embedded in the same document).
Any help would be greatly appreciated.
Regards,
Dilipkumar Jadhav
Hello all,
We've been trying to setup wiki access rights in a manner that only
registered users can access pages. As a result, we blocked any unregistered
user from either viewing or editing pages without a login. This was due to
the fact that we were trying to setup a feedback mechanism where it was
important to know who gives the feedback. However, due to these access right
changes, the Colibri skin themes applied from the presentation control panel
no longer work. The default Colibri theme (with the gray background) is what
comes up. I am assuming this is due to the fact that the themes too are
pages in the wiki (with the Colibri skin & ColorTheme space being
introduced) & blocking everyone out from viewing/editing pages will apply
the same access rights to the ColorTheme space.
The strange part is when a user does login, still the skin remains the
default one and doesn't change to the theme set in the presentation panel.
Could anyone please recommend a workaround to this. Thank you for your time
& consideration.
Regards,
Dilipkumar Jadhav
Hi,
I am using xwiki fro my organization.
In some cases the date format is appearing wrong, like the month filed is displaying "36".
How can it be possible and what should i do to correct this.
Regards
Jasvent
Eperium Business Soln. Pvt. Ltd.
eperium. e-commerceunlimited
Yahoo! India has a new look. Take a sneak peek http://in.yahoo.com/trynew
Hi!
XWiki SAS is interestred to gather testimonials about XWiki Enterprise
and propose an original way to get them. Tell us why you love this
solution, why you find it interesting, innovating... in less than 140
characters on Twitter (by sending a tweet to @xwiki
<http://www.twitter.com/xwiki>). All the tweets will be listed on
http://xwiki.com and http://www.xwiki.org
"You can also help the project by creating a page on
http://www.xwiki.org/xwiki/bin/view/References/ that explains how you
use XWiki."
Many Thanks, in advance, for your participation.
Emilie Ogez
--
Marketing & Communication Manager
Mob. : +33( 0)623414368
Email : Emilie.Ogez(a)xwiki.com
http://www.xwiki.comhttp://www.twitter.com/eogez