jira 활성 객체 구현에 초보자입니다. 내가 jTrick http://www.j-tricks.com/tutorials/active-objects-injectionJIRA 활성 객체 예외
사용하여 활성 객체를 구현하는 오류를 발견 "새로운 참조 LazyLoadedServletReference {기술자를 만들 수 없습니다 = com.atlassian.jira.demo.aoDemo : 주소 목록 (A 추가하는 서블릿과 목록 주소) [플러그인] com.atlassian.util.concurrent.LazyReference $ InitializationException : java.lang.NullPointerException : 플러그인 컨테이너 접근자가 null입니다. .jira.demo.aoDemo. 모듈 이름 : com.atlassian.jira.demo.Servlet.AddressServlet. " 내가 서블릿 생성자
종속성 코드
공공 AddressServlet에 종속성을 주입 IAOServiceImpl
public class IAOServiceImpl implements IAOService { private final ActiveObjects ao; public IAOServiceImpl(ActiveObjects ao) { System.out.println("Initializing constructor impl"); System.out.println("IAOServiceImpl constructor found active object ::"+ao); this.ao=ao; } public ActiveObjects getActiveObjects() { return this.ao; }}
에 대한 IAOService.java
public interface IAOService { public ActiveObjects getActiveObjects();}
코드에 대한
코드 (IAOServ 얼음 aoService) {
if (aoService! = null) {
this.aoService = aoService; else this.aoService = null; }플러그인에서 atlassian-plugin-scanner 기능을 비활성화합니다.
이 문제를 해결하려면 저를 도우십시오.
또한 플러그인 설명자 파일에서 ao 모듈에 대해서도 언급합니다.
플러그인 디스크립터 번호 :
<ao key="ao-module">
<description>Configuration of active object service</description>
<entity>sample.AddressEntity</entity>
<component-import key="ao" name="Active Objects service" interface="com.atlassian.activeobjects.external.ActiveObjects">
<description>Component to access Active Objects functionality from the plugin</description></component-import>
치어 코드
<pluginArtifact>
<groupId>com.atlassian.activeobjects</groupId>
<artifactId>activeobjects-plugin</artifactId>
<version>${ao.version}</version>
</pluginArtifact>
<pluginArtifact>
<groupId>com.atlassian.activeobjects</groupId>
<artifactId>activeobjects-jira-spi</artifactId>
<version>${ao.version}</version>
</pluginArtifact>
Ao.version 0.18
예외 스택
인 515,[INFO] talledLocalContainer] 2016년 9월 14일 11 : 26 : 37,451 HTTP-NIO-2990-간부 -2- DEBUG 관리 686x211x1 1x1imyf 172.17.20.51 /rest/plugins/1.0/com.atlassian. jira.demo.aoDemo 키 [caactiveobjects.osgi.OsgiServiceUtilsImpl] 서비스 인터페이스와 net.java.ao.schema.TableNameConverter [email protected] 및 속성 {com.atlassian 등록. plugin.key = com.atlassian.jira.demo.aoDemo} [INFO] [talledLocalContainer] 2016-09-14 11 : 26 : 37,453 http-nio-2990-exec-2 DEBUG 관리자 686x211x1 1x1imyf 172.17.20.51 /나머지/플러그인/1.0/com.atlassian.jira.demo .aoDemo-key [c.a.activeobjects.osgi.OsgiServiceUtilsImpl] 등록 서비스 com.atlassian.activeobjects.config.internal.DefaultActiveObjectsConfiguration @ 인터페이스 com.atlassian.activeobjects.config.ActiveObjectsConfiguration 및 특성 com.atlassian.plugin.key = {} com.atlassian.jira.demo.aoDemo [INFO] talledLocalContainer] 2016년 9월 14일와 7e886a2b 11 : 26 : 37,457 http-nio-2990-exec-2 디버그 관리자 686x211x1 1x1imyf 172.17.20.51 /rest/plugins/1.0/com.atlassian.jira.demo.aoDemo-key [caactiveobjects.osgi.ActiveObjectsServiceFactory] 26 : 37,463 HTTP-NIO-2990-간부 -2- DEBUG 관리 686x211x1 1x1imyf [INFO] [talledLocalContainer] 2016년 9월 14일 11 com.atlassian.jira.demo.aoDemo]의 부착 구성 모듈 기억 onPluginModuleEnabledEvent 172.17.20.51 /rest/plugins/1.0/com.atlassian.jira.demo.aoDemo-key [caactiveobjects.osgi.ActiveObjectsServiceFactory] onPluginEnabledEvent는 [com.atlassian.jira.demo.aoDemo] [INFO] talledLocalContainer에 부착 바운드 ] 2016-09-14 11 : 26 : 37,463 http-nio-2990-exec-2 디버그 관리자 686x211x1 1x1imyf 172.17.20.51 /rest/plugins/1.0/com.atlassian.jira.demo.aoDemo-key [ caactobjects.osgi.TenantAwareActiveObjects] init 번들 [정보] [talledLocalContainer] 2016-09-14 11 : 26 : 37,464 http-nio-2990-exec-2 디버그 관리자 686x211x1 1x1imyf 172.17.20.51 /rest/plugins/1.0/com.atlassian.jira.demo.aoDemo-key[caactiveobjects.osgi.TenantAwareActiveObjects] 번들 [com.atlassian.jira.demo.aoDemo] JiraTenantImpl {ID = '시스템'} [INFO] talledLocalContainer] 2016년 9월 14일 11 AO 새로운 약속을로드 : 26 : 37,464 http-nio-2990-exec-2 디버그 관리 686x211x1 1x1imyf 172.17.20.51 /rest/plugins/1.0/com.atlassian.jira.demo.aoDemo-key [caactobjects.osgi.TenantAwareActiveObjects] setAoConfiguration [com .atlassian.jira.demo.aoDemo] [INFO] [talledLocalContainer] 2016-09-14 11 : 26 : 37,464 http-nio-2990-exec-2 디버그 관리 686x211x1 1x1imyf 172.17.20.51 /rest/plugins/1.0 /com.atlassian.jira.demo.aoDemo-key [caactobjects.osgi.TenantAwareActiveObjects] 번들 [com.atla [정보] [talledLocalContainer] 2016-09-14 11 : 26 : 37,474 활성 객체 - 초기화 - JiraTenantImpl {id = '시스템'} - 0 디버그 관리자
[ca.aira.demo.aoDemo] ActiveObjects를 생성하는 [] [talledLocalContainer] 2016-09-14 11 : 26 : 37,488 active-objects-init-JiraTenantImpl {id = 'activeobjects.osgi.TenantAwareActiveObjects] 번들 [com.atlassian.jira.demo.aoDemo] 시스템 '} - 0 DEBUG 관리
[caactiveobjects.osgi.TenantAwareActiveObjects] 번들 [com.atlassian.jira.demo.aoDemo] 생성 ActiveObjects [INFO] [talledLocalContainer] 2016년 9월 14일 11 : 26 : 47,872 HTTP -nio-2990-exec-9 오류 관리자 686x226x1 1x1imyf 172.1 7.20.51/플러그인은 [caplugin.servlet.DefaultServletModuleManager] 새로운 참조 LazyLoadedServletReference {디스크립터를 생성 할 수 없습니다 = com.atlassian.jira.demo.aoDemo은/서블릿/addressservlet : 어드레스 목록 (A 서블릿이 추가 및 목록 주소), s[email protected]3a0a701} 이 [정보] [talledLocalContainer] com.atlassian.util.concurrent.LazyReference $ InitializationException가 : java.lang.NullPointerException이 : 플러그인 컨테이너 접근이 없는. 플러그인 : com.atlassian.jira.demo.aoDemo. 모듈 이름 : com.atlassian.jira.demo.Servlet.AddressServlet.[INFO] [talledLocalContainer] com.atlassian.util.concurrent.LazyReference.get에서 com.atlassian.util.concurrent.LazyReference.getInterruptibly (LazyReference.java:149) [INFO] talledLocalContainer (LazyReference에서. 자바 : 112) [INFO] talledLocalContainer] com.atlassian.plugin.servlet.DefaultServletModuleManager.getInstance (DefaultServletModuleManager.java:374) [INFO] talledLocalContainer] 에서 com.atlassian.plugin.servlet.DefaultServletModuleManager에서. getServlet (DefaultServletModuleManager.java:351) [정보] [talledLocalContainer] 에 com.atlassian.plugin.servlet.DefaultServletModuleManager.getServlet (DefaultServletModuleManager.java:171) [정보] [talledLocalContainer] com.atlassian.plugin.servlet.ServletModuleContainerServlet.service (ServletModuleContainerServlet.java:36) [INFO] talledLocalContainer] javax.servlet.http.HttpServlet.service (HttpServlet.java:725)에서 [INFO에서 ] [talledLocalContainer] 70 ... 여과 [INFO] talledLocalContainer] com.atlassian.labs.httpservice.resource.ResourceFilter.doFilter (ResourceFilter.java:59)에서 [INFO] talledLocalContainer] ... (38) 여과 [INFO] [talledLocalContainer] com.atlassian.jira.security.JiraSecurityFilter.doFilter (JiraSecurityFilter.java:70) [INFO] talledLocalContainer] 91 ... 여과 [INFO] [talledLocalContainer]를,617에서의 451,515,java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142) [INFO] talledLocalContainer] java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java:617) [INFO]에서 talledLocalContainer ]에서 org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run (TaskThread.java:61) [정보] [talledLocalContainer]에서 java.lang.Thread.run (Thread.java:745) [정보 ] [talledLocalContainer] 발생 원인 : java.lang.NullPointerException : 플러그인 컨테이너 접근 자 이 null입니다. 플러그인 : com.atlassian.jira.demo.aoDemo. 모듈 이름 : com.atlassian.jira.demo.Servlet.AddressServlet. [INFO] [talledLocalContainer] com.google.common.base.Preconditions.checkNotNull (Preconditions.java:250) [INFO] talledLocalContainer] com.atlassian.plugin.module.ClassPrefixModuleFactory.createModule에서 (ClassPrefixModuleFactory에서. 자바 32) [INFO] talledLocalContainer] com.atlassian.plugin.module.PrefixDelegatingModuleFactory.createModule (PrefixDelegatingModuleFactory.java:88) [INFO] talledLocalContainer]에서 com.atlassian.plugin.servlet.descriptors에서. ServletModuleDescriptor.getModule (ServletModuleDescriptor.java:43) [정보] [talledLocalContainer] at com.atlassian.plugin.servlet.DelegatingPluginServlet. (DelegatingPluginServlet.java:30) [INF O] talledLocalContainer] com.atlassian.plugin.servlet.DefaultServletModuleManager $ LazyLoadedServletReference.create (DefaultServletModuleManager.java:456) [INFO] talledLocalContainer] 위치에 com.atlassian.util.concurrent.LazyReference $ Sync.run (AT LazyReference.java:325) [INFO] talledLocalContainer] com.atlassian.util.concurrent.LazyReference.getInterruptibly (LazyReference.java:143) [INFO]에서 [talledLocalContainer] ... (211) 이상의
코드의 전체 예제를 게시 할 수 있습니까? –
예. 이것이 내 코드입니다.'final final ActiveObjects ao; \t \t public ActiveServiceImpl() { \t \t this.ao = ComponentAccessor.getOSGiComponentInstanceOfType (ActiveObjects.class); \t \t System.out.println ("---------------------------------------- --------------------------------- "); \t \t System.out.println ("ActiveObject 인스턴스는"+ this.ao); \t} \t \t 공공 무효는 addEntity (문자열 이름, 문자열 주소, 문자열 국가) { \t \t \t} \t' –
1 코드를 추가하는 대신에 원래의 질문을 수정 주실 래요 주석에 삽입 (줄 끝은 제거됩니다)? 2 - 게시 한 코드가 실제로 작동하지 않는다고 말한 "activeobject.create()"에 대한 호출을 실제로 표시하지 않습니다. 3 전체 예외 게시 (전체 예외 유형 및 스택 추적의 후속 행 포함) 도움이 될 것입니다. –