[MGNLUI-3627] ReflectionsException from ClasspathScanner Created: 16/Oct/15  Updated: 16/Oct/15  Resolved: 16/Oct/15

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 5.4.2
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Simon Aebli Assignee: Unassigned
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 15.04
Java 8
Tomcat 8
Maven 3.3.3


Issue Links:
Relates
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

My Log file gets spammed with the following exception, probably because there is no UrlType defined for *.so files.

org.reflections.ReflectionsException: could not create Vfs.Dir from url, no matching UrlType was found file:/usr/lib/x86_64-linux-gnu/jni/libatk-wrapper.so.0.0.13
either use fromURL(final URL url, final List<UrlType> urlTypes) or use the static setDefaultURLTypes(final List<UrlType> urlTypes) or addDefaultURLTypes(UrlType urlType) with your specialized UrlType.
at org.reflections.vfs.Vfs.fromURL(Vfs.java:108)
at org.reflections.vfs.Vfs.fromURL(Vfs.java:90)
at org.reflections.Reflections.scan(Reflections.java:236)
at org.reflections.Reflections.scan(Reflections.java:203)
at org.reflections.Reflections.<init>(Reflections.java:128)
at info.magnolia.classpathwatch.ClasspathScanner.run(ClasspathScanner.java:91)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)



 Comments   
Comment by Richard Gange [ 16/Oct/15 ]

FYI, those warnings are harmless and well known. In fact on 5.4 release notes, we advise to "double-check magnolia.properties and log4j.xml for latest changes". Jackrabbit configuration might also have updates, if you compare to a fresh 5.4 webapp. That said, do not worry, we have listing those with more details on 5.4.1 release notes.

Meanwhile, here's the snippet:

<!-- Reflections library spoils logs with harmless warnings; tries to look into native libs but none of its DefaultUrlTypes can handle them. -->
<category name="org.reflections">
  <priority value="ERROR" />
</category>

Note: Adding commons-vfs2 doesn't solve it (or doesn't solve all warnings iirc), there are still some cases where the Reflections lib doesn't have a so-called matching UrlType, and throws these scary warnings.

Finally, it happens on startup, not install, and has nothing to do with virtual URIs whatsoever.

Comment by Richard Gange [ 16/Oct/15 ]

https://documentation.magnolia-cms.com/display/DOCS/Release+notes+for+Magnolia+5.4.1

Generated at Mon Feb 12 09:08:32 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.