Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from itext to openpdf for PDF map rendering #6343

Merged
merged 6 commits into from
Jun 14, 2022

Conversation

jodygarnett
Copy link
Contributor

@jodygarnett jodygarnett commented Jun 2, 2022

Initially focused on using dependency exclusion to swap iText to OpenPDF for map fish print.
Also found flying-saucer-pdf-itext5 was in use and changed to flying-saucer-pdf-openpdf.

The older iText library has known security vulnerabilities, OpenPDF is a drop-in replacement (forking from iText 4.2.0 to maintain an open-source license).

References:

Notes:

  • The version dependency print-lib 2.1.6 used does not appear in maven central and may be a fork created for core-geonetwork. This version has a dependency on iText 5.5.13 and may need to be adjust to the OpenPDF (iText 4.2.0 API).
  • print-lib 2.0.0 uses the iText 2.1.5 API
  • Newer versions of print-lib are available that make use of jasper reports for pdf generation

Update:

  • ThumbnailMaker indirectly reference com.itextpdf.text.DocumentException confirming that OpenPDF cannot be directly swapped in due to package change for iText 5.
  • Created mapfish-print 2.2.0 release based on Open PDF

Fixes:

@juanluisrp
Copy link
Contributor

juanluisrp commented Jun 3, 2022

The build is failing:

Error: 6,604 [ERROR] Failed to execute goal on project gn-services: 
  Could not resolve dependencies for project org.geonetwork-opensource:gn-services:jar:4.2.1-SNAPSHOT: 
  Could not find artifact org.xhtmlrenderer:flying-saucer-pdf-openpdf:jar:9.0.7 in osgeo (https://repo.osgeo.org/repository/release/) -> [Help 1]

@jodygarnett jodygarnett marked this pull request as draft June 6, 2022 15:02
@jodygarnett
Copy link
Contributor Author

Marking this as a draft as we see if we can recover a 2.x branch of mapfish-print.

@jodygarnett
Copy link
Contributor Author

Hunting down mapfish print-lib 2.1.6:

  1. https://github.com/GeoCat/mapfish-print/tree/archive/2.1.x has the 2.1.x branch history, including 2.1.5 release
  2. https://repo.osgeo.org/ has the jar and pom only
  3. notes on changing to repo.osgeo.org document this comes from https://packages.georchestra.org/artifactory/mapfish-print
  4. browsing packages.georchestra.org org/mapfish/print/print-lib/2.1.6 show the src jar.

This 2.1.x series uses gradle with a maven plugin; so some care is required restoring src.

@jodygarnett
Copy link
Contributor Author

jodygarnett commented Jun 7, 2022

Interesting update, downloading 2.1.6 above and unpacking the source code over top of the 2.1.x branch shows ... no change.

This makes the only change beyond 2.1.5 "upgrading to pdf box 2.0.7" GeoCat/mapfish-print@de53322

Which we should be able to see in the generated pom.xml:

  • 2.1.5: org.apache.pdfbox:pdfbox:1.6.0
  • 2.1.6: org.apache.pdfbox:pdfbox:2.0.7,org.apache.pdfbox:pdfbox-tools:2.0.7

I am now comfortable we have what was tagged as 2.1.6 😄

@jodygarnett jodygarnett force-pushed the open_pdf branch 3 times, most recently from 10de7d6 to 100e739 Compare June 9, 2022 18:22
@jodygarnett jodygarnett marked this pull request as ready for review June 9, 2022 21:45
@jodygarnett
Copy link
Contributor Author

I have deployed a mapfish-print:2.2-SNAPSHOT to nexus.osgeo.org snapshots repository just so this branch has an opportunity to compile and pass tests.

@jodygarnett
Copy link
Contributor Author

This build is failing with:

Error: 0,953 [ERROR] Failed to execute goal on project gn-core: Could not resolve dependencies for project org.geonetwork-opensource:gn-core:jar:4.2.1-SNAPSHOT: Could not find artifact org.mapfish.print:print-lib:jar:2.2-SNAPSHOT in redhat (https://maven.repository.redhat.com/ga/) -> [Help 1]

The repository https://maven.repository.redhat.com/ga/ is listed in the pom.xml but no real indication what it is being used for.

Please do not list additional repositories in the pom.xml as they slow the build down considerably, instead add them as a cache to repo.osgeo.org. Adding a repository doubles the number of network connections checked when updating dependencies.

@jodygarnett
Copy link
Contributor Author

Update: Was able to track the change to 953ef0d to obtain the diff_match_patch: diff_match_patch:current dependency. Going to try and resolve as part of this pull request.

Note you can update single third-party-dependencies dependencies to geonetwork-releases repo.

Copy link
Member

@fxprunayre fxprunayre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all good Jody. Tested PDF record and map print, batch edits with diff.

@josegar74
Copy link
Member

josegar74 commented Jun 13, 2022

Tested the following features and look fine: map print, metadata detail page, metadata single print, batch edit diffs.

But the metadata selection print, I got for the attached metadata the map not printed. In GN 3.12 it works fine, but not sure if the issue is with GN 4 or with this change. For other metadata, it works.

test-metadata-print.txt

In the log I see the following exceptions:

09:17:59.706 [qtp584153299-219] ERROR org.apache.fop.apps.FOUserAgent - Image not found. URI: http://localhost:8080/geonetwork/srv/api/records/105c1246-d821-432a-bb4d-57c3c18e98f6/extents.png. (See position 463:-1)
09:17:59.724 [qtp584153299-219] ERROR org.apache.fop.apps.FOUserAgent - Image not found. URI: http://localhost:8080/geonetwork/srv/api/records/105c1246-d821-432a-bb4d-57c3c18e98f6/extents.png. (No context info available)

@josegar74
Copy link
Member

The issue is not related to the change.

@jodygarnett
Copy link
Contributor Author

The mapfish-print changes are available here mapfish/mapfish-print-v2#6 for review

@jodygarnett
Copy link
Contributor Author

Thank you for the review @josegar74, we can merge this now or wait for mapfish print 2.2.0 to be available.

…cy from maven central

This is a fork of google code diff-match-patch:diff-match-patch:current adapted to java naming convetions and available from maven central. It is by far the most popular fork of this algorithm.

By adopting this dependency we avoid the need to use https://maven.repository.redhat.com/ga/ improving build times.
@@ -65,24 +65,6 @@
</executions>
</plugin>

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This duplicated entry in the pom.xml produced warnings from maven

@jodygarnett
Copy link
Contributor Author

Updated to mapfish-print 2.2.0 (which is just released on osgeo repo), when this build is completed we can merge :)

@juanluisrp juanluisrp added dependencies Pull requests that update a dependency file backport 3.12.x labels Jun 14, 2022
@juanluisrp juanluisrp merged commit b2cfdca into geonetwork:main Jun 14, 2022
juanluisrp added a commit to GeoCat/core-geonetwork that referenced this pull request Jun 14, 2022
@juanluisrp
Copy link
Contributor

@jodygarnett I guess this need to be backported to 4.0.x branch too?

juanluisrp pushed a commit to GeoCat/core-geonetwork that referenced this pull request Jun 15, 2022
)

