Uploading .jar as attachment to page fails

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Uploading .jar as attachment to page fails

dullfig
Hello:

I want to upload the latest PlantUML.jar server as an attachment to the PlantUMLMacroGClass page. The current PlantUML.jar is outdated, and is already an attachment to this page.

I press the "chose file"button, search for the .jar file, and invariably it stops at about 2MB with an error message that says "an error occured while uploading plantuml.jar". What could be the problem? the file is about 5MB

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Uploading .jar as attachment to page fails

vmassol
Administrator
Hi,

> On 11 Apr 2016, at 23:47, dullfig <[hidden email]> wrote:
>
> Hello:
>
> I want to upload the latest PlantUML.jar server as an attachment to the
> PlantUMLMacroGClass page. The current PlantUML.jar is outdated, and is
> already an attachment to this page.
>
> I press the "chose file"button, search for the .jar file, and invariably it
> stops at about 2MB with an error message that says "an error occured while
> uploading plantuml.jar". What could be the problem? the file is about 5MB

Maybe you should check this out:
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments

And also http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL if you’re using mysql:

" • By default MySQL only accepts packets that are smaller than 1MB. If you get the "Packet for query is too large (max_allowed_packet)" error then see the Packet too large error page. For example to increase the packet size to 32M you could start the MySQL server with mysqld --console --max_allowed_packet=32M or you can modify directly the my.cnf configuration file to set this value permanently.”

You should also check the logs to see the details of "an error occured while uploading plantuml.jar” (that doesn’t give enough info to help you more).

Thanks
-Vincent

>
> Dan
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/Uploading-jar-as-attachment-to-page-fails-tp7598929.html

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Uploading .jar as attachment to page fails

Thomas Mortagne
Administrator
Note that a cleaner solution would be to refactor PlantUML Macro
extension to depend on net.sourceforge.plantuml:plantuml extension
instead of embedding it. Extension will simply put the plantuml jar in
the classloader and it would be automatically available to the
PlantUML Macro (no need to load the attachment anymore).

On Tue, Apr 12, 2016 at 9:23 AM, Vincent Massol <[hidden email]> wrote:

> Hi,
>
>> On 11 Apr 2016, at 23:47, dullfig <[hidden email]> wrote:
>>
>> Hello:
>>
>> I want to upload the latest PlantUML.jar server as an attachment to the
>> PlantUMLMacroGClass page. The current PlantUML.jar is outdated, and is
>> already an attachment to this page.
>>
>> I press the "chose file"button, search for the .jar file, and invariably it
>> stops at about 2MB with an error message that says "an error occured while
>> uploading plantuml.jar". What could be the problem? the file is about 5MB
>
> Maybe you should check this out:
> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments
>
> And also http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL if you’re using mysql:
>
> "       • By default MySQL only accepts packets that are smaller than 1MB. If you get the "Packet for query is too large (max_allowed_packet)" error then see the Packet too large error page. For example to increase the packet size to 32M you could start the MySQL server with mysqld --console --max_allowed_packet=32M or you can modify directly the my.cnf configuration file to set this value permanently.”
>
> You should also check the logs to see the details of "an error occured while uploading plantuml.jar” (that doesn’t give enough info to help you more).
>
> Thanks
> -Vincent
>
>>
>> Dan
>>
>>
>>
>> --
>> View this message in context: http://xwiki.475771.n2.nabble.com/Uploading-jar-as-attachment-to-page-fails-tp7598929.html
>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users



--
Thomas Mortagne
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Uploading .jar as attachment to page fails

dullfig
ok, so it turns out the problem was not just jar files, but any large files. I had to mess around with the max_allowed_packet variable in mysql, plus increase the size of uploads in xwiki, which at first I didn’t realize is given in BYTES. so now I can upload large files.
 
I wanted a local plantuml server because I’m trying to embed links in the diagrams, and I thought you needed a local server for that.
 
It still doesn’t work, but I thing it’s a XWiki issue.
 
Dan
 
Sent: Tuesday, April 12, 2016 6:54 AM
Subject: Re: Uploading .jar as attachment to page fails
 
Note that a cleaner solution would be to refactor PlantUML Macro
extension to depend on net.sourceforge.plantuml:plantuml extension
instead of embedding it. Extension will simply put the plantuml jar in
the classloader and it would be automatically available to the
PlantUML Macro (no need to load the attachment anymore).

On Tue, Apr 12, 2016 at 9:23 AM, Vincent Massol <<A href="wlmailhtml:/user/SendEmail.jtp?type=node&amp;node=7598943&amp;i=0" rel=nofollow target=_top link="external">[hidden email]> wrote:

> Hi,
>
>> On 11 Apr 2016, at 23:47, dullfig <<A href="wlmailhtml:/user/SendEmail.jtp?type=node&amp;node=7598943&amp;i=1" rel=nofollow target=_top link="external">[hidden email]> wrote:
>>
>> Hello:
>>
>> I want to upload the latest PlantUML.jar server as an attachment to the
>> PlantUMLMacroGClass page. The current PlantUML.jar is outdated, and is
>> already an attachment to this page.
>>
>> I press the "chose file"button, search for the .jar file, and invariably it
>> stops at about 2MB with an error message that says "an error occured while
>> uploading plantuml.jar". What could be the problem? the file is about 5MB
>
> Maybe you should check this out:
> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments
>
> And also http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL if you’re using mysql:
>
> "       • By default MySQL only accepts packets that are smaller than 1MB. If you get the "Packet for query is too large (max_allowed_packet)" error then see the Packet too large error page. For example to increase the packet size to 32M you could start the MySQL server with mysqld --console --max_allowed_packet=32M or you can modify directly the my.cnf configuration file to set this value permanently.”
>
> You should also check the logs to see the details of "an error occured while uploading plantuml.jar” (that doesn’t give enough info to help you more).
>
> Thanks
> -Vincent
>
>>
>> Dan
>>
>>
>>
>> --
>> View this message in context: http://xwiki.475771.n2.nabble.com/Uploading-jar-as-attachment-to-page-fails-tp7598929.html
>
> _______________________________________________
> users mailing list
> <A href="wlmailhtml:/user/SendEmail.jtp?type=node&amp;node=7598943&amp;i=2" rel=nofollow target=_top link="external">[hidden email]
> http://lists.xwiki.org/mailman/listinfo/users


--
Thomas Mortagne
_______________________________________________
users mailing list
<A href="wlmailhtml:/user/SendEmail.jtp?type=node&amp;node=7598943&amp;i=3" rel=nofollow target=_top link="external">[hidden email]
http://lists.xwiki.org/mailman/listinfo/users



If you reply to this email, your message will be added to the discussion below:
http://xwiki.475771.n2.nabble.com/Uploading-jar-as-attachment-to-page-fails-tp7598929p7598943.html
To unsubscribe from Uploading .jar as attachment to page fails, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Uploading .jar as attachment to page fails

Maxime Sinclair
In reply to this post by Thomas Mortagne
Hi Thomas,

What do you mean by "to depend on net.sf.plantuml:plantuml" ? Is it a
new feature ? Can you give me a few pointer on this subject ?

Thanks.
Maxime


On 12/04/2016 15:53, Thomas Mortagne wrote:

> Note that a cleaner solution would be to refactor PlantUML Macro
> extension to depend on net.sourceforge.plantuml:plantuml extension
> instead of embedding it. Extension will simply put the plantuml jar in
> the classloader and it would be automatically available to the
> PlantUML Macro (no need to load the attachment anymore).
>
> On Tue, Apr 12, 2016 at 9:23 AM, Vincent Massol <[hidden email]> wrote:
>> Hi,
>>
>>> On 11 Apr 2016, at 23:47, dullfig <[hidden email]> wrote:
>>>
>>> Hello:
>>>
>>> I want to upload the latest PlantUML.jar server as an attachment to the
>>> PlantUMLMacroGClass page. The current PlantUML.jar is outdated, and is
>>> already an attachment to this page.
>>>
>>> I press the "chose file"button, search for the .jar file, and invariably it
>>> stops at about 2MB with an error message that says "an error occured while
>>> uploading plantuml.jar". What could be the problem? the file is about 5MB
>> Maybe you should check this out:
>> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments
>>
>> And also http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL if you’re using mysql:
>>
>> "       • By default MySQL only accepts packets that are smaller than 1MB. If you get the "Packet for query is too large (max_allowed_packet)" error then see the Packet too large error page. For example to increase the packet size to 32M you could start the MySQL server with mysqld --console --max_allowed_packet=32M or you can modify directly the my.cnf configuration file to set this value permanently.”
>>
>> You should also check the logs to see the details of "an error occured while uploading plantuml.jar” (that doesn’t give enough info to help you more).
>>
>> Thanks
>> -Vincent
>>
>>> Dan
>>>
>>>
>>>
>>> --
>>> View this message in context: http://xwiki.475771.n2.nabble.com/Uploading-jar-as-attachment-to-page-fails-tp7598929.html
>> _______________________________________________
>> users mailing list
>> [hidden email]
>> http://lists.xwiki.org/mailman/listinfo/users
>
>

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Uploading .jar as attachment to page fails

Maxime Sinclair
In reply to this post by dullfig
Hi Dan,

