You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Tommy Pham <to...@gmail.com> on 2020/03/05 21:44:47 UTC

[Roller6] media files panel

Hello everyone,

I'm having an issue with the media files panel display.  I've tried in both
Firefox and Chrome without success.

https://imgur.com/a/zHXnmXV

Basically I have to scroll to view a big image while I have plenty of
screen real estate at the bottom as you can see.  The only way I can get
that window to resize so I could see the image entirely without scrolling
is edit either:

   <div id="imageGrid" style="1000px">

or it's child div

  <div class="panel-body" style="1000px">

Neither seems like a good solution since it's not sized accordingly nor
scale dynamically to browser window size.  Is this by design or bug?
Please advise.

If you're wondering what monitor I'm using, it's 40" 4k TV for about $300
USD which is cheaper than getting 4 x 27" (2560x1440) for about the same
screen real estate (slightly better PPI 110 vs 108) w/o the split screen
bezels :)

Thanks,
Tommy

Re: [Roller6] media files panel

Posted by Tommy Pham <to...@gmail.com>.
Hi Dave,

Thanks for the feedback.  I didn't need the image.  I was just
experimenting the UI.  The image was on my desktop and was used as
convenience.  All other images I've uploaded works fine thus far.  Have a
great weekend.

Thanks,
Tommy


On Fri, Apr 10, 2020 at 1:20 PM Dave <sn...@gmail.com> wrote:

> Tommy,
>
> I downloaded those two JPG files and when I try to view them on my computer
> (Mac) I get an error message "The file “fragile.jpg” could not be opened."
> and "It may be damaged or use a file format that Preview doesn’t
> recognize." Safari will not display them, but Firefox will.
>
> I'd recommend taking a screenshot of that image, saving it and then
> uploading that to Roller instead.
>
> Dave
>
>
> On Mon, Apr 6, 2020 at 6:36 PM Tommy Pham <to...@gmail.com> wrote:
>
> > Hi Dave,
> >
> > Thank you for looking into this.  I haven't tested thoroughly enough but
> it
> > seems only
> > these 2 images that are affected which were downloaded from the internet
> > long time ago:
> >
> > https://drive.google.com/open?id=17x5bAQumPq_Q2lKlTP03JCZ8mkMVnl1g
> > https://drive.google.com/open?id=1XQomqxXCJRykrGJw7ze64SybS1yvv4Hk
> >
> > The metadata / EXIF is very minimal per Window's Explorer properties.
> > Maybe something hidden that prevents image processing application from
> > 'tampering' ?
> > My environment guest VMs are:
> >
> > OS: FreeBSD 12.1-RELEASE-p3 amd64 (both DB and Web)
> > JDK is java/openjdk11 (ports built)  11.0.6+10-1
> > Tomcat 9.033 + Apache 2.4
> > MariaDB 10.4.12
> >
> > I run mainly FreeBSD due to ease and flexibility of management and
> > customization.
> > When I started to troubleshoot this issue, I noticed some discrepancy in
> > the logging
> > due to log4j (v1) dependency.  Log4j is broken in Java 9+ from my
> > research.  I've replaced
> > all the necessary logging jars and switched over to log4j2:
> >
> > # blog/WEB-INF/lib # ll *log* *slf*
> > -rw-r--r--  1 root  www    61829 Jun  9  2019 commons-logging-1.2.jar
> > -rw-r--r--  1 root  www   201684 Mar 30 02:44 log4j-1.2-api-2.13.1.jar
> > -rw-r--r--  1 root  www   292244 Mar 27 21:37 log4j-api-2.13.1.jar
> > -rw-r--r--  1 root  www  1702809 Mar 27 21:37 log4j-core-2.13.1.jar
> > -rw-r--r--  1 root  www    12657 Mar 30 02:44 log4j-jcl-2.13.1.jar
> > -rw-r--r--  1 root  www    26166 Mar 30 02:44 log4j-jul-2.13.1.jar
> > -rw-r--r--  1 root  www    23591 Mar 27 21:37 log4j-slf4j-impl-2.13.1.jar
> > -rw-r--r--  1 root  www    32327 Mar 30 02:44 log4j-taglib-2.13.1.jar
> > -rw-r--r--  1 root  www    32475 Mar 30 02:44 log4j-web-2.13.1.jar
> > -rw-r--r--  1 root  www    41472 Mar 27 13:50 slf4j-api-1.7.30.jar
> >
> >  and using my log4j2.xml file generated by this:
> >
> > http://www.sointe.com/log4j2.php
> >
> > I got tired of typing them out when I was troubleshooting some Java apps
> > recently.
> > You just enter the framework or provider you'd like and it'll generate
> the
> > file for you.
> >
> > Thanks,
> > Tommy
> >
> > On Sun, Apr 5, 2020 at 1:41 PM Dave <sn...@gmail.com> wrote:
> >
> > > Hi Tommy,
> > >
> > > I'm not able to reproduce this problem.  Here's what I tried:
> > >
> > > - Upload large image via the Media File View page
> > > - Go into the mediafiles directory for the corresponding blog and
> delete
> > > the thumbnail image of the upload (the file with the _sm suffix)
> > > - Navigate back to the the Media File View for the blog, reload the
> page
> > > - See that the large image is displayed as the thumbnail and it is
> > > correctly sized because the <img> tag specifies thumbnail size height
> and
> > > width attributes.
> > >
> > > I also debugged into the MediaResourceServlet.java to verify that, if a
> > > thumbnail image is missing, the original image will be returned. Is it
> > > possible for you to share that "FRAGILE" image that is causing the
> > problem?
> > >
> > > Also, what Java VM version, operating system version and database are
> you
> > > using?
> > >
> > > Thanks,
> > > Dave
> > >
> > >
> > >
> > > On Sun, Apr 5, 2020 at 10:40 AM Dave <sn...@gmail.com> wrote:
> > >
> > > > Apparently, ImageIO.read() only supports six image formats and if it
> > does
> > > > not recognize the image format, it returns null instead of an error.
> > That
> > > > must be why the thumbnail creation fails. Roller is able to upload
> the
> > > > image and save it as a file, but then when it tries to read the image
> > so
> > > > that it can scale it down to thumbnail size ImageIO.read() returns
> null
> > > and
> > > > we get that NPE.
> > > >
> > > > There maybe a way to work around this problem by falling back to the
> > > > full-sized image and scale it down in the Media File View. I'm going
> to
> > > > look into that option. I think that is how the Media File View page
> was
> > > > intended to work anyway but I may have broken that logic during the
> > > > Bootstrap rewrite.
> > > >
> > > > Dave
> > > >
> > > >
> > > > On Mon, Mar 30, 2020 at 2:30 PM Tommy Pham <to...@gmail.com>
> wrote:
> > > >
> > > >> Hi Dave,
> > > >>
> > > >> I've cloned the code from github and checked out roller-6.0.x
> 7d11070.
> > > I
> > > >> then modified the JPAMedifaFileManagerImpl to have some trace
> logging
> > > >> hoping to find the root cause.  For some reason, ImageIO.read()
> fails
> > > for
> > > >> that particular JPEG image even though other JPEG images upload OK.
> > > >>
> > > >> Thanks,
> > > >> Tommy
> > > >>
> > > >> On Tue, Mar 24, 2020 at 8:35 PM Tommy Pham <to...@gmail.com>
> > wrote:
> > > >>
> > > >> > I guess I was wrong.  Putting in jaxb-runtime-2.3.3-b02.jar didn't
> > > >> resolve
> > > >> > the NPE for creating thumbnail.
> > > >> >
> > > >> > On Tue, Mar 24, 2020 at 8:28 PM Tommy Pham <to...@gmail.com>
> > > wrote:
> > > >> >
> > > >> >> Hi Dave,
> > > >> >>
> > > >> >> I apologize for unable to submit the JIRA.  Something came up
> after
> > > >> >> typing that email and have been preoccupied since.  I'm using
> > > (native)
> > > >> >> OpenJDK 11on FreeBSD 12.1.  I just made some updates to the
> logging
> > > >> >> configurations since I saw log4j (v1) and that it's broken on
> Java
> > > 9+.
> > > >> >> Here's the recent snippet:
> > > >> >>
> > > >> >> 24-Mar-2020 20:01:58.056 DEBUG [http-nio-8080-exec-1]
> > > >> >>
> > > >>
> > >
> >
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.getMediaFile:361
> > > >> >> - Cannot load thumbnail for image
> > > 7c8b9f04-8cbc-4172-b3d0-ef601d040d00
> > > >> >> org.apache.roller.weblogger.business.FileNotFoundException:
> Invalid
> > > >> path
> > > >> >>
> > > >>
> > >
> >
> [/usr/local/www/_apps_/java/roller6_data/mediafiles/Tommy/7c8b9f04-8cbc-4172-b3d0-ef601d040d00_sm],
> > > >> >> file does not exist.
> > > >> >>
> > > >> >> That file does not exists.  Only the main original image (?).  It
> > > seems
> > > >> >> the thumbnails didn't generate.
> > > >> >>
> > > >> >> 24-Mar-2020 20:12:07.120 DEBUG [http-nio-8080-exec-6]
> > > >> >>
> > > >>
> > >
> >
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail:283
> > > >> >> - ERROR creating thumbnail
> > > >> >> java.lang.NullPointerException: null
> > > >> >>         at
> > > >> >>
> > > >>
> > >
> >
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail(JPAMediaFileManagerImpl.java:256)
> > > >> >> [classes/:?]
> > > >> >>         at
> > > >> >>
> > > >>
> > >
> >
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.createMediaFile(JPAMediaFileManagerImpl.java:220)
> > > >> >> [classes/:?]
> > > >> >>         at
> > > >> >>
> > > >>
> > >
> >
> org.apache.roller.weblogger.ui.struts2.editor.MediaFileAdd.save(MediaFileAdd.java:195)
> > > >> >> [classes/:?]
> > > >> >>         at
> > > jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > >> >> Method) ~[?:?]
> > > >> >>         at
> > > >> >>
> > > >>
> > >
> >
> jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > > >> >> ~[?:?]
> > > >> >>         at
> > > >> >>
> > > >>
> > >
> >
> jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > >> >> ~[?:?]
> > > >> >>
> > > >> >> Full stack trace:  https://pastebin.com/W8dgE22M
> > > >> >>
> > > >> >> From the NPE and seeing jaxb-api in lib, I think I'm missing
> > > >> >> implementation jar(s) for javax.xml.bind because I'm using JDK
> 11.
> > > >> >>
> > > >> >> I saw mixed logging mechanisms due various frameworks used.  What
> > > would
> > > >> >> be the main?  What does Roller uses to image modification /
> > > generation?
> > > >> >>
> > > >> >> Thanks,
> > > >> >> Tommy
> > > >> >>
> > > >> >>
> > > >> >> On Sat, Mar 21, 2020 at 2:03 PM Dave <sn...@gmail.com>
> wrote:
> > > >> >>
> > > >> >>> Hi Tommy,
> > > >> >>>
> > > >> >>> I created a JIRA for you Media Files bug, but I cannot reproduce
> > the
> > > >> >>> problem. Please see my comment here:
> > > >> >>> https://issues.apache.org/jira/browse/ROL-2163
> > > >> >>>
> > > >> >>> Thanks,
> > > >> >>> Dave
> > > >> >>>
> > > >> >>>
> > > >> >>> On Fri, Mar 6, 2020 at 1:25 AM Swapnil M Mane <
> > > >> swapnilmmane@apache.org>
> > > >> >>> wrote:
> > > >> >>>
> > > >> >>> > Hi Tommy,
> > > >> >>> > Yes, you can keep it Improvement with minor priority.
> > > >> >>> > Although this also falls under UI Bug, but anyways since it is
> > not
> > > >> >>> > breaking anything, I consider it as UI improvement.
> > > >> >>> >
> > > >> >>> > So, let's have it as Improvement with minor priority.
> > > >> >>> >
> > > >> >>> > Best regards,
> > > >> >>> > Swapnil M Mane,
> > > >> >>> > www.apache.org
> > > >> >>> >
> > > >> >>> > On Fri, Mar 6, 2020 at 11:31 AM Tommy Pham <
> tommyhp2@gmail.com>
> > > >> wrote:
> > > >> >>> > >
> > > >> >>> > > Hi Dave,
> > > >> >>> > >
> > > >> >>> > > What type should I file it under? Improvement? And minor
> > > priority
> > > >> (or
> > > >> >>> > > trivial) ?
> > > >> >>> > >
> > > >> >>> > > Thanks,
> > > >> >>> > > Tommy
> > > >> >>> > >
> > > >> >>> > > On Thu, Mar 5, 2020 at 4:00 PM Dave <sn...@gmail.com>
> > > wrote:
> > > >> >>> > >
> > > >> >>> > > > That's not by design or really a bug, it's just poorly
> done
> > > :-)
> > > >> >>> > > >
> > > >> >>> > > > Please file a JIRA bug for it if you have time, otherwise
> > I'll
> > > >> do
> > > >> >>> that
> > > >> >>> > this
> > > >> >>> > > > weekend.
> > > >> >>> > > >
> > > >> >>> > > > Thanks,
> > > >> >>> > > > Dave
> > > >> >>> > > >
> > > >> >>> > > >
> > > >> >>> > > > On Thu, Mar 5, 2020 at 4:45 PM Tommy Pham <
> > tommyhp2@gmail.com
> > > >
> > > >> >>> wrote:
> > > >> >>> > > >
> > > >> >>> > > > > Hello everyone,
> > > >> >>> > > > >
> > > >> >>> > > > > I'm having an issue with the media files panel display.
> > > I've
> > > >> >>> tried
> > > >> >>> > in
> > > >> >>> > > > both
> > > >> >>> > > > > Firefox and Chrome without success.
> > > >> >>> > > > >
> > > >> >>> > > > > https://imgur.com/a/zHXnmXV
> > > >> >>> > > > >
> > > >> >>> > > > > Basically I have to scroll to view a big image while I
> > have
> > > >> >>> plenty of
> > > >> >>> > > > > screen real estate at the bottom as you can see.  The
> only
> > > >> way I
> > > >> >>> can
> > > >> >>> > get
> > > >> >>> > > > > that window to resize so I could see the image entirely
> > > >> without
> > > >> >>> > scrolling
> > > >> >>> > > > > is edit either:
> > > >> >>> > > > >
> > > >> >>> > > > >    <div id="imageGrid" style="1000px">
> > > >> >>> > > > >
> > > >> >>> > > > > or it's child div
> > > >> >>> > > > >
> > > >> >>> > > > >   <div class="panel-body" style="1000px">
> > > >> >>> > > > >
> > > >> >>> > > > > Neither seems like a good solution since it's not sized
> > > >> >>> accordingly
> > > >> >>> > nor
> > > >> >>> > > > > scale dynamically to browser window size.  Is this by
> > design
> > > >> or
> > > >> >>> bug?
> > > >> >>> > > > > Please advise.
> > > >> >>> > > > >
> > > >> >>> > > > > If you're wondering what monitor I'm using, it's 40" 4k
> TV
> > > for
> > > >> >>> about
> > > >> >>> > $300
> > > >> >>> > > > > USD which is cheaper than getting 4 x 27" (2560x1440)
> for
> > > >> about
> > > >> >>> the
> > > >> >>> > same
> > > >> >>> > > > > screen real estate (slightly better PPI 110 vs 108) w/o
> > the
> > > >> split
> > > >> >>> > screen
> > > >> >>> > > > > bezels :)
> > > >> >>> > > > >
> > > >> >>> > > > > Thanks,
> > > >> >>> > > > > Tommy
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> >
> > > >> >>>
> > > >> >>
> > > >>
> > > >
> > >
> >
>

