[xwiki-devs] Componente Example Proverb - Not working
Hello, i tried to implement the component example http://extensions.xwiki.org/xwiki/bin/view/Extension/WikiComponent+Module which is also available from https://github.com/jvdrean/xwiki-proverb-example When i put the compiled jar at WEB-INF/lib i get after starting the server org.xwiki.query.QueryException: Exception while execute query. Query statement = [ select doc.space , doc.name from XWikiDocument as doc , BaseObject as proverb where ( proverb.proverb <> '' ) and doc.fullName=proverb.name and proverb.className='XWiki.Proverb' ] ... "Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: could not resolve property: proverb of: com.xpn.xwiki.objects.BaseObject [ select doc.space , doc.name from com.xpn.xwiki.doc.XWikiDocument a s doc , com.xpn.xwiki.objects.BaseObject as proverb where ( proverb.proverb <> '' ) and doc.fullName=proverb.name and proverb.className='XWiki.Proverb' ] I use XWIKI v5.1 with embedded HsqlDB on Windows7. I dont get whats wrong and really appreciate some hints. My goal is to all new classes to a document or new properties to a page, but even get this example. Has anyone an idea what i did wrong? Regards, Matthias -- View this message in context: http://xwiki.475771.n2.nabble.com/Componente-Example-Proverb-Not-working-tp7... Sent from the XWiki- Dev mailing list archive at Nabble.com.
You did not complete the tutorial. Besides the Java component you need to create some wiki pages: "Create the XWiki.Proverb class, by adding a String property named proverb to it" and so on. Hope this helps, Marius On Mon, Oct 7, 2013 at 1:20 AM, matthiaw <[email protected]> wrote:
Hello, i tried to implement the component example
http://extensions.xwiki.org/xwiki/bin/view/Extension/WikiComponent+Module
which is also available from https://github.com/jvdrean/xwiki-proverb-example
When i put the compiled jar at WEB-INF/lib i get after starting the server
org.xwiki.query.QueryException: Exception while execute query. Query statement = [ select doc.space , doc.name from XWikiDocument as doc , BaseObject as proverb where ( proverb.proverb <> '' ) and doc.fullName=proverb.name and proverb.className='XWiki.Proverb' ] ... "Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: could not resolve property: proverb of: com.xpn.xwiki.objects.BaseObject [ select doc.space , doc.name from com.xpn.xwiki.doc.XWikiDocument a s doc , com.xpn.xwiki.objects.BaseObject as proverb where ( proverb.proverb <> '' ) and doc.fullName=proverb.name and proverb.className='XWiki.Proverb' ]
I use XWIKI v5.1 with embedded HsqlDB on Windows7. I dont get whats wrong and really appreciate some hints.
My goal is to all new classes to a document or new properties to a page, but even get this example. Has anyone an idea what i did wrong?
Regards, Matthias
-- View this message in context: http://xwiki.475771.n2.nabble.com/Componente-Example-Proverb-Not-working-tp7... Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi Marius, thanks. This helps. I thought the class is created from the API and i didn't understand that i have to create a "Page" in Space "XWiki" and than open it in Class-Editor. I thought this is optional. I tried to create an application in XWiki and thought i did something wrong with classpath or compiling. If you are new to XWiki the Step in the tutorial from "Voila!" to "1. the XWiki.Proverb class ..." is not clear for a Newbie. Now it works fine ;) Is there a way to create the class Proverb with the attribute proverb directly from the api? When i write a new component i dont want to do the last steps manually for every attribute or class. Regards, Matthias -- View this message in context: http://xwiki.475771.n2.nabble.com/Componente-Example-Proverb-Not-working-tp7... Sent from the XWiki- Dev mailing list archive at Nabble.com.
We do it for the XWikiServerClass for example, you can see the code there: https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... I hope it helps, LM 2013/10/7 Matthias Wegner <[email protected]>
Hi Marius,
thanks. This helps. I thought the class is created from the API and i didn't understand that i have to create a "Page" in Space "XWiki" and than open it in Class-Editor. I thought this is optional. I tried to create an application in XWiki and thought i did something wrong with classpath or compiling. If you are new to XWiki the Step in the tutorial from "Voila!" to "1. the XWiki.Proverb class ..." is not clear for a Newbie.
Now it works fine ;)
Is there a way to create the class Proverb with the attribute proverb directly from the api? When i write a new component i dont want to do the last steps manually for every attribute or class.
Regards, Matthias
-- View this message in context: http://xwiki.475771.n2.nabble.com/Componente-Example-Proverb-Not-working-tp7... Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (4)
-
Guillaume "Louis-Marie" Delhumeau -
Marius Dumitru Florea -
Matthias Wegner -
matthiaw