English 中文(简体)
Geotools: Getting illegal ArgumentException: Argument “ellips Bot” should not be void after “org. opengis.referncing.NoSuchAuthorityCodeException”差错
原标题:Geotools: Getting IllegalArgumentException: Argument "ellipsoid" should not be null after "org.opengis.referncing.NoSuchAuthorityCodeException" error

我遇到了共同的<代码>org. opengis.referencing.NoSuchAuthorityCodeException: 在试图将我的包裹放在阿帕奇Flink集群上时,没有为“EngineeringCRS”类物体找到的“EPSG:4326”代码。

我在谈到上述错误时,已经添加了“条码”作为扶养。 我设法确定,通过遵循以下指示:,在官方Geotools Building FAQ上,并在我的pom.xml档案中重新编排扶养令,并使用

但现在我似乎遇到了一个新的例外,即这种情况。

Caused by: java.lang.IllegalArgumentException: Argument "ellipsoid" should not be null.
    at org.geotools.referencing.GeodeticCalculator.<init>(GeodeticCalculator.java:195) ~[?:?]
    at org.geotools.referencing.GeodeticCalculator.<init>(GeodeticCalculator.java:188) ~[?:?]

整天花了整整整整整整天,我试图 de倒,但没有成功。 它在通过我的国际民主和选举援助学会管理一个地方分组时,都发挥了作用,但把jar包和部署到我的分组造成这些错误。

我尝试采纳提议的POM,即原作为掩体已被列入。 这一问题,并将我的pom.xml文档修改到下文所附的现存档案中,但还是留下同样的错误。 具体来说,任何人都需要看到我关于细节的全文,。 本文在文本宾上刊登

<dependencies>
    <!-- GeoTools Related -->
    <dependency>
        <groupId>org.geotools</groupId>
        <artifactId>gt-shapefile</artifactId>
        <version>${geotools.version}</version>
    </dependency>
    <dependency>
        <groupId>org.geotools</groupId>
        <artifactId>gt-epsg-hsql</artifactId>
        <version>${geotools.version}</version>
    </dependency>
    <dependency>
        <groupId>org.geotools</groupId>
        <artifactId>gt-swing</artifactId>
        <version>${geotools.version}</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
        <scope>test</scope>
    </dependency>

