I want to create properties for a new class on a blank document with groovy. I can do the following:
def doc = xwiki.getDocument("space.docname")
c = doc.getxWikiClass();
and look at elements of a class that already exists by doing:
prop = c.get('propertyname')
propToEdit = prop.getPropertyClass
propToEdit.setValues('a|b|c')
But, how can I add a new property to a class that has no existing properties/fields?
Thanks,
-Mike
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:…
Hi,
Please, must the "All Attachments Live Grid" snippet work in a 1.3.8295
XE installation? Thanks!
Best,
Ricardo
--
Ricardo Rodríguez
CTO
eBiotic.
Life Sciences, Data Modeling and Information Management Systems
Hi,
I try to convert a website in xwiki.blog application
For each page I create a groovy script that creates a blog post
The script is successful with three exceptions;
1) Would like to maintain the original author
So I create a xwiki.user (this works)
Then I would like to set the document property with
{{groovy}}
... (the first part of the script)
vArticle.set("creator",'XWiki.FamilievandenMeulengraaf')
vArticle.save()
{{/groovy}}
But looking at the post it still has creator as the user running the code
2) Categories
I've created a few categories in the blog application
So I would like to set the category attribute, where the class-attribute definition of the post = Database Tree
{{groovy}}
...
vObjArticle.set("Category",'???')
...
{{/groovy}}
Does any body know what to put in '???', since a category can be multiple entries ???
3)
When I run the script a postpage is created, I see a link in the new documents frame.
When I go to it it displays OK, but when I go to the blog application it does not show in the blog indexes (recently, categories (explained under 2)) or historical)
Only when I go to the page, click edit object and directly click save it will show up in he blog
What could be the reason for this,
The code looks like (XXXX = title of the post)
{{groovy}}
vArticle = xwiki.getDocument("CdlsArticle.XXXXXX")
vArticle.setContent('{{include document="CdlsArticle.ArticlePostSheet"/}}')
vArticle.setParent("CdlsArticle.WebHome")
vArticle.set("language","nl")
vArticle.set("translation","1")
vObjArticle = vArticle.getObject("CdlsArticle.ArticlePostClass",true)
...
def vTitle = "XXXXX"
vObjArticle.set("title",vTitle)
...
def vExtractHeader = '....'
def vExtractText = '....'
def vExtractPicture = 'image:photo.cdlsnl@xxxx.jpg
vObjArticle.set("extract",vExtractHeader + vExtractText + vExtractPicture)
.. etcetera
..
vObjArticle.set("published",'1')
vArticle.save()
{{/groovy}}
I'm trying to save custom object values, and can only for strings using
advanced script from
http://platform.xwiki.org/xwiki/bin/view/DevGuide/GroovyNotificationTutorial
For Number type (tried integer and long), I couldn't save value in any
way. Tried explicitly define as
int daudzums
and
daudzums = Integer.parseInt(string)
I exhausted my ideas and would like to get some more :-/
Exception:
2010-04-09 19:07:40,254
[http://85.254.250.23/xwiki/bin/preview/MyWood/S-100409-181257]
ERROR .AbstractFlushingEventListener - Could not synchronize database
state with session
org.hibernate.StaleObjectStateException: Row was updated or deleted by
another transaction (or unsaved-value mapping was incorrect):
[com.xpn.xwiki.objects.IntegerProperty#<?xml version="1.0"
encoding="UTF-8"?>
<daudzums>4</daudzums>
]
at
org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1769)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2412)
at
org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2312)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612)
at
org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:854)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:825)
at
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:598)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:181)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:174)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1325)
at com.xpn.xwiki.api.Document.saveDocument(Document.java:1751)
at com.xpn.xwiki.api.Document.save(Document.java:1715)
at com.xpn.xwiki.api.Document.save(Document.java:1704)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite
$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
at
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121)
at LoggingEventListener.createIzstrade(Script15.groovy:105)
at LoggingEventListener$createIzstrade.callCurrent(Unknown Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at LoggingEventListener.doSMS(Script15.groovy:79)
at LoggingEventListener$doSMS.callCurrent(Unknown Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:151)
at LoggingEventListener.onEvent(Script15.groovy:27)
at
org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:269)
at
org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:243)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1352)
at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:176)
at com.xpn.xwiki.web.SaveAction.action(SaveAction.java:193)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:213)
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.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:109)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
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:172)
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:619)
2010-04-09 19:07:40,256
[http://85.254.250.23/xwiki/bin/preview/MyWood/S-100409-181257] ERROR
rnal.DefaultObservationManager - Fail to send event
[org.xwiki.observation.event.DocumentUpdateEvent@259805da] to listener
[LoggingEventListener@1fa83e7e]
com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while
saving document MyWood.I-100409-181257
Wrapped Exception: Row was updated or deleted by another transaction (or
unsaved-value mapping was incorrect):
[com.xpn.xwiki.objects.IntegerProperty#<?xml version="1.0"
encoding="UTF-8"?>
<daudzums>4</daudzums>
]
at
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:608)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:181)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:174)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1325)
at com.xpn.xwiki.api.Document.saveDocument(Document.java:1751)
at com.xpn.xwiki.api.Document.save(Document.java:1715)
at com.xpn.xwiki.api.Document.save(Document.java:1704)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite
$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
at
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121)
at LoggingEventListener.createIzstrade(Script15.groovy:105)
at LoggingEventListener$createIzstrade.callCurrent(Unknown Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at LoggingEventListener.doSMS(Script15.groovy:79)
at LoggingEventListener$doSMS.callCurrent(Unknown Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:151)
at LoggingEventListener.onEvent(Script15.groovy:27)
at
org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:269)
at
org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:243)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1352)
at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:176)
at com.xpn.xwiki.web.SaveAction.action(SaveAction.java:193)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:213)
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.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:109)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
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:172)
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:619)
Wrapped Exception:
org.hibernate.StaleObjectStateException: Row was updated or deleted by
another transaction (or unsaved-value mapping was incorrect):
[com.xpn.xwiki.objects.IntegerProperty#<?xml version="1.0"
encoding="UTF-8"?>
<daudzums>4</daudzums>
]
at
org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1769)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2412)
at
org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2312)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612)
at
org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:854)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:825)
at
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:598)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:181)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:174)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1325)
at com.xpn.xwiki.api.Document.saveDocument(Document.java:1751)
at com.xpn.xwiki.api.Document.save(Document.java:1715)
at com.xpn.xwiki.api.Document.save(Document.java:1704)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite
$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
at
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121)
at LoggingEventListener.createIzstrade(Script15.groovy:105)
at LoggingEventListener$createIzstrade.callCurrent(Unknown Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at LoggingEventListener.doSMS(Script15.groovy:79)
at LoggingEventListener$doSMS.callCurrent(Unknown Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:151)
at LoggingEventListener.onEvent(Script15.groovy:27)
at
org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:269)
at
org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:243)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1352)
at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:176)
at com.xpn.xwiki.web.SaveAction.action(SaveAction.java:193)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:213)
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.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:109)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
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:172)
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:619)
Hello,
We have designed a simple tab macro. Sharing it for those who might need
it.
Attached are the files with code that you need to define the macro.
* Macro page space: Macro
* Macro page name: Macro.XWikiMacroTabs (actually you can change
this, but you'll need to update $xwiki.jsx.use('Macro.XWikiMacroTabs')
directive in the MacroObjectDefinition.vm)
* Macro page content:
http://n2.nabble.com/file/n4857504/MacroPage.txt MacroPage.txt
* Js object definition:
http://n2.nabble.com/file/n4857504/JavascriptObjectDefinition.js
JavascriptObjectDefinition.js
* Macro object definition:
http://n2.nabble.com/file/n4857504/MacroObjectDefinition.vm
MacroObjectDefinition.vm
Please reference
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial
WikiMacroTutorial if you've never created a wiki-macro before.
I know that the macro is not perfect (there are several known issues, see
MacroPage.txt), well writing it I have remembered why I like Java and
dislike JS/CSS :).
Yet the macro does the work that we need it to and maybe will be useful
to someone as well.
Regards,
Roman
--
View this message in context: http://n2.nabble.com/XWiki-Macro-Tabs-tp4857504p4857504.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi,
I would like to consult and above all to modify the e-mails of some
users profiles that I have created a long time ago.
I try to change them via the Users menu in XWiki Administration menu,
however the e-mail is not available among the fields that can be edited
in the user profile form (nor advanced nor simple form).
How can I do ?
Thanks,
S.A
Our IS department xwiki seems to be running well. I am not sure what this
entry in the xwiki.log is caused by, and hope someone will point me towards
the issue. Apache Tomcat MySql Windows 2008R2 64bit XWiki Enterprise 2.2.2.
<clip>
2010-04-07 11:51:07,622
[http://wiki.lc.local/xwiki/bin/loginsubmit/XWiki/XWikiLogin]
[http://wiki.lc.local/xwiki/bin/loginsubmit/XWiki/XWikiLogin] ERROR
xwiki.XWikiAuthServiceImpl - Failed to authenticate
java.lang.IllegalStateException
at
org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435)
at
com.xpn.xwiki.user.impl.xwiki.MyFormAuthenticator.processLogin(MyFormAuthenticator.java:225)
at
com.xpn.xwiki.user.impl.xwiki.MyFormAuthenticator.processLogin(MyFormAuthenticator.java:174)
at
com.xpn.xwiki.user.impl.xwiki.XWikiAuthServiceImpl.checkAuth(XWikiAuthServiceImpl.java:239)
at com.xpn.xwiki.api.XWiki.checkAuth(XWiki.java:2677)
at sun.reflect.GeneratedMethodAccessor425.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.evaluate(ASTReference.java:460)
at
org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpression.java:62)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:85)
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:116)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:272)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:202)
...
Why are there "Unknown Source" is it not able to find a file needed? How do
I track this down? I don't have it installed in the default path,
everything is off the root in webroot\apache\tomcat6.0\webapps\ etc.
Thanks in advance for any suggestions.
John
--
View this message in context: http://n2.nabble.com/registration-error-with-velocity-tp4867874p4867874.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
I have javascript code that will get user input from a simple input form, but I need to use that input to query some groovy objects. If I understand correctly, groovy code is parsed on the server, then the javascript is parsed on the user's machine, so I can't pass javascript variables to the groovy code. Is there a way to reload the page such that I could pass the input values to groovy?
Any solution where the user inputs a string to be used in a groovy query is welcome as well.
Thanks,
-Mike
_________________________________________________________________
Hotmail is redefining busy with tools for the New Busy. Get more from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:…
Hello there,
I asked the Admin of my system to create a space in xWiki, into which I can log in via my username & pswd through a browser. I cannot create a connection to the same space via xEclipse.
Any idea about how to cope with it?
Thanks,
Omar.-
"Error connecting to remote XWiki: 'Failed to create input stream: Server returned HTTP response code: 401 for URL:https://wiki.LLLLLLLL.HH/xwiki/bin/login/XWiki/XWikiLogin;jsessionid=9ABDC68E028A86AF510B64DDE1B313D6?srid=impUiQ5i'. Please check your settings."
After registering on a recently announced 2.2.4-based site and having it
fail, I tried the same in my Xwiki setup and it failed too.
The issue is that
/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin§ion=Rights#|t=usersandgroupstable&p=1&uorg=users&clsname=XWiki.XWikiGlobalRights&wiki=local
must be set with the "User" radiobutton selected, both "View" and "Register"
must be selected. If just "Register" is checked, then you get problems:
When unregistered-user right "View" is not selected, the clicking the email
activation link gives you a style-sheet-less view of the activation page,
and an error message that you are not allowed to view. When
unregistered-user right "View" is selected, the email activation works and
the page displays correctly with full style sheet.
It seems like there's a bug also in that if you're not allowed to view, then
you should also not be given the contents of the pages, sans CSS.
Other than this, 2.2.4 is far better and more stable than my previous
attempts at upgrading to 2.2 branch.
Niels
http://nielsmayer.com