在运行我正在编写的Jira插件时出现了一个奇怪的错误。
插件编译并运行,我觉得无法找到SQLException
类型,这在插件中显然是重要的:
import java.sql.SQLException;
而且,据我所知它是Java运行时的一部分,因此我不需要包含任何其他jar。
[INFO] [talledLocalContainer] 2012-11-25 16:00:36,739 http-2990-1 ERROR [atlassian.plugin.servlet.DefaultServletModuleManager] Unable to create servlet
[INFO] [talledLocalContainer] com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.Error: Unresolved compilation problem:
[INFO] [talledLocalContainer] The constructor TestRun(String) refers to the missing type SQLException
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:152)
[INFO] [talledLocalContainer] at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:115)
[INFO] [talledLocalContainer] at com.atlassian.plugin.servlet.DefaultServletModuleManager.getServlet(DefaultServletModuleManager.java:344)
以下是关于Jira如何开始的信息,这对我来说似乎很好:
[INFO] [talledLocalContainer] ___ Java Class Paths _______________________ [INFO] [talledLocalContainer] [INFO] [talledLocalContainer] sun.boot.class.path : /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/jre/lib/resources.jar: [INFO] [talledLocalContainer] /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/jre/lib/rt.jar: [INFO] [talledLocalContainer] /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/jre/lib/sunrsasign.jar: [INFO] [talledLocalContainer] /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/jre/lib/jsse.jar: [INFO] [talledLocalContainer] /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/jre/lib/jce.jar: [INFO] [talledLocalContainer] /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/jre/lib/charsets.jar: [INFO] [talledLocalContainer] /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/jre/lib/jfr.jar: [INFO] [talledLocalContainer] /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/jre/lib/JObjC.jar: [INFO] [talledLocalContainer] /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/jre/classes [INFO] [talledLocalContainer] [INFO] [talledLocalContainer] java.library.path : /Users/sorins/Library/Java/Extensions: [INFO] [talledLocalContainer] /Library/Java/Extensions: [INFO] [talledLocalContainer] /Network/Library/Java/Extensions: [INFO] [talledLocalContainer] /System/Library/Java/Extensions: [INFO] [talledLocalContainer] /usr/lib/java: [INFO] [talledLocalContainer] . [INFO] [talledLocalContainer] [INFO] [talledLocalContainer] java.endorsed.dirs : /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/jre/lib/endorsed [INFO] [talledLocalContainer] [INFO] [talledLocalContainer] java.ext.dirs : /Users/sorins/Library/Java/Extensions: [INFO] [talledLocalContainer] /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/jre/lib/ext: [INFO] [talledLocalContainer] /Library/Java/Extensions: [INFO] [talledLocalContainer] /Network/Library/Java/Extensions: [INFO] [talledLocalContainer] /System/Library/Java/Extensions: [INFO] [talledLocalContainer] /usr/lib/java [INFO] [talledLocalContainer] [INFO] [talledLocalContainer] java.class.path : /Users/sorins/dev/jira/jira-libs.hg/plugins/testrun/target/container/tomcat6x/apache-tomcat-6.0.20/bin/bootstrap.jar: [INFO] [talledLocalContainer] /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/lib/tools.jar [INFO] [talledLocalContainer]