* Switch from iText to OpenPDF for PDF map rendering.
* Change to mapfish-print 2.2.x based on OpenPDF.
* Remove duplicate maven-assembly-plugin for dublin-core/pom.xml resolving warning.
* Change Diff to use org.bitbucket.cowwoc:diff-match-patch:1.2 dependency from maven central.
    This is a fork of google code diff-match-patch:diff-match-patch:current adapted to java naming conventions and
    available from maven central. It is by far the most popular fork of this algorithm.
    By adopting this dependency we avoid the need to use https://maven.repository.redhat.com/ga/ improving build
    times.
* Use mapfish-print 2.2.0 release.
Backport of geonetwork#6343
juanluisrp added a commit that referenced this pull request Jun 15, 2022
* [BP] Switch from itext to openpdf for PDF map rendering (#6343)

* Switch from iText to OpenPDF for PDF map rendering.
* Change to mapfish-print 2.2.x based on OpenPDF.
* Remove duplicate maven-assembly-plugin for dublin-core/pom.xml resolving warning.
* Change Diff to use org.bitbucket.cowwoc:diff-match-patch:1.2 dependency from maven central.
    This is a fork of google code diff-match-patch:diff-match-patch:current adapted to java naming conventions and
    available from maven central. It is by far the most popular fork of this algorithm.
    By adopting this dependency we avoid the need to use https://maven.repository.redhat.com/ga/ improving build
    times.
* Use mapfish-print 2.2.0 release.
Backport of #6343

* Remove unused import

Co-authored-by: Jody Garnett <jody.garnett@gmail.com>
@juanluisrp juanluisrp deleted the open_pdf branch June 15, 2022 08:48
juanluisrp added a commit that referenced this pull request Jun 15, 2022
* [BP] Switch from itext to openpdf for PDF map rendering

Backport of #6343

* Remove unnecessary exclusions

Remove itext exclusions becasue it isn't a depencency of mapfish's print-lib
2.2.0 anymore
@fxprunayre
Copy link
Member

On main, we still have the Caused by: java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender while deploying the webapp on Jetty and Tomcat - it works ok while using jetty:run.

The issue was first introduced by #6364 and #6396 was supposed to fix it. But no.

To have main deploying ok, I've to revert b2cfdca as well. Don't ask me why. So far, I've no idea why those library updates introduce that error. Any help or suggestions are welcomed @juanluisrp @jodygarnett ? :)

@jodygarnett
Copy link
Contributor Author

I expect the different java environments have been configured with different logging systems wrapping each other.

Do you have a stack trace please?

So you are reverting the work I did? That is not so good.

@fxprunayre
Copy link
Member

Do you have a stack trace please?

2022-07-22 09:20:21.684:INFO:oejshC.catalogue:main: Initializing Spring JeevesDispatcherServlet 'spring'
2022-07-22 09:20:22.992:WARN:oejshC.catalogue:main: unavailable
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/log': Invocation of init method failed; nested exception is java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
	at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:702)
	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:668)
	at jeeves.config.springutil.JeevesDispatcherServlet.findWebApplicationContext(JeevesDispatcherServlet.java:65)
	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:587)
	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:530)
	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:170)
	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
	at org.eclipse.jetty.servlet.ServletHolder$Wrapper.init(ServletHolder.java:1345)
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:632)
	at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:415)
	at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:731)
	at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:313)
	at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:743)
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647)
	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:755)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:379)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1449)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1414)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:916)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:46)
	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
	at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:517)
	at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:157)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:173)
	at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:428)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:66)
	at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:785)
	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:754)
	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:641)
	at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:540)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:146)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:605)
	at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:252)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
	at org.eclipse.jetty.server.Server.start(Server.java:423)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
	at org.eclipse.jetty.server.Server.doStart(Server.java:387)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$3(XmlConfiguration.java:1907)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1857)
