Struts2 Filter stating issue - struts2

Please solve this.I am new to struts2.i am using hibernate 3.1.thanks in advance
SEVERE: Exception starting filter struts2
Class: com.opensymphony.xwork2.spring.SpringObjectFactory
File: SpringObjectFactory.java
Method: getClassInstance
Line: 209 - com/opensymphony/xwork2/spring/SpringObjectFactory.java:209:-1
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:431)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4340)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NullPointerException
at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:209)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyResultType(XmlConfigurationProvider.java:519)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addResultTypes(XmlConfigurationProvider.java:490)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:446)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:264)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:193)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
... 28 more
Apr 12, 2012 11:48:51 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Apr 12, 2012 11:48:51 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/Struts2Hibernat] startup failed due to previous errors

Umesh Awasthi is right. You need to provide more information in order to solve this problem. If you are using spring to create your actions, here is what you need to do.
Make sure that you have struts2-spring-plugin in your classpath.
Annotate your action class with Spring's #Component. e.g. #Component("myActionName") or use java.inject.Named (JSR330) #Named. e.g. #Named("myActionName").
You also need to make another change to your struts.xml. Add the following to it
Next in your your action element instead of referencing the full class path of your action class in the class attribute use the value passed to the #Named or #Component. e.g. class="myActionName"
Hope this helps.
Contact me if you need more explanation.

Related

WSDLToJava: NPE in AbstractGenerator calling new VelocityGenerator(false) when org.slf4j.helpers.NOPLogger is on the classpath

I'm getting a NullPointerException in Hashtable when calling WSDLToJava after upgrading to CXF 3.4.1.
Full stack trace:
org.apache.cxf.tools.common.ToolException: Tools can not load the frontend plugin class org.apache.cxf.tools.wsdlto.frontend.jaxws.generators.AntGenerator
at org.apache.cxf.tools.wsdlto.core.PluginLoader.getFrontEndGenerators(PluginLoader.java:275)
at org.apache.cxf.tools.wsdlto.core.PluginLoader.getFrontEndProfile(PluginLoader.java:385)
at org.apache.cxf.tools.wsdlto.WSDLToJava.loadFrontEnd(WSDLToJava.java:64)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:96)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
... 19 more
Caused by: org.apache.cxf.tools.common.ToolException: Failed to initialize velocity engine
at org.apache.cxf.tools.common.VelocityGenerator.initVelocity(VelocityGenerator.java:91)
at org.apache.cxf.tools.common.VelocityGenerator.<init>(VelocityGenerator.java:53)
at org.apache.cxf.tools.wsdlto.core.AbstractGenerator.<init>(AbstractGenerator.java:47)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.generators.AbstractJAXWSGenerator.<init>(AbstractJAXWSGenerator.java:30)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.generators.AntGenerator.<init>(AntGenerator.java:44)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.apache.cxf.tools.wsdlto.core.PluginLoader.getFrontEndGenerators(PluginLoader.java:270)
... 24 more
Caused by: java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:460)
at org.apache.commons.collections.ExtendedProperties.addPropertyInternal(ExtendedProperties.java:723)
at org.apache.commons.collections.ExtendedProperties.addProperty(ExtendedProperties.java:671)
at org.apache.commons.collections.ExtendedProperties.setProperty(ExtendedProperties.java:737)
at org.apache.commons.collections.ExtendedProperties.convertProperties(ExtendedProperties.java:1693)
at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:645)
at org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:226)
at org.apache.velocity.app.Velocity.init(Velocity.java:97)
at org.apache.cxf.tools.common.VelocityGenerator.initVelocity(VelocityGenerator.java:87)
... 34 more
What's wrong? How can I fix this?
AbstractGenerator calls VelocityGenerator(false) which sets the field log to false.
The code in initVelocity() will then create an instance of org.slf4j.helpers.NOPLogger (if it can) and put that into the Properties instance.
Eventually, org.apache.commons.collections.ExtendedProperties.convertProperties(Properties) will be called. This line
c.setProperty(s, props.getProperty(s));
results in call to Hashtable.put(s, null) because Properties.getProperty() will return null for non-String elements in the map like the NOPLogger instance.
The culprit is that you have two implementations of Velocity on the classpath. One has version 1.x with the coordinate org.apache.velocity:velocity and one org.apache.velocity:velocity-engine-core with version 2.2.
Exclude the dependency to Velocity 1.x to fix this error. Velocity 2.x uses ExtProperties instead of ExtendedProperties which contains a patch for this bug.

