在运行maven打包程序或者使用maven运行单测的时候,遇到下面的问题:
写道
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:94)
at org.springframework.test.context.DefaultTestContext.getApplicationContext(DefaultTestContext.java:72)
at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)
at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:212)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:200)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:259)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:261)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:219)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.lang.SecurityException: class "javax.servlet.ServletRegistration$Dynamic"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:806)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:625)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2436)
at java.lang.Class.getDeclaredMethods(Class.java:1793)
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:571)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:488)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:474)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:241)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1065)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1038)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:125)
at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:109)
at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:261)
at org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:68)
at org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:86)
... 25 more
at org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:94)
at org.springframework.test.context.DefaultTestContext.getApplicationContext(DefaultTestContext.java:72)
at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)
at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:212)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:200)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:259)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:261)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:219)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.lang.SecurityException: class "javax.servlet.ServletRegistration$Dynamic"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:806)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:625)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2436)
at java.lang.Class.getDeclaredMethods(Class.java:1793)
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:571)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:488)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:474)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:241)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1065)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1038)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:125)
at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:109)
at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:261)
at org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:68)
at org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:86)
... 25 more
看了看,主要是说:在classpath里面存在一个同名同包的类出现了多次,造成程序运行的过程中无法确定具体引用那个类来运行程序。
maven引入jar的时候,这些pom.xml里面声明的jar还会依赖于别的jar,会被maven自动下载下来放入classpath里面。这个时候就会造成同名同包的jar被多次引用。
知道了问题,就需要进行解决:将那么多余的同名同包的jar进行排查,只留下一个合适的jar。
如何排除呢?如下:
<dependency> <groupId>com.baidu.rigel.dmap</groupId> <artifactId>dmap-business</artifactId> <version>${project.version}</version> <scope>test</scope> <type>test-jar</type> <exclusions> <exclusion> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> </exclusion> </exclusions> </dependency>
使用 exclusions 将这些jar排查。
那么如何确定有哪些jar是同名同包冲突的呢?
可以执行maven的一个命令,查找依赖关系树:
mvn -f=D:\baidu\workspaces\workspace_java\dmap\dmap-scheduleframework\pom.xml dependency:tree > d:\dependency.tree.txt
这样就可以将这些依赖关系保存在文件中,如下:
写道
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.kanpiaoxue.rigel.dmap:dmap-scheduleframework:jar:1.0
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: mysql:mysql-connector-java:jar -> version (?) vs 5.1.13 @ org.kanpiaoxue.rigel.dmap:dmap-scheduleframework:[unknown-version], D:\baidu\workspaces\workspace_java\dmap\dmap-scheduleframework\pom.xml, line 492, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building dmap-scheduleframework 1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact freemarker:freemarker:jar:2.3.9 has been relocated to org.freemarker:freemarker:jar:2.3.9
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ dmap-scheduleframework ---
[WARNING] The artifact freemarker:freemarker:jar:2.3.9 has been relocated to org.freemarker:freemarker:jar:2.3.9
[INFO] org.kanpiaoxue.rigel.dmap:dmap-scheduleframework:jar:1.0
[INFO] +- org.kanpiaoxue.uic:uic-client:jar:2.0.0:compile
[INFO] | +- org.apache.cxf:cxf-rt-core:jar:2.7.5:compile
[INFO] | | +- org.apache.cxf:cxf-api:jar:2.7.5:compile
[INFO] | | | +- org.codehaus.woodstox:woodstox-core-asl:jar:4.2.0:compile
[INFO] | | | | \- org.codehaus.woodstox:stax2-api:jar:3.1.1:compile
[INFO] | | | \- wsdl4j:wsdl4j:jar:1.6.3:compile
[INFO] | | +- com.sun.xml.bind:jaxb-impl:jar:2.2.6:compile
[INFO] | | +- org.apache.ws.xmlschema:xmlschema-core:jar:2.0.3:compile
[INFO] | | \- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile
[INFO] | +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.7.5:compile
[INFO] | | +- xml-resolver:xml-resolver:jar:1.2:compile
[INFO] | | +- asm:asm:jar:3.3.1:compile
[INFO] | | +- org.apache.cxf:cxf-rt-bindings-soap:jar:2.7.5:compile
[INFO] | | | \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:2.7.5:compile
[INFO] | | +- org.apache.cxf:cxf-rt-bindings-xml:jar:2.7.5:compile
[INFO] | | +- org.apache.cxf:cxf-rt-frontend-simple:jar:2.7.5:compile
[INFO] | | \- org.apache.cxf:cxf-rt-ws-addr:jar:2.7.5:compile
[INFO] | | \- org.apache.cxf:cxf-rt-ws-policy:jar:2.7.5:compile
[INFO] | | \- org.apache.neethi:neethi:jar:3.0.2:compile
[INFO] | +- org.apache.cxf:cxf-rt-transports-http:jar:2.7.5:compile
[INFO] | \- commons-lang:commons-lang:jar:2.4:compile
[INFO] +- net.sf.ehcache:ehcache:jar:2.8.3:compile
[INFO] +- org.kanpiaoxue.rigel.dmap:dmap-commons:jar:1.0:compile
[INFO] | \- commons-validator:commons-validator:jar:1.4.0:compile
[INFO] | \- commons-digester:commons-digester:jar:1.8:compile
[INFO] +- org.kanpiaoxue.rigel.dmap:dmap-protobuf:jar:1.0:compile
[INFO] +- org.kanpiaoxue.rigel.dmap:dmap-business:test-jar:tests:1.0:test
[INFO] | +- org.springframework:spring-context-support:jar:4.1.6.RELEASE:compile
[INFO] | \- org.kanpiaoxue:bjf:jar:1.0.0.9:compile
[INFO] | +- org.kanpiaoxue:bjf-management:jar:1.0.0.2:compile
[INFO] | +- org.kanpiaoxue:bjf-tcom-compatible:jar:1.0.0.0:compile
[INFO] | +- org.kanpiaoxue.rigel:tcom-base:jar:1.0.0.6.2:compile
[INFO] | | \- com.ibm.icu:icu4j:jar:49.1:compile
[INFO] | +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] | +- org.hibernate:hibernate:jar:3.2.7.ga:compile
[INFO] | | +- asm:asm-attrs:jar:1.5.3:compile
[INFO] | | +- antlr:antlr:jar:2.7.6:compile
[INFO] | | \- cglib:cglib:jar:2.1_3:compile
[INFO] | +- org.jasypt:jasypt:jar:1.6:compile
[INFO] | +- com.google:jsonplugin:jar:0.30:compile
[INFO] | +- javax.annotation:jsr250-api:jar:1.0:compile
[INFO] | +- org.apache.struts:struts2-convention-plugin:jar:2.2.1:compile
[INFO] | +- org.kanpiaoxue.rigel.tmp:struts2-core:jar:2.2.1.1.1:compile
[INFO] | +- org.ostermiller:utils:jar:1.07.00:compile
[INFO] | +- commons-net:commons-net:jar:2.0:compile
[INFO] | +- org.hibernate:hibernate-annotations:jar:3.4.0.GA:compile
[INFO] | | +- org.hibernate:ejb3-persistence:jar:1.0.2.GA:compile
[INFO] | | \- org.hibernate:hibernate-commons-annotations:jar:3.1.0.GA:compile
[INFO] | +- org.kanpiaoxue.rigel.tmp:mcpack:jar:1.0.1:compile
[INFO] | +- org.kanpiaoxue.rigel.tmp:json-rpc:jar:1.1.2:compile
[INFO] | +- org.kanpiaoxue.rigel.tmp:wireformat:jar:1.0:compile
[INFO] | +- org.kanpiaoxue.rigel:security-client:jar:1.0.0.0:compile
[INFO] | +- net.spy:memcached:jar:2.1:compile
[INFO] | +- com.caucho:hessian:jar:3.2.0:compile
[INFO] | +- net.spy:spy:jar:2.4:compile
[INFO] | +- org.apache.struts.xwork:xwork-core:jar:2.2.1.1:compile
[INFO] | | \- ognl:ognl:jar:3.0:compile
[INFO] | +- oro:oro:jar:2.0.8:compile
[INFO] | +- org.apache.velocity:velocity:jar:1.6.3:compile
[INFO] | +- javax.servlet.jsp:jsp-api:jar:2.1:compile
[INFO] | +- redis.clients:jedis:jar:2.0.0:compile
[INFO] | \- velocity-tools:velocity-tools:jar:1.4:compile
[INFO] +- org.kanpiaoxue.rigel.dmap:dmap-business:jar:1.0:compile
[INFO] +- org.kanpiaoxue.rigel.drun:drun-client:jar:1.0:compile
[INFO] +- org.kanpiaoxue.rigel.drun:drun-commons:jar:1.0:compile
[INFO] | \- io.netty:netty:jar:3.8.0.Final:compile
[INFO] +- io.netty:netty-all:jar:4.0.24.Final:compile
[INFO] +- org.freemarker:freemarker:jar:2.3.9:compile
[INFO] +- org.apache.zookeeper:zookeeper:jar:3.4.5:compile
[INFO] | \- jline:jline:jar:0.9.94:compile
[INFO] +- com.google.protobuf:protobuf-java:jar:2.6.0:compile
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.3.2:compile
[INFO] +- org.apache.httpcomponents:httpcore:jar:4.3.2:compile
[INFO] +- org.apache.thrift:libthrift:jar:0.9.1:compile
[INFO] +- commons-pool:commons-pool:jar:1.6:compile
[INFO] +- commons-io:commons-io:jar:2.4:compile
[INFO] +- com.google.code.gson:gson:jar:2.2.2:compile
[INFO] +- commons-configuration:commons-configuration:jar:1.10:compile
[INFO] +- org.apache.curator:curator-recipes:jar:2.7.0:compile
[INFO] | \- org.apache.curator:curator-framework:jar:2.7.0:compile
[INFO] | \- org.apache.curator:curator-client:jar:2.7.0:compile
[INFO] +- org.apache.curator:curator-x-discovery:jar:2.7.0:compile
[INFO] | \- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] +- org.kanpiaoxue.cap:billboard-client:jar:2.0.0.1:compile
[INFO] +- joda-time:joda-time:jar:2.5:compile
[INFO] +- org.eclipse.jetty.aggregate:jetty-all:jar:8.1.17.v20150415:compile
[INFO] | \- org.eclipse.jetty.orbit:javax.servlet:jar:3.0.0.v201112011016:compile
[INFO] +- com.google.guava:guava:jar:18.0:compile
[INFO] +- junit:junit:jar:4.11:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.easymock:easymock:jar:3.2:test
[INFO] | +- cglib:cglib-nodep:jar:2.2.2:test
[INFO] | \- org.objenesis:objenesis:jar:1.3:test
[INFO] +- org.powermock:powermock-module-junit4-rule-agent:jar:1.5.6:test
[INFO] | \- org.powermock:powermock-module-javaagent:jar:1.5.6:test
[INFO] +- org.powermock.tests:powermock-tests-utils:jar:1.5.6:test
[INFO] +- org.powermock:powermock-core:jar:1.5.6:test
[INFO] | +- org.powermock:powermock-reflect:jar:1.5.6:test
[INFO] | \- org.javassist:javassist:jar:3.18.2-GA:test
[INFO] +- org.powermock:powermock-module-junit4:jar:1.5.6:test
[INFO] | \- org.powermock:powermock-module-junit4-common:jar:1.5.6:test
[INFO] +- org.powermock:powermock-api-mockito:jar:1.5.6:test
[INFO] | +- org.mockito:mockito-all:jar:1.9.5:test
[INFO] | \- org.powermock:powermock-api-support:jar:1.5.6:test
[INFO] +- org.powermock:powermock-classloading-xstream:jar:1.5.6:test
[INFO] | +- org.powermock:powermock-classloading-base:jar:1.5.6:test
[INFO] | \- com.thoughtworks.xstream:xstream:jar:1.4.2:test
[INFO] | +- xmlpull:xmlpull:jar:1.1.3.1:test
[INFO] | \- xpp3:xpp3_min:jar:1.1.4c:test
[INFO] +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] +- mysql:mysql-connector-java:jar:5.1.13:compile
[INFO] +- commons-beanutils:commons-beanutils:jar:1.8.3:compile
[INFO] +- commons-codec:commons-codec:jar:1.8:compile
[INFO] +- commons-dbcp:commons-dbcp:jar:1.4:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.1:compile
[INFO] +- com.alibaba:fastjson:jar:1.1.41:compile
[INFO] +- javax.transaction:jta:jar:1.1:compile
[INFO] +- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- javax.mail:mail:jar:1.4.3:compile
[INFO] +- javax.activation:activation:jar:1.1:compile
[INFO] +- org.quartz-scheduler:quartz:jar:2.2.1:compile
[INFO] | \- c3p0:c3p0:jar:0.9.1.1:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.3:compile
[INFO] +- org.aspectj:aspectjweaver:jar:1.7.4:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.1:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.1:compile
[INFO] +- log4j:log4j:jar:1.2.17:compile
[INFO] +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] +- org.springframework:spring-context:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-aop:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-aspects:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-beans:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-core:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-expression:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-instrument:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-jdbc:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-jms:jar:4.1.6.RELEASE:compile
[INFO] | \- org.springframework:spring-messaging:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-orm:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-oxm:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-test:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-tx:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-web:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-webmvc:jar:4.1.6.RELEASE:compile
[INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.3.0:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.3.0:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.3.0:compile
[INFO] \- com.dbdeploy:maven-dbdeploy-plugin:maven-plugin:3.0M3:compile
[INFO] +- org.apache.maven:maven-plugin-api:jar:2.0:compile
[INFO] \- com.dbdeploy:dbdeploy-core:jar:3.0M3:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.857 s
[INFO] Finished at: 2015-07-20T21:40:00+08:00
[INFO] Final Memory: 16M/216M
[INFO] ------------------------------------------------------------------------
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.kanpiaoxue.rigel.dmap:dmap-scheduleframework:jar:1.0
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: mysql:mysql-connector-java:jar -> version (?) vs 5.1.13 @ org.kanpiaoxue.rigel.dmap:dmap-scheduleframework:[unknown-version], D:\baidu\workspaces\workspace_java\dmap\dmap-scheduleframework\pom.xml, line 492, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building dmap-scheduleframework 1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact freemarker:freemarker:jar:2.3.9 has been relocated to org.freemarker:freemarker:jar:2.3.9
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ dmap-scheduleframework ---
[WARNING] The artifact freemarker:freemarker:jar:2.3.9 has been relocated to org.freemarker:freemarker:jar:2.3.9
[INFO] org.kanpiaoxue.rigel.dmap:dmap-scheduleframework:jar:1.0
[INFO] +- org.kanpiaoxue.uic:uic-client:jar:2.0.0:compile
[INFO] | +- org.apache.cxf:cxf-rt-core:jar:2.7.5:compile
[INFO] | | +- org.apache.cxf:cxf-api:jar:2.7.5:compile
[INFO] | | | +- org.codehaus.woodstox:woodstox-core-asl:jar:4.2.0:compile
[INFO] | | | | \- org.codehaus.woodstox:stax2-api:jar:3.1.1:compile
[INFO] | | | \- wsdl4j:wsdl4j:jar:1.6.3:compile
[INFO] | | +- com.sun.xml.bind:jaxb-impl:jar:2.2.6:compile
[INFO] | | +- org.apache.ws.xmlschema:xmlschema-core:jar:2.0.3:compile
[INFO] | | \- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile
[INFO] | +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.7.5:compile
[INFO] | | +- xml-resolver:xml-resolver:jar:1.2:compile
[INFO] | | +- asm:asm:jar:3.3.1:compile
[INFO] | | +- org.apache.cxf:cxf-rt-bindings-soap:jar:2.7.5:compile
[INFO] | | | \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:2.7.5:compile
[INFO] | | +- org.apache.cxf:cxf-rt-bindings-xml:jar:2.7.5:compile
[INFO] | | +- org.apache.cxf:cxf-rt-frontend-simple:jar:2.7.5:compile
[INFO] | | \- org.apache.cxf:cxf-rt-ws-addr:jar:2.7.5:compile
[INFO] | | \- org.apache.cxf:cxf-rt-ws-policy:jar:2.7.5:compile
[INFO] | | \- org.apache.neethi:neethi:jar:3.0.2:compile
[INFO] | +- org.apache.cxf:cxf-rt-transports-http:jar:2.7.5:compile
[INFO] | \- commons-lang:commons-lang:jar:2.4:compile
[INFO] +- net.sf.ehcache:ehcache:jar:2.8.3:compile
[INFO] +- org.kanpiaoxue.rigel.dmap:dmap-commons:jar:1.0:compile
[INFO] | \- commons-validator:commons-validator:jar:1.4.0:compile
[INFO] | \- commons-digester:commons-digester:jar:1.8:compile
[INFO] +- org.kanpiaoxue.rigel.dmap:dmap-protobuf:jar:1.0:compile
[INFO] +- org.kanpiaoxue.rigel.dmap:dmap-business:test-jar:tests:1.0:test
[INFO] | +- org.springframework:spring-context-support:jar:4.1.6.RELEASE:compile
[INFO] | \- org.kanpiaoxue:bjf:jar:1.0.0.9:compile
[INFO] | +- org.kanpiaoxue:bjf-management:jar:1.0.0.2:compile
[INFO] | +- org.kanpiaoxue:bjf-tcom-compatible:jar:1.0.0.0:compile
[INFO] | +- org.kanpiaoxue.rigel:tcom-base:jar:1.0.0.6.2:compile
[INFO] | | \- com.ibm.icu:icu4j:jar:49.1:compile
[INFO] | +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] | +- org.hibernate:hibernate:jar:3.2.7.ga:compile
[INFO] | | +- asm:asm-attrs:jar:1.5.3:compile
[INFO] | | +- antlr:antlr:jar:2.7.6:compile
[INFO] | | \- cglib:cglib:jar:2.1_3:compile
[INFO] | +- org.jasypt:jasypt:jar:1.6:compile
[INFO] | +- com.google:jsonplugin:jar:0.30:compile
[INFO] | +- javax.annotation:jsr250-api:jar:1.0:compile
[INFO] | +- org.apache.struts:struts2-convention-plugin:jar:2.2.1:compile
[INFO] | +- org.kanpiaoxue.rigel.tmp:struts2-core:jar:2.2.1.1.1:compile
[INFO] | +- org.ostermiller:utils:jar:1.07.00:compile
[INFO] | +- commons-net:commons-net:jar:2.0:compile
[INFO] | +- org.hibernate:hibernate-annotations:jar:3.4.0.GA:compile
[INFO] | | +- org.hibernate:ejb3-persistence:jar:1.0.2.GA:compile
[INFO] | | \- org.hibernate:hibernate-commons-annotations:jar:3.1.0.GA:compile
[INFO] | +- org.kanpiaoxue.rigel.tmp:mcpack:jar:1.0.1:compile
[INFO] | +- org.kanpiaoxue.rigel.tmp:json-rpc:jar:1.1.2:compile
[INFO] | +- org.kanpiaoxue.rigel.tmp:wireformat:jar:1.0:compile
[INFO] | +- org.kanpiaoxue.rigel:security-client:jar:1.0.0.0:compile
[INFO] | +- net.spy:memcached:jar:2.1:compile
[INFO] | +- com.caucho:hessian:jar:3.2.0:compile
[INFO] | +- net.spy:spy:jar:2.4:compile
[INFO] | +- org.apache.struts.xwork:xwork-core:jar:2.2.1.1:compile
[INFO] | | \- ognl:ognl:jar:3.0:compile
[INFO] | +- oro:oro:jar:2.0.8:compile
[INFO] | +- org.apache.velocity:velocity:jar:1.6.3:compile
[INFO] | +- javax.servlet.jsp:jsp-api:jar:2.1:compile
[INFO] | +- redis.clients:jedis:jar:2.0.0:compile
[INFO] | \- velocity-tools:velocity-tools:jar:1.4:compile
[INFO] +- org.kanpiaoxue.rigel.dmap:dmap-business:jar:1.0:compile
[INFO] +- org.kanpiaoxue.rigel.drun:drun-client:jar:1.0:compile
[INFO] +- org.kanpiaoxue.rigel.drun:drun-commons:jar:1.0:compile
[INFO] | \- io.netty:netty:jar:3.8.0.Final:compile
[INFO] +- io.netty:netty-all:jar:4.0.24.Final:compile
[INFO] +- org.freemarker:freemarker:jar:2.3.9:compile
[INFO] +- org.apache.zookeeper:zookeeper:jar:3.4.5:compile
[INFO] | \- jline:jline:jar:0.9.94:compile
[INFO] +- com.google.protobuf:protobuf-java:jar:2.6.0:compile
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.3.2:compile
[INFO] +- org.apache.httpcomponents:httpcore:jar:4.3.2:compile
[INFO] +- org.apache.thrift:libthrift:jar:0.9.1:compile
[INFO] +- commons-pool:commons-pool:jar:1.6:compile
[INFO] +- commons-io:commons-io:jar:2.4:compile
[INFO] +- com.google.code.gson:gson:jar:2.2.2:compile
[INFO] +- commons-configuration:commons-configuration:jar:1.10:compile
[INFO] +- org.apache.curator:curator-recipes:jar:2.7.0:compile
[INFO] | \- org.apache.curator:curator-framework:jar:2.7.0:compile
[INFO] | \- org.apache.curator:curator-client:jar:2.7.0:compile
[INFO] +- org.apache.curator:curator-x-discovery:jar:2.7.0:compile
[INFO] | \- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] +- org.kanpiaoxue.cap:billboard-client:jar:2.0.0.1:compile
[INFO] +- joda-time:joda-time:jar:2.5:compile
[INFO] +- org.eclipse.jetty.aggregate:jetty-all:jar:8.1.17.v20150415:compile
[INFO] | \- org.eclipse.jetty.orbit:javax.servlet:jar:3.0.0.v201112011016:compile
[INFO] +- com.google.guava:guava:jar:18.0:compile
[INFO] +- junit:junit:jar:4.11:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.easymock:easymock:jar:3.2:test
[INFO] | +- cglib:cglib-nodep:jar:2.2.2:test
[INFO] | \- org.objenesis:objenesis:jar:1.3:test
[INFO] +- org.powermock:powermock-module-junit4-rule-agent:jar:1.5.6:test
[INFO] | \- org.powermock:powermock-module-javaagent:jar:1.5.6:test
[INFO] +- org.powermock.tests:powermock-tests-utils:jar:1.5.6:test
[INFO] +- org.powermock:powermock-core:jar:1.5.6:test
[INFO] | +- org.powermock:powermock-reflect:jar:1.5.6:test
[INFO] | \- org.javassist:javassist:jar:3.18.2-GA:test
[INFO] +- org.powermock:powermock-module-junit4:jar:1.5.6:test
[INFO] | \- org.powermock:powermock-module-junit4-common:jar:1.5.6:test
[INFO] +- org.powermock:powermock-api-mockito:jar:1.5.6:test
[INFO] | +- org.mockito:mockito-all:jar:1.9.5:test
[INFO] | \- org.powermock:powermock-api-support:jar:1.5.6:test
[INFO] +- org.powermock:powermock-classloading-xstream:jar:1.5.6:test
[INFO] | +- org.powermock:powermock-classloading-base:jar:1.5.6:test
[INFO] | \- com.thoughtworks.xstream:xstream:jar:1.4.2:test
[INFO] | +- xmlpull:xmlpull:jar:1.1.3.1:test
[INFO] | \- xpp3:xpp3_min:jar:1.1.4c:test
[INFO] +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] +- mysql:mysql-connector-java:jar:5.1.13:compile
[INFO] +- commons-beanutils:commons-beanutils:jar:1.8.3:compile
[INFO] +- commons-codec:commons-codec:jar:1.8:compile
[INFO] +- commons-dbcp:commons-dbcp:jar:1.4:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.1:compile
[INFO] +- com.alibaba:fastjson:jar:1.1.41:compile
[INFO] +- javax.transaction:jta:jar:1.1:compile
[INFO] +- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- javax.mail:mail:jar:1.4.3:compile
[INFO] +- javax.activation:activation:jar:1.1:compile
[INFO] +- org.quartz-scheduler:quartz:jar:2.2.1:compile
[INFO] | \- c3p0:c3p0:jar:0.9.1.1:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.3:compile
[INFO] +- org.aspectj:aspectjweaver:jar:1.7.4:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.1:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.1:compile
[INFO] +- log4j:log4j:jar:1.2.17:compile
[INFO] +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] +- org.springframework:spring-context:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-aop:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-aspects:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-beans:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-core:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-expression:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-instrument:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-jdbc:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-jms:jar:4.1.6.RELEASE:compile
[INFO] | \- org.springframework:spring-messaging:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-orm:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-oxm:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-test:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-tx:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-web:jar:4.1.6.RELEASE:compile
[INFO] +- org.springframework:spring-webmvc:jar:4.1.6.RELEASE:compile
[INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.3.0:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.3.0:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.3.0:compile
[INFO] \- com.dbdeploy:maven-dbdeploy-plugin:maven-plugin:3.0M3:compile
[INFO] +- org.apache.maven:maven-plugin-api:jar:2.0:compile
[INFO] \- com.dbdeploy:dbdeploy-core:jar:3.0M3:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.857 s
[INFO] Finished at: 2015-07-20T21:40:00+08:00
[INFO] Final Memory: 16M/216M
[INFO] ------------------------------------------------------------------------
在这个文件里面搜索报错的类就能找到。我报错的是servlet被多次引入。可以在这个文件里面搜索servlet,看看有哪些jar额外的引入了servlet。只保留一个即可。
还可以参考:http://stackoverflow.com/questions/2877262/java-securityexception-signer-information-does-not-match
相关推荐
在与银联的对接中,调试过程中报错或使用类似登入加密:java.lang.SecurityException: JCE cannot authenticate the provider BC 进行问题解决,里面包含 bcprov-jdk16-143.jar与bcprov-jdk15-135.jar与具体文件存放...
org.bouncycastle.openssl.PEMException: problem parsing ENCRYPTED PRIVATE KEY: java.lang.SecurityException: JCE cannot authenticate the provider BC at org.bouncycastle.openssl.PEMReader$...
标题中的“jboss7.1.1下报java.lang.SecurityException: JCE cannot authenticate the provider BC”是一个典型的Java安全异常,通常发生在尝试使用不受信任的加密提供者时。在这个问题中,"BC"指的是Bouncy Castle...
标题 "system.Security.SecurityException 不受信任" 指的是在编程过程中遇到的一种特定错误,它属于 .NET Framework 的安全异常类型。此异常通常发生在代码尝试执行一个被安全策略禁止的操作时,例如访问受保护的...
java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package at java.lang....
08-13 18:29:22.924: E/AndroidRuntime(1875): Caused by: Java.lang.ClassNotFoundException:XXXXX in loader dalvik.system.PathClassLoader[/data/app/XXXX.apk] 我想大家经常因为疏忽出现...
public class DatabaseAccess { public void accessCount() { try { InitialContext ic = new InitialContext(); DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/MyDataSource"); Connection ...
* pageContext 对象:表示一个 javax.servlet.jsp.PageContext 对象,提供了对各种范围的名字空间、servlet 相关的对象的 API 和通用的 servlet 相关功能的方法。 * session 对象:表示一个请求的 javax.servlet....
05-27 15:35:11.487 E/AndroidRuntime( 2352): java.lang.RuntimeException: Unable to create service com.android.systemui.keyguard.KeyguardService: java.lang.SecurityException: read wallpaper: Neither ...
如下错误提示:“java.lang.SecurityException: class "org.apache.commons.collections.SequencedHashMap"'s signer information does not match signer information of other classes in the same package”的解决...
Android Media...1、解决Android Q中java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION 异常 2、targetSdk 32可用
6. **违背安全原则异常:SecurityException** - 安全管理器检测到不安全的操作时,会抛出此异常。 7. **文件已结束异常:EOFException** - 在读取文件或流时,如果已经到达文件末尾,但程序还试图读取更多数据,会...
Constructor constructor = classkeyspec.getConstructor(new Class[]{byte[].class}); KeySpec dks = (KeySpec) constructor.newInstance(new Object[]{rawKeyData}); // 创建一个密钥工厂,然后用它把DESKeySpec...
import javax.microedition.lcdui.ChoiceGroup; import javax.microedition.lcdui.Command; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Form; import javax.microedition.lcdui....
其次,`java.lang.SecurityException: class "javax.xml.bind.JAXBContext"'s signer information does not match signer information of other classes in the same package`这个错误表明存在签名冲突,即不同来源...
这个jar包包含了`javax.mail`和`javax.mail.api`等相关类,如`Session`、`Message`、`Transport`等,它们是构建和发送邮件的核心组件。例如,我们可以创建一个`Properties`对象来设置SMTP服务器的属性,然后创建一个...
在Android平台上进行串口通信(SerialPort)是嵌入式和物联网应用中常见的需求,它允许设备通过串行接口与其他硬件设备交换数据。本篇将深入讲解如何在Android上实现串口开发,包括使用.so库文件和Java调用C/C++代码...
System.Security.SecurityException:“未找到源,但未能搜索某些或全部事件日志。 不可访问的日志: Security 需要判断当前是否已经存在日志,下面我来创建一个事件叫 “德熙” if (EventLog.SourceExists("德熙"))...
6. **异常处理**:通过 `catch(System.Security.SecurityException)` 捕获可能的安全异常。 7. **线程管理**: - 创建线程:`thThreadRead = new Thread(new ThreadStart(Listen));` - 启动线程:`thThreadRead....