Jump to content
We've recently updated our Privacy Statement, available here. ×

CustomAuthenticator not working


Gabriel Dausque

Recommended Posts

We are trying to migrate a customauthenticator implementation that works in 7.11 LTS + but not anymore in 10.X + (including 10.3).

After referencing the new java apispotfire-public-java-api.jar, and making the correct configuration with the configuration tools, I've got following error

INFO 2019-05-21T10:57:00,748+0200 [*Initialization*] spotfire.server.LifecycleManager: The application is about to be shut down.

INFO 2019-05-21T10:57:00,748+0200 [*Initialization*] spotfire.server.LifecycleManager: Shutting down TIBCO Spotfire Server. Uptime: 0 day(s), 0 hour(s), 0 minute(s), 0 second(s)

ERROR 2019-05-21T10:57:00,757+0200 [*Initialization*] web.context.ContextLoader: Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalAuthenticator' defined in class path resource [applicationContext.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.spotfire.server.security.ExternalAuthenticator]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/spotfire/server/security/CustomAuthenticator

at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:304) ~[spring-beans.jar:5.1.5.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:285) ~[spring-beans.jar:5.1.5.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1325) ~[spring-beans.jar:5.1.5.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1171) ~[spring-beans.jar:5.1.5.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans.jar:5.1.5.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans.jar:5.1.5.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans.jar:5.1.5.RELEASE]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans.jar:5.1.5.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans.jar:5.1.5.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans.jar:5.1.5.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849) ~[spring-beans.jar:5.1.5.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context.jar:5.1.5.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context.jar:5.1.5.RELEASE]

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400) ~[spring-web.jar:5.1.5.RELEASE]

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291) ~[spring-web.jar:5.1.5.RELEASE]

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103) ~[spring-web.jar:5.1.5.RELEASE]

at com.spotfire.server.lifecycle.SpotfireServerInitializer.contextInitialized(SpotfireServerInitializer.java:56) ~[spotfire-server.jar:]

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4680) ~[catalina.jar:9.0.17]

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5150) ~[catalina.jar:9.0.17]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.17]

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713) ~[catalina.jar:9.0.17]

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) ~[catalina.jar:9.0.17]

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695) ~[catalina.jar:9.0.17]

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:631) ~[catalina.jar:9.0.17]

at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1832) ~[catalina.jar:9.0.17]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[:1.8.0_201]

at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[:1.8.0_201]

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-util.jar:9.0.17]

at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112) ~[:1.8.0_201]

at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:526) ~[catalina.jar:9.0.17]

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:425) ~[catalina.jar:9.0.17]

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1577) ~[catalina.jar:9.0.17]

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309) ~[catalina.jar:9.0.17]

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) ~[catalina.jar:9.0.17]

at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424) ~[catalina.jar:9.0.17]

at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367) ~[catalina.jar:9.0.17]

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929) ~[catalina.jar:9.0.17]

at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831) ~[catalina.jar:9.0.17]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.17]

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377) ~[catalina.jar:9.0.17]

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367) ~[catalina.jar:9.0.17]

at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[:1.8.0_201]

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-util.jar:9.0.17]

at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) ~[:1.8.0_201]

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902) ~[catalina.jar:9.0.17]

at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[catalina.jar:9.0.17]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.17]

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:423) ~[catalina.jar:9.0.17]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.17]

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:928) ~[catalina.jar:9.0.17]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.17]

at org.apache.catalina.startup.Catalina.start(Catalina.java:634) ~[catalina.jar:9.0.17]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[:1.8.0_201]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[:1.8.0_201]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[:1.8.0_201]

at java.lang.reflect.Method.invoke(Method.java:498) ~[:1.8.0_201]

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350) ~[bootstrap.jar:9.0.17]

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492) ~[bootstrap.jar:9.0.17]

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.spotfire.server.security.ExternalAuthenticator]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/spotfire/server/security/CustomAuthenticator

at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:184) ~[spring-beans.jar:5.1.5.RELEASE]

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117) ~[spring-beans.jar:5.1.5.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:300) ~[spring-beans.jar:5.1.5.RELEASE]

... 57 more

Caused by: java.lang.NoClassDefFoundError: com/spotfire/server/security/CustomAuthenticator

at java.lang.ClassLoader.defineClass1(Native Method) ~[:1.8.0_201]

at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[:1.8.0_201]

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[:1.8.0_201]

at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) ~[:1.8.0_201]

at java.net.URLClassLoader.access$100(URLClassLoader.java:74) ~[:1.8.0_201]

at java.net.URLClassLoader$1.run(URLClassLoader.java:369) ~[:1.8.0_201]

at java.net.URLClassLoader$1.run(URLClassLoader.java:363) ~[:1.8.0_201]

at java.security.AccessController.doPrivileged(Native Method) ~[:1.8.0_201]

at java.net.URLClassLoader.findClass(URLClassLoader.java:362) ~[:1.8.0_201]

at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[:1.8.0_201]

at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[:1.8.0_201]

at java.lang.Class.forName0(Native Method) ~[:1.8.0_201]

at java.lang.Class.forName(Class.java:348) ~[:1.8.0_201]

at org.apache.catalina

Link to comment
Share on other sites

  • 4 weeks later...

Hi,

The class that isn't found is the CustomAuthenticator interface itself. That is strange since it's included with the server. Any chance you may have brought over some extra JARs from the old installation to the new or anything like that Where are you placing your code If you could attach the startup.log file that would be helpful.

Link to comment
Share on other sites

  • 5 months later...
  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...