Re: [Roller6] media files panel

Posted by Dave <sn...@gmail.com>.
Tommy,

I downloaded those two JPG files and when I try to view them on my computer
(Mac) I get an error message "The file “fragile.jpg” could not be opened."
and "It may be damaged or use a file format that Preview doesn’t
recognize." Safari will not display them, but Firefox will.

I'd recommend taking a screenshot of that image, saving it and then
uploading that to Roller instead.

Dave


On Mon, Apr 6, 2020 at 6:36 PM Tommy Pham <to...@gmail.com> wrote:

> Hi Dave,
>
> Thank you for looking into this.  I haven't tested thoroughly enough but it
> seems only
> these 2 images that are affected which were downloaded from the internet
> long time ago:
>
> https://drive.google.com/open?id=17x5bAQumPq_Q2lKlTP03JCZ8mkMVnl1g
> https://drive.google.com/open?id=1XQomqxXCJRykrGJw7ze64SybS1yvv4Hk
>
> The metadata / EXIF is very minimal per Window's Explorer properties.
> Maybe something hidden that prevents image processing application from
> 'tampering' ?
> My environment guest VMs are:
>
> OS: FreeBSD 12.1-RELEASE-p3 amd64 (both DB and Web)
> JDK is java/openjdk11 (ports built)  11.0.6+10-1
> Tomcat 9.033 + Apache 2.4
> MariaDB 10.4.12
>
> I run mainly FreeBSD due to ease and flexibility of management and
> customization.
> When I started to troubleshoot this issue, I noticed some discrepancy in
> the logging
> due to log4j (v1) dependency.  Log4j is broken in Java 9+ from my
> research.  I've replaced
> all the necessary logging jars and switched over to log4j2:
>
> # blog/WEB-INF/lib # ll *log* *slf*
> -rw-r--r--  1 root  www    61829 Jun  9  2019 commons-logging-1.2.jar
> -rw-r--r--  1 root  www   201684 Mar 30 02:44 log4j-1.2-api-2.13.1.jar
> -rw-r--r--  1 root  www   292244 Mar 27 21:37 log4j-api-2.13.1.jar
> -rw-r--r--  1 root  www  1702809 Mar 27 21:37 log4j-core-2.13.1.jar
> -rw-r--r--  1 root  www    12657 Mar 30 02:44 log4j-jcl-2.13.1.jar
> -rw-r--r--  1 root  www    26166 Mar 30 02:44 log4j-jul-2.13.1.jar
> -rw-r--r--  1 root  www    23591 Mar 27 21:37 log4j-slf4j-impl-2.13.1.jar
> -rw-r--r--  1 root  www    32327 Mar 30 02:44 log4j-taglib-2.13.1.jar
> -rw-r--r--  1 root  www    32475 Mar 30 02:44 log4j-web-2.13.1.jar
> -rw-r--r--  1 root  www    41472 Mar 27 13:50 slf4j-api-1.7.30.jar
>
>  and using my log4j2.xml file generated by this:
>
> http://www.sointe.com/log4j2.php
>
> I got tired of typing them out when I was troubleshooting some Java apps
> recently.
> You just enter the framework or provider you'd like and it'll generate the
> file for you.
>
> Thanks,
> Tommy
>
> On Sun, Apr 5, 2020 at 1:41 PM Dave <sn...@gmail.com> wrote:
>
> > Hi Tommy,
> >
> > I'm not able to reproduce this problem.  Here's what I tried:
> >
> > - Upload large image via the Media File View page
> > - Go into the mediafiles directory for the corresponding blog and delete
> > the thumbnail image of the upload (the file with the _sm suffix)
> > - Navigate back to the the Media File View for the blog, reload the page
> > - See that the large image is displayed as the thumbnail and it is
> > correctly sized because the <img> tag specifies thumbnail size height and
> > width attributes.
> >
> > I also debugged into the MediaResourceServlet.java to verify that, if a
> > thumbnail image is missing, the original image will be returned. Is it
> > possible for you to share that "FRAGILE" image that is causing the
> problem?
> >
> > Also, what Java VM version, operating system version and database are you
> > using?
> >
> > Thanks,
> > Dave
> >
> >
> >
> > On Sun, Apr 5, 2020 at 10:40 AM Dave <sn...@gmail.com> wrote:
> >
> > > Apparently, ImageIO.read() only supports six image formats and if it
> does
> > > not recognize the image format, it returns null instead of an error.
> That
> > > must be why the thumbnail creation fails. Roller is able to upload the
> > > image and save it as a file, but then when it tries to read the image
> so
> > > that it can scale it down to thumbnail size ImageIO.read() returns null
> > and
> > > we get that NPE.
> > >
> > > There maybe a way to work around this problem by falling back to the
> > > full-sized image and scale it down in the Media File View. I'm going to
> > > look into that option. I think that is how the Media File View page was
> > > intended to work anyway but I may have broken that logic during the
> > > Bootstrap rewrite.
> > >
> > > Dave
> > >
> > >
> > > On Mon, Mar 30, 2020 at 2:30 PM Tommy Pham <to...@gmail.com> wrote:
> > >
> > >> Hi Dave,
> > >>
> > >> I've cloned the code from github and checked out roller-6.0.x 7d11070.
> > I
> > >> then modified the JPAMedifaFileManagerImpl to have some trace logging
> > >> hoping to find the root cause.  For some reason, ImageIO.read() fails
> > for
> > >> that particular JPEG image even though other JPEG images upload OK.
> > >>
> > >> Thanks,
> > >> Tommy
> > >>
> > >> On Tue, Mar 24, 2020 at 8:35 PM Tommy Pham <to...@gmail.com>
> wrote:
> > >>
> > >> > I guess I was wrong.  Putting in jaxb-runtime-2.3.3-b02.jar didn't
> > >> resolve
> > >> > the NPE for creating thumbnail.
> > >> >
> > >> > On Tue, Mar 24, 2020 at 8:28 PM Tommy Pham <to...@gmail.com>
> > wrote:
> > >> >
> > >> >> Hi Dave,
> > >> >>
> > >> >> I apologize for unable to submit the JIRA.  Something came up after
> > >> >> typing that email and have been preoccupied since.  I'm using
> > (native)
> > >> >> OpenJDK 11on FreeBSD 12.1.  I just made some updates to the logging
> > >> >> configurations since I saw log4j (v1) and that it's broken on Java
> > 9+.
> > >> >> Here's the recent snippet:
> > >> >>
> > >> >> 24-Mar-2020 20:01:58.056 DEBUG [http-nio-8080-exec-1]
> > >> >>
> > >>
> >
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.getMediaFile:361
> > >> >> - Cannot load thumbnail for image
> > 7c8b9f04-8cbc-4172-b3d0-ef601d040d00
> > >> >> org.apache.roller.weblogger.business.FileNotFoundException: Invalid
> > >> path
> > >> >>
> > >>
> >
> [/usr/local/www/_apps_/java/roller6_data/mediafiles/Tommy/7c8b9f04-8cbc-4172-b3d0-ef601d040d00_sm],
> > >> >> file does not exist.
> > >> >>
> > >> >> That file does not exists.  Only the main original image (?).  It
> > seems
> > >> >> the thumbnails didn't generate.
> > >> >>
> > >> >> 24-Mar-2020 20:12:07.120 DEBUG [http-nio-8080-exec-6]
> > >> >>
> > >>
> >
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail:283
> > >> >> - ERROR creating thumbnail
> > >> >> java.lang.NullPointerException: null
> > >> >>         at
> > >> >>
> > >>
> >
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail(JPAMediaFileManagerImpl.java:256)
> > >> >> [classes/:?]
> > >> >>         at
> > >> >>
> > >>
> >
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.createMediaFile(JPAMediaFileManagerImpl.java:220)
> > >> >> [classes/:?]
> > >> >>         at
> > >> >>
> > >>
> >
> org.apache.roller.weblogger.ui.struts2.editor.MediaFileAdd.save(MediaFileAdd.java:195)
> > >> >> [classes/:?]
> > >> >>         at
> > jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > >> >> Method) ~[?:?]
> > >> >>         at
> > >> >>
> > >>
> >
> jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > >> >> ~[?:?]
> > >> >>         at
> > >> >>
> > >>
> >
> jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > >> >> ~[?:?]
> > >> >>
> > >> >> Full stack trace:  https://pastebin.com/W8dgE22M
> > >> >>
> > >> >> From the NPE and seeing jaxb-api in lib, I think I'm missing
> > >> >> implementation jar(s) for javax.xml.bind because I'm using JDK 11.
> > >> >>
> > >> >> I saw mixed logging mechanisms due various frameworks used.  What
> > would
> > >> >> be the main?  What does Roller uses to image modification /
> > generation?
> > >> >>
> > >> >> Thanks,
> > >> >> Tommy
> > >> >>
> > >> >>
> > >> >> On Sat, Mar 21, 2020 at 2:03 PM Dave <sn...@gmail.com> wrote:
> > >> >>
> > >> >>> Hi Tommy,
> > >> >>>
> > >> >>> I created a JIRA for you Media Files bug, but I cannot reproduce
> the
> > >> >>> problem. Please see my comment here:
> > >> >>> https://issues.apache.org/jira/browse/ROL-2163
> > >> >>>
> > >> >>> Thanks,
> > >> >>> Dave
> > >> >>>
> > >> >>>
> > >> >>> On Fri, Mar 6, 2020 at 1:25 AM Swapnil M Mane <
> > >> swapnilmmane@apache.org>
> > >> >>> wrote:
> > >> >>>
> > >> >>> > Hi Tommy,
> > >> >>> > Yes, you can keep it Improvement with minor priority.
> > >> >>> > Although this also falls under UI Bug, but anyways since it is
> not
> > >> >>> > breaking anything, I consider it as UI improvement.
> > >> >>> >
> > >> >>> > So, let's have it as Improvement with minor priority.
> > >> >>> >
> > >> >>> > Best regards,
> > >> >>> > Swapnil M Mane,
> > >> >>> > www.apache.org
> > >> >>> >
> > >> >>> > On Fri, Mar 6, 2020 at 11:31 AM Tommy Pham <to...@gmail.com>
> > >> wrote:
> > >> >>> > >
> > >> >>> > > Hi Dave,
> > >> >>> > >
> > >> >>> > > What type should I file it under? Improvement? And minor
> > priority
> > >> (or
> > >> >>> > > trivial) ?
> > >> >>> > >
> > >> >>> > > Thanks,
> > >> >>> > > Tommy
> > >> >>> > >
> > >> >>> > > On Thu, Mar 5, 2020 at 4:00 PM Dave <sn...@gmail.com>
> > wrote:
> > >> >>> > >
> > >> >>> > > > That's not by design or really a bug, it's just poorly done
> > :-)
> > >> >>> > > >
> > >> >>> > > > Please file a JIRA bug for it if you have time, otherwise
> I'll
> > >> do
> > >> >>> that
> > >> >>> > this
> > >> >>> > > > weekend.
> > >> >>> > > >
> > >> >>> > > > Thanks,
> > >> >>> > > > Dave
> > >> >>> > > >
> > >> >>> > > >
> > >> >>> > > > On Thu, Mar 5, 2020 at 4:45 PM Tommy Pham <
> tommyhp2@gmail.com
> > >
> > >> >>> wrote:
> > >> >>> > > >
> > >> >>> > > > > Hello everyone,
> > >> >>> > > > >
> > >> >>> > > > > I'm having an issue with the media files panel display.
> > I've
> > >> >>> tried
> > >> >>> > in
> > >> >>> > > > both
> > >> >>> > > > > Firefox and Chrome without success.
> > >> >>> > > > >
> > >> >>> > > > > https://imgur.com/a/zHXnmXV
> > >> >>> > > > >
> > >> >>> > > > > Basically I have to scroll to view a big image while I
> have
> > >> >>> plenty of
> > >> >>> > > > > screen real estate at the bottom as you can see.  The only
> > >> way I
> > >> >>> can
> > >> >>> > get
> > >> >>> > > > > that window to resize so I could see the image entirely
> > >> without
> > >> >>> > scrolling
> > >> >>> > > > > is edit either:
> > >> >>> > > > >
> > >> >>> > > > >    <div id="imageGrid" style="1000px">
> > >> >>> > > > >
> > >> >>> > > > > or it's child div
> > >> >>> > > > >
> > >> >>> > > > >   <div class="panel-body" style="1000px">
> > >> >>> > > > >
> > >> >>> > > > > Neither seems like a good solution since it's not sized
> > >> >>> accordingly
> > >> >>> > nor
> > >> >>> > > > > scale dynamically to browser window size.  Is this by
> design
> > >> or
> > >> >>> bug?
> > >> >>> > > > > Please advise.
> > >> >>> > > > >
> > >> >>> > > > > If you're wondering what monitor I'm using, it's 40" 4k TV
> > for
> > >> >>> about
> > >> >>> > $300
> > >> >>> > > > > USD which is cheaper than getting 4 x 27" (2560x1440) for
> > >> about
> > >> >>> the
> > >> >>> > same
> > >> >>> > > > > screen real estate (slightly better PPI 110 vs 108) w/o
> the
> > >> split
> > >> >>> > screen
> > >> >>> > > > > bezels :)
> > >> >>> > > > >
> > >> >>> > > > > Thanks,
> > >> >>> > > > > Tommy
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> >
> > >> >>>
> > >> >>
> > >>
> > >
> >
>

