Hi,
I'd like to do a kind of SQL request with XWiki in order to get a data store
in an Object.
Here's my problem :
1 I've created a Class in XWiki in order to create a form for users. In this
class I've named one of a property ID that should allow me to distinct
objects.
2. I've created a template associated to this class that contain a single
Object of this class.
3. I've created a Form to allow users to fill the data. The problem I have is
that I have to give a unique name for the document created. Thus I thought to
use to ID property that I've created. So I wanted to do a SQL Query to get
the maximum id and by this way my new document name would be Data.Doc"ID+1".
The problem is that I don't know how to access the desired property with
XWiki. I've read the documentation about the data model :
http://www.xwiki.org/xwiki/bin/view/DevGuide/Database+Schema but I didn't
find the solution to my problem.
If I execute the following Query (my class is XWiki.CFPClass):
#set ($sql = "select distinct obj from XWikiDocument as doc, BaseObject as obj
where obj.name=doc.fullName and obj.className='XWiki.CFPClass' and
doc.name!='CFPClassTemplate'")
with this code :
#foreach ($item in $xwiki.search($sql))
$item <br />
#end
I get fine my objects :
CFP.Test 0 XWiki.CFPClass
CFP.Test1 0 XWiki.CFPClass
But I don't know how can I reach the property ? The property class seems to be
'BaseProperty' but I don't know how can I add it with the query.
if I test a query like this :
select distinct prop.name from XWikiDocument as doc, BaseObject as obj,
BaseProperty as prop where obj.name=doc.fullName and
obj.className='XWiki.CFPClass' and doc.name!='CFPClassTemplate'
I get all the existing properties even the ones which aren't in the class
XWiki.CFPClass.
Any Idea ?
--
Xavier MOGHRABI - Consortium ObjectWeb
Email: xavier.moghrabi at objectweb.org
Phone: +33 4 76 61 52 35 - Skype ID: xavier.moghrabi.bureau
In moving content over from our Zope driven site, I have noticed that
several times the content of the Zope page creeps into the right margin
and pollutes the Search column. Is there a global setting that will
change the XWiki format so that it will auto adjust for the content?
With the Toolbar editor, I am sure I could remove the whole column,
however I don't want to. Just make it allow for content so it will
shift to the right automagically.
Thanks,
Tim Suter
Hi,
I try to set up virtual wikis by following the documentation :
http://www.xwiki.com/xwiki/bin/view/Doc/HowToSetupVirtualWikis
However when I went to the page XWiki.XWikiServerClass, I got the following
error. I was using xWiki 0.9.840 with UTF-8 configuration :
Error number 0 in 11: Uncaught exception
Wrapped Exception: String index out of range: -7
com.xpn.xwiki.XWikiException: Error number 0 in 11: Uncaught exception
Wrapped Exception: String index out of range: -7
at com.xpn.xwiki.web.ViewEditAction.execute(ViewEditAction.java:224)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run()V(Unknown Source)
Wrapped Exception:
java.lang.StringIndexOutOfBoundsException: String index out of range: -7
at java.lang.String.substring(II)Ljava.lang.String;(Unknown Source)
at com.xpn.xwiki.XWiki.getDocumentFromPath(XWiki.java:627)
at com.xpn.xwiki.XWiki.prepareDocuments(XWiki.java:2428)
at com.xpn.xwiki.web.ViewEditAction.execute(ViewEditAction.java:133)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run()V(Unknown Source)
Any clue ?
--
Xavier MOGHRABI - Consortium ObjectWeb
Email: xavier.moghrabi at objectweb.org
Phone: +33 4 76 61 52 35 - Skype ID: xavier.moghrabi.bureau
Hi everybody,
I have this issue with usernames: it appears that too long logins
prevent users from logging in. What is the actual limit for login names,
and is there a way to extend it?
As a test I have registered on xwiki.org a user with a username having
100 characters, and they cannot login indeed.
Locally I see the user is correctly authentified, but then there's a
problem with the cookie. Here's the trace I get:
==============
!remember-me cookie validation hash mismatch!
!remember-me cookie has been tampered with!
!remember-me cookie is being deleted!
==============
That's a problem for me as my logins are based on the email address, and
some have a length of 100 characters.
Stéphane
--
Stéphane Laurière
slauriere(a)mandriva.com
http://club.mandriva.com
While trying to upgrade an XWiki installation from 0.9.793 to 0.9.840 I
face a MySQL connection problem.
My server config:
=======
MySQL 4.1.12
Tomcat 5.5.9
JDK 1.5
Mandrake Linux virtual server kernel 2.6.9-vs1.9.3
XWiki runs in non virtual mode
URL: http://www.edos-project.org
======
XWiki 0.9.793 works perfectly on that server since a while. When trying
to run the 0.9.840 version with the same Hibernate and XWiki
configuration files, I get the exception below. MySQL "skip-networking"
option is correctly set in /etc/my.cnf. I noticed that the error appears
in some of previous XWiki build reports such as this one:
http://build.xpertnet.biz/cc/buildresults/xwiki?log=log20050628171819Lbuild…
Any hint is welcome!
Note: getting a simple connection to MySQL with the lines below works
perfectly fine on the server.
======================
String url = "jdbc:mysql://localhost/xwiki";
String username = "xwiki";
String password = "passwd";
Connection conn = DriverManager.getConnection(url, username, password);
======================
Exception when running XWiki webapp:
21:32:16,675 WARN http-80-Processor25 http://www.edos-project.org/xwiki/
Configurator:configure:126 - No configuration found. Configuring ehcache
from ehcache-failsafe.xml found in the classpath:
jar:file:/usr/local/tomcat/jakarta-tomcat-5.5.9/webapps/xwiki/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
21:32:21,112 WARN http-80-Processor25 http://www.edos-project.org/xwiki/
JDBCExceptionReporter:logExceptions:71 - SQL Error: 0, SQLState: 08S01
21:32:21,113 ERROR http-80-Processor25
http://www.edos-project.org/xwiki/
JDBCExceptionReporter:logExceptions:72 - Communications link failure due
to underlying exception:
** BEGIN NESTED EXCEPTION **
java.io.EOFException
STACKTRACE:
java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1842)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2288)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2784)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)
at
com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1347)
at
com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:958)
at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1705)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:118)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1239)
at org.hibernate.loader.Loader.doQuery(Loader.java:374)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:210)
at org.hibernate.loader.Loader.doList(Loader.java:1562)
at org.hibernate.loader.Loader.list(Loader.java:1545)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
at
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:840)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
============================
--
Stéphane Laurière
slauriere(a)mandriva.com
Mandriva Club - http://club.mandriva.com
Mandrakesoft becomes Mandriva!
Hi,
I have followed the installation instructions but for some reason I do
not understand I get the following exception:
com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize
main XWiki context
Wrapped Exception: Error number 3201 in 3: Exception while saving document XWiki.XWikiPreferences
Wrapped Exception: Error number 3221 in 3: Exception while saving class XWiki.XWikiPreferences
Wrapped Exception: Error number 3222 in 3: Exception while saving class XWiki.XWikiPreferences
Wrapped Exception: Could not execute JDBC batch update
com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:142)
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:202)
com.xpn.xwiki.web.ViewEditAction.execute(ViewEditAction.java:117)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
Is there a fool (==me) proof way of installing xwiki with JBoss,
PostgreSQL and Debian Sarge AMD64? Is there anyone actually using XWiki
with JBoss??
TIA
--
Groeten,
Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J.Kraaijeveld(a)Askesis.nl
web: www.askesis.nl
Is it possible for xwiki to serve a static VM file that is not
associated with a document? That is, serve a url like "/xwiki/
foo.vm" and have the velocity evaluated? As a workaround, I can do
something like /xwiki/bin/view/XWiki/DummyDoc?xpage=foo.vm but it
seems wasteful to have to query the DB to serve a somewhat static file.
Matt
Hi,
I'm using v0.9.842 on tomcat 4.1.31 with j2sdk1.4.2_06 and postgresql 7.3.5:
I had been editing and building a page thru the bin/edit function over days without problem, then today it would throw the errors below after every save even tho it still made the changes (most of the time).
I tried cutting down the size of the page but finally tried saving a blank page and still got the error so I do not think it was from my mix of wiki syntax and html or html-area generated content that caused the errors.
And, during this whole period I was still able to create and edit other pages than the one I had trouble with. I finally deleted the page, and recreated it w/ a different name but same content and it's fine now.
I had restarted the db server and tomcat but that had no effect.
Does anyone know what this might be? thx in adv -ken
here's the generic-looking error:
Wrapped Exception: Could not execute JDBC batch update
com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving document Csdg.WebAppServersAsRPMs
Wrapped Exception: Could not execute JDBC batch update
at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:540)
at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:557)
at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:77)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:560)
at com.xpn.xwiki.XWikiService.actionSave(XWikiService.java:445)
at com.xpn.xwiki.web.ViewEditAction.execute(ViewEditAction.java:155)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:716)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
[snip]
...sorry at this point I can't do a debug.
I'm sure I'm not the only one who's noticed the outage. Maybe it's time to
think about migrating back to sourceforge, or using some other system that's
a bit more robust?
I got LDAP Authentication working. However, I cannot log in as the
xwiki admin. How do I get that log in AND LDAP working at the same
time? Also, I need the LDAP users to have editing capabilities and not
just be able to view.
Thanks,
Tim