Изначально эта ошибка появлялась только на этапе пакета atlas-mvn, но теперь она сохраняется даже после удаления целевого объекта. каталог и пересобрать проект с нуля с помощью atlas-run.
Я перепробовал все, что мог придумать, но, похоже, ничто не помогло решить проблему. Такое ощущение, что проблема в самом SDK — проект успешно компилируется, но приложение не запускается на сервере.
Вот журнал ошибок:
Код: Выделить всё
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://3a20f3ef-c74d-403e-ab58-ca9d1f222d58_187.0:0/META-INF/spring/plugin-context.xml]; nested exception is java.lang.IllegalArgumentException: Could not find class [com.atlassian.plugins.osgi.javaconfig.configs.beans.ModuleFactoryBean]
...
2025-01-09 23:35:55,544+0500 ThreadPoolAsyncTaskExecutor::Thread 28 ERROR [o.e.g.b.e.internal.support.ExtenderConfiguration] Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=com.i2c.jira.timesheet, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://3a20f3ef-c74d-403e-ab58-ca9d1f222d58_187.0:0/META-INF/spring/plugin-context.xml]; nested exception is java.lang.IllegalArgumentException: Could not find class [com.atlassian.plugins.osgi.javaconfig.configs.beans.ModuleFactoryBean]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:417)
Код: Выделить всё
package com.i2c.jira.timesheet.config;
import com.i2c.jira.timesheet.api.MyPluginComponent;
import com.i2c.jira.timesheet.impl.MyPluginComponentImpl;
import com.atlassian.plugins.osgi.javaconfig.configs.beans.ModuleFactoryBean;
import com.atlassian.plugins.osgi.javaconfig.configs.beans.PluginAccessorBean;
import com.atlassian.sal.api.ApplicationProperties;
import org.osgi.framework.ServiceRegistration;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import static com.atlassian.plugins.osgi.javaconfig.OsgiServices.exportOsgiService;
import static com.atlassian.plugins.osgi.javaconfig.OsgiServices.importOsgiService;
@Configuration
@Import({
ModuleFactoryBean.class,
PluginAccessorBean.class
})
public class MyPluginJavaConfig {
@Bean
public ApplicationProperties applicationProperties() {
return importOsgiService(ApplicationProperties.class);
}
@Bean
public MyPluginComponent myPluginComponent(ApplicationProperties applicationProperties) {
return new MyPluginComponentImpl(applicationProperties);
}
@SuppressWarnings("rawtypes")
@Bean
public FactoryBean registerMyDelegatingService(
final MyPluginComponent mypluginComponent) {
return exportOsgiService(mypluginComponent, null, MyPluginComponent.class);
}
}
Код: Выделить всё
- Версия SDK: 8.2.7
- Версия Maven: 3.5.4
- Версия AMPS: 8.1.2
- Версия Spring: 5.3.39
Код: Выделить всё
com.atlassian.plugins
atlassian-plugins-osgi-javaconfig
${osgi.javaconfig.version}
provided
- 0.2.0
- 0.2.1
- 0.6.0
Подробнее здесь: https://stackoverflow.com/questions/793 ... actorybean
Мобильная версия