Closed myio561 closed 9 years ago
@myio561, I'm not sure, have you examined the logs? The atlassian-stash.log might contain useful info.
Found this in the log, if I recall this means I have a compatibility problem between two different Java versions. Running java -version
on the server reports 1.7.0. I built the plugin on my workstation using 1.8.
2015-05-08 12:05:23,608 INFO [UpmAsynchronousTaskManager:thread-4] gxs0onr 725x171x0 1k0pm7v 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" c.a.p.o.f.UnrecognisedModuleDescriptorFallbackFactory Unknown module descriptor of type ao registered as an unrecognised descriptor.
2015-05-08 12:05:23,624 INFO [FelixDispatchQueue] c.a.p.o.c.f.FelixOsgiContainerManager Installed bundle com.palantir.stash.stash-code-search (98)
2015-05-08 12:05:23,655 INFO [FelixDispatchQueue] c.a.p.o.c.f.FelixOsgiContainerManager Resolved bundle com.palantir.stash.stash-code-search (98)
2015-05-08 12:05:23,655 INFO [UpmAsynchronousTaskManager:thread-4] gxs0onr 725x171x0 1k0pm7v 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" o.s.o.e.s.DefaultOsgiApplicationContextCreator Discovered configurations {osgibundle:/META-INF/spring/*.xml} in bundle [com.palantir.stash.stash-code-search (com.palantir.stash.stash-code-search)]
2015-05-08 12:05:23,655 INFO [ThreadPoolAsyncTaskExecutor::Thread 41] gxs0onr 725x171x0 1k0pm7v 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" o.s.o.a.NonValidatingOsgiBundleXmlApplicationContext Refreshing org.springframework.osgi.atlassian.NonValidatingOsgiBundleXmlApplicationContext@9b63012: display name [NonValidatingOsgiBundleXmlApplicationContext(bundle=com.palantir.stash.stash-code-search, config=osgibundle:/META-INF/spring/*.xml)]; startup date [Fri May 08 12:05:23 EDT 2015]; root of context hierarchy
2015-05-08 12:05:23,655 INFO [ThreadPoolAsyncTaskExecutor::Thread 41] gxs0onr 725x171x0 1k0pm7v 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" o.s.o.a.NonValidatingOsgiBundleXmlApplicationContext Application Context service already unpublished
2015-05-08 12:05:23,796 INFO [FelixDispatchQueue] c.a.p.o.c.f.FelixOsgiContainerManager Started bundle com.palantir.stash.stash-code-search (98)
2015-05-08 12:05:23,796 INFO [ThreadPoolAsyncTaskExecutor::Thread 41] gxs0onr 725x171x0 1k0pm7v 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" o.s.b.f.xml.XmlBeanDefinitionReader Loading XML bean definitions from URL [bundle://98.0:0/META-INF/spring/atlassian-plugins-components.xml]
2015-05-08 12:05:23,796 INFO [ThreadPoolAsyncTaskExecutor::Thread 41] gxs0onr 725x171x0 1k0pm7v 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" o.s.b.f.xml.XmlBeanDefinitionReader Loading XML bean definitions from URL [bundle://98.0:0/META-INF/spring/atlassian-plugins-host-components.xml]
2015-05-08 12:05:23,796 INFO [ThreadPoolAsyncTaskExecutor::Thread 41] gxs0onr 725x171x0 1k0pm7v 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" o.s.b.f.xml.XmlBeanDefinitionReader Loading XML bean definitions from URL [bundle://98.0:0/META-INF/spring/atlassian-plugins-component-imports.xml]
2015-05-08 12:05:23,811 INFO [ThreadPoolAsyncTaskExecutor::Thread 41] gxs0onr 725x171x0 1k0pm7v 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" o.s.o.a.NonValidatingOsgiBundleXmlApplicationContext Bean factory for application context [org.springframework.osgi.atlassian.NonValidatingOsgiBundleXmlApplicationContext@9b63012]: org.springframework.beans.factory.support.DefaultListableBeanFactory@58e13fdd
2015-05-08 12:05:23,811 INFO [ThreadPoolAsyncTaskExecutor::Thread 41] gxs0onr 725x171x0 1k0pm7v 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" o.s.o.e.i.d.s.DependencyWaiterApplicationContextExecutor No outstanding OSGi service dependencies, completing initialization for NonValidatingOsgiBundleXmlApplicationContext(bundle=com.palantir.stash.stash-code-search, config=osgibundle:/META-INF/spring/*.xml)
2015-05-08 12:05:23,827 INFO [ThreadPoolAsyncTaskExecutor::Thread 42] gxs0onr 725x171x0 1k0pm7v 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" o.s.b.f.s.DefaultListableBeanFactory Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@58e13fdd: defining beans [es,es_osgiService,settings-manager,settings-manager_osgiService,repository-service-manager,repository-service-manager_osgiService,search-update-job-factory,search-update-job-factory_osgiService,search-updater,search-updater_osgiService,indexer-event-listener,git-version-validator,plugin-logger-factorty,search-filters,applicationPropertiesService,permissionValidationService,securityService,repositoryMetadataService,pageBuilderService,repositoryService,eventPublisher,scheduledExecutorService,authenticationContext,activeObjects,userManager,gitScm,applicationProperties,soyTemplateRenderer]; root of factory hierarchy
2015-05-08 12:05:23,827 INFO [ThreadPoolAsyncTaskExecutor::Thread 42] gxs0onr 725x171x0 1k0pm7v 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" o.s.b.f.s.DefaultListableBeanFactory Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@58e13fdd: defining beans [es,es_osgiService,settings-manager,settings-manager_osgiService,repository-service-manager,repository-service-manager_osgiService,search-update-job-factory,search-update-job-factory_osgiService,search-updater,search-updater_osgiService,indexer-event-listener,git-version-validator,plugin-logger-factorty,search-filters,applicationPropertiesService,permissionValidationService,securityService,repositoryMetadataService,pageBuilderService,repositoryService,eventPublisher,scheduledExecutorService,authenticationContext,activeObjects,userManager,gitScm,applicationProperties,soyTemplateRenderer]; root of factory hierarchy
2015-05-08 12:05:23,827 ERROR [ThreadPoolAsyncTaskExecutor::Thread 42] gxs0onr 725x171x0 1k0pm7v 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" c.a.plugin.osgi.factory.OsgiPlugin Unable to start the plugin container for plugin 'com.palantir.stash.stash-code-search'
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.palantir.stash.codesearch.elasticsearch.ElasticSearchImpl] for bean with name 'es' defined in URL [bundle://98.0:0/META-INF/spring/atlassian-plugins-components.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: com/palantir/stash/codesearch/elasticsearch/ElasticSearchImpl : Unsupported major.minor version 52.0
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1144) ~[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) ~[spring-context-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:1.7.0_15]
at java.lang.Thread.run(Unknown Source) ~[na:1.7.0_15]
... 10 frames trimmed
Caused by: java.lang.UnsupportedClassVersionError: com/palantir/stash/codesearch/elasticsearch/ElasticSearchImpl : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.7.0_15]
at org.springframework.util.ClassUtils.forName(ClassUtils.java:211) ~[spring-core-4.0.5.RELEASE.jar:4.0.5.RELEASE]
... 4 common frames omitted
2015-05-08 12:05:23,827 ERROR [ThreadPoolAsyncTaskExecutor::Thread 42] gxs0onr 725x171x0 1k0pm7v 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" o.s.o.e.i.a.ContextLoaderListener Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=com.palantir.stash.stash-code-search, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.palantir.stash.codesearch.elasticsearch.ElasticSearchImpl] for bean with name 'es' defined in URL [bundle://98.0:0/META-INF/spring/atlassian-plugins-components.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: com/palantir/stash/codesearch/elasticsearch/ElasticSearchImpl : Unsupported major.minor version 52.0
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1144) ~[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) ~[spring-context-4.0.5.RELEASE.jar:4.0.5.RELEASE]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_15]
at java.lang.Thread.run(Unknown Source) [na:1.7.0_15]
... 10 frames trimmed
Caused by: java.lang.UnsupportedClassVersionError: com/palantir/stash/codesearch/elasticsearch/ElasticSearchImpl : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.7.0_15]
at org.springframework.util.ClassUtils.forName(ClassUtils.java:211) ~[spring-2.5.6.SEC03-atlassian-6.jar:4.0.5.RELEASE]
... 4 common frames omitted
Yeah, so Stash is officially dropping support for java 1.7 in a nearby release. You can either upgrade to java 8 for your stash instance, or you can edit the pom.xml to produce java7 compatible jars when building the plugin.
Great, rebuilding with 1.7 compatibility level fixed it!
I installed ElasticSearch, cloned the stash-codesearch-plugin, built the plugin (mvn package). When I attempt to install the plugin in Stash, using "Upload add-on" I select the jar and click install and the progress bar goes up to about 90% and just sits there. Any idea what is going wrong?
Stash version 3.1.3