Re: [Roller6] media files panel

Posted by Tommy Pham <to...@gmail.com>.
Hi Dave,

Thank you for looking into this.  I haven't tested thoroughly enough but it
seems only
these 2 images that are affected which were downloaded from the internet
long time ago:

https://drive.google.com/open?id=17x5bAQumPq_Q2lKlTP03JCZ8mkMVnl1g
https://drive.google.com/open?id=1XQomqxXCJRykrGJw7ze64SybS1yvv4Hk

The metadata / EXIF is very minimal per Window's Explorer properties.
Maybe something hidden that prevents image processing application from
'tampering' ?
My environment guest VMs are:

OS: FreeBSD 12.1-RELEASE-p3 amd64 (both DB and Web)
JDK is java/openjdk11 (ports built)  11.0.6+10-1
Tomcat 9.033 + Apache 2.4
MariaDB 10.4.12

I run mainly FreeBSD due to ease and flexibility of management and
customization.
When I started to troubleshoot this issue, I noticed some discrepancy in
the logging
due to log4j (v1) dependency.  Log4j is broken in Java 9+ from my
research.  I've replaced
all the necessary logging jars and switched over to log4j2:

# blog/WEB-INF/lib # ll *log* *slf*
-rw-r--r--  1 root  www    61829 Jun  9  2019 commons-logging-1.2.jar
-rw-r--r--  1 root  www   201684 Mar 30 02:44 log4j-1.2-api-2.13.1.jar
-rw-r--r--  1 root  www   292244 Mar 27 21:37 log4j-api-2.13.1.jar
-rw-r--r--  1 root  www  1702809 Mar 27 21:37 log4j-core-2.13.1.jar
-rw-r--r--  1 root  www    12657 Mar 30 02:44 log4j-jcl-2.13.1.jar
-rw-r--r--  1 root  www    26166 Mar 30 02:44 log4j-jul-2.13.1.jar
-rw-r--r--  1 root  www    23591 Mar 27 21:37 log4j-slf4j-impl-2.13.1.jar
-rw-r--r--  1 root  www    32327 Mar 30 02:44 log4j-taglib-2.13.1.jar
-rw-r--r--  1 root  www    32475 Mar 30 02:44 log4j-web-2.13.1.jar
-rw-r--r--  1 root  www    41472 Mar 27 13:50 slf4j-api-1.7.30.jar

 and using my log4j2.xml file generated by this:

