Update
I solved my problem. The problem was in distinction between 3.0 and 2.0 versions cocos2d-x. For version 2.0 at .java file has to be the following code
static
{
System.loadLibrary("cocos2dcpp");
}
Maybe it will be useful for somebody.
I compiled app without errors, but after I run app on my device I have strange error.
05-22 08:43:38.477: E/AndroidRuntime(1493): FATAL EXCEPTION: main
05-22 08:43:38.477: E/AndroidRuntime(1493): java.lang.UnsatisfiedLinkError: Native method not found: org.cocos2dx.lib.Cocos2dxHelper.nativeSetApkPath:(Ljava/lang/String;)V
05-22 08:43:38.477: E/AndroidRuntime(1493): at org.cocos2dx.lib.Cocos2dxHelper.nativeSetApkPath(Native Method)
05-22 08:43:38.477: E/AndroidRuntime(1493): at org.cocos2dx.lib.Cocos2dxHelper.init(Cocos2dxHelper.java:71)
05-22 08:43:38.477: E/AndroidRuntime(1493): at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:68)
05-22 08:43:38.477: E/AndroidRuntime(1493): at com.newhope.barman.barman.onCreate(barman.java:99)
05-22 08:43:38.477: E/AndroidRuntime(1493): at android.app.Activity.performCreate(Activity.java:5133)
05-22 08:43:38.477: E/AndroidRuntime(1493): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
05-22 08:43:38.477: E/AndroidRuntime(1493): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
05-22 08:43:38.477: E/AndroidRuntime(1493): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
05-22 08:43:38.477: E/AndroidRuntime(1493): at android.app.ActivityThread.access$600(ActivityThread.java:141)
05-22 08:43:38.477: E/AndroidRuntime(1493): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
05-22 08:43:38.477: E/AndroidRuntime(1493): at android.os.Handler.dispatchMessage(Handler.java:99)
05-22 08:43:38.477: E/AndroidRuntime(1493): at android.os.Looper.loop(Looper.java:137)
05-22 08:43:38.477: E/AndroidRuntime(1493): at android.app.ActivityThread.main(ActivityThread.java:5103)
05-22 08:43:38.477: E/AndroidRuntime(1493): at java.lang.reflect.Method.invokeNative(Native Method)
05-22 08:43:38.477: E/AndroidRuntime(1493): at java.lang.reflect.Method.invoke(Method.java:525)
05-22 08:43:38.477: E/AndroidRuntime(1493): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
05-22 08:43:38.477: E/AndroidRuntime(1493): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
05-22 08:43:38.477: E/AndroidRuntime(1493): at dalvik.system.NativeStart.main(Native Method)
Tell me please, what I do wrong? Thanks for your help!
Related
I'm trying to enable elk analytics for wso2 api manager 4.0.0 by following the official documentation but when i add the following configuration in deployment.toml [apim.analytics] enable = true type="elk"
i got this error
ERROR - gateway [SCR] Error while trying to bind reference Reference[name = api.manager.config.service, interface = org.wso2.carbon.apimgt.impl.APIManagerConfigurationService, policy = dynamic, cardinality = 1..1, target = null, bind = setAPIManagerConfigurationService, unbind = unsetAPIManagerConfigurationService]
Details:
Problematic reference = Reference[name = api.manager.config.service, interface = org.wso2.carbon.apimgt.impl.APIManagerConfigurationService, policy = dynamic, cardinality = 1..1, target = null, bind = setAPIManagerConfigurationService, unbind = unsetAPIManagerConfigurationService]
of service component = org.wso2.carbon.apimgt.handlers
component implementation class = org.wso2.carbon.apimgt.gateway.internal.APIHandlerServiceComponent
located in bundle with symbolic name = org.wso2.carbon.apimgt.gateway
bundle location = reference:file:../plugins/org.wso2.carbon.apimgt.gateway_9.0.174.jar
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_221]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_221]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_221]
at org.eclipse.equinox.internal.ds.model.ComponentReference.bind(ComponentReference.java:376) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bindReference(ServiceComponentProp.java:430) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bind(ServiceComponentProp.java:218) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:343) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:113) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:985) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:866) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:525) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:544) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.wso2.carbon.sequences.internal.SequenceEditorServiceComponent.activate(SequenceEditorServiceComponent.java:80) [org.wso2.carbon.sequences_4.7.99.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_221]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_221]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_221]
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:113) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:985) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:866) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:525) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:544) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.wso2.carbon.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:213) [org.wso2.carbon.mediation.initializer_4.7.99.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_221]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_221]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_221]
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:113) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:985) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:866) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:525) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:544) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.wso2.carbon.inbound.endpoint.persistence.service.InboundEndpointPersistenceServiceDSComponent.activate(InboundEndpointPersistenceServiceDSComponent.java:50) [org.wso2.carbon.inbound.endpoint.persistence_4.7.99.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_221]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_221]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_221]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_221]
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222) [org.eclipse.equinox.ds_1.4.400.v20160226-2036.jar:?]
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:113) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:985) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:866) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:525) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:544) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:529) [org.wso2.carbon.core_4.6.2.jar:?]
at org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:305) [org.wso2.carbon.core_4.6.2.jar:?]
at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:118) [org.wso2.carbon.core_4.6.2.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:973) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
Caused by: java.lang.NullPointerException: name
at feign.Util.checkNotNull(Util.java:116) ~[io.github.openfeign.feign-core_11.0.0.jar:?]
at feign.Target$HardCodedTarget.(Target.java:78) ~[io.github.openfeign.feign-core_11.0.0.jar:?]
at feign.Target$HardCodedTarget.(Target.java:73) ~[io.github.openfeign.feign-core_11.0.0.jar:?]
at feign.Feign$Builder.target(Feign.java:265) ~[io.github.openfeign.feign-core_11.0.0.jar:?]
at org.wso2.am.analytics.publisher.auth.AuthClient.getSASToken(AuthClient.java:44) ~[org.wso2.am.analytics.publisher.client_1.0.1.jar:?]
at org.wso2.am.analytics.publisher.client.EventHubProducerClientFactory.getSASToken(EventHubProducerClientFactory.java:59) ~[org.wso2.am.analytics.publisher.client_1.0.1.jar:?]
at org.wso2.am.analytics.publisher.client.EventHubProducerClientFactory.create(EventHubProducerClientFactory.java:46) ~[org.wso2.am.analytics.publisher.client_1.0.1.jar:?]
at org.wso2.am.analytics.publisher.client.EventHubClient.createProducerWithRetry(EventHubClient.java:94) ~[org.wso2.am.analytics.publisher.client_1.0.1.jar:?]
at org.wso2.am.analytics.publisher.client.EventHubClient.(EventHubClient.java:72) ~[org.wso2.am.analytics.publisher.client_1.0.1.jar:?]
at org.wso2.am.analytics.publisher.reporter.cloud.DefaultAnalyticsMetricReporter.(DefaultAnalyticsMetricReporter.java:63) ~[org.wso2.am.analytics.publisher.client_1.0.1.jar:?]
at org.wso2.am.analytics.publisher.reporter.MetricReporterFactory.createMetricReporter(MetricReporterFactory.java:51) ~[org.wso2.am.analytics.publisher.client_1.0.1.jar:?]
at org.wso2.carbon.apimgt.common.analytics.publishers.impl.AnalyticsDataPublisher.initialize(AnalyticsDataPublisher.java:60) ~[org.wso2.carbon.apimgt.common.analytics_9.0.174.jar:?]
at org.wso2.carbon.apimgt.common.analytics.AnalyticsServiceReferenceHolder.setConfigurations(AnalyticsServiceReferenceHolder.java:46) ~[org.wso2.carbon.apimgt.common.analytics_9.0.174.jar:?]
at org.wso2.carbon.apimgt.gateway.internal.APIHandlerServiceComponent.setAPIManagerConfigurationService_aroundBody12(APIHandlerServiceComponent.java:227) ~[?:?]
at org.wso2.carbon.apimgt.gateway.internal.APIHandlerServiceComponent.setAPIManagerConfigurationService(APIHandlerServiceComponent.java:214) ~[?:?]
... 94 more
As mentioned in the docs the ELK Analytics feature is available as an update. You need to update WSO2 API Manager 4.0.0 to at least update level 90 to use this. You may refer Updating WSO2 API Manager to update the API Manager.
No, it means it has updated the Update too to the latest version. You need to re-run the Update tool to update the product pack.
You can use current-state switch to check the current product pack version to see whether you are in the correct update level.
i fixed the issue by getting the latest version 4.1.0
I configured WSO2 identity server to use external mysql database for both identity, shared database and as the primary user store. Given below is the configuration
[super_admin]
username = "admin"
password = "admin"
create_admin_account = true
[user_store]
type = "database"
[database.identity_db]
type = "mysql"
url= "jdbc:mysql://192.168.2.102:3306/data?useSSL=false"
username = "userdb"
password ="userdb"
[database.shared_db]
type = "mysql"
url= "jdbc:mysql://192.168.2.102:3306/data?useSSL=false"
username = "userdb"
password ="userdb"
While the identity and shared database is connected perfectly, i get the following error for user store and cannot login to management console
ERROR {org.wso2.carbon.identity.scim.common.internal.SCIMCommonComponent} - Error occurred while setting SCIM attributes for the Admin org.wso2.carbon.user.core.UserStoreException: Error in adding SCIM metadata to the admin in tenant domain: carbon.super
at org.wso2.carbon.identity.scim.common.utils.SCIMCommonUtils.setAdminSCIMAttributes(SCIMCommonUtils.java:250)
at org.wso2.carbon.identity.scim.common.internal.SCIMCommonComponent.activate(SCIMCommonComponent.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:113)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:985)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:866)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:525)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:544)
at org.wso2.carbon.identity.core.internal.IdentityCoreServiceComponent.activate(IdentityCoreServiceComponent.java:171)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:113)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:985)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:866)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:525)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:544)
at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:529)
at org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java:234)
at org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:113)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:985)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:866)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:525)
at org.eclipse.equinox.http.servlet.internal.Activator.registerHttpService(Activator.java:81)
at org.eclipse.equinox.http.servlet.internal.Activator.addProxyServlet(Activator.java:60)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.init(ProxyServlet.java:40)
at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.init(DelegationServlet.java:38)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1134)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1089)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:983)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4871)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5180)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.wso2.carbon.tomcat.ext.service.ExtendedStandardService.startInternal(ExtendedStandardService.java:52)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.wso2.carbon.tomcat.internal.CarbonTomcat.start(CarbonTomcat.java:113)
at org.wso2.carbon.tomcat.internal.ServerManager$1.run(ServerManager.java:167)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.wso2.carbon.user.core.UserStoreException: 30007 - UserNotFound: User admin does not exist in: PRIMARY
at org.wso2.carbon.user.core.common.AbstractUserStoreManager.callSecure(AbstractUserStoreManager.java:205)
at org.wso2.carbon.user.core.common.AbstractUserStoreManager.getUserClaimValue(AbstractUserStoreManager.java:1548)
at org.wso2.carbon.identity.scim.common.utils.SCIMCommonUtils.setAdminSCIMAttributes(SCIMCommonUtils.java:231)
... 100 more
Caused by: java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
at java.security.AccessController.doPrivileged(Native Method)
at org.wso2.carbon.user.core.common.AbstractUserStoreManager.callSecure(AbstractUserStoreManager.java:191)
... 102 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.wso2.carbon.user.core.common.AbstractUserStoreManager$2.run(AbstractUserStoreManager.java:194)
... 104 more
Caused by: org.wso2.carbon.user.core.UserStoreException: 30007 - UserNotFound: User admin does not exist in: PRIMARY
at org.wso2.carbon.user.core.common.AbstractUserStoreManager.getUserClaimValue(AbstractUserStoreManager.java:1575)
... 109 more
Am i not pointing the user store correctly to database?
Can someone help me explain what causes this error and how to resolve it?
Just describing the answer posted by #janak in the comments if you are looking for the answer.
The solution was to use the database_unique_id userstore type.
[user_store]
type = "database_unique_id"
From WSO2 IS 5.10.0 onwards, all user store managers have UniqueID included as part of the user store manager name (e.g., UniqueIDJDBCUserStoreManager). The user store managers that do not have UniqueID as part of the user store manager name are only available for backward compatibility purposes and can only be used if you are migrating from a previous version of WSO2 Identity Server.
The issue you have observed happens due to using the new schema with old JDBCUserStoremanager. Simply changing your userstore manager class to UniqueIDJDBCUserStoreManager will resolve the issue.
If you are using the old JDBCUserStoreManager, you will have to use the old schema to create the tables. The difference is, UM_USER_ID column is present in the UM_USER table in the new SCHEMA.
[1] https://is.docs.wso2.com/en/5.10.0/setup/configuring-secondary-user-stores/
I have tried to install wso2 EI 6.5.0 & 6.6.0 and also MI 1.0 & 1.1.0 product as Windows service. While checking runConsole.bat itself throwing bulk exception.
If anyone faced same scenario means help me to get out from those exceptions.
6.6.0 Exception
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| Details:
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| Problematic reference = Reference[name = serverConfigurationService, interface = org.wso2.carbon.base.api.ServerConfigurationService, policy = dynamic, cardinality = 0..n, target = null, bind = setServerConfigurationService, unbind = unsetServerConfigurationService]
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| of service component = org.wso2.carbon.crypto.impl
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| component implementation class = org.wso2.carbon.crypto.impl.internal.CryptoImplComponent
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| located in bundle with symbolic name = org.wso2.carbon.crypto.impl
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| bundle location = reference:file:../plugins/org.wso2.carbon.crypto.impl_1.1.2.jar java.lang.reflect.InvocationTargetException
INFO|wrapper|Service "WSO2 Carbon"|20-02-13 12:26:50|Trigger found: Exception in line:
INFO|wrapper|Service "WSO2 Carbon"|20-02-13 12:26:50| bundle location = reference:file:../plugins/org.wso2.carbon.crypto.impl_1.1.2.jar java.lang.reflect.InvocationTargetException
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO|wrapper|Service "WSO2 Carbon"|20-02-13 12:26:50|start script scripts/trayMessage.gv
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at java.lang.reflect.Method.invoke(Method.java:497)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at org.eclipse.equinox.internal.ds.model.ComponentReference.bind(ComponentReference.java:376)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bindReference(ServiceComponentProp.java:444)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bind(ServiceComponentProp.java:218)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:343)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:473)
INFO|wrapper|Service "WSO2 Carbon"|20-02-13 12:26:50|end script scripts/trayMessage.gv
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:217)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:816)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:783)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at java.lang.Thread.run(Thread.java:745)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50|Caused by: java.lang.NoClassDefFoundError: org/apache/xerces/util/SecurityManager
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at org.wso2.carbon.base.ServerConfiguration.getSecuredDocumentBuilder(ServerConfiguration.java:523)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at org.wso2.carbon.base.ServerConfiguration.toDOM(ServerConfiguration.java:501)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at org.wso2.carbon.base.ServerConfiguration.getDocumentElement(ServerConfiguration.java:468)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| at org.wso2.carbon.crypto.impl.internal.CryptoImplComponent.setServerConfigurationService(CryptoImplComponent.java:123)
INFO|216808/0|Service "WSO2 Carbon"|20-02-13 12:26:50| ... 16 more```
There are some recent changes made to the documentation of EI 6.6.0. https://docs.wso2.com/display/EI660/Running+the+Product+as+a+Windows+Service
Can you confirm whether you followed all the steps in this particular doc?
Please take note of the below points
WSO2 recommends Yet Another Java Service Wrapper (YAJSW) version
12.14. If you are running on JDK 11, previous versions of YAJSW will not be compatible.
Also,
Step 1: Setting up the YAJSW wrapper
I'm trying out the AWS X-Ray into a simple Spring Boot app.
I have the right credentials in ~/.aws/credentials and have included the necessary dependencies:
plugins {
id 'org.springframework.boot' version '2.2.0.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'java'
}
group = 'com.test'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
implementation("com.amazonaws:aws-xray-recorder-sdk-core")
implementation("com.amazonaws:aws-xray-recorder-sdk-aws-sdk")
implementation("com.amazonaws:aws-xray-recorder-sdk-aws-sdk-instrumentor")
implementation("com.amazonaws:aws-xray-recorder-sdk-apache-http")
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
dependencyManagement {
imports {
mavenBom('com.amazonaws:aws-java-sdk-bom:1.11.39')
mavenBom('com.amazonaws:aws-xray-recorder-sdk-bom:2.3.0')
}
}
test {
useJUnitPlatform()
}
I followed the guide in the documentation, but received the following error on the first call :
com.amazonaws.client.builder.AwsClientBuilder$EndpointConfiguration
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) ~[na:na]
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na]
at com.amazonaws.xray.strategy.sampling.XRayClient.newClient(XRayClient.java:26) ~[aws-xray-recorder-sdk-core-2.3.0.jar:na]
at com.amazonaws.xray.strategy.sampling.CentralizedSamplingStrategy.<init>(CentralizedSamplingStrategy.java:40) ~[aws-xray-recorder-sdk-core-2.3.0.jar:na]
at com.amazonaws.xray.strategy.sampling.DefaultSamplingStrategy.<init>(DefaultSamplingStrategy.java:5) ~[aws-xray-recorder-sdk-core-2.3.0.jar:na]
at com.amazonaws.xray.AWSXRayRecorder.<init>(AWSXRayRecorder.java:87) ~[aws-xray-recorder-sdk-core-2.3.0.jar:na]
at com.amazonaws.xray.AWSXRayRecorderBuilder.build(AWSXRayRecorderBuilder.java:142) ~[aws-xray-recorder-sdk-core-2.3.0.jar:na]
at com.amazonaws.xray.AWSXRayRecorderBuilder.defaultRecorder(AWSXRayRecorderBuilder.java:75) ~[aws-xray-recorder-sdk-core-2.3.0.jar:na]
at com.amazonaws.xray.AWSXRay.<clinit>(AWSXRay.java:18) ~[aws-xray-recorder-sdk-core-2.3.0.jar:na]
at com.amazonaws.xray.javax.servlet.AWSXRayServletFilter.getRecorder(AWSXRayServletFilter.java:267) ~[aws-xray-recorder-sdk-core-2.3.0.jar:na]
at com.amazonaws.xray.javax.servlet.AWSXRayServletFilter.preFilter(AWSXRayServletFilter.java:273) ~[aws-xray-recorder-sdk-core-2.3.0.jar:na]
at com.amazonaws.xray.javax.servlet.AWSXRayServletFilter.doFilter(AWSXRayServletFilter.java:150) ~[aws-xray-recorder-sdk-core-2.3.0.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.2.0.RELEASE.jar:5.2.0.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.0.RELEASE.jar:5.2.0.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.2.0.RELEASE.jar:5.2.0.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.0.RELEASE.jar:5.2.0.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.2.0.RELEASE.jar:5.2.0.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.0.RELEASE.jar:5.2.0.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
And this error on subsequent calls:
java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.xray.AWSXRay
at com.amazonaws.xray.javax.servlet.AWSXRayServletFilter.getRecorder(AWSXRayServletFilter.java:267) ~[aws-xray-recorder-sdk-core-2.3.0.jar:na]
at com.amazonaws.xray.javax.servlet.AWSXRayServletFilter.preFilter(AWSXRayServletFilter.java:273) ~[aws-xray-recorder-sdk-core-2.3.0.jar:na]
at com.amazonaws.xray.javax.servlet.AWSXRayServletFilter.doFilter(AWSXRayServletFilter.java:150) ~[aws-xray-recorder-sdk-core-2.3.0.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.2.0.RELEASE.jar:5.2.0.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.0.RELEASE.jar:5.2.0.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.2.0.RELEASE.jar:5.2.0.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.0.RELEASE.jar:5.2.0.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.2.0.RELEASE.jar:5.2.0.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.2.0.RELEASE.jar:5.2.0.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.27.jar:9.0.27]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Any ideas how to fix this ?
I have a super simple app as follows:
#SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
#Configuration
public class WebConfig {
#Bean
public Filter TracingFilter() {
return new AWSXRayServletFilter("SimpleApp");
}
}
#RestController
#RequestMapping("test")
public class SimpleService {
#GetMapping
public String test() {
return "Test";
}
}
X-Ray SDK depends on AWS SDK X-Ray client. Can you try using api instead of implementation, or explicitly adding the com.amazonaws:aws-java-sdk-xray:1.11.398 dependency?
The issue here is that one of the classes AWSXRay depends on, CentralizedSamplingStrategy, calls javax.xml.bind.DatatypeConverter in a static block. This class is part of the Java EE APIs, and isn't included by default in JDK 9 and above. You can add javax.xml.bind:jaxb-api as a library to get it running.
windows python version is 2.7.10 scrapy version is 1.0.1
when i run scrapy fetch http://google.com:81 also appear this problem
and i don't konw how to solve it
my code:
items.py:
from scrapy.item import Item, Field
class StackItem(Item):
title = Field()
url = Field()
stack_spider.py
from scrapy import Spider
from scrapy.selector import Selector
class StackSpider(Spider):
name = "stack"
allowed_domains = ["stackoverflow.com"]
start_urls = ["http://stackoverflow.com/questions?pagesize=50&sort=newest", ]
def parse(self, response):
questions = Selector(response).xpath('//div[#class="summary"]/h3')
for question in questions:
item = StackItem()
item['title'] = question.xpath(
'a[#class="question-hyperlink"]/text()').extract()[0]
item['url'] = question.xpath(
'a[#class="question-hyperlink"]/#href').extract()[0]
yield item
the error detail:
$ scrapy crawl stack
2015-07-07 16:26:26 [scrapy] INFO: Scrapy 1.0.1 started (bot: stack)
2015-07-07 16:26:26 [scrapy] INFO: Optional features available: ssl, http11
2015-07-07 16:26:26 [scrapy] INFO: Overridden settings: {'NEWSPIDER_MODULE': `'stack.spiders', 'SPIDER_MODULES': ['stack.spiders'], 'BOT_NAME': 'stack'}`
2015-07-07 16:26:27 [scrapy] INFO: Enabled extensions: CloseSpider, `TelnetConsole, LogStats, CoreStats, SpiderState`
Unhandled error in Deferred:
2015-07-07 16:26:28 [twisted] CRITICAL: Unhandled error in Deferred:
2015-07-07 16:26:28 [twisted] CRITICAL:
I think in the stack_spider.py file you are missing a line:
from stack.items import StackItem