我试图在API网关框架中使用Hibernate验证器。代码最终在Karaf中运行,但是我试图让单元测试(不是PAX测试)先工作。我将使用Mockito来嘲讽,但我不认为这是一个问题。
我使用的是“hibernate-validator”和“hibernate-validator-annotation-processor”,版本5.4.1.Final。
当我运行测试时,我得到以下结果:
HV000183: Unable to initialize 'javax.el.ExpressionFactory'. Check that you have the EL dependencies on the classpath, or use ParameterMessageInterpolator instead
根据其他情况,我得出结论,我必须添加“org.glassfish:javax.el:3.0.0”。不幸的是,这没有任何效果。这是完全相同的例外。
更新:
我看到的一些建议说要删除“javax.el-api”工件。我发现这在一个POM中被引用,所以我把它注释掉了。我还注意到“cdi-api”工件似乎可以传递它,所以我也注释掉了它。
不幸的是,“mvn依赖:树”仍然显示了2.2.5版本的“javax.el-api”,以及3.0.0版本的glassfish“javax.el”神器。
我该如何克服这一点?
更新:
我现在已经更新了我的依赖项,因此我只有“javax.el”,版本3.0.1-b08,没有“api”变体,但我仍然收到错误。
这是我当前的依赖关系树:
[INFO] mygroupid:usl-fraudcheck-impl:bundle:2.5.0-SNAPSHOT
[INFO] +- mygroupid:usl-csi-jaxb-base:jar:2.5.0-SNAPSHOT:compile
[INFO] | +- mygroupid:usl-shared:jar:2.5.0-SNAPSHOT:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.xmlbeans:jar:2.5.0_1:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.xstream:jar:1.4.9_1:compile
[INFO] | | | +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | | | \- xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.xmlpull:jar:1.1.3.1_2:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.javax.mail:jar:1.4.1_5:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-httpclient:jar:3.1_7:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-codec:jar:1.3_5:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-io:jar:1.4_3:compile
[INFO] | | +- javax.ejb:javax.ejb-api:jar:3.2:compile
[INFO] | | +- javax.jms:javax.jms-api:jar:2.0:compile
[INFO] | | +- mygroupid.csi:csi88:jar:88.0:compile
[INFO] | | +- mygroupid.csi:csi213:jar:213.0:compile
[INFO] | | +- javax.xml.rpc:com.springsource.javax.xml.rpc:jar:1.1.0.v20110517:compile
[INFO] | | +- javax.transaction:javax.transaction-api:jar:1.2:compile
[INFO] | | +- javax.interceptor:javax.interceptor-api:jar:1.2:compile
[INFO] | | \- org.apache.servicemix.bundles:org.apache.servicemix.bundles.javax-inject:jar:1_2:compile
[INFO] | +- mygroupid:usl-base:jar:2.5.0-SNAPSHOT:compile
[INFO] | | +- org.apache.xmlbeans:xmlbeans:jar:2.4.0:compile
[INFO] | | | \- stax:stax-api:jar:1.0.1:compile
[INFO] | | +- org.apache.axis:axis:jar:1.4:compile
[INFO] | | +- org.apache.neethi:neethi:jar:3.0.0:compile
[INFO] | | | \- wsdl4j:wsdl4j:jar:1.6.2:compile
[INFO] | | +- org.apache.woden:woden-api:jar:1.0M9:compile
[INFO] | | +- org.apache.commons:com.springsource.org.apache.commons.net:jar:1.4.1:compile
[INFO] | | +- org.apache.woden:woden-impl-dom:jar:1.0M9:compile
[INFO] | | +- org.apache.woden:woden-impl-commons:jar:1.0M9:compile
[INFO] | | +- org.apache.ws.commons.schema:XmlSchema:jar:1.4.7:compile
[INFO] | | +- org.apache.httpcomponents:httpcore-osgi:jar:4.4:compile
[INFO] | | | +- org.apache.httpcomponents:httpcore:jar:4.4:compile
[INFO] | | | \- org.apache.httpcomponents:httpcore-nio:jar:4.4:compile
[INFO] | | +- org.apache.httpcomponents:httpclient-osgi:jar:4.5.2:compile
[INFO] | | | +- org.apache.httpcomponents:httpclient:jar:4.5.2:compile
[INFO] | | | +- commons-codec:commons-codec:jar:1.10:compile
[INFO] | | | +- org.apache.httpcomponents:httpmime:jar:4.5.2:compile
[INFO] | | | +- org.apache.httpcomponents:httpclient-cache:jar:4.5.2:compile
[INFO] | | | \- org.apache.httpcomponents:fluent-hc:jar:4.5.2:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.wsdl4j:jar:1.6.2_5:compile
[INFO] | | +- org.apache.ws.commons.axiom:axiom-api:jar:1.2.5:compile
[INFO] | | | +- javax.mail:mail:jar:1.4:compile
[INFO] | | | | \- javax.activation:activation:jar:1.1:compile
[INFO] | | | \- xml-apis:xml-apis:jar:1.4.01:test
[INFO] | | +- org.apache.axiom:com.springsource.org.apache.axiom:jar:1.2.5:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.axiom-impl:jar:1.2.13_1:compile
[INFO] | | | +- org.apache.james:apache-mime4j-core:jar:0.7.2:compile
[INFO] | | | +- org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar:1.1:compile
[INFO] | | | +- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile
[INFO] | | | +- org.codehaus.woodstox:wstx-asl:jar:3.2.9:compile
[INFO] | | | \- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:compile
[INFO] | | +- org.apache.axis:com.springsource.org.apache.axis:jar:1.4.0:compile
[INFO] | | | \- org.apache.commons:com.springsource.org.apache.commons.httpclient:jar:3.1.0:compile
[INFO] | | | \- org.apache.commons:com.springsource.org.apache.commons.codec:jar:1.3.0:compile
[INFO] | | +- org.apache.commons:com.springsource.org.apache.commons.discovery:jar:0.4.0:compile
[INFO] | | +- org.apache.commons:com.springsource.org.apache.commons.logging:jar:1.1.1:compile
[INFO] | | +- javax.jms:com.springsource.javax.jms:jar:1.1.0:compile
[INFO] | | +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] | | \- javax.ws.rs:javax.ws.rs-api:jar:2.0:compile
[INFO] | +- mygroupid.csi:csi-app:jar:1.0:compile
[INFO] | +- mygroupid.csi:csi97:jar:97.0:compile
[INFO] | +- mygroupid.csi:csi104:jar:104.0:compile
[INFO] | +- mygroupid.csi:csi106:jar:106.0:compile
[INFO] | +- mygroupid.csi:csi112:jar:112.1:compile
[INFO] | +- mygroupid.csi:csi109:jar:109.0:compile
[INFO] | +- mygroupid.csi:csi217:jar:217.0:compile
[INFO] | +- mygroupid.csi:csi116:jar:116:compile
[INFO] | +- mygroupid.csi.icas:csi116:jar:200.0:compile
[INFO] | +- mygroupid.csi.unifiedservices:csi116:jar:212.0:compile
[INFO] | +- mygroupid.csi.paom:csi112:jar:205.0:compile
[INFO] | +- mygroupid.csi.oneviewaddresslocationsystem:csi116:jar:203.0:compile
[INFO] | +- mygroupid.csi.orderandsubscriptionmanagementmobility:csi116:jar:206.0:compile
[INFO] | +- mygroupid.csi:csi121:jar:121:compile
[INFO] | \- mygroupid.csi.unifiedservices:csi121:jar:216.0:compile
[INFO] +- mygroupid:usl-fraudcheck-api:jar:2.5.0-SNAPSHOT:compile
[INFO] | \- mygroupid:usl-metrics:jar:2.5.0-SNAPSHOT:compile
[INFO] | +- mygroupid.oracle:ojdbc6:jar:11.2.0.3.0:compile
[INFO] | +- mygroupid.oracle:oracle.jdbc.OracleDriver:jar:12.1.0.1:compile
[INFO] | +- com.zaxxer:HikariCP:jar:2.6.1:compile
[INFO] | \- org.javassist:javassist:jar:3.18.2-GA:compile
[INFO] +- mygroupid.xmlsoap:xmlsoap:jar:11.0:compile
[INFO] +- mygroupid:usl-csi-jaxb-base:test-jar:tests:2.5.0-SNAPSHOT:test
[INFO] +- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] +- org.hibernate:hibernate-validator:jar:5.4.1.Final:compile
[INFO] | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
[INFO] | \- com.fasterxml:classmate:jar:1.3.1:compile
[INFO] +- org.hibernate:hibernate-validator-annotation-processor:jar:5.4.1.Final:compile
[INFO] +- org.glassfish:javax.el:jar:3.0.1-b08:compile
[INFO] +- log4j:log4j:jar:1.2.16:provided
[INFO] +- org.codehaus.mojo:cobertura-maven-plugin:jar:2.6:compile
[INFO] | +- net.sourceforge.cobertura:cobertura:jar:2.0.3:compile
[INFO] | | +- org.ow2.asm:asm:jar:4.1:compile
[INFO] | | +- org.ow2.asm:asm-tree:jar:4.1:compile
[INFO] | | +- org.ow2.asm:asm-commons:jar:4.1:compile
[INFO] | | +- org.ow2.asm:asm-util:jar:4.1:compile
[INFO] | | +- org.ow2.asm:asm-analysis:jar:4.1:compile
[INFO] | | +- oro:oro:jar:2.0.8:compile
[INFO] | | +- jaxen:jaxen:jar:1.1-beta-8:compile
[INFO] | | | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | | +- jdom:jdom:jar:1.0:compile
[INFO] | | | +- xerces:xmlParserAPIs:jar:2.6.2:compile
[INFO] | | | +- xerces:xercesImpl:jar:2.11.0:test
[INFO] | | | \- xom:xom:jar:1.0b3:compile
[INFO] | | | +- com.ibm.icu:icu4j:jar:2.6.1:compile
[INFO] | | | +- xalan:xalan:jar:2.7.2:compile
[INFO] | | | | \- xalan:serializer:jar:2.7.2:compile
[INFO] | | | \- org.ccil.cowan.tagsoup:tagsoup:jar:0.9.7:compile
[INFO] | | +- org.apache.ant:ant:jar:1.8.3:compile
[INFO] | | | \- org.apache.ant:ant-launcher:jar:1.8.3:compile
[INFO] | | +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.14:compile
[INFO] | | +- org.mortbay.jetty:jetty:jar:6.1.14:compile
[INFO] | | +- org.mortbay.jetty:jetty-util:jar:6.1.14:compile
[INFO] | | \- com.sun:tools:jar:0:system
[INFO] | +- net.sourceforge.cobertura:cobertura-runtime:pom:2.0.3:compile
[INFO] | +- urbanophile:java-getopt:jar:1.0.9:compile
[INFO] | +- org.apache.maven:maven-core:jar:2.0.8:compile
[INFO] | | +- org.apache.maven:maven-settings:jar:2.0.8:compile
[INFO] | | +- org.apache.maven.wagon:wagon-file:jar:1.0-beta-2:runtime
[INFO] | | +- org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.8:compile
[INFO] | | +- org.apache.maven.wagon:wagon-http-lightweight:jar:1.0-beta-2:runtime
[INFO] | | | \- org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-2:runtime
[INFO] | | | \- jtidy:jtidy:jar:4aug2000r7-dev:runtime
[INFO] | | +- org.apache.maven:maven-profile:jar:2.0.8:compile
[INFO] | | +- org.apache.maven:maven-model:jar:2.0.8:compile
[INFO] | | +- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:compile
[INFO] | | +- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[INFO] | | +- org.apache.maven:maven-repository-metadata:jar:2.0.8:compile
[INFO] | | +- org.apache.maven:maven-error-diagnostics:jar:2.0.8:compile
[INFO] | | +- commons-cli:commons-cli:jar:1.0:compile
[INFO] | | +- org.apache.maven.wagon:wagon-ssh-external:jar:1.0-beta-2:runtime
[INFO] | | | \- org.apache.maven.wagon:wagon-ssh-common:jar:1.0-beta-2:runtime
[INFO] | | +- org.apache.maven:maven-plugin-descriptor:jar:2.0.8:compile
[INFO] | | +- org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4:compile
[INFO] | | +- org.apache.maven:maven-artifact-manager:jar:2.0.8:compile
[INFO] | | +- org.apache.maven:maven-monitor:jar:2.0.8:compile
[INFO] | | +- org.apache.maven.wagon:wagon-ssh:jar:1.0-beta-2:runtime
[INFO] | | | \- com.jcraft:jsch:jar:0.1.27:runtime
[INFO] | | \- classworlds:classworlds:jar:1.1:compile
[INFO] | +- org.apache.maven:maven-artifact:jar:2.0.8:compile
[INFO] | +- org.apache.maven:maven-plugin-api:jar:2.0.8:compile
[INFO] | +- org.apache.maven.reporting:maven-reporting-api:jar:2.0.8:compile
[INFO] | | \- org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-9:compile
[INFO] | +- org.apache.maven:maven-project:jar:2.0.8:compile
[INFO] | | \- org.apache.maven:maven-plugin-registry:jar:2.0.8:compile
[INFO] | +- org.apache.maven.reporting:maven-reporting-impl:jar:2.0.4.2:compile
[INFO] | | +- commons-validator:commons-validator:jar:1.2.0:compile
[INFO] | | | \- commons-digester:commons-digester:jar:1.6:compile
[INFO] | | +- org.apache.maven.doxia:doxia-core:jar:1.0:compile
[INFO] | | \- org.apache.maven.doxia:doxia-site-renderer:jar:1.0:compile
[INFO] | | +- org.codehaus.plexus:plexus-i18n:jar:1.0-beta-7:compile
[INFO] | | +- org.codehaus.plexus:plexus-velocity:jar:1.1.7:compile
[INFO] | | +- org.apache.velocity:velocity:jar:1.5:compile
[INFO] | | +- org.apache.maven.doxia:doxia-decoration-model:jar:1.0:compile
[INFO] | | +- org.apache.maven.doxia:doxia-module-apt:jar:1.0:compile
[INFO] | | +- org.apache.maven.doxia:doxia-module-fml:jar:1.0:compile
[INFO] | | +- org.apache.maven.doxia:doxia-module-xdoc:jar:1.0:compile
[INFO] | | \- org.apache.maven.doxia:doxia-module-xhtml:jar:1.0:compile
[INFO] | +- org.codehaus.plexus:plexus-utils:jar:2.0.2:compile
[INFO] | \- org.apache.maven.shared:maven-invoker:jar:2.0.11:compile
[INFO] +- org.osgi:org.osgi.core:jar:5.0.0:provided
[INFO] +- org.osgi:org.osgi.compendium:jar:5.0.0:provided
[INFO] +- junit:junit:jar:4.11:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.mockito:mockito-core:jar:1.10.19:test
[INFO] | \- org.objenesis:objenesis:jar:2.1:test
[INFO] +- org.powermock:powermock-module-junit4:jar:1.6.6:test
[INFO] | \- org.powermock:powermock-module-junit4-common:jar:1.6.6:test
[INFO] | +- org.powermock:powermock-core:jar:1.6.6:test
[INFO] | \- org.powermock:powermock-reflect:jar:1.6.6:test
[INFO] +- org.powermock:powermock-api-mockito:jar:1.6.6:test
[INFO] | \- org.powermock:powermock-api-mockito-common:jar:1.6.6:test
[INFO] | \- org.powermock:powermock-api-support:jar:1.6.6:test
[INFO] +- org.slf4j:slf4j-api:jar:1.7.21:provided
[INFO] +- org.apache.aries.blueprint:org.apache.aries.blueprint.annotation.api:jar:1.0.0:provided
[INFO] +- org.ops4j.pax.exam:pax-exam-junit4:jar:4.9.1:test
[INFO] | +- org.ops4j.pax.exam:pax-exam-spi:jar:4.9.1:test
[INFO] | | \- org.ops4j.pax.tinybundles:tinybundles:jar:2.1.1:test
[INFO] | | \- biz.aQute.bnd:bndlib:jar:2.4.0:test
[INFO] | \- org.ops4j.base:ops4j-base-lang:jar:1.5.0:test
[INFO] +- org.ops4j.pax.exam:pax-exam-container-karaf:jar:4.9.1:test
[INFO] | +- org.ops4j.pax.exam:pax-exam-container-remote:jar:4.9.1:test
[INFO] | | +- org.ops4j.pax.exam:pax-exam-container-rbc-client:jar:4.9.1:test
[INFO] | | | \- org.ops4j.pax.exam:pax-exam-container-rbc:jar:4.9.1:test
[INFO] | | +- org.ops4j.pax.swissbox:pax-swissbox-core:jar:1.8.2:test
[INFO] | | | \- org.ops4j.pax.swissbox:pax-swissbox-lifecycle:jar:1.8.2:test
[INFO] | | \- org.ops4j.base:ops4j-base-net:jar:1.5.0:test
[INFO] | +- org.apache.commons:commons-compress:jar:1.4.1:test
[INFO] | | \- org.tukaani:xz:jar:1.0:test
[INFO] | +- org.ops4j.pax.swissbox:pax-swissbox-framework:jar:1.8.2:test
[INFO] | | +- org.ops4j.pax.swissbox:pax-swissbox-tracker:jar:1.8.2:test
[INFO] | | +- org.ops4j.base:ops4j-base-exec:jar:1.5.0:test
[INFO] | | +- org.ops4j.base:ops4j-base-io:jar:1.5.0:test
[INFO] | | \- org.ops4j.base:ops4j-base-monitors:jar:1.5.0:test
[INFO] | \- org.ops4j.base:ops4j-base-spi:jar:1.5.0:test
[INFO] +- org.apache.karaf:apache-karaf:zip:4.0.7:compile
[INFO] | +- org.apache.karaf.features:framework:kar:4.0.7:compile
[INFO] | | +- org.apache.karaf.features:base:jar:4.0.7:runtime
[INFO] | | +- org.apache.karaf:org.apache.karaf.main:jar:4.0.7:runtime
[INFO] | | | +- org.apache.karaf:org.apache.karaf.util:jar:4.0.7:runtime
[INFO] | | | | \- org.apache.felix:org.apache.felix.utils:jar:1.8.2:runtime
[INFO] | | | +- net.java.dev.jna:jna:jar:4.2.2:runtime
[INFO] | | | \- net.java.dev.jna:jna-platform:jar:4.2.2:runtime
[INFO] | | +- org.apache.karaf:org.apache.karaf.exception:jar:4.0.7:runtime
[INFO] | | +- org.apache.karaf:org.apache.karaf.client:jar:4.0.7:runtime
[INFO] | | | \- org.apache.sshd:sshd-core:jar:0.14.0:runtime
[INFO] | | +- org.apache.karaf.jaas:org.apache.karaf.jaas.boot:jar:4.0.7:runtime
[INFO] | | +- org.apache.karaf.diagnostic:org.apache.karaf.diagnostic.boot:jar:4.0.7:runtime
[INFO] | | +- org.eclipse.tycho:org.eclipse.osgi:jar:3.10.101.v20150820-1432:runtime
[INFO] | | +- org.apache.felix:org.apache.felix.framework:jar:5.4.0:runtime
[INFO] | | +- jline:jline:jar:2.14.2:compile
[INFO] | | +- org.jledit:core:jar:0.2.1:compile
[INFO] | | +- org.ops4j.pax.logging:pax-logging-api:jar:1.8.5:compile
[INFO] | | +- org.ops4j.pax.logging:pax-logging-service:jar:1.8.5:compile
[INFO] | | +- org.ops4j.pax.url:pax-url-aether:jar:2.4.7:compile
[INFO] | | \- org.apache.karaf.features:org.apache.karaf.features.core:jar:4.0.7:compile
[INFO] | +- org.apache.karaf.features:framework:xml:features:4.0.7:runtime
[INFO] | +- org.apache.karaf.features:standard:xml:features:4.0.7:compile
[INFO] | +- org.apache.karaf.features:spring:xml:features:4.0.7:runtime
[INFO] | \- org.apache.karaf.features:enterprise:xml:features:4.0.7:runtime
[INFO] +- org.ops4j.pax.exam:pax-exam:jar:4.9.1:test
[INFO] | +- org.ops4j.base:ops4j-base-store:jar:1.5.0:test
[INFO] | \- org.ops4j.base:ops4j-base-util-property:jar:1.5.0:test
[INFO] +- org.apache.camel:camel-core:jar:2.17.0:provided
[INFO] | +- com.sun.xml.bind:jaxb-core:jar:2.2.11:provided
[INFO] | \- com.sun.xml.bind:jaxb-impl:jar:2.2.11:provided
[INFO] +- org.apache.camel:camel-blueprint:jar:2.17.0:provided
[INFO] | +- org.apache.camel:camel-core-xml:jar:2.17.0:provided
[INFO] | \- org.apache.camel:camel-core-osgi:jar:2.17.0:provided
[INFO] +- org.apache.camel:camel-jms:jar:2.17.0:provided
[INFO] | +- org.apache.camel:camel-spring:jar:2.17.0:provided
[INFO] | | +- org.springframework:spring-core:jar:4.2.5.RELEASE:provided
[INFO] | | +- org.springframework:spring-aop:jar:4.2.5.RELEASE:provided
[INFO] | | | \- aopalliance:aopalliance:jar:1.0:provided
[INFO] | | \- org.springframework:spring-expression:jar:4.2.5.RELEASE:provided
[INFO] | +- org.springframework:spring-jms:jar:4.2.5.RELEASE:provided
[INFO] | | \- org.springframework:spring-messaging:jar:4.2.5.RELEASE:provided
[INFO] | +- org.springframework:spring-context:jar:4.2.5.RELEASE:provided
[INFO] | +- org.springframework:spring-tx:jar:4.2.5.RELEASE:provided
[INFO] | \- org.springframework:spring-beans:jar:4.2.5.RELEASE:provided
[INFO] +- org.apache.camel:camel-jaxb:jar:2.17.0:provided
[INFO] +- org.apache.camel:camel-test:jar:2.17.0:test
[INFO] +- commons-logging:commons-logging:jar:1.2:provided
[INFO] +- commons-lang:commons-lang:jar:2.6:provided
[INFO] +- commons-io:commons-io:jar:2.4:provided
[INFO] +- org.apache.camel:camel-test-blueprint:jar:2.13.0:test
[INFO] | +- org.apache.aries.blueprint:org.apache.aries.blueprint:jar:1.1.0:test
[INFO] | +- org.apache.aries:org.apache.aries.util:jar:1.1.0:test
[INFO] | +- org.apache.aries.proxy:org.apache.aries.proxy.impl:jar:1.0.1:test
[INFO] | +- org.apache.aries.proxy:org.apache.aries.proxy.api:jar:1.0.0:test
[INFO] | +- com.googlecode.pojosr:de.kalpatec.pojosr.framework:jar:0.2.1:test
[INFO] | +- org.ops4j.pax.swissbox:pax-swissbox-tinybundles:jar:1.3.1:test
[INFO] | | \- org.ops4j.pax.swissbox:pax-swissbox-bnd:jar:1.3.1:test
[INFO] | | \- biz.aQute:bndlib:jar:0.0.357:test
[INFO] | +- org.apache.felix:org.apache.felix.configadmin:jar:1.4.0:compile
[INFO] | \- org.apache.felix:org.apache.felix.fileinstall:jar:3.2.6:compile
[INFO] +- org.apache.camel:camel-jackson:jar:2.17.0:provided
[INFO] | \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.7.2:provided
[INFO] +- org.apache.camel:camel-jsonpath:jar:2.17.0:provided
[INFO] +- org.apache.camel:camel-jolt:jar:2.17.0:provided
[INFO] +- org.apache.camel:camel-quartz2:jar:2.17.0:provided
[INFO] | +- org.quartz-scheduler:quartz:jar:2.2.2:provided
[INFO] | | \- c3p0:c3p0:jar:0.9.1.1:provided
[INFO] | \- com.mchange:c3p0:jar:0.9.5.2:provided
[INFO] | \- com.mchange:mchange-commons-java:jar:0.2.11:provided
[INFO] +- org.apache.camel:camel-hazelcast:jar:2.17.0:provided
[INFO] | +- com.hazelcast:hazelcast:jar:3.6.2:provided
[INFO] | \- com.hazelcast:hazelcast-client:jar:3.6.2:provided
[INFO] +- com.jayway.jsonpath:json-path:jar:2.0.0:provided
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.3:provided
[INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.8.3:provided
[INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.3:provided
[INFO] +- com.bazaarvoice.jolt:jolt-core:jar:0.0.16:provided
[INFO] | \- javax.inject:javax.inject:jar:1:provided
[INFO] +- com.bazaarvoice.jolt:json-utils:jar:0.0.16:provided
[INFO] +- net.minidev:json-smart:jar:2.1.1:provided
[INFO] +- net.minidev:asm:jar:1.0.2:provided
[INFO] | \- asm:asm:jar:3.3.1:provided
[INFO] +- com.google.code.gson:gson:jar:2.8.0:provided
[INFO] +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] +- org.apache.maven.surefire:surefire-junit4:jar:2.19.1:test
[INFO] | \- org.apache.maven.surefire:surefire-api:jar:2.19.1:test
[INFO] +- org.apache.cxf:cxf-core:jar:3.1.8:provided
[INFO] | +- org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:compile
[INFO] | | \- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO] | \- org.apache.ws.xmlschema:xmlschema-core:jar:2.2.1:compile
[INFO] +- org.apache.cxf:cxf-rt-rs-client:jar:3.1.8:provided
[INFO] | +- org.apache.cxf:cxf-rt-transports-http:jar:3.1.8:provided
[INFO] | \- org.apache.cxf:cxf-rt-frontend-jaxrs:jar:3.1.8:provided
[INFO] | \- javax.annotation:javax.annotation-api:jar:1.2:provided
[INFO] +- org.jacoco:org.jacoco.agent:jar:runtime:0.7.8:test
[INFO] \- org.eclipse.jdt:org.eclipse.jdt.annotation:jar:2.1.0:compile
以下是运行单元测试时模块中“mvn安装”输出的摘录:
Running package.usl.fraudcheck.impl.InquireCPNIContactInformationProcessorTest
[org.jboss.logging] : Logging Provider: org.jboss.logging.Log4j2LoggerProvider Ignored FQCN: org.jboss.logging.Logger
[org.hibernate.validator.internal.util.Version] : HV000001: Hibernate Validator 5.4.1.Final Ignored FQCN: org.hibernate.validator.internal.util.logging.Log_$logger
[org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver] : Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable. Ignored FQCN: org.jboss.logging.DelegatingBasicLogger
[org.hibernate.validator.internal.xml.ValidationXmlParser] : Trying to load META-INF/validation.xml for XML based Validator configuration. Ignored FQCN: org.jboss.logging.DelegatingBasicLogger
[org.hibernate.validator.internal.xml.ResourceLoaderHelper] : Trying to load META-INF/validation.xml via TCCL Ignored FQCN: org.jboss.logging.DelegatingBasicLogger
[org.hibernate.validator.internal.xml.ResourceLoaderHelper] : Trying to load META-INF/validation.xml via Hibernate Validator's class loader Ignored FQCN: org.jboss.logging.DelegatingBasicLogger
[org.hibernate.validator.internal.xml.ValidationXmlParser] : No META-INF/validation.xml found. Using annotation based configuration only. Ignored FQCN: org.jboss.logging.DelegatingBasicLogger
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.67 sec <<< FAILURE! - in package.usl.fraudcheck.impl.InquireCPNIContactInformationProcessorTest
testValidate(package.usl.fraudcheck.impl.InquireCPNIContactInformationProcessorTest) Time elapsed: 0.219 sec <<< ERROR!
javax.validation.ValidationException: HV000183: Unable to initialize 'javax.el.ExpressionFactory'. Check that you have the EL dependencies on the classpath, or use ParameterMessageInterpolator instead
at package.usl.fraudcheck.impl.InquireCPNIContactInformationProcessorTest.testValidate(InquireCPNIContactInformationProcessorTest.java:23)
Caused by: java.lang.NoClassDefFoundError: javax/el/ExpressionFactory
at package.usl.fraudcheck.impl.InquireCPNIContactInformationProcessorTest.testValidate(InquireCPNIContactInformationProcessorTest.java:23)
所以,你真的只需要一个版本的el jar。它应该是:
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<version>3.0.1-b08</version>
</dependency>
至于其他el jars,您需要将它们从您的依赖项中排除。依赖关系树应该对你有所帮助,因为你可以看到它们来自哪里。
只需对临时引入旧el jar的依赖项使用排除,并确保您没有在pom中显式引用它,它应该可以工作。
错误消息中提到的另一种解决方案是使用不使用EL的消息内插器,但我不建议使用它,因为一些内置约束在其消息中使用EL,您可能需要它来满足自己的约束。
即使在向org.glassfish:javax.el:3.0.1-b08
添加依赖项后,我也遇到了同样的错误。事实证明,问题在于包含javax.el.ExpressionFactory
但没有实现的传递依赖项。
以下命令将输出包含< code > javax . El . expression factory 的所有依赖项
for i in $(mvn dependency:build-classpath | grep '.m2' | tr ':' ' '); do
jar -tvf $i | grep 'javax/el/ExpressionFactory' && echo -e "\t$i"
done 2> /dev/null
然后我使用了
排除可能最终会删除排除的Jars中所需的代码。在我的情况下,我必须找到一个提供嵌入式Jetty Server的替代jar。
我最近将Chrome浏览器版本升级到78,将Selenium Web驱动程序版本升级到3.141.0,并将Selenum Chrome驱动程序版本更新到78.0.3904.7000。 当我通过Azure管道在远程机器上运行测试时,由于波纹管失败,我的所有测试都失败了。请建议如何处理此问题 OneTimeSetUp: Automation.test.Framework.models.exceptio
我在我的android应用程序中使用谷歌地图。我已经创建了密钥并在清单文件中添加了必要的权限。但很快我启动了应用程序,我在调试器中收到了这条消息: Google服务初始化失败,状态:10,缺少用于初始化Google服务的预期资源:“R.string.google_app_id”。可能的原因是缺少google-services.json或com.google.gms.google服务gradle插件
我正在尝试使用Spring Security实现一个简单的登录(我是Spring Security的新手)。我从Spring Security参考开始,其中包含一个简单的“Hello world”示例(链接)。我在Eclipse中准备了一个Web项目(带有EAR项目),文件结构如下所示: SecurityConfig和SecurityWebApplicationInitializer类与上面链接(
我使用velocity作为Java代码生成器,我正在运行一个Eclipse应用程序,它有多个插件,不同的插件调用velocity模块进行代码生成。 每当我运行一个特定的插件时,不管我运行多少次,它都可以单独工作,现在如果我试图运行另一个插件,它会抛出速度异常(我在下面提供了堆栈跟踪),我将再次重启eclipse,其他插件也可以工作。 结论:当一个插件在某个插件已经执行后运行时,Velocity初始
在此之前,我能够在Visual Studio 2013下运行特定项目的单元测试。这项工作最近停止了,没有对项目进行重大修改,不幸的是,我不记得上次工作是什么时候,也不记得后来发生了什么变化。然而,对项目本身的任何修改都是最小的(一个或两个新方法),并且不涉及任何配置文件更改或类似的频繁报告的问题。我认为,Visual Studio(可能是最近的更新)或插件或第三方软件的更改会导致以下问题。 加载项
我不熟悉匕首。我创建了一个非常简单的单元测试,试图理解我应该如何使用dagger。不幸的是,它失败了。我可能还不了解匕首的一些基本原理。 而我的测试课失败了 我认为dagger会将B注入A,因为A希望注入B,DaggerModule包含一个@Providers注释方法,该方法创建B。 更新: 我发现当我像这样编写模块类时 将B注入A作品中。然而,我不理解为什么当模块有一个构造a实例的带注释的方法时