http://www.sointe.com/log4j2.php

I got tired of typing them out when I was troubleshooting some Java apps
recently.
You just enter the framework or provider you'd like and it'll generate the
file for you.

Thanks,
Tommy

On Sun, Apr 5, 2020 at 1:41 PM Dave <sn...@gmail.com> wrote:

> Hi Tommy,
>
> I'm not able to reproduce this problem.  Here's what I tried:
>
> - Upload large image via the Media File View page
> - Go into the mediafiles directory for the corresponding blog and delete
> the thumbnail image of the upload (the file with the _sm suffix)
> - Navigate back to the the Media File View for the blog, reload the page
> - See that the large image is displayed as the thumbnail and it is
> correctly sized because the <img> tag specifies thumbnail size height and
> width attributes.
>
> I also debugged into the MediaResourceServlet.java to verify that, if a
> thumbnail image is missing, the original image will be returned. Is it
> possible for you to share that "FRAGILE" image that is causing the problem?
>
> Also, what Java VM version, operating system version and database are you
> using?
>
> Thanks,
> Dave
>
>
>
> On Sun, Apr 5, 2020 at 10:40 AM Dave <sn...@gmail.com> wrote:
>
> > Apparently, ImageIO.read() only supports six image formats and if it does
> > not recognize the image format, it returns null instead of an error. That
> > must be why the thumbnail creation fails. Roller is able to upload the
> > image and save it as a file, but then when it tries to read the image so
> > that it can scale it down to thumbnail size ImageIO.read() returns null
> and
> > we get that NPE.
> >
> > There maybe a way to work around this problem by falling back to the
> > full-sized image and scale it down in the Media File View. I'm going to
> > look into that option. I think that is how the Media File View page was
> > intended to work anyway but I may have broken that logic during the
> > Bootstrap rewrite.
> >
> > Dave
> >
> >
> > On Mon, Mar 30, 2020 at 2:30 PM Tommy Pham <to...@gmail.com> wrote:
> >
> >> Hi Dave,
> >>
> >> I've cloned the code from github and checked out roller-6.0.x 7d11070.
> I
> >> then modified the JPAMedifaFileManagerImpl to have some trace logging
> >> hoping to find the root cause.  For some reason, ImageIO.read() fails
> for
> >> that particular JPEG image even though other JPEG images upload OK.
> >>
> >> Thanks,
> >> Tommy
> >>
> >> On Tue, Mar 24, 2020 at 8:35 PM Tommy Pham <to...@gmail.com> wrote:
> >>
> >> > I guess I was wrong.  Putting in jaxb-runtime-2.3.3-b02.jar didn't
> >> resolve
> >> > the NPE for creating thumbnail.
> >> >
> >> > On Tue, Mar 24, 2020 at 8:28 PM Tommy Pham <to...@gmail.com>
> wrote:
> >> >
> >> >> Hi Dave,
> >> >>
> >> >> I apologize for unable to submit the JIRA.  Something came up after
> >> >> typing that email and have been preoccupied since.  I'm using
> (native)
> >> >> OpenJDK 11on FreeBSD 12.1.  I just made some updates to the logging
> >> >> configurations since I saw log4j (v1) and that it's broken on Java
> 9+.
> >> >> Here's the recent snippet:
> >> >>
> >> >> 24-Mar-2020 20:01:58.056 DEBUG [http-nio-8080-exec-1]
> >> >>
> >>
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.getMediaFile:361
> >> >> - Cannot load thumbnail for image
> 7c8b9f04-8cbc-4172-b3d0-ef601d040d00
> >> >> org.apache.roller.weblogger.business.FileNotFoundException: Invalid
> >> path
> >> >>
> >>
> [/usr/local/www/_apps_/java/roller6_data/mediafiles/Tommy/7c8b9f04-8cbc-4172-b3d0-ef601d040d00_sm],
> >> >> file does not exist.
> >> >>
> >> >> That file does not exists.  Only the main original image (?).  It
> seems
> >> >> the thumbnails didn't generate.
> >> >>
> >> >> 24-Mar-2020 20:12:07.120 DEBUG [http-nio-8080-exec-6]
> >> >>
> >>
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail:283
> >> >> - ERROR creating thumbnail
> >> >> java.lang.NullPointerException: null
> >> >>         at
> >> >>
> >>
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail(JPAMediaFileManagerImpl.java:256)
> >> >> [classes/:?]
> >> >>         at
> >> >>
> >>
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.createMediaFile(JPAMediaFileManagerImpl.java:220)
> >> >> [classes/:?]
> >> >>         at
> >> >>
> >>
> org.apache.roller.weblogger.ui.struts2.editor.MediaFileAdd.save(MediaFileAdd.java:195)
> >> >> [classes/:?]
> >> >>         at
> jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> >> >> Method) ~[?:?]
> >> >>         at
> >> >>
> >>
> jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> >> >> ~[?:?]
> >> >>         at
> >> >>
> >>
> jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >> >> ~[?:?]
> >> >>
> >> >> Full stack trace:  https://pastebin.com/W8dgE22M
> >> >>
> >> >> From the NPE and seeing jaxb-api in lib, I think I'm missing
> >> >> implementation jar(s) for javax.xml.bind because I'm using JDK 11.
> >> >>
> >> >> I saw mixed logging mechanisms due various frameworks used.  What
> would
> >> >> be the main?  What does Roller uses to image modification /
> generation?
> >> >>
> >> >> Thanks,
> >> >> Tommy
> >> >>
> >> >>
> >> >> On Sat, Mar 21, 2020 at 2:03 PM Dave <sn...@gmail.com> wrote:
> >> >>
> >> >>> Hi Tommy,
> >> >>>
> >> >>> I created a JIRA for you Media Files bug, but I cannot reproduce the
> >> >>> problem. Please see my comment here:
> >> >>> https://issues.apache.org/jira/browse/ROL-2163
> >> >>>
> >> >>> Thanks,
> >> >>> Dave
> >> >>>
> >> >>>
> >> >>> On Fri, Mar 6, 2020 at 1:25 AM Swapnil M Mane <
> >> swapnilmmane@apache.org>
> >> >>> wrote:
> >> >>>
> >> >>> > Hi Tommy,
> >> >>> > Yes, you can keep it Improvement with minor priority.
> >> >>> > Although this also falls under UI Bug, but anyways since it is not
> >> >>> > breaking anything, I consider it as UI improvement.
> >> >>> >
> >> >>> > So, let's have it as Improvement with minor priority.
> >> >>> >
> >> >>> > Best regards,
> >> >>> > Swapnil M Mane,
> >> >>> > www.apache.org
> >> >>> >
> >> >>> > On Fri, Mar 6, 2020 at 11:31 AM Tommy Pham <to...@gmail.com>
> >> wrote:
> >> >>> > >
> >> >>> > > Hi Dave,
> >> >>> > >
> >> >>> > > What type should I file it under? Improvement? And minor
> priority
> >> (or
> >> >>> > > trivial) ?
> >> >>> > >
> >> >>> > > Thanks,
> >> >>> > > Tommy
> >> >>> > >
> >> >>> > > On Thu, Mar 5, 2020 at 4:00 PM Dave <sn...@gmail.com>
> wrote:
> >> >>> > >
> >> >>> > > > That's not by design or really a bug, it's just poorly done
> :-)
> >> >>> > > >
> >> >>> > > > Please file a JIRA bug for it if you have time, otherwise I'll
> >> do
> >> >>> that
> >> >>> > this
> >> >>> > > > weekend.
> >> >>> > > >
> >> >>> > > > Thanks,
> >> >>> > > > Dave
> >> >>> > > >
> >> >>> > > >
> >> >>> > > > On Thu, Mar 5, 2020 at 4:45 PM Tommy Pham <tommyhp2@gmail.com
> >
> >> >>> wrote:
> >> >>> > > >
> >> >>> > > > > Hello everyone,
> >> >>> > > > >
> >> >>> > > > > I'm having an issue with the media files panel display.
> I've
> >> >>> tried
> >> >>> > in
> >> >>> > > > both
> >> >>> > > > > Firefox and Chrome without success.
> >> >>> > > > >
> >> >>> > > > > https://imgur.com/a/zHXnmXV
> >> >>> > > > >
> >> >>> > > > > Basically I have to scroll to view a big image while I have
> >> >>> plenty of
> >> >>> > > > > screen real estate at the bottom as you can see.  The only
> >> way I
> >> >>> can
> >> >>> > get
> >> >>> > > > > that window to resize so I could see the image entirely
> >> without
> >> >>> > scrolling
> >> >>> > > > > is edit either:
> >> >>> > > > >
> >> >>> > > > >    <div id="imageGrid" style="1000px">
> >> >>> > > > >
> >> >>> > > > > or it's child div
> >> >>> > > > >
> >> >>> > > > >   <div class="panel-body" style="1000px">
> >> >>> > > > >
> >> >>> > > > > Neither seems like a good solution since it's not sized
> >> >>> accordingly
> >> >>> > nor
> >> >>> > > > > scale dynamically to browser window size.  Is this by design
> >> or
> >> >>> bug?
> >> >>> > > > > Please advise.
> >> >>> > > > >
> >> >>> > > > > If you're wondering what monitor I'm using, it's 40" 4k TV
> for
> >> >>> about
> >> >>> > $300
> >> >>> > > > > USD which is cheaper than getting 4 x 27" (2560x1440) for
> >> about
> >> >>> the
> >> >>> > same
> >> >>> > > > > screen real estate (slightly better PPI 110 vs 108) w/o the
> >> split
> >> >>> > screen
> >> >>> > > > > bezels :)
> >> >>> > > > >
> >> >>> > > > > Thanks,
> >> >>> > > > > Tommy
> >> >>> > > > >
> >> >>> > > >
> >> >>> >
> >> >>>
> >> >>
> >>
> >
>