</dependencies>
    <plugins>
                <!-- Java Compiler -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>
    
                <!-- We use the maven-shade plugin to create a fat jar that contains all necessary dependencies. -->
                <!-- Change the value of <mainClass>...</mainClass> if your program entry point changes. -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.0.0</version>
                    <executions>
                        <!-- Run shade goal on package phase -->
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>shade</goal>
                            </goals>
                            <configuration>
                                <artifactSet>
                                    <excludes>
                                        <exclude>org.apache.flink:force-shading</exclude>
                                        <exclude>com.google.code.findbugs:jsr305</exclude>
                                        <exclude>org.slf4j:*</exclude>
                                        <exclude>log4j:*</exclude>
                                    </excludes>
                                </artifactSet>
                                <filters>
                                    <filter>
                                        <!-- Do not copy the signatures in the META-INF folder.
                                        Otherwise, this might cause SecurityExceptions when using the JAR. -->
                                        <artifact>*:*</artifact>
                                        <excludes>
                                            <exclude>META-INF/*.SF</exclude>
                                            <exclude>META-INF/*.DSA</exclude>
                                            <exclude>META-INF/*.RSA</exclude>
                                        </excludes>
                                    </filter>
                                </filters>
                                <transformers>
                                    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                        <mainClass>DataGen.StreamingJob</mainClass>
                                    </transformer>
                                    <!-- This bit merges the various GeoTools META-INF/services files         -->
                                    <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                                </transformers>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                </plugin>
            </plugins>

任何关于如何纠正这一错误的想法?

EDIT: Apache Flink version 1.13.0. Geotools 28-SNAPSHOT. Java version "1.8.0_333". Adding the contents of META-INF/services:

├── com.fasterxml.jackson.core.JsonFactory
├── com.fasterxml.jackson.core.ObjectCodec
├── it.geosolutions.imageio.compression.CompressorSpi
├── it.geosolutions.imageio.compression.DecompressorSpi
├── java.sql.Driver
├── javax.annotation.processing.Processor
├── javax.cache.spi.CachingProvider
├── javax.imageio.spi.ImageInputStreamSpi
├── javax.imageio.spi.ImageOutputStreamSpi
├── javax.imageio.spi.ImageReaderSpi
├── javax.imageio.spi.ImageWriterSpi
├── javax.measure.spi.FormatService
├── javax.measure.spi.ServiceProvider
├── javax.measure.spi.SystemOfUnitsService
├── javax.measure.spi.UnitFormatService
├── javax.media.jai.OperationRegistrySpi
├── javax.media.jai.OperationsRegistrySpi
├── javax.xml.bind.JAXBContext
├── org.apache.flink.client.deployment.ClusterClientFactory
├── org.apache.flink.core.execution.PipelineExecutorFactory
├── org.apache.flink.runtime.security.contexts.SecurityContextFactory
├── org.apache.flink.runtime.security.modules.SecurityModuleFactory
├── org.apache.flink.runtime.state.changelog.StateChangelogWriterFactory
├── org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.JsonFactory
├── org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.ObjectCodec
├── org.apache.flink.table.factories.Factory
├── org.apache.flink.table.factories.TableFactory
├── org.apache.kafka.common.config.provider.ConfigProvider
├── org.apache.logging.log4j.core.util.ContextDataProvider
├── org.apache.logging.log4j.message.ThreadDumpMessage$ThreadInfoFactory
├── org.apache.logging.log4j.spi.Provider
├── org.apache.logging.log4j.util.PropertySource
├── org.geotools.coverage.grid.GridCoverageFactory
├── org.geotools.coverage.grid.io.footprint.FootprintLoaderSpi
├── org.geotools.data.DataStoreFactorySpi
├── org.geotools.data.FileDataStoreFactorySpi
├── org.geotools.feature.AttributeTypeFactory
├── org.geotools.filter.FunctionExpression
├── org.geotools.filter.FunctionFactory
├── org.geotools.filter.expression.PropertyAccessorFactory
├── org.geotools.http.HTTPClientFactory
├── org.geotools.referencing.factory.gridshift.GridShiftLocator
├── org.geotools.referencing.operation.MathTransformProvider
├── org.geotools.renderer.crs.ProjectionHandlerFactory
├── org.geotools.renderer.style.ExternalGraphicFactory
├── org.geotools.renderer.style.MarkFactory
├── org.geotools.styling.StyleFactory
├── org.geotools.swing.tool.InfoToolHelper
├── org.geotools.util.ConverterFactory
├── org.jaitools.numeric.Processor
├── org.jboss.marshalling.ProviderDescriptor
├── org.opengis.coverage.processing.Operation
├── org.opengis.feature.FeatureFactory
├── org.opengis.feature.type.FeatureTypeFactory
├── org.opengis.filter.FilterFactory
├── org.opengis.filter.expression.Function
├── org.opengis.referencing.crs.CRSAuthorityFactory
├── org.opengis.referencing.crs.CRSFactory
├── org.opengis.referencing.cs.CSAuthorityFactory
├── org.opengis.referencing.cs.CSFactory
├── org.opengis.referencing.datum.DatumAuthorityFactory
├── org.opengis.referencing.datum.DatumFactory
├── org.opengis.referencing.operation.CoordinateOperationAuthorityFactory
├── org.opengis.referencing.operation.CoordinateOperationFactory
├── org.opengis.referencing.operation.MathTransformFactory
├── reactor.blockhound.integration.BlockHoundIntegration
└── tech.units.indriya.spi.NumberSystem

1 directory, 67 files
最佳回答

这个问题与Geotools无关。

The problem was in these specific lines of the my code:

crs = Params.coordinateReferenceSystem;
GeodeticCalculator gc = new GeodeticCalculator(crs);

and the crs was being set to null because Params.coordinateReferenceSystem was defined as a static variable. Static variables cannot be serialized hence are not replicated across all nodes in a distributed system.

The result of which it works perfectly on the local IDE but fails on the cluster.

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签