Caused by: 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/log': Invocation of init method failed; nested exception is java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:415)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1791)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1109)
	at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:341)
	at org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:319)
	at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.detectHandlers(AbstractDetectingUrlHandlerMapping.java:81)
	at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.initApplicationContext(AbstractDetectingUrlHandlerMapping.java:59)
	at org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:124)
	at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:78)
	at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:78)
	at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:123)
	at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:100)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:415)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1791)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
	at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:702)
	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:668)
	at jeeves.config.springutil.JeevesDispatcherServlet.findWebApplicationContext(JeevesDispatcherServlet.java:65)
	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:587)
	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:530)
	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:170)
	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
	at org.eclipse.jetty.servlet.ServletHolder$Wrapper.init(ServletHolder.java:1345)
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:632)
	at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:415)
	at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$0(ServletHandler.java:731)
	at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:313)
	at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:743)
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647)
	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:755)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:379)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1449)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1414)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:916)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:46)
	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
	at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:517)
	at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:157)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:173)
	at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:428)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:66)
	at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:785)
	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:754)
	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:641)
	at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:540)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:146)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:605)
	at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:252)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
	at org.eclipse.jetty.server.Server.start(Server.java:423)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
	at org.eclipse.jetty.server.Server.doStart(Server.java:387)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
	at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$3(XmlConfiguration.java:1907)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1857)

So you are reverting the work I did? That is not so good.

:) it is not but I've no clue why the camel update or this PR trigger that problem. And also sounds odd that jetty:run works and not deploying the WAR on the same Jetty version. Maybe the log4j update will solve it ?

@juanluisrp
Copy link
Contributor

juanluisrp commented Jul 23, 2022

Is this error, isn't it? https://issues.apache.org/jira/browse/LOG4J2-3426

@jodygarnett
Copy link
Contributor Author

Francois the licenses are incompatible; reverting the work means you cannot legally release geonetwork. You know that right?

@jodygarnett
Copy link
Contributor Author

jodygarnett commented Jul 23, 2022

It looks like your environment started using log4j2 2 some how and you have ended up with the log4j2 1.2 API ... bridging to log4j2 2 backend.

Still we should collect details into a bug report; there is a PR to migrate to log4j2 2 outstanding also (held up on figuring out harvester logs).

@jodygarnett
Copy link
Contributor Author

Going to move discussion to #6475

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 3.12.x backport 4.0.x dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants