Re: [xwiki-users] Help Request! Running the Attachment Porter

2017-03-30 Thread Douglas Landau

>I’ve never used this code but shouldn’t it execute in a wiki page?

Thanks Vincent.  I finally figured out from Craig Wright's comment ("FOR THOSE 
NEW TO XWIKI") that a)there is such a thing [as a code snippet that runs in a 
page] and that this is one of them.  Being completely unaware of the existence 
of snippets, I would never have guessed that this was one.

I followed step 1:
Step 1: Switch to Filesystem attachments.
I followed step 2:
 Step 2: Add a new directory to your backup routine.
I read step 3:
Step 3: Copy attachments from database to filesystem.
Now you are ready to copy the data over from your database to the filesystem. 
It is prudent to leave the attachments in the database since in most situations 
the attachment data is not bothersome just sitting in the database (The only 
risk of attachments left in the database is that they will bloat the size of 
the database files). As such, this script contains no facility to delete 
entries from the database.
If anything goes wrong in this function, it will fail with an error message and 
you should get the stack trace, keep it to confuse and humiliate the developer 
with. No harm should be done since this only loads from the database and only 
saves to the filesystem.

I read step 4:
Step 4: Make sure everything is working.
Check to make sure your attachments are still there, if an attachment is 
broken, ... 

I felt quite sure that how to run the thing should be in step 3; 2 is too soon, 
and 4 is too late.  But how?  Nowhere in the text does it actually say how to 
run the thing!!!   So I googled looking for other's comments on forums, etc.  I 
YUM installed Groovy and tried running it on the commandline.  I removed the 
leading and trailing lines ("[[grovy]]") which caused errors.  I got class not 
found errors.  I read step 3 again.  I started reading the details of CLASSPATH 
and /bin/build-classpath.  With reluctance and just a little resentment.   It 
was an extwemewy fwustwating expewience.

That said, I realize it the mailing list is for questions, not complaints, and 
so apologize to all for this complaint, and will take it and my other such 
observations to Jira and log them as bugs.

dkl

The information contained in this transmission may contain West Marine 
proprietary, confidential and/or privileged 
information.  It is intended only for the use of the person(s) named above. If 
you are not the intended recipient, you are 
hereby notified that any review, dissemination, distribution or duplication of 
this communication is strictly prohibited. 
If you are not the intended recipient, please contact the sender by reply email 
and destroy all copies of the original 
message. To reply to our email administrator directly, please send an email to 
netad...@westmarine.com.


Re: [xwiki-users] Help Request! Running the Attachment Porter

2017-03-27 Thread Vincent Massol
Hi,

I’ve never used this code but shouldn’t it execute in a wiki page?

Thanks
-Vincent

> On 23 Mar 2017, at 05:41, Douglas Landau  wrote:
> 
> Folks,
> 
> I found the attachment porter but don’t know how to invoke it.  I am reading 
> and re-reading the page about it, the page that has the download button.  But 
> nowhere does it say how to use it.   
> 
> Now, I apologize sincerely for the dumb question.   But I am getting an error 
> for every one of 15 or so import lines!   It -must- be necessary to set some 
> CLASSPATH or something or specify some JARs on the groovy commandline or 
> -some-thing it seems like there -must- be something here that everyone 
> thinks is so obvious that it goes without saying...
> 
> Could someone please take pity on me and send me their command line that they 
> used to run this sucker?
> 
> Thank You!
> ---
> [root@dwswiki10 xwiki]# groovy p.groovy
> /bin/build-classpath: Could not find ../../jvm/java/lib Java extension for 
> this JVM
> /bin/build-classpath: error: Some specified jars were not found
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed:
> /data/xwiki/p.groovy: 6: unable to resolve class 
> com.xpn.xwiki.store.XWikiAttachmentStoreInterface
> @ line 6, column 1.
>   import com.xpn.xwiki.store.XWikiAttachmentStoreInterface;
>   ^
> 
> /data/xwiki/p.groovy: 8: unable to resolve class 
> com.xpn.xwiki.store.AttachmentVersioningStore
> @ line 8, column 1.
>   import com.xpn.xwiki.store.AttachmentVersioningStore;
>   ^
> 
> /data/xwiki/p.groovy: 15: unable to resolve class 
> org.xwiki.store.filesystem.internal.FilesystemStoreTools
> @ line 15, column 1.
>   import org.xwiki.store.filesystem.internal.FilesystemStoreTools;
>   ^
> 
> /data/xwiki/p.groovy: 12: unable to resolve class com.xpn.xwiki.XWikiContext
> @ line 12, column 1.
>   import com.xpn.xwiki.XWikiContext;
>   ^
> 
> /data/xwiki/p.groovy: 13: unable to resolve class com.xpn.xwiki.XWiki
> @ line 13, column 1.
>   import com.xpn.xwiki.XWiki;
>   ^
> 
> /data/xwiki/p.groovy: 16: unable to resolve class 
> org.apache.commons.lang.exception.ExceptionUtils
> @ line 16, column 1.
>   import org.apache.commons.lang.exception.ExceptionUtils;
>   ^
> 
> /data/xwiki/p.groovy: 2: unable to resolve class 
> com.xpn.xwiki.doc.XWikiAttachment
> @ line 2, column 1.
>   import com.xpn.xwiki.doc.XWikiAttachment;
>   ^
> 
> /data/xwiki/p.groovy: 4: unable to resolve class 
> com.xpn.xwiki.doc.DeletedAttachment
> @ line 4, column 1.
>   import com.xpn.xwiki.doc.DeletedAttachment;
>   ^
> 
> ...
> ...
> ...
> ...
> ...
> 
> 
> 
> 
> The information contained in this transmission may contain West Marine 
> proprietary, confidential and/or privileged 
> information.  It is intended only for the use of the person(s) named above. 
> If you are not the intended recipient, you are 
> hereby notified that any review, dissemination, distribution or duplication 
> of this communication is strictly prohibited. 
> If you are not the intended recipient, please contact the sender by reply 
> email and destroy all copies of the original 
> message. To reply to our email administrator directly, please send an email 
> to netad...@westmarine.com.



