I have set up a Geoserver instance. Now I need the GSR extension to have an ArcGIS compatible REST API.
I installed the extension as described but on Geoserver startup I get a couple of errors and when I access the webpage a HTTP error 503.
I already tried different versions of Geoserver and JDK, all with the same result.
Here is the Java error:
11:52:17.791 [main] ERROR
org.springframework.web.context.ContextLoader - Context initialization
failed org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'gsrDispatcher' defined in URL
[jar:file:/home/nico/gs/webapps/geoserver/WEB-INF/lib/gs-gsr-2.21-SNAPSHOT.jar!/applicationContext.xml]:
Initialization of bean failed; nested exception is
javax.xml.stream.FactoryConfigurationError: Provider for
javax.xml.stream.XMLOutputFactory cannot be found
Thanks for any hint,
best regards
Nico
I did some more research and tested the following versions each with both openjdk version ("1.8.0_312" & "11.0.14.1"):
geoserver-2.18-SNAPSHOT-gsr-plugin.zip
Geoserver version:
2.18.2-6
Running without problems
geoserver-2.19-SNAPSHOT-gsr-plugin.zip
Geoserver version:
2.19.0-5
Problem: Error creating bean with name 'geoServicesExceptionResolver'
geoserver-2.19-SNAPSHOT-gsr-plugin.zip
Geoserver version:
2.19.6
Problem: Error creating bean with name 'gsrDispatcher'
geoserver-2.20-SNAPSHOT-gsr-plugin.zip
Geoserver version:
2.20.0-4
Problem: Error creating bean with name 'gsrDispatcher'
geoserver-2.21-SNAPSHOT-gsr-plugin.zip
Geoserver version:
2.21
Problem: Error creating bean with name 'gsrDispatcher'
So it seems something happened between geoserver version 2.18.6 and 2.19.0 and something more happened between version 2.19.5 and 2.19.6.
It would be helpful if someone could give me the contact of the community GSR extenstion. I can not find anything about it.
To get my geoserver updated it would be great to have this fixed soon.
Many thanks in advance.
Make sure you're installing the same plugin version for the same GeoServer version you're having.
I think you have did something wrong in applicationContext.xml file.
Related
I'm trying to migrate a SpringBoot project to Quarkus. When I try to build a native image with Graal VM, I get the following error:
Caused by: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: io.quarkus.runner.ApplicationImpl. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.reportUnresolvedElement(SharedGraphBuilderPhase.java:286)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedType(SharedGraphBuilderPhase.java:242)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedNewInstance(SharedGraphBuilderPhase.java:186)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4619)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4612)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5409)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3436)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3243)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1109)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:1003)
at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:76)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:212)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:223)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:357)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:313)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:302)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103)
at com.oracle.graal.pointsto.flow.StaticInvokeTypeFlow.update(InvokeTypeFlow.java:434)
at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:547)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
... 5 more
My project uses quarkus-resteasy and I'm trying to build my native image with GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06, mixed mode, sharing).
The application can be viewed here: https://gitlab.com/henixdevelopment/open-source/opentestfactory/java-plugins/-/tree/26-perf-study-replace-springboot-by-quarkus
The service I'm trying to build is otf-robot-framework-interpreter.
Has anyone encountered this error before?
Thanks in advance !
I have a question concerning the eXistDB:
After an upgrade to eXistDB 5.2.0 I get the following error:
HTTP ERROR 500 javax.servlet.ServletException: javax.servlet.ServletException: An error occurred while processing request to /exist/apps/ediarum/: err:XPST0081 error found while loading module config: Error while loading module modules/config.xqm: error found while loading module ediarum: Error while loading module ./ediarum.xql: Invalid qname httpclient:put. No namespace defined for prefix httpclient. QName is invalid: INVALID_PREFIX
in Version eXistDB 4.4, everything is working fine...
What exactly is different between 4.4 and 5.2.0 concerning the "httpclient"?
As per the release notes for 5.0.0:
removed eXist-db's HTTP Client module. Use the EXPath HTTP Client
module instead.
My website is/was working just fine. But I am being forced to upgrade the OS of the servers it runs on, because the newer version of a piece of software I need to upgrade, won't run on the old OS. So, now I am in dependency hell.
So, on a test server, I've upgraded the OS from Ubuntu 14.04 to 18.04.1 . I was also forced to use a later version of Java from:
echo $JAVA_HOME
/usr/lib/jvm/java-7-oracle
to
echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-amd64/
And the version of Tomcat from 7 to 8.
Having fiddled a bit (I started this in January, but have only just been able to get back to it, so I can't remember what exactly, though can search the history for clues if required), I can build my application OK, but it fails at the final hurdle:
BUILD SUCCESSFUL Total time: 19 seconds Using CATALINA_BASE:
/var/lib/tomcat8 Using CATALINA_HOME: /usr/share/tomcat8 Using
CATALINA_TMPDIR: /var/lib/tomcat8/temp Using JRE_HOME:
/usr/lib/jvm/java-11-openjdk-amd64/ Using CLASSPATH:
/usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.jar
Using CATALINA_PID: /root/catalina.pid Tomcat started.
--2019-05-28 16:10:16-- http://localhost:8080/ Resolving localhost (localhost)... 127.0.0.1 Connecting to localhost
(localhost)|127.0.0.1|:8080... connected. HTTP request sent, awaiting
response... 404 2019-05-28 16:10:16 ERROR 404: (no description).
Further investigation reveals:
less /var/log/tomcat8/catalina.out
2019-05-28 16:10:06.418 UTC [localhost-startStop-1] ERROR
org.springframework.web.context.ContextLoader - Context initialization
failed org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'embedController' defined in ServletContext
resource [/WEB-INF/playground-servlet.xml]: Cannot resolve reference
to bean 'homeController' while settin g bean property
'homeController'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'homeController' defined in ServletContext
resource [/WEB-INF/playground-servlet.xml]: Cannot re solve reference
to bean 'execService' while setting bean property 'execService';
nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'execService': Invocation of init method
failed; nested exception is javax.ws.rs.ProcessingException:
java.net.ConnectException: Connection refused (Connection refused)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:326)
~[spring-beans-3.2.8.RELEASE.jar:3.2.8.RELEASE]
It should be abundantly clear by now that I don't have much clue what I'm doing. I have spent the afternoon doing lots of googling and looking at lots of Stack Overflow answers, but nothing seems relevant.
that error comes from Spring. For Java 11 support, you'd also need to upgrade Spring to the latest 5.x version (currently 5.2.x).
You may encounter various compatibility issues when upgrading an older environment to Java 11. Unless you absolutely need to upgrade, you may consider staying on a previous version. Java 8 is still being supported.
I have been working on a Java application with Spring version 4.0.7 on a Windows machine which has worked fine over the past few years. Recently we have the requirement for developers to use MacBook Pro to develop and we've immediately had issues with circular references within our Spring configuration when running the application (build with Maven is fine). Does anyone know any reason why running Spring applications on Windows machines would be any different to Mac OS machines?
The Java version we are using is 1.7.0.80,
Details of exception:
Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'reactor': Requested bean is currently in creation: Is there an unresolvable circular reference?
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.beforeSingletonCreation(DefaultSingletonBeanRegistry.java:334)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:446)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:420)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:545)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:155)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:305)
... 127 more
Check this out first: http://forum.spring.io/forum/spring-projects/container/115998-circular-dependency-identification-inconsistent
Apparently, in some scenarios, the underlying OS api for listing files returns a different order.
However, you might try to solve the problem by either changing the order of the packages to scan in the #ComponentScan() annotation or by using the #dependsOn("reactor") annotation on the class that is triggering the exception.
I'm using java with apache tika 1.18 to convert some files to TXT.
When I try to use the AutoDetectParser(), I'm getting the error :
[ERROR ] Error occurred during error handling, give up!
org.apache.commons.compress.archivers.ArchiveStreamFactory.detect(Ljava/io/InputStream;)Ljava/lang/String;
[ERROR ] SRVE0777E: Exception thrown by application class 'org.apache.cxf.service.invoker.AbstractInvoker.createFault:162'
org.apache.cxf.interceptor.Fault: org.apache.commons.compress.archivers.ArchiveStreamFactory.detect(Ljava/io/InputStream;)Ljava/lang/String;
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
at [internal classes]
Caused by: java.lang.NoSuchMethodError: org.apache.commons.compress.archivers.ArchiveStreamFactory.detect(Ljava/io/InputStream;)Ljava/lang/String;
I was dinging on internet and found this error related wrong version of commom_compress, appears this method doesn't exist in versions previous of 1.14 of commom_compress. In my case the version is 1.16.1.
After build the project, I checked the libs inside and there is only the correct version.
I'm using IBM Liberty 18.0 ... and now I'm really lost about options to solve this problem.
When I use the specific parser, like PDFParser(), everything works fine!
Any ideas?
Thanks
Source of the issue:
Spark 2.x distributions include old versions of commons-compress, while Tika library depends on version 1.18 of commons-compress library.
Solution
Use --driver-class-path argument in your spark-shell or spark-submit to point to a the right version of commons-compress library.
spark-submit
--driver-class-path ~/.m2/repository/org/apache/commons/commons-compress/1.18/commons-compress-1.18.jar
--class {you.main.class}
....
Check my detailed answer here.