无法实例化 DynamoDBStoreManager(因为 Apache HTTP 客户端版本不正确?)
Can't instanciate DynamoDBStoreManager (because of incorrect Apache HTTP Client version?)
当我尝试创建一个连接到(本地)DynamoDB 服务器的 TinkerPop Graph 实例时,我遇到了这个异常:
java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLConnectionSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)V
Basic research suggests that the Apache HTTP Client version used is too old (minimum 4.5.2 required),但我的项目只导入了 dynamodb
工件本身包含的一个版本:
我已经清理了项目,删除了整个 .m2
文件夹并让 Maven 更新项目。我可以检查运行时使用的实际版本吗?还能是什么?
详情
异常的完整堆栈跟踪:
java.lang.IllegalArgumentException: Could not instantiate implementation: com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager
at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:55)
at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:473)
at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:407)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1320)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:62)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:44)
... 16 more
Caused by: java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLConnectionSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)V
at com.amazonaws.http.conn.ssl.SdkTLSSocketFactory.<init>(SdkTLSSocketFactory.java:56)
at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.getPreferredSocketFactory(ApacheConnectionManagerFactory.java:92)
at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.create(ApacheConnectionManagerFactory.java:65)
at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.create(ApacheConnectionManagerFactory.java:58)
at com.amazonaws.http.apache.client.impl.ApacheHttpClientFactory.create(ApacheHttpClientFactory.java:51)
at com.amazonaws.http.apache.client.impl.ApacheHttpClientFactory.create(ApacheHttpClientFactory.java:39)
at com.amazonaws.http.AmazonHttpClient.<init>(AmazonHttpClient.java:314)
at com.amazonaws.http.AmazonHttpClient.<init>(AmazonHttpClient.java:298)
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:165)
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:154)
at com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.<init>(AmazonDynamoDBClient.java:264)
at com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.<init>(AmazonDynamoDBClient.java:239)
at com.amazon.titan.diskstorage.dynamodb.DynamoDBDelegate.<init>(DynamoDBDelegate.java:174)
at com.amazon.titan.diskstorage.dynamodb.Client.<init>(Client.java:145)
at com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager.<init>(DynamoDBStoreManager.java:90)
... 21 more
相信奥卡姆剃刀:最简单的答案很可能是正确的。我手动链接了一个 .jar
文件,其中包含旧版本的 Apache HTTP 客户端。现在我摆脱了它。
当我尝试创建一个连接到(本地)DynamoDB 服务器的 TinkerPop Graph 实例时,我遇到了这个异常:
java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLConnectionSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)V
Basic research suggests that the Apache HTTP Client version used is too old (minimum 4.5.2 required),但我的项目只导入了 dynamodb
工件本身包含的一个版本:
我已经清理了项目,删除了整个 .m2
文件夹并让 Maven 更新项目。我可以检查运行时使用的实际版本吗?还能是什么?
详情
异常的完整堆栈跟踪:
java.lang.IllegalArgumentException: Could not instantiate implementation: com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager
at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:55)
at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:473)
at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:407)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1320)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:62)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:44)
... 16 more
Caused by: java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLConnectionSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Ljavax/net/ssl/HostnameVerifier;)V
at com.amazonaws.http.conn.ssl.SdkTLSSocketFactory.<init>(SdkTLSSocketFactory.java:56)
at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.getPreferredSocketFactory(ApacheConnectionManagerFactory.java:92)
at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.create(ApacheConnectionManagerFactory.java:65)
at com.amazonaws.http.apache.client.impl.ApacheConnectionManagerFactory.create(ApacheConnectionManagerFactory.java:58)
at com.amazonaws.http.apache.client.impl.ApacheHttpClientFactory.create(ApacheHttpClientFactory.java:51)
at com.amazonaws.http.apache.client.impl.ApacheHttpClientFactory.create(ApacheHttpClientFactory.java:39)
at com.amazonaws.http.AmazonHttpClient.<init>(AmazonHttpClient.java:314)
at com.amazonaws.http.AmazonHttpClient.<init>(AmazonHttpClient.java:298)
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:165)
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:154)
at com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.<init>(AmazonDynamoDBClient.java:264)
at com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.<init>(AmazonDynamoDBClient.java:239)
at com.amazon.titan.diskstorage.dynamodb.DynamoDBDelegate.<init>(DynamoDBDelegate.java:174)
at com.amazon.titan.diskstorage.dynamodb.Client.<init>(Client.java:145)
at com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager.<init>(DynamoDBStoreManager.java:90)
... 21 more
相信奥卡姆剃刀:最简单的答案很可能是正确的。我手动链接了一个 .jar
文件,其中包含旧版本的 Apache HTTP 客户端。现在我摆脱了它。