[xwiki-users] Help Request! Running the Attachment Porter

2017-03-22 Thread Douglas Landau
Folks,

I found the attachment porter but don’t know how to invoke it.  I am reading 
and re-reading the page about it, the page that has the download button.  But 
nowhere does it say how to use it.   

Now, I apologize sincerely for the dumb question.   But I am getting an error 
for every one of 15 or so import lines!   It -must- be necessary to set some 
CLASSPATH or something or specify some JARs on the groovy commandline or 
-some-thing it seems like there -must- be something here that everyone 
thinks is so obvious that it goes without saying...

Could someone please take pity on me and send me their command line that they 
used to run this sucker?

Thank You!
---
[root@dwswiki10 xwiki]# groovy p.groovy
/bin/build-classpath: Could not find ../../jvm/java/lib Java extension for this 
JVM
/bin/build-classpath: error: Some specified jars were not found
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/data/xwiki/p.groovy: 6: unable to resolve class 
com.xpn.xwiki.store.XWikiAttachmentStoreInterface
 @ line 6, column 1.
   import com.xpn.xwiki.store.XWikiAttachmentStoreInterface;
   ^

/data/xwiki/p.groovy: 8: unable to resolve class 
com.xpn.xwiki.store.AttachmentVersioningStore
 @ line 8, column 1.
   import com.xpn.xwiki.store.AttachmentVersioningStore;
   ^

/data/xwiki/p.groovy: 15: unable to resolve class 
org.xwiki.store.filesystem.internal.FilesystemStoreTools
 @ line 15, column 1.
   import org.xwiki.store.filesystem.internal.FilesystemStoreTools;
   ^

/data/xwiki/p.groovy: 12: unable to resolve class com.xpn.xwiki.XWikiContext
 @ line 12, column 1.
   import com.xpn.xwiki.XWikiContext;
   ^

/data/xwiki/p.groovy: 13: unable to resolve class com.xpn.xwiki.XWiki
 @ line 13, column 1.
   import com.xpn.xwiki.XWiki;
   ^

/data/xwiki/p.groovy: 16: unable to resolve class 
org.apache.commons.lang.exception.ExceptionUtils
 @ line 16, column 1.
   import org.apache.commons.lang.exception.ExceptionUtils;
   ^

/data/xwiki/p.groovy: 2: unable to resolve class 
com.xpn.xwiki.doc.XWikiAttachment
 @ line 2, column 1.
   import com.xpn.xwiki.doc.XWikiAttachment;
   ^

/data/xwiki/p.groovy: 4: unable to resolve class 
com.xpn.xwiki.doc.DeletedAttachment
 @ line 4, column 1.
   import com.xpn.xwiki.doc.DeletedAttachment;
   ^

...
...
...
...
...


 

The information contained in this transmission may contain West Marine 
proprietary, confidential and/or privileged 
information.  It is intended only for the use of the person(s) named above. If 
you are not the intended recipient, you are 
hereby notified that any review, dissemination, distribution or duplication of 
this communication is strictly prohibited. 
If you are not the intended recipient, please contact the sender by reply email 
and destroy all copies of the original 
message. To reply to our email administrator directly, please send an email to 
netad...@westmarine.com.