Re: [Roller6] media files panel

Posted by Dave <sn...@gmail.com>.
Hi Tommy,

I'm not able to reproduce this problem.  Here's what I tried:

- Upload large image via the Media File View page
- Go into the mediafiles directory for the corresponding blog and delete
the thumbnail image of the upload (the file with the _sm suffix)
- Navigate back to the the Media File View for the blog, reload the page
- See that the large image is displayed as the thumbnail and it is
correctly sized because the <img> tag specifies thumbnail size height and
width attributes.

I also debugged into the MediaResourceServlet.java to verify that, if a
thumbnail image is missing, the original image will be returned. Is it
possible for you to share that "FRAGILE" image that is causing the problem?

Also, what Java VM version, operating system version and database are you
using?

Thanks,
Dave



On Sun, Apr 5, 2020 at 10:40 AM Dave <sn...@gmail.com> wrote:

> Apparently, ImageIO.read() only supports six image formats and if it does
> not recognize the image format, it returns null instead of an error. That
> must be why the thumbnail creation fails. Roller is able to upload the
> image and save it as a file, but then when it tries to read the image so
> that it can scale it down to thumbnail size ImageIO.read() returns null and
> we get that NPE.
>
> There maybe a way to work around this problem by falling back to the
> full-sized image and scale it down in the Media File View. I'm going to
> look into that option. I think that is how the Media File View page was
> intended to work anyway but I may have broken that logic during the
> Bootstrap rewrite.
>
> Dave
>
>
> On Mon, Mar 30, 2020 at 2:30 PM Tommy Pham <to...@gmail.com> wrote:
>
>> Hi Dave,
>>
>> I've cloned the code from github and checked out roller-6.0.x 7d11070.  I
>> then modified the JPAMedifaFileManagerImpl to have some trace logging
>> hoping to find the root cause.  For some reason, ImageIO.read() fails for
>> that particular JPEG image even though other JPEG images upload OK.
>>
>> Thanks,
>> Tommy
>>
>> On Tue, Mar 24, 2020 at 8:35 PM Tommy Pham <to...@gmail.com> wrote:
>>
>> > I guess I was wrong.  Putting in jaxb-runtime-2.3.3-b02.jar didn't
>> resolve
>> > the NPE for creating thumbnail.
>> >
>> > On Tue, Mar 24, 2020 at 8:28 PM Tommy Pham <to...@gmail.com> wrote:
>> >
>> >> Hi Dave,
>> >>
>> >> I apologize for unable to submit the JIRA.  Something came up after
>> >> typing that email and have been preoccupied since.  I'm using (native)
>> >> OpenJDK 11on FreeBSD 12.1.  I just made some updates to the logging
>> >> configurations since I saw log4j (v1) and that it's broken on Java 9+.
>> >> Here's the recent snippet:
>> >>
>> >> 24-Mar-2020 20:01:58.056 DEBUG [http-nio-8080-exec-1]
>> >>
>> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.getMediaFile:361
>> >> - Cannot load thumbnail for image 7c8b9f04-8cbc-4172-b3d0-ef601d040d00
>> >> org.apache.roller.weblogger.business.FileNotFoundException: Invalid
>> path
>> >>
>> [/usr/local/www/_apps_/java/roller6_data/mediafiles/Tommy/7c8b9f04-8cbc-4172-b3d0-ef601d040d00_sm],
>> >> file does not exist.
>> >>
>> >> That file does not exists.  Only the main original image (?).  It seems
>> >> the thumbnails didn't generate.
>> >>
>> >> 24-Mar-2020 20:12:07.120 DEBUG [http-nio-8080-exec-6]
>> >>
>> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail:283
>> >> - ERROR creating thumbnail
>> >> java.lang.NullPointerException: null
>> >>         at
>> >>
>> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail(JPAMediaFileManagerImpl.java:256)
>> >> [classes/:?]
>> >>         at
>> >>
>> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.createMediaFile(JPAMediaFileManagerImpl.java:220)
>> >> [classes/:?]
>> >>         at
>> >>
>> org.apache.roller.weblogger.ui.struts2.editor.MediaFileAdd.save(MediaFileAdd.java:195)
>> >> [classes/:?]
>> >>         at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
>> >> Method) ~[?:?]
>> >>         at
>> >>
>> jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>> >> ~[?:?]
>> >>         at
>> >>
>> jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> >> ~[?:?]
>> >>
>> >> Full stack trace:  https://pastebin.com/W8dgE22M
>> >>
>> >> From the NPE and seeing jaxb-api in lib, I think I'm missing
>> >> implementation jar(s) for javax.xml.bind because I'm using JDK 11.
>> >>
>> >> I saw mixed logging mechanisms due various frameworks used.  What would
>> >> be the main?  What does Roller uses to image modification / generation?
>> >>
>> >> Thanks,
>> >> Tommy
>> >>
>> >>
>> >> On Sat, Mar 21, 2020 at 2:03 PM Dave <sn...@gmail.com> wrote:
>> >>
>> >>> Hi Tommy,
>> >>>
>> >>> I created a JIRA for you Media Files bug, but I cannot reproduce the
>> >>> problem. Please see my comment here:
>> >>> https://issues.apache.org/jira/browse/ROL-2163
>> >>>
>> >>> Thanks,
>> >>> Dave
>> >>>
>> >>>
>> >>> On Fri, Mar 6, 2020 at 1:25 AM Swapnil M Mane <
>> swapnilmmane@apache.org>
>> >>> wrote:
>> >>>
>> >>> > Hi Tommy,
>> >>> > Yes, you can keep it Improvement with minor priority.
>> >>> > Although this also falls under UI Bug, but anyways since it is not
>> >>> > breaking anything, I consider it as UI improvement.
>> >>> >
>> >>> > So, let's have it as Improvement with minor priority.
>> >>> >
>> >>> > Best regards,
>> >>> > Swapnil M Mane,
>> >>> > www.apache.org
>> >>> >
>> >>> > On Fri, Mar 6, 2020 at 11:31 AM Tommy Pham <to...@gmail.com>
>> wrote:
>> >>> > >
>> >>> > > Hi Dave,
>> >>> > >
>> >>> > > What type should I file it under? Improvement? And minor priority
>> (or
>> >>> > > trivial) ?
>> >>> > >
>> >>> > > Thanks,
>> >>> > > Tommy
>> >>> > >
>> >>> > > On Thu, Mar 5, 2020 at 4:00 PM Dave <sn...@gmail.com> wrote:
>> >>> > >
>> >>> > > > That's not by design or really a bug, it's just poorly done :-)
>> >>> > > >
>> >>> > > > Please file a JIRA bug for it if you have time, otherwise I'll
>> do
>> >>> that
>> >>> > this
>> >>> > > > weekend.
>> >>> > > >
>> >>> > > > Thanks,
>> >>> > > > Dave
>> >>> > > >
>> >>> > > >
>> >>> > > > On Thu, Mar 5, 2020 at 4:45 PM Tommy Pham <to...@gmail.com>
>> >>> wrote:
>> >>> > > >
>> >>> > > > > Hello everyone,
>> >>> > > > >
>> >>> > > > > I'm having an issue with the media files panel display.  I've
>> >>> tried
>> >>> > in
>> >>> > > > both
>> >>> > > > > Firefox and Chrome without success.
>> >>> > > > >
>> >>> > > > > https://imgur.com/a/zHXnmXV
>> >>> > > > >
>> >>> > > > > Basically I have to scroll to view a big image while I have
>> >>> plenty of
>> >>> > > > > screen real estate at the bottom as you can see.  The only
>> way I
>> >>> can
>> >>> > get
>> >>> > > > > that window to resize so I could see the image entirely
>> without
>> >>> > scrolling
>> >>> > > > > is edit either:
>> >>> > > > >
>> >>> > > > >    <div id="imageGrid" style="1000px">
>> >>> > > > >
>> >>> > > > > or it's child div
>> >>> > > > >
>> >>> > > > >   <div class="panel-body" style="1000px">
>> >>> > > > >
>> >>> > > > > Neither seems like a good solution since it's not sized
>> >>> accordingly
>> >>> > nor
>> >>> > > > > scale dynamically to browser window size.  Is this by design
>> or
>> >>> bug?
>> >>> > > > > Please advise.
>> >>> > > > >
>> >>> > > > > If you're wondering what monitor I'm using, it's 40" 4k TV for
>> >>> about
>> >>> > $300
>> >>> > > > > USD which is cheaper than getting 4 x 27" (2560x1440) for
>> about
>> >>> the
>> >>> > same
>> >>> > > > > screen real estate (slightly better PPI 110 vs 108) w/o the
>> split
>> >>> > screen
>> >>> > > > > bezels :)
>> >>> > > > >
>> >>> > > > > Thanks,
>> >>> > > > > Tommy
>> >>> > > > >
>> >>> > > >
>> >>> >
>> >>>
>> >>
>>
>

Re: [Roller6] media files panel

Posted by Dave <sn...@gmail.com>.
Apparently, ImageIO.read() only supports six image formats and if it does
not recognize the image format, it returns null instead of an error. That
must be why the thumbnail creation fails. Roller is able to upload the
image and save it as a file, but then when it tries to read the image so
that it can scale it down to thumbnail size ImageIO.read() returns null and
we get that NPE.

There maybe a way to work around this problem by falling back to the
full-sized image and scale it down in the Media File View. I'm going to
look into that option. I think that is how the Media File View page was
intended to work anyway but I may have broken that logic during the
Bootstrap rewrite.

Dave


On Mon, Mar 30, 2020 at 2:30 PM Tommy Pham <to...@gmail.com> wrote:

> Hi Dave,
>
> I've cloned the code from github and checked out roller-6.0.x 7d11070.  I
> then modified the JPAMedifaFileManagerImpl to have some trace logging
> hoping to find the root cause.  For some reason, ImageIO.read() fails for
> that particular JPEG image even though other JPEG images upload OK.
>
> Thanks,
> Tommy
>
> On Tue, Mar 24, 2020 at 8:35 PM Tommy Pham <to...@gmail.com> wrote:
>
> > I guess I was wrong.  Putting in jaxb-runtime-2.3.3-b02.jar didn't
> resolve
> > the NPE for creating thumbnail.
> >
> > On Tue, Mar 24, 2020 at 8:28 PM Tommy Pham <to...@gmail.com> wrote:
> >
> >> Hi Dave,
> >>
> >> I apologize for unable to submit the JIRA.  Something came up after
> >> typing that email and have been preoccupied since.  I'm using (native)
> >> OpenJDK 11on FreeBSD 12.1.  I just made some updates to the logging
> >> configurations since I saw log4j (v1) and that it's broken on Java 9+.
> >> Here's the recent snippet:
> >>
> >> 24-Mar-2020 20:01:58.056 DEBUG [http-nio-8080-exec-1]
> >>
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.getMediaFile:361
> >> - Cannot load thumbnail for image 7c8b9f04-8cbc-4172-b3d0-ef601d040d00
> >> org.apache.roller.weblogger.business.FileNotFoundException: Invalid path
> >>
> [/usr/local/www/_apps_/java/roller6_data/mediafiles/Tommy/7c8b9f04-8cbc-4172-b3d0-ef601d040d00_sm],
> >> file does not exist.
> >>
> >> That file does not exists.  Only the main original image (?).  It seems
> >> the thumbnails didn't generate.
> >>
> >> 24-Mar-2020 20:12:07.120 DEBUG [http-nio-8080-exec-6]
> >>
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail:283
> >> - ERROR creating thumbnail
> >> java.lang.NullPointerException: null
> >>         at
> >>
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail(JPAMediaFileManagerImpl.java:256)
> >> [classes/:?]
> >>         at
> >>
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.createMediaFile(JPAMediaFileManagerImpl.java:220)
> >> [classes/:?]
> >>         at
> >>
> org.apache.roller.weblogger.ui.struts2.editor.MediaFileAdd.save(MediaFileAdd.java:195)
> >> [classes/:?]
> >>         at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> >> Method) ~[?:?]
> >>         at
> >>
> jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> >> ~[?:?]
> >>         at
> >>
> jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >> ~[?:?]
> >>
> >> Full stack trace:  https://pastebin.com/W8dgE22M
> >>
> >> From the NPE and seeing jaxb-api in lib, I think I'm missing
> >> implementation jar(s) for javax.xml.bind because I'm using JDK 11.
> >>
> >> I saw mixed logging mechanisms due various frameworks used.  What would
> >> be the main?  What does Roller uses to image modification / generation?
> >>
> >> Thanks,
> >> Tommy
> >>
> >>
> >> On Sat, Mar 21, 2020 at 2:03 PM Dave <sn...@gmail.com> wrote:
> >>
> >>> Hi Tommy,
> >>>
> >>> I created a JIRA for you Media Files bug, but I cannot reproduce the
> >>> problem. Please see my comment here:
> >>> https://issues.apache.org/jira/browse/ROL-2163
> >>>
> >>> Thanks,
> >>> Dave
> >>>
> >>>
> >>> On Fri, Mar 6, 2020 at 1:25 AM Swapnil M Mane <swapnilmmane@apache.org
> >
> >>> wrote:
> >>>
> >>> > Hi Tommy,
> >>> > Yes, you can keep it Improvement with minor priority.
> >>> > Although this also falls under UI Bug, but anyways since it is not
> >>> > breaking anything, I consider it as UI improvement.
> >>> >
> >>> > So, let's have it as Improvement with minor priority.
> >>> >
> >>> > Best regards,
> >>> > Swapnil M Mane,
> >>> > www.apache.org
> >>> >
> >>> > On Fri, Mar 6, 2020 at 11:31 AM Tommy Pham <to...@gmail.com>
> wrote:
> >>> > >
> >>> > > Hi Dave,
> >>> > >
> >>> > > What type should I file it under? Improvement? And minor priority
> (or
> >>> > > trivial) ?
> >>> > >
> >>> > > Thanks,
> >>> > > Tommy
> >>> > >
> >>> > > On Thu, Mar 5, 2020 at 4:00 PM Dave <sn...@gmail.com> wrote:
> >>> > >
> >>> > > > That's not by design or really a bug, it's just poorly done :-)
> >>> > > >
> >>> > > > Please file a JIRA bug for it if you have time, otherwise I'll do
> >>> that
> >>> > this
> >>> > > > weekend.
> >>> > > >
> >>> > > > Thanks,
> >>> > > > Dave
> >>> > > >
> >>> > > >
> >>> > > > On Thu, Mar 5, 2020 at 4:45 PM Tommy Pham <to...@gmail.com>
> >>> wrote:
> >>> > > >
> >>> > > > > Hello everyone,
> >>> > > > >
> >>> > > > > I'm having an issue with the media files panel display.  I've
> >>> tried
> >>> > in
> >>> > > > both
> >>> > > > > Firefox and Chrome without success.
> >>> > > > >
> >>> > > > > https://imgur.com/a/zHXnmXV
> >>> > > > >
> >>> > > > > Basically I have to scroll to view a big image while I have
> >>> plenty of
> >>> > > > > screen real estate at the bottom as you can see.  The only way
> I
> >>> can
> >>> > get
> >>> > > > > that window to resize so I could see the image entirely without
> >>> > scrolling
> >>> > > > > is edit either:
> >>> > > > >
> >>> > > > >    <div id="imageGrid" style="1000px">
> >>> > > > >
> >>> > > > > or it's child div
> >>> > > > >
> >>> > > > >   <div class="panel-body" style="1000px">
> >>> > > > >
> >>> > > > > Neither seems like a good solution since it's not sized
> >>> accordingly
> >>> > nor
> >>> > > > > scale dynamically to browser window size.  Is this by design or
> >>> bug?
> >>> > > > > Please advise.
> >>> > > > >
> >>> > > > > If you're wondering what monitor I'm using, it's 40" 4k TV for
> >>> about
> >>> > $300
> >>> > > > > USD which is cheaper than getting 4 x 27" (2560x1440) for about
> >>> the
> >>> > same
> >>> > > > > screen real estate (slightly better PPI 110 vs 108) w/o the
> split
> >>> > screen
> >>> > > > > bezels :)
> >>> > > > >
> >>> > > > > Thanks,
> >>> > > > > Tommy
> >>> > > > >
> >>> > > >
> >>> >
> >>>
> >>
>

Re: [Roller6] media files panel

Posted by Tommy Pham <to...@gmail.com>.
Hi Dave,

I've cloned the code from github and checked out roller-6.0.x 7d11070.  I
then modified the JPAMedifaFileManagerImpl to have some trace logging
hoping to find the root cause.  For some reason, ImageIO.read() fails for
that particular JPEG image even though other JPEG images upload OK.

Thanks,
Tommy

On Tue, Mar 24, 2020 at 8:35 PM Tommy Pham <to...@gmail.com> wrote:

> I guess I was wrong.  Putting in jaxb-runtime-2.3.3-b02.jar didn't resolve
> the NPE for creating thumbnail.
>
> On Tue, Mar 24, 2020 at 8:28 PM Tommy Pham <to...@gmail.com> wrote:
>
>> Hi Dave,
>>
>> I apologize for unable to submit the JIRA.  Something came up after
>> typing that email and have been preoccupied since.  I'm using (native)
>> OpenJDK 11on FreeBSD 12.1.  I just made some updates to the logging
>> configurations since I saw log4j (v1) and that it's broken on Java 9+.
>> Here's the recent snippet:
>>
>> 24-Mar-2020 20:01:58.056 DEBUG [http-nio-8080-exec-1]
>> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.getMediaFile:361
>> - Cannot load thumbnail for image 7c8b9f04-8cbc-4172-b3d0-ef601d040d00
>> org.apache.roller.weblogger.business.FileNotFoundException: Invalid path
>> [/usr/local/www/_apps_/java/roller6_data/mediafiles/Tommy/7c8b9f04-8cbc-4172-b3d0-ef601d040d00_sm],
>> file does not exist.
>>
>> That file does not exists.  Only the main original image (?).  It seems
>> the thumbnails didn't generate.
>>
>> 24-Mar-2020 20:12:07.120 DEBUG [http-nio-8080-exec-6]
>> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail:283
>> - ERROR creating thumbnail
>> java.lang.NullPointerException: null
>>         at
>> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail(JPAMediaFileManagerImpl.java:256)
>> [classes/:?]
>>         at
>> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.createMediaFile(JPAMediaFileManagerImpl.java:220)
>> [classes/:?]
>>         at
>> org.apache.roller.weblogger.ui.struts2.editor.MediaFileAdd.save(MediaFileAdd.java:195)
>> [classes/:?]
>>         at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
>> Method) ~[?:?]
>>         at
>> jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>> ~[?:?]
>>         at
>> jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> ~[?:?]
>>
>> Full stack trace:  https://pastebin.com/W8dgE22M
>>
>> From the NPE and seeing jaxb-api in lib, I think I'm missing
>> implementation jar(s) for javax.xml.bind because I'm using JDK 11.
>>
>> I saw mixed logging mechanisms due various frameworks used.  What would
>> be the main?  What does Roller uses to image modification / generation?
>>
>> Thanks,
>> Tommy
>>
>>
>> On Sat, Mar 21, 2020 at 2:03 PM Dave <sn...@gmail.com> wrote:
>>
>>> Hi Tommy,
>>>
>>> I created a JIRA for you Media Files bug, but I cannot reproduce the
>>> problem. Please see my comment here:
>>> https://issues.apache.org/jira/browse/ROL-2163
>>>
>>> Thanks,
>>> Dave
>>>
>>>
>>> On Fri, Mar 6, 2020 at 1:25 AM Swapnil M Mane <sw...@apache.org>
>>> wrote:
>>>
>>> > Hi Tommy,
>>> > Yes, you can keep it Improvement with minor priority.
>>> > Although this also falls under UI Bug, but anyways since it is not
>>> > breaking anything, I consider it as UI improvement.
>>> >
>>> > So, let's have it as Improvement with minor priority.
>>> >
>>> > Best regards,
>>> > Swapnil M Mane,
>>> > www.apache.org
>>> >
>>> > On Fri, Mar 6, 2020 at 11:31 AM Tommy Pham <to...@gmail.com> wrote:
>>> > >
>>> > > Hi Dave,
>>> > >
>>> > > What type should I file it under? Improvement? And minor priority (or
>>> > > trivial) ?
>>> > >
>>> > > Thanks,
>>> > > Tommy
>>> > >
>>> > > On Thu, Mar 5, 2020 at 4:00 PM Dave <sn...@gmail.com> wrote:
>>> > >
>>> > > > That's not by design or really a bug, it's just poorly done :-)
>>> > > >
>>> > > > Please file a JIRA bug for it if you have time, otherwise I'll do
>>> that
>>> > this
>>> > > > weekend.
>>> > > >
>>> > > > Thanks,
>>> > > > Dave
>>> > > >
>>> > > >
>>> > > > On Thu, Mar 5, 2020 at 4:45 PM Tommy Pham <to...@gmail.com>
>>> wrote:
>>> > > >
>>> > > > > Hello everyone,
>>> > > > >
>>> > > > > I'm having an issue with the media files panel display.  I've
>>> tried
>>> > in
>>> > > > both
>>> > > > > Firefox and Chrome without success.
>>> > > > >
>>> > > > > https://imgur.com/a/zHXnmXV
>>> > > > >
>>> > > > > Basically I have to scroll to view a big image while I have
>>> plenty of
>>> > > > > screen real estate at the bottom as you can see.  The only way I
>>> can
>>> > get
>>> > > > > that window to resize so I could see the image entirely without
>>> > scrolling
>>> > > > > is edit either:
>>> > > > >
>>> > > > >    <div id="imageGrid" style="1000px">
>>> > > > >
>>> > > > > or it's child div
>>> > > > >
>>> > > > >   <div class="panel-body" style="1000px">
>>> > > > >
>>> > > > > Neither seems like a good solution since it's not sized
>>> accordingly
>>> > nor
>>> > > > > scale dynamically to browser window size.  Is this by design or
>>> bug?
>>> > > > > Please advise.
>>> > > > >
>>> > > > > If you're wondering what monitor I'm using, it's 40" 4k TV for
>>> about
>>> > $300
>>> > > > > USD which is cheaper than getting 4 x 27" (2560x1440) for about
>>> the
>>> > same
>>> > > > > screen real estate (slightly better PPI 110 vs 108) w/o the split
>>> > screen
>>> > > > > bezels :)
>>> > > > >
>>> > > > > Thanks,
>>> > > > > Tommy
>>> > > > >
>>> > > >
>>> >
>>>
>>

