Hello!
I am sorry for reposting these questions. But, it would be great if I could
get some kind of response - even if nobody wants to answer these questions,
please respond with your choice so that I stop waiting for the response.
Thanks
I want to refer back to my thread on adding XWiki attachments to SVN.
Artem and Vincent both suggested implementing the
XWikiAttachmentStoreInterface.
In this regard, I have a few Questions:
1)If I chose this option, do I have to follow the implementaion as done for
XWikiHibernateAttachmentStore (Is this the class that handles adding the
attachments to the DB?)
2) would that be enough - just implementing the interface, so that the
functions like saveAttachementContent() will add it to SVN and
loadAttachmentContent() will load it into XWiki from SVN. or would I have to
do something with other classes like the XWikiAction class (in the Web
package)
3) Sergiu suggested that I could also use the notification mechanism for the
Fileupload action. Is this referring to the UploadAction class in the Web
ackage or the fileupload plugin?
I am sorry if I am being naive, I am just trying to undertsand the code
structure and dependencies, call hierarchies etc. Is there any place where I
can go in to understand the code better?
4) Also, my understanding is that the API package has all the classes whose
objects can be used in the velocity scripts at the presentation layer. Am I
right?
5) Can the SVN integration be done at the presentation layer (with velocity
scripts...I doubt it, but just wanted to confirm)
6) this is something to do with Eclispe and Subclipse I guess. I used
subclipse to download the xwiki core and then checked it out into my
workspace. The first time I did it, I had the Lucene plugin class in there.
The second time I re-did it, the plugin class was no more there. (That is
just one of the classes I noticed). could you think of something I might
have missed out?
Waiting eagerly for responses.
Hi Asiri,
If you have some time... :) I think it would be great if you could
document how to use the m2eclipse plugin in Eclipse to set up XWiki
(with screenshots). I've been using it for the past 5 days and it's
great and makes setting up a XWiki dev environment a breeze and it's
much much better than doing it the manual way for lots of reasons
(always synced with the POMs, etc).
http://m2eclipse.codehaus.org/
Thanks
-Vincent
Hi Vincent & All,
This is about the above two GSoC ideas,
I would like to know what are the deliverables for the above two projects ?
My guess is,
1. Finished Components (i think these are going to be two jar files ?, i'm
yet to discover plexus)
2. Test cases.
3. Current core integrated with the two components.
4. Anything else ?
Since the current core doesn't follow a components based architecture, what
kind of complications will arise in the integration phase ?
Vincent, what about the two implementations of the data-model component in
the sandbox ? have you made a decision ? :)
Your help and comments are very much appreciated.
Thanks.
- Asiri
I am sorry Sergiu,
I just received the mail digest that has the messages from you and Artem. I
apologize.
Thanks to both of you for the responses. Seems like I am on track, but I
would really need guidance from you as I am trying to understand exactly
what I need to do.
Regarding your question on whether we want to replace the DB table for
attachments with an SVN store or use both of these, I think we want to use
both (I am not sure. I will discuss this with my team and let you know).
But, say if we wanted to keep both, SVN would be the primary storage
(because for the application we are designing, users may have many versions
of the same file and we want all of them to be available for future
references.) and the DB would mirror the SVN store.
But, at any time, the Attachments table wil only have the latest uploaded
file right, and not its previous versions? Am I right?
Also you mentioned this : "The notification mechanism will allow you to also
store the attachment
in SVN, but the attachment will go in the database, as it is done now.
If you want to also update the wiki when the SVN is changed, you can
write a SVN hook that notifies XWiki of the change. If you need more
details, ask."
Here when you say if you want to update the wiki, are u assuming that the
SVN repo. will be modified outside of the wiki interface?
In this regard, can you please point out the specific code packages I need
to look at to understand the notification mecahninsm.
Thanks a lot.
On 3/21/08, Sergiu Dumitriu <sergiu(a)xwiki.com> wrote:
>
> Already sent, didn't you receive it?
>
>
> -------- Original Message --------
> Subject: Re: [xwiki-devs] XWiki Attachments
> Date: Fri, 21 Mar 2008 12:42:27 +0100
> From: Sergiu Dumitriu <sergiu(a)xwiki.com>
> Organization: XWiki
> To: XWiki Developers <devs(a)xwiki.org>
> References:
> <fb681d280803200948m79336289j221ed581c0890f94(a)mail.gmail.com>
> <47E398BE.1020009(a)gmail.com>
>
> Hi,
>
> The best approach depends on what exactly do you want to do. Is the SVN
> the only place where you want attachments, or should the SVN be just a
> "backup", or alternate storage.
>
> If you want to completely replace the database with SVN for attachments,
> then implementing XWikiAttachmentStoreInterface is the way to go.
>
> If you want to use the DB inside XWiki, but have a mirror on an SVN
> server, then the notification mechanism is better.
>
> Read below.
>
> Artem Melentyev wrote:
> > Hi.
> >
> > Kamna Jain wrote:
> >> I want to refer back to my thread on adding XWiki attachments to SVN.
> >> Artem and Vincent both suggested implementing the
> >>
> >> XWikiAttachmentStoreInterface.
> >>
> >> In this regard, I have a few Questions:
> >>
> >> 1)If I chose this option, do I have to follow the implementaion as done
> >> for
> >>
> >> XWikiHibernateAttachmentStore (Is this the class that handles adding
> the
> >> attachments to the DB?)
> > Yes.
> > You can just extend this class and override needed methods.
>
> You also have to register your implementation as the attachment storage
> in xwiki.cfg:
>
> xwiki.store.attachment.class=some.package.SvnAttachmentStorage
>
> >> 2) would that be enough - just implementing the interface, so that the
> >> functions like saveAttachementContent() will add it to SVN and
> >> loadAttachmentContent() will load it into XWiki from SVN. or would I
> >> have to do something with other classes like the XWikiAction class (in
> >> the Web package)
> > Yes. It would be enough.
> >
> >> 3) Sergiu suggested that I could also use the notification mechanism
> for
> >> the Fileupload action. Is this referring to the UploadAction class in
> >> the Web ackage or the fileupload plugin?
> >
> > I'm not much familiar with notification mechanism in xwiki, but I think
> > it is more simpler and better way than writing AttachmentStore.
>
> The notification mechanism will allow you to also store the attachment
> in SVN, but the attachment will go in the database, as it is done now.
> If you want to also update the wiki when the SVN is changed, you can
> write a SVN hook that notifies XWiki of the change. If you need more
> details, ask.
>
> >> I am sorry if I am being naive, I am just trying to undertsand the code
> >> structure and dependencies, call hierarchies etc. Is there any place
> >> where I can go in to understand the code better?
>
> Yes, the code :p
>
> >> 4) Also, my understanding is that the API package has all the classes
> >> whose objects can be used in the velocity scripts at the presentation
> >> layer. Am I right?
> > yes
>
> Almost, there is also the request, response and different plugin APIs
> that you can use. Also, using programming rights you can get to the
> internal objects behind the API, as each API class has a method that
> allows getting the wrapped object. But for the start the main API should
> be enough, playing with the internal stuff is dangerous and not
> recommended.
>
> >> 5) Can the SVN integration be done at the presentation layer (with
> >> velocity scripts...I doubt it, but just wanted to confirm)
> > I think no.
>
> Not directly. You can put a svn client jar in the lib directory, and
> write a Groovy class that acts as a Notification Listener and uses that
> svn client to perform the changes. It is the same as writing a java
> class, just that it is written in a wiki document, and uses the
> (simpler?) Groovy language instead of Java. You cannot write an
> attachment storage in Groovy, though.
>
> >> 6) this is something to do with Eclispe and Subclipse I guess. I used
> >> subclipse to download the xwiki core and then checked it out into my
> >> workspace. The first time I did it, I had the Lucene plugin class in
> >> there. The second time I re-did it, the plugin class was no more there.
> >> (That is just one of the classes I noticed). could you think of
> >> something I might have missed out?
> > try to clean, update eclipse projects.
> > no ideas more.
> >
>
> The Lucene plugin was recently moved to another place, so this is normal.
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu/
>
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu/
>
Hello Artem, Sergiu and all
I want to refer back to my thread on adding XWiki attachments to SVN.
Artem and Vincent both suggested implementing the
XWikiAttachmentStoreInterface.
In this regard, I have a few Questions:
1)If I chose this option, do I have to follow the implementaion as done for
XWikiHibernateAttachmentStore (Is this the class that handles adding the
attachments to the DB?)
2) would that be enough - just implementing the interface, so that the
functions like saveAttachementContent() will add it to SVN and
loadAttachmentContent() will load it into XWiki from SVN. or would I have to
do something with other classes like the XWikiAction class (in the Web
package)
3) Sergiu suggested that I could also use the notification mechanism for the
Fileupload action. Is this referring to the UploadAction class in the Web
ackage or the fileupload plugin?
I am sorry if I am being naive, I am just trying to undertsand the code
structure and dependencies, call hierarchies etc. Is there any place where I
can go in to understand the code better?
4) Also, my understanding is that the API package has all the classes whose
objects can be used in the velocity scripts at the presentation layer. Am I
right?
5) Can the SVN integration be done at the presentation layer (with velocity
scripts...I doubt it, but just wanted to confirm)
6) this is something to do with Eclispe and Subclipse I guess. I used
subclipse to download the xwiki core and then checked it out into my
workspace. The first time I did it, I had the Lucene plugin class in there.
The second time I re-did it, the plugin class was no more there. (That is
just one of the classes I noticed). could you think of something I might
have missed out?
Waiting eagerly for responses.
Thanks
Hello,
I see in the code that "classical" ORM mapping and "dynamic" EntityMap XML
mapping are both used... sometimes for backward compatibility, sometimes as
a feature... but this is not easy to understand the exact status...
Tell me if I'm wrong or right:
- Class/PropertyClass classical Table mapping is no more the preferred
choice
- a Class is now directly linked to a Doc and it is created and stored
within the Doc...
- Class/PropertyClass mapping is now stored by default using XML
custommapping in Doc (Class tables are still available with the right
option)
- Object/Property are stored by default in tables using classical ORM but
also using EntityMap when the Class has a custommapping
So, what is the current and future tendency for all of this? classes in XML
and object in tables? something different?
I don't know the history of the project but I find the code of XWikiDoc is
quite dependent on the chosen mapping of classes, objects etc...
Do you intend to introduce an abstraction about the mapping?
Finally, a bulk remark: going further, could a XWikiDoc be considered as a
class itself?
Best regards
Pascal
Hi,
Building the latest platform web and adding some of the plugins like
scheduler, watchlist, lucene, applicationmanager and spacemanager on top it,
I see lot of stack traces on my console. They pertain to either class not
found or file not found exceptions. It looks like some of the references in
pom have to be updated to get the latest jars.
I am pasting these below, please have a look and let me know if I need to
add some extra settings.
Where can I add log4j.properties and any sample log4j.properties available?
Next for quartz scheduler do I need any quartz.properties ?
Thanks
Sachin
============================================================================
INFO: Reloading this Context has started
2008-03-21 00:56:47,890 [] [http-9080-Processor25] ERROR
[localhost].[/xwiki] - Exception sending context destroyed event
to listener instance of class
org.xwiki.plexus.XWikiPlexusServletContextListener
java.lang.NoClassDefFoundError:
org/codehaus/plexus/personality/plexus/lifecycle/phase/Disposable
at
org.codehaus.plexus.personality.plexus.lifecycle.phase.DisposePhase.execute(DisposePhase.java:28)
at
org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.end(AbstractLifecycleHandler.java:190)
at
org.codehaus.plexus.component.manager.AbstractComponentManager.endComponentLifecycle(AbstractComponentManager.java:187)
at
org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.dispose(ClassicSingletonComponentManager.java:76)
at
org.codehaus.plexus.DefaultPlexusContainer.disposeAllComponents(DefaultPlexusContainer.java:988)
at
org.codehaus.plexus.DefaultPlexusContainer.dispose(DefaultPlexusContainer.java:949)
at
org.codehaus.plexus.servlet.ServletContextUtils.stop(ServletContextUtils.java:141)
at
org.codehaus.plexus.servlet.PlexusServletContextListener.contextDestroyed(PlexusServletContextListener.java:64)
at
org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3804)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4352)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3018)
at
org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:906)
at
org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:353)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:346)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
log4j:ERROR Could not read configuration file from URL
[jar:file:/C:/apache-tomcat-5.5.20/webapps/xwiki/WEB-INF/lib/xwiki-core-1.4-SNAPSHOT.jar!/log4j.properties].
java.io.FileNotFoundException: JAR entry log4j.properties not found in
C:\apache-tomcat-5.5.20\webapps\xwiki\WEB-INF\lib\xwiki-core-1.4-SNAPSHOT.jar
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
at
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:433)
at
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:468)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at
org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:289)
at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:109)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:370)
at org.apache.catalina.core.ContainerBase.getLogger(ContainerBase.java:380)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4114)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3024)
at
org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:906)
at
org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:353)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:346)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
log4j:ERROR Ignoring configuration file
[jar:file:/C:/apache-tomcat-5.5.20/webapps/xwiki/WEB-INF/lib/xwiki-core-1.4-SNAPSHOT.jar!/log4j.properties].
log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "OSCacheService Cache Monitor"
java.lang.NullPointerException
at org.apache.log4j.LogManager.getLogger(LogManager.java:188)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at
org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:289)
at
org.apache.commons.logging.impl.Log4JLogger.isInfoEnabled(Log4JLogger.java:323)
at com.xpn.xwiki.cache.impl.OSCacheService.run(OSCacheService.java:205)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-44" java.lang.NoClassDefFoundError:
org/apache/lucene/search/Weight
at com.xpn.xwiki.plugin.lucene.IndexData.buildQuery(IndexData.java:161)
at
com.xpn.xwiki.plugin.lucene.IndexUpdater.getOldIndexDocIds(IndexUpdater.java:288)
at com.xpn.xwiki.plugin.lucene.IndexUpdater.run(IndexUpdater.java:118)
at java.lang.Thread.run(Unknown Source)
java.lang.NoClassDefFoundError:
org/apache/commons/collections/buffer/BoundedFifoBuffer$1
at
org.apache.commons.collections.buffer.BoundedFifoBuffer.iterator(BoundedFifoBuffer.java:326)
at java.util.AbstractCollection.remove(Unknown Source)
at
com.xpn.xwiki.monitor.api.MonitorPlugin.addToTimerDataList(MonitorPlugin.java:137)
at
com.xpn.xwiki.monitor.api.MonitorPlugin.endRequest(MonitorPlugin.java:120)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:320)
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:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:346)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
-----
http://www.assembla.com/wiki/show/sachin_mittal about me:
--
View this message in context: http://www.nabble.com/Noticed-several-stack-traces-on-tomcat-console-tp1619…
Sent from the XWiki- Dev mailing list archive at Nabble.com.