Neo4j 3.1.2 Database has encountered some p*oblem, please perform necessary action (tx recovery/restart)

I have moved to Neo4j 3.1.2 and already a few times I have encountered the following database issue with no any changes in my application:
Caused by: java.lang.RuntimeException: org.neo4j.ogm.exception.TransactionException: Database has encountered some problem, please perform necessary action (tx recovery/restart)
at org.neo4j.ogm.drivers.bolt.request.BoltRequest.executeRequest(BoltRequest.java:175)
at org.neo4j.ogm.drivers.bolt.request.BoltRequest.execute(BoltRequest.java:89)
at org.neo4j.ogm.autoindex.AutoIndexManager.assertIndexes(AutoIndexManager.java:170)
at org.neo4j.ogm.autoindex.AutoIndexManager.build(AutoIndexManager.java:92)
at org.neo4j.ogm.session.SessionFactory.<init>(SessionFactory.java:45)
at org.neo4j.ogm.session.SessionFactory.<init>(SessionFactory.java:62)
at com.example.domain.api.configuration.Neo4jConfig.sessionFactory(Neo4jConfig.java:26)
at com.example.domain.api.configuration.Neo4jConfig$$EnhancerBySpringCGLIB$$93871c91.CGLIB$sessionFactory$0(<generated>)
at com.example.domain.api.configuration.Neo4jConfig$$EnhancerBySpringCGLIB$$93871c91$$FastClassBySpringCGLIB$$8bc180c.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
at com.example.domain.api.configuration.Neo4jConfig$$EnhancerBySpringCGLIB$$93871c91.sessionFactory(<generated>)
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:497)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
... 131 common frames omitted
What can be a reason of this ?
UPDATED
This is my Neo4j database logs
Oh, this time this was caused by a known (although considered very rare) issue:
org.neo4j.graphdb.TransactionFailureException: Database has encountered some problem, please perform necessary action (tx recovery/restart)
at org.neo4j.kernel.impl.factory.ClassicCoreSPI.beginTransaction(ClassicCoreSPI.java:181)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransactionInternal(GraphDatabaseFacade.java:578)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransaction(GraphDatabaseFacade.java:383)
at org.neo4j.bolt.v1.runtime.TransactionStateMachineSPI.beginTransaction(TransactionStateMachineSPI.java:95)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State$1.run(TransactionStateMachine.java:184)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine.run(TransactionStateMachine.java:77)
at org.neo4j.bolt.v1.runtime.BoltStateMachine$State$2.run(BoltStateMachine.java:396)
at org.neo4j.bolt.v1.runtime.BoltStateMachine.run(BoltStateMachine.java:196)
at org.neo4j.bolt.v1.messaging.BoltMessageRouter.lambda$onRun$3(BoltMessageRouter.java:80)
at org.neo4j.bolt.v1.runtime.concurrent.RunnableBoltWorker.execute(RunnableBoltWorker.java:135)
at org.neo4j.bolt.v1.runtime.concurrent.RunnableBoltWorker.run(RunnableBoltWorker.java:89)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.neo4j.kernel.api.exceptions.TransactionFailureException: Database has encountered some problem, please perform necessary action (tx recovery/restart)
at sun.reflect.GeneratedConstructorAccessor46.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.neo4j.kernel.internal.DatabaseHealth.assertHealthy(DatabaseHealth.java:62)
at org.neo4j.kernel.impl.api.Kernel.newTransaction(Kernel.java:99)
at org.neo4j.kernel.impl.factory.ClassicCoreSPI.beginTransaction(ClassicCoreSPI.java:173)
... 11 more
Caused by: java.lang.IllegalStateException: Concurrent drop() while updates have not completed
at org.neo4j.kernel.impl.api.index.ContractCheckingIndexProxy.ensureNoOpenCalls(ContractCheckingIndexProxy.java:187)
at org.neo4j.kernel.impl.api.index.ContractCheckingIndexProxy.drop(ContractCheckingIndexProxy.java:144)
at org.neo4j.kernel.impl.api.index.IndexingService.dropIndex(IndexingService.java:611)
at org.neo4j.kernel.impl.transaction.command.IndexBatchTransactionApplier$SingleTransactionApplier.visitSchemaRuleCommand(IndexBatchTransactionApplier.java:248)
at org.neo4j.kernel.impl.transaction.command.Command$SchemaRuleCommand.handle(Command.java:645)
at org.neo4j.kernel.impl.api.TransactionApplierFacade.visit(TransactionApplierFacade.java:61)
at org.neo4j.kernel.impl.api.TransactionApplierFacade.visit(TransactionApplierFacade.java:35)
at org.neo4j.kernel.impl.transaction.log.PhysicalTransactionRepresentation.accept(PhysicalTransactionRepresentation.java:69)
at org.neo4j.kernel.impl.api.TransactionToApply.accept(TransactionToApply.java:111)
at org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine.apply(RecordStorageEngine.java:349)
at org.neo4j.kernel.impl.api.TransactionRepresentationCommitProcess.applyToStore(TransactionRepresentationCommitProcess.java:78)
at org.neo4j.kernel.impl.api.TransactionRepresentationCommitProcess.commit(TransactionRepresentationCommitProcess.java:51)
at org.neo4j.kernel.impl.api.KernelTransactionImplementation.commit(KernelTransactionImplementation.java:608)
at org.neo4j.kernel.impl.api.KernelTransactionImplementation.closeTransaction(KernelTransactionImplementation.java:484)
at org.neo4j.kernel.api.KernelTransaction.close(KernelTransaction.java:135)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State.closeTransaction(TransactionStateMachine.java:325)
at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State$2.run(TransactionStateMachine.java:229)
... 7 more
Ideally it will be fixed soon. And I'm not sure how to get out of it w/o restarting server.

RESTful web service on TIBCO BW6.3 and Swagger UI tool

I recently started to use TIBCO BW6.3
I've created a RESTful web service that invokes another SOAP Web service, Hopefully until now.
I want to use a user-friendly tool, called Swagger UI, included in TIBCO BW6.3, in order to test my RESTful web service, when i start my application (process that represent my RESTful Web service), i get an exception in the console, and i cannot access the Swagger interface !
The console shows me at the end a message that the application has successfully started, but when i try to use Swagger UI to test my RESTful web service, it doesn't work !!
The followwing is the error :
!MESSAGE [com.tibco.bw.binding.rest.swagger.runtime(76)] The addSwaggerHostingConfig method has thrown an exception
!STACK 0
java.lang.NullPointerException
at java.lang.String.replace(Unknown Source)
at com.tibco.bw.rest.swagger.service.impl.SwaggerHostingConfigurationConsumer.addSwaggerHostingConfig(SwaggerHostingConfigurationConsumer.java:159)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
at org.apache.felix.scr.impl.helper.BindMethod.invoke(BindMethod.java:41)
at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1605)
at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1581)
at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:369)
at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:322)
at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:298)
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1492)
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1413)
at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:1222)
at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:1158)
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1444)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:914)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:998)
at com.tibco.bw.binding.rest.runtime.core.RestServiceBT.init(RestServiceBT.java:373)
at com.tibco.bw.frwk.BWComponentImpl.initializeComponent(BWComponentImpl.java:537)
at com.tibco.bw.frwk.BWComponentImpl.doStart(BWComponentImpl.java:393)
at com.tibco.bw.frwk.BWApplicationModuleImpl.startApplication(BWApplicationModuleImpl.java:390)
at com.tibco.bw.frwk.BWApplicationModuleImpl.onResolved(BWApplicationModuleImpl.java:144)
at com.tibco.bw.thor.runtime.api.DependencyDescriptor.onStateChange(DependencyDescriptor.java:83)
at com.tibco.bw.thor.runtime.api.ConstituentStateDependency.o00000(ConstituentStateDependency.java:105)
at com.tibco.bw.thor.runtime.api.ConstituentStateDependency.onStateChange(ConstituentStateDependency.java:71)
at com.tibco.bw.thor.runtime.model.Constituent.setConstituentState(Constituent.java:124)
at com.tibco.bw.frwk.BWSharedModuleImpl.onResolved(BWSharedModuleImpl.java:67)
at com.tibco.bw.thor.runtime.api.DependencyDescriptor.start(DependencyDescriptor.java:120)
at com.tibco.bw.frwk.BWModuleEventHandler.deployModule(BWModuleEventHandler.java:562)
at com.tibco.bw.frwk.BWModuleEventHandler.handleBundleEvent(BWModuleEventHandler.java:411)
at com.tibco.bw.thor.runtime.ApplicationHandler.addingBundle(ApplicationHandler.java:254)
at com.tibco.bw.thor.runtime.ApplicationHandler.addingBundle(ApplicationHandler.java:1)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
at org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:156)
at com.tibco.bw.thor.runtime.ApplicationHandler.onResolved(ApplicationHandler.java:187)
at com.tibco.bw.thor.runtime.api.DependencyDescriptor.start(DependencyDescriptor.java:120)
at com.tibco.bw.thor.runtime.ApplicationHandler.handleBundleEvent(ApplicationHandler.java:1568)
at com.tibco.bw.thor.runtime.Deployer.addingBundle(Deployer.java:485)
at com.tibco.bw.thor.runtime.Deployer.addingBundle(Deployer.java:1)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
at org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:156)
at com.tibco.bw.thor.runtime.Deployer$1.frameworkEvent(Deployer.java:297)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:926)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY com.tibco.bw.binding.rest.swagger.runtime 4 0 2016-05-16 15:09:48.782
!MESSAGE [com.tibco.bw.binding.rest.swagger.runtime(76)] The addSwaggerHostingConfig method has thrown an exception
!STACK 0
java.lang.NullPointerException
at java.lang.String.replace(Unknown Source)
at com.tibco.bw.rest.swagger.service.impl.SwaggerHostingConfigurationConsumer.addSwaggerHostingConfig(SwaggerHostingConfigurationConsumer.java:159)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
at org.apache.felix.scr.impl.helper.BindMethod.invoke(BindMethod.java:41)
at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1605)
at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1581)
at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:369)
at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:322)
at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:298)
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1492)
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1413)
at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:1222)
at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:1158)
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1444)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:914)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:998)
at com.tibco.bw.binding.rest.runtime.core.RestServiceBT.init(RestServiceBT.java:373)
at com.tibco.bw.frwk.BWComponentImpl.initializeComponent(BWComponentImpl.java:537)
at com.tibco.bw.frwk.BWComponentImpl.doStart(BWComponentImpl.java:393)
at com.tibco.bw.frwk.BWApplicationModuleImpl.startApplication(BWApplicationModuleImpl.java:390)
at com.tibco.bw.frwk.BWApplicationModuleImpl.onResolved(BWApplicationModuleImpl.java:144)
at com.tibco.bw.thor.runtime.api.DependencyDescriptor.onStateChange(DependencyDescriptor.java:83)
at com.tibco.bw.thor.runtime.api.ConstituentStateDependency.o00000(ConstituentStateDependency.java:105)
at com.tibco.bw.thor.runtime.api.ConstituentStateDependency.onStateChange(ConstituentStateDependency.java:71)
at com.tibco.bw.thor.runtime.model.Constituent.setConstituentState(Constituent.java:124)
at com.tibco.bw.frwk.BWSharedModuleImpl.onResolved(BWSharedModuleImpl.java:67)
at com.tibco.bw.thor.runtime.api.DependencyDescriptor.start(DependencyDescriptor.java:120)
at com.tibco.bw.frwk.BWModuleEventHandler.deployModule(BWModuleEventHandler.java:562)
at com.tibco.bw.frwk.BWModuleEventHandler.handleBundleEvent(BWModuleEventHandler.java:411)
at com.tibco.bw.thor.runtime.ApplicationHandler.addingBundle(ApplicationHandler.java:254)
at com.tibco.bw.thor.runtime.ApplicationHandler.addingBundle(ApplicationHandler.java:1)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
at org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:156)
at com.tibco.bw.thor.runtime.ApplicationHandler.onResolved(ApplicationHandler.java:187)
at com.tibco.bw.thor.runtime.api.DependencyDescriptor.start(DependencyDescriptor.java:120)
at com.tibco.bw.thor.runtime.ApplicationHandler.handleBundleEvent(ApplicationHandler.java:1568)
at com.tibco.bw.thor.runtime.Deployer.addingBundle(Deployer.java:485)
at com.tibco.bw.thor.runtime.Deployer.addingBundle(Deployer.java:1)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
at org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:156)
at com.tibco.bw.thor.runtime.Deployer$1.frameworkEvent(Deployer.java:297)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:926)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
15:09:49.585 INFO [bwEngThread:In-Memory Process Worker-2] c.t.b.p.g.Log.ACMEAppModule.Log - Received Lookup request for OrderID : TESTORDER123
15:09:49.834 INFO [Thread-30] com.tibco.thor.frwk.Application - TIBCO-THOR-FRWK-300006: Started BW Application [ACMEApp:1.0]
15:09:49.835 INFO [Framework Event Dispatcher: Equinox Container: f0806ac5-6f1b-0016-1355-e14504be535b] com.tibco.thor.frwk.Application - Started by BusinessStudio, ignoring .enabled settings.
Could you help me to solve this issue, thanks a lot.
You will need to change the default port for Swagger in TIBCO. Add a JVM argument to point to the correct port number like this:
-Dbw.rest.docport=<your_port>
For more details refer to this link:
https://community.tibco.com/questions/i-am-getting-below-error-opening-swagger-document-server-bw6-even-after-i-changed-http

