platonai / PulsarRPAPro

PulsarRPA Pro Edition: Empower Your Workflows with AI-Driven Web Data Extraction.
95 stars 26 forks source link

Failed to run harvest command using exotic-standalone.jar on Windows #5

Open platonai opened 2 years ago

platonai commented 2 years ago

Failed to run harvest command using exotic-standalone.jar on Windows:

D:\Download>java -jar exotic-standalone.jar harvest https://www.amazon.com/Best-Sellers-Automotive/zgbs/automotive/
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webExtractor' defined in URL [jar:file:/D:/Download/exotic-standalone.jar!/BOOT-INF/lib/scent-beans-1.9.5.jar!/scent-beans/scent-components-context.xml]: Cannot resolve reference to bean 'documentPartitioner' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'documentPartitioner' defined in URL [jar:file:/D:/Download/exotic-standalone.jar!/BOOT-INF/lib/scent-beans-1.9.5.jar!/scent-beans/scent-components-context.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [ai.platon.scent.segment.DocumentPartitioner]: Constructor threw exception; nested exception is java.lang.reflect.InvocationTargetException
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:707)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:198)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1282)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1243)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveBean(DefaultListableBeanFactory.java:494)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:349)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:342)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1172)
        at ai.platon.pulsar.context.support.AbstractPulsarContext.getBean(AbstractPulsarContext.kt:143)
        at ai.platon.scent.dm.HarvestRunner.getExtractor(HarvestRunner.kt:329)
        at ai.platon.scent.dm.HarvestRunner.getAutoMining(HarvestRunner.kt:45)
        at ai.platon.scent.dm.HarvestRunner.harvest(HarvestRunner.kt:56)
        at ai.platon.scent.AbstractScentSession.harvest$suspendImpl(AbstractScentSession.kt:403)
        at ai.platon.scent.AbstractScentSession.harvest(AbstractScentSession.kt)
        at ai.platon.exotic.standalone.common.VerboseHarvester$harvest$result$2.invokeSuspend(VerboseHarvester.kt:65)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
        at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
        at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
        at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
        at ai.platon.exotic.standalone.common.VerboseHarvester.harvest(VerboseHarvester.kt:65)
        at ai.platon.exotic.standalone.common.VerboseHarvester.harvest(VerboseHarvester.kt:55)
        at ai.platon.exotic.standalone.common.VerboseHarvester.harvest(VerboseHarvester.kt:53)
        at ai.platon.exotic.standalone.starter.ExoticExecutor$harvest$1.invokeSuspend(ExoticExecutor.kt:186)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
        at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
        at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
        at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
        at ai.platon.exotic.standalone.starter.ExoticExecutor.harvest$exotic_standalone(ExoticExecutor.kt:185)
        at ai.platon.exotic.standalone.starter.ExoticExecutor.execute(ExoticExecutor.kt:81)
        at ai.platon.exotic.standalone.starter.ExoticStandaloneStarterKt.main(ExoticStandaloneStarter.kt:10)
        ... 8 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'documentPartitioner' defined in URL [jar:file:/D:/Download/exotic-standalone.jar!/BOOT-INF/lib/scent-beans-1.9.5.jar!/scent-beans/scent-components-context.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [ai.platon.scent.segment.DocumentPartitioner]: Constructor threw exception; nested exception is java.lang.reflect.InvocationTargetException
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:315)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:296)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330)
        ... 55 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [ai.platon.scent.segment.DocumentPartitioner]: Constructor threw exception; nested exception is java.lang.reflect.InvocationTargetException
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:224)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:311)
        ... 65 more
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
        at kotlin.reflect.jvm.internal.calls.CallerImpl$Constructor.call(CallerImpl.kt:41)
        at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
        at ai.platon.scent.segment.SelectorLocator.<init>(BlockLocators.kt:399)
        at ai.platon.scent.segment.DocumentPartitioner$Companion.predefinedLocators(DocumentPartitioner.kt:21)
        at ai.platon.scent.segment.DocumentPartitioner.<init>(DocumentPartitioner.kt:32)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
        at kotlin.reflect.jvm.internal.calls.CallerImpl$Constructor.call(CallerImpl.kt:41)
        at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
        at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:159)
        at kotlin.reflect.jvm.internal.KCallableImpl.callBy(KCallableImpl.kt:112)
        at org.springframework.beans.BeanUtils$KotlinDelegate.instantiateClass(BeanUtils.java:892)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:196)
        ... 67 more
Caused by: java.lang.IllegalArgumentException: name
        at java.base/jdk.internal.loader.URLClassPath$Loader.findResource(URLClassPath.java:603)
        at java.base/jdk.internal.loader.URLClassPath.findResource(URLClassPath.java:294)
        at java.base/java.net.URLClassLoader$2.run(URLClassLoader.java:619)
        at java.base/java.net.URLClassLoader$2.run(URLClassLoader.java:617)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
        at java.base/java.net.URLClassLoader.findResource(URLClassLoader.java:616)
        at org.springframework.boot.loader.LaunchedURLClassLoader.findResource(LaunchedURLClassLoader.java:100)
        at java.base/java.lang.ClassLoader.getResource(ClassLoader.java:1401)
        at ai.platon.pulsar.common.ResourceLoader.getResource(ResourceLoader.kt:209)
        at ai.platon.pulsar.common.ResourceLoader.getResourceAsStream(ResourceLoader.kt:158)
        at ai.platon.scent.feature.BlockFeature.loadIgnoreMissing(BlockFeature.kt:52)
        at ai.platon.scent.feature.selector.BlockSelectorFeature.<init>(BlockSelectorFeature.kt:18)
        ... 88 more
platonai commented 2 years ago

This command works on WSL, so if your system hava WSL, run it on WSL.