Re: [Roller6] media files panel

Posted by Tommy Pham <to...@gmail.com>.
I guess I was wrong.  Putting in jaxb-runtime-2.3.3-b02.jar didn't resolve
the NPE for creating thumbnail.

On Tue, Mar 24, 2020 at 8:28 PM Tommy Pham <to...@gmail.com> wrote:

> Hi Dave,
>
> I apologize for unable to submit the JIRA.  Something came up after typing
> that email and have been preoccupied since.  I'm using (native) OpenJDK
> 11on FreeBSD 12.1.  I just made some updates to the logging configurations
> since I saw log4j (v1) and that it's broken on Java 9+.  Here's the recent
> snippet:
>
> 24-Mar-2020 20:01:58.056 DEBUG [http-nio-8080-exec-1]
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.getMediaFile:361
> - Cannot load thumbnail for image 7c8b9f04-8cbc-4172-b3d0-ef601d040d00
> org.apache.roller.weblogger.business.FileNotFoundException: Invalid path
> [/usr/local/www/_apps_/java/roller6_data/mediafiles/Tommy/7c8b9f04-8cbc-4172-b3d0-ef601d040d00_sm],
> file does not exist.
>
> That file does not exists.  Only the main original image (?).  It seems
> the thumbnails didn't generate.
>
> 24-Mar-2020 20:12:07.120 DEBUG [http-nio-8080-exec-6]
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail:283
> - ERROR creating thumbnail
> java.lang.NullPointerException: null
>         at
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail(JPAMediaFileManagerImpl.java:256)
> [classes/:?]
>         at
> org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.createMediaFile(JPAMediaFileManagerImpl.java:220)
> [classes/:?]
>         at
> org.apache.roller.weblogger.ui.struts2.editor.MediaFileAdd.save(MediaFileAdd.java:195)
> [classes/:?]
>         at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method) ~[?:?]
>         at
> jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> ~[?:?]
>         at
> jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ~[?:?]
>
> Full stack trace:  https://pastebin.com/W8dgE22M
>
> From the NPE and seeing jaxb-api in lib, I think I'm missing
> implementation jar(s) for javax.xml.bind because I'm using JDK 11.
>
> I saw mixed logging mechanisms due various frameworks used.  What would be
> the main?  What does Roller uses to image modification / generation?
>
> Thanks,
> Tommy
>
>
> On Sat, Mar 21, 2020 at 2:03 PM Dave <sn...@gmail.com> wrote:
>
>> Hi Tommy,
>>
>> I created a JIRA for you Media Files bug, but I cannot reproduce the
>> problem. Please see my comment here:
>> https://issues.apache.org/jira/browse/ROL-2163
>>
>> Thanks,
>> Dave
>>
>>
>> On Fri, Mar 6, 2020 at 1:25 AM Swapnil M Mane <sw...@apache.org>
>> wrote:
>>
>> > Hi Tommy,
>> > Yes, you can keep it Improvement with minor priority.
>> > Although this also falls under UI Bug, but anyways since it is not
>> > breaking anything, I consider it as UI improvement.
>> >
>> > So, let's have it as Improvement with minor priority.
>> >
>> > Best regards,
>> > Swapnil M Mane,
>> > www.apache.org
>> >
>> > On Fri, Mar 6, 2020 at 11:31 AM Tommy Pham <to...@gmail.com> wrote:
>> > >
>> > > Hi Dave,
>> > >
>> > > What type should I file it under? Improvement? And minor priority (or
>> > > trivial) ?
>> > >
>> > > Thanks,
>> > > Tommy
>> > >
>> > > On Thu, Mar 5, 2020 at 4:00 PM Dave <sn...@gmail.com> wrote:
>> > >
>> > > > That's not by design or really a bug, it's just poorly done :-)
>> > > >
>> > > > Please file a JIRA bug for it if you have time, otherwise I'll do
>> that
>> > this
>> > > > weekend.
>> > > >
>> > > > Thanks,
>> > > > Dave
>> > > >
>> > > >
>> > > > On Thu, Mar 5, 2020 at 4:45 PM Tommy Pham <to...@gmail.com>
>> wrote:
>> > > >
>> > > > > Hello everyone,
>> > > > >
>> > > > > I'm having an issue with the media files panel display.  I've
>> tried
>> > in
>> > > > both
>> > > > > Firefox and Chrome without success.
>> > > > >
>> > > > > https://imgur.com/a/zHXnmXV
>> > > > >
>> > > > > Basically I have to scroll to view a big image while I have
>> plenty of
>> > > > > screen real estate at the bottom as you can see.  The only way I
>> can
>> > get
>> > > > > that window to resize so I could see the image entirely without
>> > scrolling
>> > > > > is edit either:
>> > > > >
>> > > > >    <div id="imageGrid" style="1000px">
>> > > > >
>> > > > > or it's child div
>> > > > >
>> > > > >   <div class="panel-body" style="1000px">
>> > > > >
>> > > > > Neither seems like a good solution since it's not sized
>> accordingly
>> > nor
>> > > > > scale dynamically to browser window size.  Is this by design or
>> bug?
>> > > > > Please advise.
>> > > > >
>> > > > > If you're wondering what monitor I'm using, it's 40" 4k TV for
>> about
>> > $300
>> > > > > USD which is cheaper than getting 4 x 27" (2560x1440) for about
>> the
>> > same
>> > > > > screen real estate (slightly better PPI 110 vs 108) w/o the split
>> > screen
>> > > > > bezels :)
>> > > > >
>> > > > > Thanks,
>> > > > > Tommy
>> > > > >
>> > > >
>> >
>>
>

Re: [Roller6] media files panel

Posted by Tommy Pham <to...@gmail.com>.
Hi Dave,

I apologize for unable to submit the JIRA.  Something came up after typing
that email and have been preoccupied since.  I'm using (native) OpenJDK
11on FreeBSD 12.1.  I just made some updates to the logging configurations
since I saw log4j (v1) and that it's broken on Java 9+.  Here's the recent
snippet:

24-Mar-2020 20:01:58.056 DEBUG [http-nio-8080-exec-1]
org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.getMediaFile:361
- Cannot load thumbnail for image 7c8b9f04-8cbc-4172-b3d0-ef601d040d00
org.apache.roller.weblogger.business.FileNotFoundException: Invalid path
[/usr/local/www/_apps_/java/roller6_data/mediafiles/Tommy/7c8b9f04-8cbc-4172-b3d0-ef601d040d00_sm],
file does not exist.

That file does not exists.  Only the main original image (?).  It seems the
thumbnails didn't generate.

24-Mar-2020 20:12:07.120 DEBUG [http-nio-8080-exec-6]
org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail:283
- ERROR creating thumbnail
java.lang.NullPointerException: null
        at
org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.updateThumbnail(JPAMediaFileManagerImpl.java:256)
[classes/:?]
        at
org.apache.roller.weblogger.business.jpa.JPAMediaFileManagerImpl.createMediaFile(JPAMediaFileManagerImpl.java:220)
[classes/:?]
        at
org.apache.roller.weblogger.ui.struts2.editor.MediaFileAdd.save(MediaFileAdd.java:195)
[classes/:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method) ~[?:?]
        at
jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:?]
        at
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:?]

Full stack trace:  https://pastebin.com/W8dgE22M

From the NPE and seeing jaxb-api in lib, I think I'm missing implementation
jar(s) for javax.xml.bind because I'm using JDK 11.

I saw mixed logging mechanisms due various frameworks used.  What would be
the main?  What does Roller uses to image modification / generation?

Thanks,
Tommy


On Sat, Mar 21, 2020 at 2:03 PM Dave <sn...@gmail.com> wrote:

