Hi,
Now that XE 1.4RC1 is release I would like to follow with XEM 1.2RC1
on next Tuesday.
It add the wiki name ajax based validation to the wiki creation page
and XE 1.4M2 -> XE 1.4RC1 dependency upgrade.
See http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXEM12RC1
Here is my +1
--
Thomas Mortagne
Hi devs,
I'm working on a new cache component
(http://jira.xwiki.org/jira/browse/XWIKI-2359) to replace the current
cache service. For this I'm refactoring a little the API to improve
extensibility.
I will explain what I modified and I would like to have your point of
views, suggestions and corrections on all this.
First of all, how the current service works :
You ask for cache service (which is more a factory than a service in
fact) containing two major type of factory methods :
- get a cache : create and return a new local or distributed (depends
of the implementation) cache where you can put and retrieve object to
cache with eventually a refresh period
- get a local cache : force to get a cache store in the local computer
All these methods return the same XWikiOSCache interface.
I did not made lots of big modifications (as I want to be sure to
correctly support all current service support), the main difference
with the cache service (except the fact it now a factory component) is
that I separate "normal" cache factory and "local" cache factory in
two separate plexus roles. That way it could have different
implementations configured in the xwiki.cfg like
xwiki.cache.cachefactory.hint=memcache
xwiki.cache.localcachefactory.hint=oscache
And XWiki now contains getCacheFactory and getLocalCacheFactory
methods in place of getCacheService.
As a first example I moved the oscache cache service implementation as
component : I attached a patch for it in
http://jira.xwiki.org/jira/browse/XWIKI-2359
Thanks,
--
Thomas Mortagne
Hi Sergiu,
On May 5, 2008, at 7:59 PM, sdumitriu (SVN) wrote:
> Author: sdumitriu
> Date: 2008-05-05 19:59:18 +0200 (Mon, 05 May 2008)
> New Revision: 9649
>
> Modified:
> xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/
> XWiki.java
> Log:
> [misc] Fix NPE during tests
>
>
> Modified: xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/
> xwiki/XWiki.java
> ===================================================================
> --- xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/
> XWiki.java 2008-05-05 16:57:49 UTC (rev 9648)
> +++ xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/
> XWiki.java 2008-05-05 17:59:18 UTC (rev 9649)
> @@ -3580,7 +3580,9 @@
> // doc.getOriginalDocument()
> ObservationManager om =
> (ObservationManager)
> Utils.getComponent(ObservationManager.ROLE, null, context);
> - om.notify(new DocumentDeleteEvent(doc.getFullName()),
> doc, context);
> + if (om != null) {
> + om.notify(new
> DocumentDeleteEvent(doc.getFullName()), doc, context);
> + }
Question: Utils.getComponents throws a RuntimeException when a
component cannot be found. Thus I'm not sure why you're testing for
null? Am I missing something?
In addition I think that if we really wanted to test for null then we
should also have an else and display a warning if a notification
cannot be sent. However I don't think it's normal that such a
component cannot be lookup and we can safely assume it is found. The
test should probably be modified to use AbstractXWikiComponentTestCase.
WDYT?
Thanks
-Vincent
Hi devs,
Since JV and I are at Javaone, Thomas Mortagne has kindly accepted to
become the release manager for XE 1.4RC1.
I've quickly reviewed the jira list of outstanding issues and I think
the following should be fixed before the RC1 release:
http://jira.xwiki.org/jira/browse/XWIKI-2274http://jira.xwiki.org/jira/browse/XWIKI-1809
Also we need to verify that the Lucene plugin works fine and doesn't
throw any error when we start XE and leave it running for a few
minutes as it used to do (I think Sergiu fixed this).
Anyone knows of any crucial outstanding issue for 1.4RC1? Note that
RC1 means that it's a release candidate for being promoted to 1.4
final in a few days if its stable enough.
The release was planned for last Friday so we need to set a new
release date (tomorrow would be great). I'll let Thomas propose a date.
Thanks
-Vincent
Evelina Slatineanu wrote:
> Hi Guys,
>
>
>
> I am working on XE-14 (the new Administration UI)
> http://dev.xwiki.org/xwiki/bin/view/Design/ImproveWikiAdministration .
>
> Since the admin templates will be deleted and replaced by an AdminSheet
> which will be included by default in XwikiPreferences (wiki level) and
> WebPreferences (space level), I need to create the WebPreferences document
> for each space, attach an Xwiki.XwikiPreferences object to it and include
> the AdminSheet.
>
>
>
> To do that, I need to write some java code in the core . So , here's my
> proposal:
>
>
>
> - At xwiki intitialization create all the WebPreferences for the
> currently existing spaces in the wiki (this should be done for all the
> wikis, if in a multi-wiki).
>
> - Then, use a notification system to create the WebPreferences for
> any new space in the wiki in one of two ways:
>
> a) When calling the "view" action on AnySpace.WebPreferences, check if
> it exists, if not create it, attach the obj. and include the sheet
>
> b) When calling the "save" action on AnySpace.AnyDoc, check if
> AnySpace.WebPreferences exists, if not, create it etc.
>
a) should be used, as there will probably be more save calls on ALL
documents in a space, than view on one administration document. Plus, I
can view the administration page before saving any document in that
space, right? And anyway, the check is not that expensive.
>
> I am for the second one, since the 'view' is much more often performed than
> 'save'.
>
> So, my questions: what should I use for the notifications? I found this
> function in the Stats notification system:
>
>
>
> // Adding the rule which will allow this module to be called on each page
> view
>
> context.getWiki().getNotificationManager().addGeneralRule(
>
> new XWikiActionRule(this, true, true));
>
>
>
> But Thomas said the method above registers all types of notifs, not only on
> page view.
>
> There is also:
>
>
>
> notify(XWikiNotificationRule rule, XWikiDocument doc, String action,
>
> XWikiContext context)
>
>
>
> and I can perform an if(action == "save") to use the notif system for the
> "save" action.
>
>
>
> Thomas Mortagne also told me that this notif system is a little bit outdated
> and would be replaced by the observation component, but I have no idea which
> I should use.
>
Use the new observation component. The code is in
trunks/xwiki-platform-core/xwiki-observation, but there's no example yet
on how to register a new listener. I can help you with that, if you want.
>
> Also, according to the specifs in the draft above, so far I created the
> Xwiki.AdminSheet, that will display the main categories (General,
> Presentation, Rights, Users, Groups, Import/Export etc). For each section of
> this menu I created a sheet (General - > Xwiki.GeneralSheet etc.) in which I
> can personalize the display. I also created Xwiki.AdminSectionSheet which
> contains the common code to display the fields necessary from the
> Xwiki.XwikiPreferences object and this sheet will be included in the
> sections where is needed (Genera, Presentation etc.) The reason I created
> separated sheets for each section of the menu (which are fixed as number) is
> to keep the code clean and allow the possibility to display something else
> than fields from the xwiki prefs. object (for example for rights, users,
> groups, import/export).
>
+1 for several distinct sheets. More extensible and modular.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
Hi devs,
As suggested by Vincent, it would be cool not to have a distinct API for
usage from velocity scripts, but pseudo-wrap the Java classes into a
scriptable API using some uberspectors/introspectors. I like this idea a
lot, as it is a bit hard to maintain two APIs (as the internal core is
an API, just that it isn't directly scriptable), and with the new
component architecture, the scriptable API would be completely unneeded.
To remind, introspectors are used for finding the right methods to be
called, given the target object, the method name, and the parameters;
uberspectors must use introspector's results to construct
velocity-specific objects for direct method calls
($something.methodCall()), getters (#set something = $object.getter),
setters (#set $object.setter = something) and iterators (#foreach
$iterator in something).
During the last few days I wrote a chaining uberspector, that allows
chaining several uberspectors, and a introspector chaining uberspector,
that allows chaining several introspectors (not committed yet). The idea
would be to have something like:
[(introspector <- ... <- introspector)>- IntrospectorChainingUberspector
<- Uberspector <- ... <- uberspector]>- ChainingUberspector
Introspectors are chained in order to find or to filter out requested
methods, then uberspectors use these methods to further enhance or
restrict the method retrieving & calling process.
So, a possible chain would be:
BaseIntropector - finds methods using reflection.
SecureIntrospector - filters out restricted objects/methods, like
reflection, classloaders, threads/synchronization and the System class.
ScriptableCheckIntrospector - blocks all direct calls to methods in the
org.xwiki package that don't have an @Scriptable annotation. Note that
it is possible to have calls to non-scriptable methods inside scriptable
methods, as that is java code already, outside scripting.
RightsCheckingIntrospector - uses the @Authorisation("accessright")
annotations placed on our methods to perform rights checking.
ProgrammingWrapIntrospector - not sure about this one, as I don't know
how it could be implemented, but it would be nice to mimic all
*WithProgrammingRights methods (like saveWithProgrammingRights), instead
of literally having them in the java classes.
ContextInjectionIntrospector - if no method was found, tries to find a
method with an extra XWikiContext parameter. I must find a way to pass
the request-specific XWikiContext (Vincent, any ideas?). This one is
needed because all current API methods hide a non-scriptable method with
almost the same signature, just an extra XWikiContext parameter at the
end. This might not be needed if we completely get rid of the
XWikiContext from the code before starting to use this chain.
DeprecatedCheckIntrospector - logs deprecated method calls.
IntrospectorChainingUberspector - calls the introspector chain and wraps
the resulting methods into velocity objects (VelMethod, VelPropertyGet,
VelPropertySet).
ExceptionCatchingUberspector - catches all exceptions and puts them in
the context (and logs them, too).
ChainingUberspector - just allows having the uberspectors chain.
I'm not sure if all those should be introspectors, or would be better as
uberspectors instead.
I didn't include the SecureUberspector in the chain, as besides the
filtering done by the SecureIntrospector, it only checks if the returned
iterator is restricted or not, and I don't think the iterators should
ever be restricted.
I don't know if the rights check should be left only to the introspector
or not. Currently, this check is done mostly in the API classes only,
suggesting that anything that happens in the java world is safe to
execute, regardless of the access rights. Groovy doesn't need access
rights check, as it requires programming rights from the start. XmlRpc
should be a little more secure, but right now it doesn't use rights
checks from the core classes anyway.
So, any method we would like to be callable from Velocity should have an
@Scriptable annotation. Rights checking could be performed entirely from
an introspector.
Any thoughts on this?
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
I attempted to edit the CalendarEvent Class by changing the Start Date and
End Date format
from:
dd/MM/yyyy
to:
MM/dd/yyyy
when I clicked Save & View I got this exception - I get the same exception
if I attempt to rollback to a previous version? Any idea what causes this
problem or how to fix it.
Error number 3201 in 3: Exception while saving document
XWiki.CalendarEvent
Wrapped Exception: Error number 3211 in 3: Exception while updating archive
XWiki.CalendarEvent
Wrapped Exception: Error number 13027 in 13: Failed to create diff for doc
XWiki.CalendarEvent
Wrapped Exception: null
com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while saving
document XWiki.CalendarEvent
Wrapped Exception: Error number 3211 in 3: Exception while updating archive
XWiki.CalendarEvent
Wrapped Exception: Error number 13027 in 13: Failed to create diff for doc
XWiki.CalendarEvent
Wrapped Exception: null
at
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:457)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:97)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:91)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1078)
at com.xpn.xwiki.web.PropUpdateAction.propUpdate(PropUpdateAction.java:79)
at
com.xpn.xwiki.web.SaveAndContinueAction.action(SaveAndContinueAction.java:59)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:188)
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.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
Wrapped Exception:
com.xpn.xwiki.XWikiException: Error number 3211 in 3: Exception while
updating archive XWiki.CalendarEvent
Wrapped Exception: Error number 13027 in 13: Failed to create diff for doc
XWiki.CalendarEvent
Wrapped Exception: null
at
com.xpn.xwiki.store.XWikiHibernateVersioningStore.updateXWikiDocArchive(XWikiHibernateVersioningStore.java:203)
at
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:332)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:97)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:91)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1078)
at com.xpn.xwiki.web.PropUpdateAction.propUpdate(PropUpdateAction.java:79)
at
com.xpn.xwiki.web.SaveAndContinueAction.action(SaveAndContinueAction.java:59)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:188)
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.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
Wrapped Exception:
com.xpn.xwiki.XWikiException: Error number 13027 in 13: Failed to create
diff for doc XWiki.CalendarEvent
Wrapped Exception: null
at com.xpn.xwiki.doc.rcs.XWikiPatch.setDiffVersion(XWikiPatch.java:176)
at com.xpn.xwiki.doc.rcs.XWikiPatch.setDiffVersion(XWikiPatch.java:153)
at
com.xpn.xwiki.doc.XWikiDocumentArchive.makePatch(XWikiDocumentArchive.java:140)
at
com.xpn.xwiki.doc.XWikiDocumentArchive.updateArchive(XWikiDocumentArchive.java:255)
at
com.xpn.xwiki.store.XWikiHibernateVersioningStore.updateXWikiDocArchive(XWikiHibernateVersioningStore.java:198)
at
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:332)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:97)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:91)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1078)
at com.xpn.xwiki.web.PropUpdateAction.propUpdate(PropUpdateAction.java:79)
at
com.xpn.xwiki.web.SaveAndContinueAction.action(SaveAndContinueAction.java:59)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:188)
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.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
Wrapped Exception:
java.lang.NullPointerException
--
View this message in context: http://www.nabble.com/CalendarEvent----Failed-to-create-diff-tp17190022p171…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi everyone,
With Mikhail we created this generic GWT annotation tool that we may
consider integrating into XWiki since it's bringing handy annotation
features. The tool works fine only on static documents though for now.
Annotation on evolving documents will require additional work.
Project: http://code.google.com/p/adnotatio/
Demo: checkout the following folder and open "HtmlAnnotatorClient.html"
in a browser:
http://adnotatio.googlecode.com/svn/trunk/adnotatio/demo/adnotatio.HtmlAnno…
Cheers
Stéphane
Hello XWiki users and developers,
I'm in Boston today and tomorrow and could be available for a quick
meetup with users of XWiki if there are some in the area.
I will also be in New York wednesday to saturday.
Anybody interested in an informal Meetup ? I would love to hear what we
could improve in XWiki and show the latest things we are working on.
Ludovic
--
Ludovic Dubost
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
Hi All,
This question "might" be related to the thread that has been active in the
past couple of days about the data model.
We have a similar situation with the only difference being that we want to
create lists or collections (like Groups) of certain pre- created Objects.
The Object as a whole may/will belong to more than one such collection -
which means that if we were to use a Document to link a Collection and its
contents, then every document will have a COPY of the same object and this
is definitely not desirable for good performance - Right?
So, in that case, we have 2 alternatives:
1) Use the techiniques used in XWiki to create Groups: each group has
objects of class XWikiGroup with just one field that refers to the Member
name. OR
2) Use XWiki.getHashmap() and add the Collection and its members to the
hashmap (as the Key and Value resp.)
The XWiki API indicates that the option #2 must be used in xwiki when
Objects can not be created.
My Question is:
-> Even though I could use option #1 and create objects and add them to the
document that would represent the Collection, can I still use option #2
because I think that it will provide better performance. Am I right in my
assumption? What should I do?
Thanks a lot for all help!
Hi,
Sorry if this question is too basic, but I am not able to find the answer.
I am able to read all the properties of an instance of
Species.SpeciesClass class in a document with this code:
#set($obj = $doc.getObject("Species.SpeciesClass").xWikiClass)
#foreach($prop in $obj.properties)
*${prop.prettyName}:* $doc.display($prop.getName())<br/>
#end
But, please, how could I read a single, let's say, Genrus property of
this object?
Thanks!
Ricardo
--
Ricardo Rodríguez
Your EPEC Network ICT Team
Hi devs,
This week I introduced the support for chainable uberspectors, and
beside the SecureUberspector that was used before, now there's also a
DeprecatedCheckUberspector, that prints a warning in the logs whenever a
deprecated method is called from velocity.
Several things I'd like to emphasize:
- These logs break the validity check done in the XmlRpc tests, so this
allows us to detect (almost) any usage of the deprecated methods in wiki
documents and update these documents
- It also means that we can't make a product release while there are
deprecated calls in the wiki pages
- "deprecated" means "having the @Deprecated annotation". There's no
(simple) way of checking for the @deprecated doclet.
- whenever something gets deprecated, be sure to add this annotation, as
otherwise the calls to the deprecated method won't be detected
- could someone help with cleaning the wiki source in order to fix the
builds on the 1.5-depending products? Just look at the continuum build
results (for example
http://continuum.xwiki.org/continuum/buildResult.action?buildId=20015&proje…)
and look for messages like:
[WARNING] Deprecated usage of method [com.xpn.xwiki.api.XWiki.parseInt]
in Main.Dashboard@14,25
and update the affected document (could be a GSoC student...)
- the logged document name is not always right, as it doesn't reflect
inclusions and calls to $xwiki.parseText
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
* XWiki Core <http://jira.xwiki.org/jira/browse/XWIKI>*
browsing http://www.xwiki.org/xwiki/bin gives uncaught/wrapped
exception Created:
Today 06:09 AM Updated: Today 06:09 AM * Return to
search<http://jira.xwiki.org/jira/secure/IssueNavigator.jspa>
* Issue *88* of *128* issue(s)
<< Previous <http://jira.xwiki.org/jira/browse/XWIKI-2287> | XWIKI-2372 | Next
>> <http://jira.xwiki.org/jira/browse/XWIKI-358>
*Component/s:*
Core<http://jira.xwiki.org/jira/secure/IssueNavigator.jspa?sorter/order=ASC&sort…>
*Affects Version/s:*
1.3.2<http://jira.xwiki.org/jira/secure/IssueNavigator.jspa?sorter/order=ASC&sort…>
*Fix Version/s:* None
*Original Estimate:* Unknown *Remaining Estimate:* Unknown *Time
Spent:* Unknown *Environment:* Windows XP, Mozilla Firefox...
*keywords:* XWikiAction.java XWiki.java
*Description* « Hide
<http://jira.xwiki.org/jira/browse/XWIKI-2372> Although
http://www.xwiki.org/xwiki/bin/ does the "right thing"
http://www.xwiki.org/xwiki/bin doesn't:
------------------------------------------------------------
A problem occured while trying to service your request. Please contact the
support if this happens again.
Detailed information:
Error number 0 in 11: Uncaught exception
Wrapped Exception: String index out of range: -1
com.xpn.xwiki.XWikiException: Error number 0 in 11: Uncaught exception
Wrapped Exception: String index out of range: -1
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:223)
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:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Wrapped Exception:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1938)
at java.lang.String.substring(String.java:1905)
at com.xpn.xwiki.XWiki.getDocumentNameFromPath(XWiki.java:1187)
at com.xpn.xwiki.XWiki.getDocumentName(XWiki.java:4195)
at com.xpn.xwiki.XWiki.prepareDocuments(XWiki.java:4225)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:173)
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:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Note that the header area of the page also produces some velocity errors,
resulting in the following output prior to the above errors:
Error number 4001 in 4: Error while parsing velocity page
/templates/xwikivars.vm Wrapped Exception: Invocation of method
'hasAccessLevel' in class com.xpn.xwiki.api.XWiki threw exception
java.lang.NullPointerException @ /templates/xwikivars.vm[3,24]
Error number 4001 in 4: Error while parsing velocity page
/templates/xwikivars.vm
Wrapped Exception: Invocation of method 'hasAccessLevel' in class
com.xpn.xwiki.api.XWiki threw exception java.lang.NullPointerException @
/templates/xwikivars.vm[3,24]
com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while parsing
velocity page /templates/xwikivars.vm
Wrapped Exception: Invocation of method 'hasAccessLevel' in class
com.xpn.xwiki.api.XWiki threw exception java.lang.NullPointerException @
/templates/xwikivars.vm[3,24]
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:160)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:108)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:51)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:263)
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:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Wrapped Exception:
java.lang.NullPointerException
at com.xpn.xwiki.api.XWiki.hasAccessLevel(XWiki.java:1375)
at sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:419)
at
org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:73)
at
org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:125)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:108)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:51)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:263)
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:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Error number 4001 in 4: Error while parsing velocity page Wrapped Exception:
Invocation of method 'parseContent' in class com.xpn.xwiki.api.XWiki threw
exception java.lang.NullPointerException @ [14,16]
Error number 4001 in 4: Error while parsing velocity page
Wrapped Exception: Invocation of method 'parseContent' in class
com.xpn.xwiki.api.XWiki threw exception java.lang.NullPointerException @
<unknown template>[14,16]
com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while parsing
velocity page
Wrapped Exception: Invocation of method 'parseContent' in class
com.xpn.xwiki.api.XWiki threw exception java.lang.NullPointerException @
<unknown template>[14,16]
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:160)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1444)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1397)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:108)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:51)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:263)
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:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Wrapped Exception:
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:238)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.interpretText(DefaultXWikiRenderingEngine.java:156)
at com.xpn.xwiki.XWiki.parseContent(XWiki.java:1384)
at com.xpn.xwiki.api.XWiki.parseContent(XWiki.java:545)
at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:88)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:88)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:88)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1444)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1397)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:241)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1424)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:108)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:51)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:263)
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:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
XWiki
Log-in | Register |
$doc.web: $tdoc.displayTitle
Top Menu
Documentation
Show: Comments Attachments History
Print: Print Print preview Export as PDF Export as RTF Export as HTML Export
as XAR
vmassol (SVN) wrote:
> Author: vmassol
> Date: 2008-05-07 20:29:05 +0200 (Wed, 07 May 2008)
> New Revision: 9684
>
> Modified:
> xwiki-platform/core/branches/xwiki-core-1.4/xwiki-core/src/main/java/com/xpn/xwiki/render/XWikiVelocityRenderer.java
> Log:
> XWIKI-2369: Error when custom skin defined in wiki page has a macros.vm property
>
>
> Modified: xwiki-platform/core/branches/xwiki-core-1.4/xwiki-core/src/main/java/com/xpn/xwiki/render/XWikiVelocityRenderer.java
> ===================================================================
> --- xwiki-platform/core/branches/xwiki-core-1.4/xwiki-core/src/main/java/com/xpn/xwiki/render/XWikiVelocityRenderer.java 2008-05-07 16:53:26 UTC (rev 9683)
> +++ xwiki-platform/core/branches/xwiki-core-1.4/xwiki-core/src/main/java/com/xpn/xwiki/render/XWikiVelocityRenderer.java 2008-05-07 18:29:05 UTC (rev 9684)
> @@ -104,6 +104,40 @@
> }
>
> /**
> + * @return the key used to cache the Velocity Engines. We have one Velocity Engine
> + * per skin which has a macros.vm file on the filesystem. Right now we don't
> + * support macros.vm defined in custom skins in wiki pages.
> + */
> + private static String getVelocityEngineCacheKey(String skin, XWikiContext context)
> + {
> + // We need the path relative to the webapp's home folder so we need to remove all path before
> + // the skins/ directory. This is a bit of a hack and should be improved with a proper api.
> + String skinMacros = context.getWiki().getSkinFile("macros.vm", skin, context);
> + String cacheKey;
> + if (skinMacros != null) {
> + // We're only using the path starting with the skin name since sometimes we'll
> + // get ".../skins/skins/<skinname>/...", sometimes we get ".../skins/<skinname>/...",
> + // sometimes we get "skins/<skinname>/..." and if the skin is done in wiki pages
> + // we get ".../skin/...".
> + int pos = skinMacros.indexOf("skins/");
> + if (pos > -1) {
> + cacheKey = skinMacros.substring(pos);
> + } else {
> + // If the macros.vm file is stored in a wiki page (in a macros.vm property in
> + // a XWikiSkins object) then we use the parent skin's macros.vm since we
> + // currently don't support having global velocimacros defined in wiki pages.
> + String baseSkin = context.getWiki().getBaseSkin(context);
This can lead to an infinite loop if someone uses the skin document as
its own base skin... I'd add a check here, just to be sure.
> + cacheKey = getVelocityEngineCacheKey(baseSkin, context);
> + }
> + } else {
> + // If no skin macros.vm file exists then use a "default" cache id
> + cacheKey = "default";
> + }
> +
> + return cacheKey;
> + }
> +
> + /**
> * @todo Move this initialization code to a Skin Manager component.
> */
> public static VelocityEngine getVelocityEngine(XWikiContext context) throws XWikiVelocityException
> @@ -118,19 +152,7 @@
>
> // Get the location of the skin's macros.vm file
> String skin = context.getWiki().getSkin(context);
> - // We need the path relative to the webapp's home folder so we need to remove all path before
> - // the skins/ directory. This is a bit of a hack and should be improved with a proper api.
> - String skinMacros = context.getWiki().getSkinFile("macros.vm", skin, context);
> - String cacheKey;
> - if (skinMacros != null) {
> - // We're only using the path starting with the skin name since sometimes we'll
> - // get /skins/skins/<skinname>/..., sometimes we get "/skins/<skinname>/..."
> - // and sometimes we get "skins/<skinname>/...
> - cacheKey = skinMacros.substring(skinMacros.indexOf("skins/"));
> - } else {
> - // If no skin macros.vm file exists then use a "default" cache id
> - cacheKey = "default";
> - }
> + String cacheKey = getVelocityEngineCacheKey(skin, context);
>
> // Get the Velocity Engine to use
> VelocityFactory velocityFactory =
> @@ -141,7 +163,7 @@
> } else {
> // Gather the global Velocity macros that we want to have. These are skin dependent.
> Properties properties = new Properties();
> - String macroList = "/templates/macros.vm" + ((skinMacros == null) ? "" : "," + cacheKey);
> + String macroList = "/templates/macros.vm" + (cacheKey.equals("default") ? "" : "," + cacheKey);
> properties.put(RuntimeConstants.VM_LIBRARY, macroList);
> velocityEngine = velocityFactory.createVelocityEngine(cacheKey, properties);
> }
>
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
Hello XWiki developers,
is there a documentation on adding a new property type?
I know I can do a lot with the hql type, but I'd like to enhance the
user-interface part for a better choice method of the value.
thanks for pointers.
paul
The XWiki development team is pleased to announce the release of XWiki
Workspaces 1.1 Milestone 1.
Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download
New features have been implemented in this release, amongst them :
* Windows and generic java installers have been added for easier
installation.
* Application management per workspace : you can now install/uninstall
applications whenever you want.
* New application available : the "Workstream", to keep your coworkers
informed of what you are working on.
You can read the full release notes, including screenshots of the
aforementioned features, here :
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesWorkspaces11Milestone1
To get started with XWiki Workspaces, point your browser at
http://workspaces.xwiki.org
Thanks
-The XWiki dev team
The XWiki development team is pleased to announce the release of XWiki
Enterprise 1.4 Release Candidate 1.
Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download
This is the first hopefully the last release candidate for the 1.4 version.
Changes from 1.4 Milestone 2:
* Import generate DELETE notifications
* Macros declared before a call to doc.getRenderedContent() in
custom XWiki.XWikiSkins skin object are not taken into account
* Section editing is broken
* Activity statistics merge two days in one in graphics
* HTML export is broken
* Plugins should only be instantiated once
* WYSIWYG editor misinterprets velocity comments as a list
* Wysiwyg editor does not take its stylesheet from preferences
* Add correct Last-Modification header for filesystem skin files
* The indexing should be split in limited batches to reduce memory
consumption
For more information see the Release notes at:
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise14RC1
Thanks
-The XWiki dev team
Hi Guys,
I am working on XE-14 (the new Administration UI)
http://dev.xwiki.org/xwiki/bin/view/Design/ImproveWikiAdministration .
Since the admin templates will be deleted and replaced by an AdminSheet
which will be included by default in XwikiPreferences (wiki level) and
WebPreferences (space level), I need to create the WebPreferences document
for each space, attach an Xwiki.XwikiPreferences object to it and include
the AdminSheet.
To do that, I need to write some java code in the core . So , here's my
proposal:
- At xwiki intitialization create all the WebPreferences for the
currently existing spaces in the wiki (this should be done for all the
wikis, if in a multi-wiki).
- Then, use a notification system to create the WebPreferences for
any new space in the wiki in one of two ways:
a) When calling the "view" action on AnySpace.WebPreferences, check if
it exists, if not create it, attach the obj. and include the sheet
b) When calling the "save" action on AnySpace.AnyDoc, check if
AnySpace.WebPreferences exists, if not, create it etc.
I am for the second one, since the 'view' is much more often performed than
'save'.
So, my questions: what should I use for the notifications? I found this
function in the Stats notification system:
// Adding the rule which will allow this module to be called on each page
view
context.getWiki().getNotificationManager().addGeneralRule(
new XWikiActionRule(this, true, true));
But Thomas said the method above registers all types of notifs, not only on
page view.
There is also:
notify(XWikiNotificationRule rule, XWikiDocument doc, String action,
XWikiContext context)
and I can perform an if(action == "save") to use the notif system for the
"save" action.
Thomas Mortagne also told me that this notif system is a little bit outdated
and would be replaced by the observation component, but I have no idea which
I should use.
Also, according to the specifs in the draft above, so far I created the
Xwiki.AdminSheet, that will display the main categories (General,
Presentation, Rights, Users, Groups, Import/Export etc). For each section of
this menu I created a sheet (General - > Xwiki.GeneralSheet etc.) in which I
can personalize the display. I also created Xwiki.AdminSectionSheet which
contains the common code to display the fields necessary from the
Xwiki.XwikiPreferences object and this sheet will be included in the
sections where is needed (Genera, Presentation etc.) The reason I created
separated sheets for each section of the menu (which are fixed as number) is
to keep the code clean and allow the possibility to display something else
than fields from the xwiki prefs. object (for example for rights, users,
groups, import/export).
I would really really appreciate some feedback for this 2 proposals.
Thanks,
Evelina
Hi,
I think it would be a good idea to standardize on package naming. I've
seen Jerome's commit for the new invitation manager plugin and this
prompted me to send this email.
I propose the following:
* org.xwiki.<module name>.* : user public APIs
* org.xwiki.<module name>.internal.* : non user public classes
- This means no "impl" package (which IMO doesn't mean much since it
doesn't say if it's public or not).
- This also means no "api" package (which IMO is not necessary since
it should be the default and makes it more complex to use).
- I also don't think we need a "spi" package since we have components.
I'm also proposing to generally follow the rules defined here:
http://www.eclipse.org/articles/article.php?file=Article-API-Use/index.html
(see also http://jakarta.apache.org/cactus/participating/apis.html)
Here's my +1
Thanks
-Vincent
Hi,
I tried the following script but, I do not get anything displayed on my page
wen I save it: [xwiki version: 1.3.2.9174]
#set($rightsAPI=$xwiki.rightsmanager)
#set($groupsAPI=$rightsAPI.getGroupsAPI()) - (I hope this is right!)
#set($list=$groupsAPI.getAllLocalGroupsNames()) - (I do not know if this is
working or not...I tried all methods available..Global, Local, normal..)
##set($list=$rightsAPI.getAllGroupsNamesForMember($context.getUser())) -
(This works)
#set($temp =$xwiki.getUser())
##$temp
#foreach($grp in $list)
* [$grp ]
#end
Nothing displayed on the page...whats the mistake?
Thanks
Hi,
Since Maven 2.0.9 is now released and it works with our build we
should standardize on it rather than using a"non-official" 2.1
snapshot version.
I'm thus proposing to move the maven version we use for Continuum on
Maven 2.0.9 and to change the Building page to remove our snapshot
version and change the text to say that to build XWiki you need Maven
2.0.9 or greater.
WDYT?
Thanks
-Vincent