I tried using AppiumDriver.tap() with parameters but when it execute it throws server side error

org.openqa.selenium.WebDriverException An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:605)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at io.appium.java_client.AppiumDriver.performTouchAction(AppiumDriver.java:297)
at io.appium.java_client.MultiTouchAction.perform(MultiTouchAction.java:74)
at io.appium.java_client.AppiumDriver.tap(AppiumDriver.java:338)
at allpages.General.swipeLeft(General.java:44)
at test.testappandroid.eVerify(testappandroid.java:152)
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:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Try typing adb devices into the console, is the device listed.
For anymore help please can you post your testng.xml, your test script and you grid configurations (if you are using selenium grid).
It seems like you are experiencing this issue
The developers recommend:
Make sure you are in a native view
Use mobile: tap which uses the click() method
If none of this helps it seems as if this is an open bug, keep and eye on the issue thread linked above and to get around this problem try to use the click method instead of tap.
Thanks,
Liam
I found the reason for my problem.
The error for me is because i missed to use "#Test" annotation in my code where i was using swipe function.
thanks

SDN4 - Neo4j OGM + Jackson 2.0

I am trying to use Jackson 2.x annotations on a Spring Data Neo4j 4.0.0RC1 entity but am seeing failures in my application context starting. I have two #NodeEntities that implement an interface and I've annotated the interface as such:
#JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
#JsonSubTypes({
#Type(value = SimpleNode.class, name="simple"),
#Type(value = OtherNode.class, name="other")
})
public interface Node {
}
I believe this is correct usage but when I start my application, the Spring context fails to load due to a problem creating the Neo4j session factory.
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getSessionFactory' defined in class path resource [com/example/TestApplication$Neo4jConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.neo4j.ogm.session.SessionFactory]: Factory method 'getSessionFactory' threw exception; nested exception is java.lang.ClassFormatError: Invalid annotation element type tag: 0x0
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:322) ~[spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at com.example.TestApplication$Neo4jConfig$$EnhancerBySpringCGLIB$$e5734e5.getSessionFactory(<generated>) ~[spring-core-4.1.6.RELEASE.jar:na]
at org.springframework.data.neo4j.config.Neo4jConfiguration.getSession(Neo4jConfiguration.java:49) ~[spring-data-neo4j-4.0.0.RC1.jar:na]
at com.example.TestApplication$Neo4jConfig$$EnhancerBySpringCGLIB$$e5734e5.CGLIB$getSession$12(<generated>) ~[spring-core-4.1.6.RELEASE.jar:na]
at com.example.TestApplication$Neo4jConfig$$EnhancerBySpringCGLIB$$e5734e5$$FastClassBySpringCGLIB$$a7919784.invoke(<generated>) ~[spring-core-4.1.6.RELEASE.jar:na]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309) ~[spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at com.example.TestApplication$Neo4jConfig$$EnhancerBySpringCGLIB$$e5734e5.getSession(<generated>) ~[spring-core-4.1.6.RELEASE.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
... 94 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.neo4j.ogm.session.SessionFactory]: Factory method 'getSessionFactory' threw exception; nested exception is java.lang.ClassFormatError: Invalid annotation element type tag: 0x0
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
... 115 common frames omitted
When playing around with my config I was able to determine that the OGM code (version 1.1.0) seems to choke on the #JsonSubTypes. This error also occurs if I replace my interface with an abstract class. Lastly, I noticed in org.neo4j.ogm.metadata.info.AnnotationsInfo constructor (line 89) that there is a TODO that says // todo: maybe register just the annotations we're interested in.
My questions are:
Is there an elegant workaround? I'm of the opinion that polymorphic deserialization is not an entirely uncommon use case?
Is my usage of the Jackson annotations correct?
This is most likely the issue fixed in https://jira.spring.io/browse/DATAGRAPH-674
It'll be available in neo4j-ogm 1.1.1 but till that's released, you can use a snapshot version 1.1.1-SNAPSHOT
You'll need to also include the snapshot repository-
<repository>
<id>neo4j-snapshots</id>
<url>http://m2.neo4j.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>

Resources