> Hi Tommy,
>
> I created a JIRA for you Media Files bug, but I cannot reproduce the
> problem. Please see my comment here:
> https://issues.apache.org/jira/browse/ROL-2163
>
> Thanks,
> Dave
>
>
> On Fri, Mar 6, 2020 at 1:25 AM Swapnil M Mane <sw...@apache.org>
> wrote:
>
> > Hi Tommy,
> > Yes, you can keep it Improvement with minor priority.
> > Although this also falls under UI Bug, but anyways since it is not
> > breaking anything, I consider it as UI improvement.
> >
> > So, let's have it as Improvement with minor priority.
> >
> > Best regards,
> > Swapnil M Mane,
> > www.apache.org
> >
> > On Fri, Mar 6, 2020 at 11:31 AM Tommy Pham <to...@gmail.com> wrote:
> > >
> > > Hi Dave,
> > >
> > > What type should I file it under? Improvement? And minor priority (or
> > > trivial) ?
> > >
> > > Thanks,
> > > Tommy
> > >
> > > On Thu, Mar 5, 2020 at 4:00 PM Dave <sn...@gmail.com> wrote:
> > >
> > > > That's not by design or really a bug, it's just poorly done :-)
> > > >
> > > > Please file a JIRA bug for it if you have time, otherwise I'll do
> that
> > this
> > > > weekend.
> > > >
> > > > Thanks,
> > > > Dave
> > > >
> > > >
> > > > On Thu, Mar 5, 2020 at 4:45 PM Tommy Pham <to...@gmail.com>
> wrote:
> > > >
> > > > > Hello everyone,
> > > > >
> > > > > I'm having an issue with the media files panel display.  I've tried
> > in
> > > > both
> > > > > Firefox and Chrome without success.
> > > > >
> > > > > https://imgur.com/a/zHXnmXV
> > > > >
> > > > > Basically I have to scroll to view a big image while I have plenty
> of
> > > > > screen real estate at the bottom as you can see.  The only way I
> can
> > get
> > > > > that window to resize so I could see the image entirely without
> > scrolling
> > > > > is edit either:
> > > > >
> > > > >    <div id="imageGrid" style="1000px">
> > > > >
> > > > > or it's child div
> > > > >
> > > > >   <div class="panel-body" style="1000px">
> > > > >
> > > > > Neither seems like a good solution since it's not sized accordingly
> > nor
> > > > > scale dynamically to browser window size.  Is this by design or
> bug?
> > > > > Please advise.
> > > > >
> > > > > If you're wondering what monitor I'm using, it's 40" 4k TV for
> about
> > $300
> > > > > USD which is cheaper than getting 4 x 27" (2560x1440) for about the
> > same
> > > > > screen real estate (slightly better PPI 110 vs 108) w/o the split
> > screen
> > > > > bezels :)
> > > > >
> > > > > Thanks,
> > > > > Tommy
> > > > >
> > > >
> >
>

Re: [Roller6] media files panel

Posted by Dave <sn...@gmail.com>.
Hi Tommy,

I created a JIRA for you Media Files bug, but I cannot reproduce the
problem. Please see my comment here:
https://issues.apache.org/jira/browse/ROL-2163

Thanks,
Dave


On Fri, Mar 6, 2020 at 1:25 AM Swapnil M Mane <sw...@apache.org>
wrote:

> Hi Tommy,
> Yes, you can keep it Improvement with minor priority.
> Although this also falls under UI Bug, but anyways since it is not
> breaking anything, I consider it as UI improvement.
>
> So, let's have it as Improvement with minor priority.
>
> Best regards,
> Swapnil M Mane,
> www.apache.org
>
> On Fri, Mar 6, 2020 at 11:31 AM Tommy Pham <to...@gmail.com> wrote:
> >
> > Hi Dave,
> >
> > What type should I file it under? Improvement? And minor priority (or
> > trivial) ?
> >
> > Thanks,
> > Tommy
> >
> > On Thu, Mar 5, 2020 at 4:00 PM Dave <sn...@gmail.com> wrote:
> >
> > > That's not by design or really a bug, it's just poorly done :-)
> > >
> > > Please file a JIRA bug for it if you have time, otherwise I'll do that
> this
> > > weekend.
> > >
> > > Thanks,
> > > Dave
> > >
> > >
> > > On Thu, Mar 5, 2020 at 4:45 PM Tommy Pham <to...@gmail.com> wrote:
> > >
> > > > Hello everyone,
> > > >
> > > > I'm having an issue with the media files panel display.  I've tried
> in
> > > both
> > > > Firefox and Chrome without success.
> > > >
> > > > https://imgur.com/a/zHXnmXV
> > > >
> > > > Basically I have to scroll to view a big image while I have plenty of
> > > > screen real estate at the bottom as you can see.  The only way I can
> get
> > > > that window to resize so I could see the image entirely without
> scrolling
> > > > is edit either:
> > > >
> > > >    <div id="imageGrid" style="1000px">
> > > >
> > > > or it's child div
> > > >
> > > >   <div class="panel-body" style="1000px">
> > > >
> > > > Neither seems like a good solution since it's not sized accordingly
> nor
> > > > scale dynamically to browser window size.  Is this by design or bug?
> > > > Please advise.
> > > >
> > > > If you're wondering what monitor I'm using, it's 40" 4k TV for about
> $300
> > > > USD which is cheaper than getting 4 x 27" (2560x1440) for about the
> same
> > > > screen real estate (slightly better PPI 110 vs 108) w/o the split
> screen
> > > > bezels :)
> > > >
> > > > Thanks,
> > > > Tommy
> > > >
> > >
>

Re: [Roller6] media files panel

Posted by Swapnil M Mane <sw...@apache.org>.
Hi Tommy,
Yes, you can keep it Improvement with minor priority.
Although this also falls under UI Bug, but anyways since it is not
breaking anything, I consider it as UI improvement.

So, let's have it as Improvement with minor priority.

Best regards,
Swapnil M Mane,
www.apache.org

On Fri, Mar 6, 2020 at 11:31 AM Tommy Pham <to...@gmail.com> wrote:
>
> Hi Dave,
>
> What type should I file it under? Improvement? And minor priority (or
> trivial) ?
>
> Thanks,
> Tommy
>
> On Thu, Mar 5, 2020 at 4:00 PM Dave <sn...@gmail.com> wrote:
>
> > That's not by design or really a bug, it's just poorly done :-)
> >
> > Please file a JIRA bug for it if you have time, otherwise I'll do that this
> > weekend.
> >
> > Thanks,
> > Dave
> >
> >
> > On Thu, Mar 5, 2020 at 4:45 PM Tommy Pham <to...@gmail.com> wrote:
> >
> > > Hello everyone,
> > >
> > > I'm having an issue with the media files panel display.  I've tried in
> > both
> > > Firefox and Chrome without success.
> > >
> > > https://imgur.com/a/zHXnmXV
> > >
> > > Basically I have to scroll to view a big image while I have plenty of
> > > screen real estate at the bottom as you can see.  The only way I can get
> > > that window to resize so I could see the image entirely without scrolling
> > > is edit either:
> > >
> > >    <div id="imageGrid" style="1000px">
> > >
> > > or it's child div
> > >
> > >   <div class="panel-body" style="1000px">
> > >
> > > Neither seems like a good solution since it's not sized accordingly nor
> > > scale dynamically to browser window size.  Is this by design or bug?
> > > Please advise.
> > >
> > > If you're wondering what monitor I'm using, it's 40" 4k TV for about $300
> > > USD which is cheaper than getting 4 x 27" (2560x1440) for about the same
> > > screen real estate (slightly better PPI 110 vs 108) w/o the split screen
> > > bezels :)
> > >
> > > Thanks,
> > > Tommy
> > >
> >

Re: [Roller6] media files panel

Posted by Tommy Pham <to...@gmail.com>.
Hi Dave,

What type should I file it under? Improvement? And minor priority (or
trivial) ?

Thanks,
Tommy

On Thu, Mar 5, 2020 at 4:00 PM Dave <sn...@gmail.com> wrote:

> That's not by design or really a bug, it's just poorly done :-)
>
> Please file a JIRA bug for it if you have time, otherwise I'll do that this
> weekend.
>
> Thanks,
> Dave
>
>
> On Thu, Mar 5, 2020 at 4:45 PM Tommy Pham <to...@gmail.com> wrote:
>
> > Hello everyone,
> >
> > I'm having an issue with the media files panel display.  I've tried in
> both
> > Firefox and Chrome without success.
> >
> > https://imgur.com/a/zHXnmXV
> >
> > Basically I have to scroll to view a big image while I have plenty of
> > screen real estate at the bottom as you can see.  The only way I can get
> > that window to resize so I could see the image entirely without scrolling
> > is edit either:
> >
> >    <div id="imageGrid" style="1000px">
> >
> > or it's child div
> >
> >   <div class="panel-body" style="1000px">
> >
> > Neither seems like a good solution since it's not sized accordingly nor
> > scale dynamically to browser window size.  Is this by design or bug?
> > Please advise.
> >
> > If you're wondering what monitor I'm using, it's 40" 4k TV for about $300
> > USD which is cheaper than getting 4 x 27" (2560x1440) for about the same
> > screen real estate (slightly better PPI 110 vs 108) w/o the split screen
> > bezels :)
> >
> > Thanks,
> > Tommy
> >
>

Re: [Roller6] media files panel

Posted by Dave <sn...@gmail.com>.
That's not by design or really a bug, it's just poorly done :-)

Please file a JIRA bug for it if you have time, otherwise I'll do that this
weekend.

Thanks,
Dave


On Thu, Mar 5, 2020 at 4:45 PM Tommy Pham <to...@gmail.com> wrote:

> Hello everyone,
>
> I'm having an issue with the media files panel display.  I've tried in both
> Firefox and Chrome without success.
>
> https://imgur.com/a/zHXnmXV
>
> Basically I have to scroll to view a big image while I have plenty of
> screen real estate at the bottom as you can see.  The only way I can get
> that window to resize so I could see the image entirely without scrolling
> is edit either:
>
>    <div id="imageGrid" style="1000px">
>
> or it's child div
>
>   <div class="panel-body" style="1000px">
>
> Neither seems like a good solution since it's not sized accordingly nor
> scale dynamically to browser window size.  Is this by design or bug?
> Please advise.
>
> If you're wondering what monitor I'm using, it's 40" 4k TV for about $300
> USD which is cheaper than getting 4 x 27" (2560x1440) for about the same
> screen real estate (slightly better PPI 110 vs 108) w/o the split screen
> bezels :)
>
> Thanks,
> Tommy
>