0

我正在尝试在我的 java spring 应用程序中使用 highrise api。

我从https://github.com/dnobel/highrise-java-api复制了 highrise .jar 。但是当我用这个运行我的应用程序时我遇到了异常并且它停止了我的tomcat服务器

   [ERROR] 2013-09-30 12:03:34 Context initialization failed
   org.springframework.beans.factory.BeanCreationException: Error creating bean with       name 'org.springframework.security.filterChains': Cannot resolve reference to bean   'org.springframework.security.web.DefaultSecurityFilterChain#1' while setting bean property    'sourceList' with key [1]; nested exception is  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#1': Cannot resolve reference to  bean     'org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0'  while setting constructor argument with key [2]; nested exception is  org.springframework.beans.factory.BeanCreationException: Error creating bean with name  'org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0':  Cannot resolve reference to bean  'org.springframework.security.authentication.ProviderManager#0' while setting bean property  'authenticationManager'; nested exception is  org.springframework.beans.factory.BeanCreationException: Error creating bean with name  'org.springframework.security.authentication.ProviderManager#0': Cannot resolve reference to     bean 'org.springframework.security.config.authentication.AuthenticationManagerFactoryBean#0'  while setting constructor argument; nested exception is  org.springframework.beans.factory.BeanCreationException: Error creating bean with name  'org.springframework.security.config.authentication.AuthenticationManagerFactoryBean#0':  FactoryBean threw exception on object creation; nested exception is  org.springframework.beans.factory.BeanCreationException: Error creating bean with name  'org.springframework.security.authenticationManager': Cannot resolve reference to bean  'org.springframework.security.authentication.dao.DaoAuthenticationProvider#0' while setting  constructor argument with key [0]; nested exception is  org.springframework.beans.factory.BeanCreationException: Error creating bean with name  'org.springframework.security.authentication.dao.DaoAuthenticationProvider#0': Error setting  property values; nested exception is org.springframework.beans.PropertyBatchUpdateException;  nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property ' passwordEncoder' threw exception; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:354)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:154)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:587)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5291)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722) 

当我删除高层 jar 文件时,我的应用程序工作正常。

有谁知道为什么我会收到此错误,或者是否有任何其他方法可以使用 highrise api 我已经获得了要连接的高层令牌号。我想检索所有与员工姓名有关的电子邮件、便笺和交易。

如果您需要更多信息,请告诉我

4

1 回答 1

0

您是否在类路径中添加了 spring 安全库?看来您的高层 jar 文件需要安全库。

于 2013-10-01T07:42:56.373 回答