Embedding links in a diagram is not available in the current PlantUML
Macro but it could be possible using the Image Map service (as described
on this page http://plantuml.com/server.html ). The drawback would be to
define links as absolute URLs and not in the xwiki simpler syntax.

Maxime

On 12/04/2016 17:24, dullfig wrote:

> ok, so it turns out the problem was not just jar files, but any large files. I had to mess around with the max_allowed_packet variable in mysql, plus increase the size of uploads in xwiki, which at first I didn’t realize is given in BYTES. so now I can upload large files.
>
> I wanted a local plantuml server because I’m trying to embed links in the diagrams, and I thought you needed a local server for that.
>
> It still doesn’t work, but I thing it’s a XWiki issue.
>
> Dan
>
> From: Thomas Mortagne [via XWiki]
> Sent: Tuesday, April 12, 2016 6:54 AM
> To: dullfig
> Subject: Re: Uploading .jar as attachment to page fails
>
> Note that a cleaner solution would be to refactor PlantUML Macro
> extension to depend on net.sourceforge.plantuml:plantuml extension
> instead of embedding it. Extension will simply put the plantuml jar in
> the classloader and it would be automatically available to the
> PlantUML Macro (no need to load the attachment anymore).
>
> On Tue, Apr 12, 2016 at 9:23 AM, Vincent Massol <[hidden email]> wrote:
>
>> Hi,
>>
>>> On 11 Apr 2016, at 23:47, dullfig <[hidden email]> wrote:
>>>
>>> Hello:
>>>
>>> I want to upload the latest PlantUML.jar server as an attachment to the
>>> PlantUMLMacroGClass page. The current PlantUML.jar is outdated, and is
>>> already an attachment to this page.
>>>
>>> I press the "chose file"button, search for the .jar file, and invariably it
>>> stops at about 2MB with an error message that says "an error occured while
>>> uploading plantuml.jar". What could be the problem? the file is about 5MB
>> Maybe you should check this out:
>> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments
>>
>> And also http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL if you’re using mysql:
>>
>> "       • By default MySQL only accepts packets that are smaller than 1MB. If you get the "Packet for query is too large (max_allowed_packet)" error then see the Packet too large error page. For example to increase the packet size to 32M you could start the MySQL server with mysqld --console --max_allowed_packet=32M or you can modify directly the my.cnf configuration file to set this value permanently.”
>>
>> You should also check the logs to see the details of "an error occured while uploading plantuml.jar” (that doesn’t give enough info to help you more).
>>
>> Thanks
>> -Vincent
>>
>>> Dan
>>>
>>>
>>>
>>> --
>>> View this message in context: http://xwiki.475771.n2.nabble.com/Uploading-jar-as-attachment-to-page-fails-tp7598929.html
>> _______________________________________________
>> users mailing list
>> [hidden email]
>> http://lists.xwiki.org/mailman/listinfo/users
>
>

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Uploading .jar as attachment to page fails

dullfig
I think there is a problem with how xwiki renders pages. Because the SVG macro can't show embedded links either. I have been trying it out, you can include links in the svg devinition, but they just don't render as links. XWiki seems to just convert everything to dumb images.

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Uploading .jar as attachment to page fails

Thomas Mortagne
Administrator
In reply to this post by Maxime Sinclair
Not exactly new. plantuml is on Maven central which mean you can just
declare it as dependency of your extension and Extension Manager will
install it when you install your extension.

For imported Maven extension you just need to add it as dependency in
the pom, for 100% extension.xwiki.org extensions you can add
dependency object, see
http://extensions.xwiki.org/xwiki/bin/edit/Extension/PlantUML+Macro#HAddDependencies.

On Tue, Apr 12, 2016 at 9:28 PM, Maxime Sinclair
<[hidden email]> wrote:

> Hi Thomas,
>
> What do you mean by "to depend on net.sf.plantuml:plantuml" ? Is it a new
> feature ? Can you give me a few pointer on this subject ?
>
> Thanks.
> Maxime
>
>
>
> On 12/04/2016 15:53, Thomas Mortagne wrote:
>>
>> Note that a cleaner solution would be to refactor PlantUML Macro
>> extension to depend on net.sourceforge.plantuml:plantuml extension
>> instead of embedding it. Extension will simply put the plantuml jar in
>> the classloader and it would be automatically available to the
>> PlantUML Macro (no need to load the attachment anymore).
>>
>> On Tue, Apr 12, 2016 at 9:23 AM, Vincent Massol <[hidden email]>
>> wrote:
>>>
>>> Hi,
>>>
>>>> On 11 Apr 2016, at 23:47, dullfig <[hidden email]> wrote:
>>>>
>>>> Hello:
>>>>
>>>> I want to upload the latest PlantUML.jar server as an attachment to the
>>>> PlantUMLMacroGClass page. The current PlantUML.jar is outdated, and is
>>>> already an attachment to this page.
>>>>
>>>> I press the "chose file"button, search for the .jar file, and invariably
>>>> it
>>>> stops at about 2MB with an error message that says "an error occured
>>>> while
>>>> uploading plantuml.jar". What could be the problem? the file is about
>>>> 5MB
>>>
>>> Maybe you should check this out:
>>> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments
>>>
>>> And also
>>> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL if
>>> you’re using mysql:
>>>
>>> "       • By default MySQL only accepts packets that are smaller than
>>> 1MB. If you get the "Packet for query is too large (max_allowed_packet)"
>>> error then see the Packet too large error page. For example to increase the
>>> packet size to 32M you could start the MySQL server with mysqld --console
>>> --max_allowed_packet=32M or you can modify directly the my.cnf configuration
>>> file to set this value permanently.”
>>>
>>> You should also check the logs to see the details of "an error occured
>>> while uploading plantuml.jar” (that doesn’t give enough info to help you
>>> more).
>>>
>>> Thanks
>>> -Vincent
>>>
>>>> Dan
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://xwiki.475771.n2.nabble.com/Uploading-jar-as-attachment-to-page-fails-tp7598929.html
>>>
>>> _______________________________________________
>>> users mailing list
>>> [hidden email]
>>> http://lists.xwiki.org/mailman/listinfo/users
>>
>>
>>
>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users



--
Thomas Mortagne
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Uploading .jar as attachment to page fails

dullfig
In reply to this post by Maxime Sinclair
I think I'm on to something. I have modified the macro to produce an svg instead of a png. I then wrap the output in {{html}}{{/html}} aND now the links are clickable. I'm working on running the uml input through services.rendering.parse () to convert the wiki links to absolute url automatically.