En Java 6 no hay un método directo que permita obtener el número de registros por una consulta. Hay diferentes formas, pero aquí vamos a describir la más elegantes (a mi humilde entender).
Es muy sencillo. Instaciamos el objeto Statement
de la siguiente forma:
Session session; Connection connection; Statement statement; /* [... nos conectamos a la base de datos...] */ //En este caso devolveremos un resultset por el que nos podamos desplazar (ResultSet.TYPE_SCROLL_INSENSITIVE) y no actualizable (ResultSet.CONCUR_READ_ONLY) Statement statement = session.connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
Resultset resultSet = statement.executeQuery("SELECT * FROM MI TABLA");
//Si la consulta ha devuelto registros if( resultSet.last ){ //Obtenemos el númeo de registro de la última fila int totalRegistros = resultSet.getRow(); //Nos volvemos a posicionar antes de la primera fila para poder tratar el resultset resultSet.beforeFirst(); }
Con el código anterior resolvemos el problemilla se saber cuantos registros devuelve la consulta que hagamos
Código para general el fichero excel:
HSSFWorkbook workbook = new HSSFWorkbook(); HSSFSheet sheet = workbook.createSheet("Hoja1");
Creamos un fichero temporal (puede ser temporal o no, a tu elección):
File file = File.createTempFile(dto.getGridName().toLowerCase()+"-", ".xls");
A partir del fichero creamos un InputStream
FileOutputStream report = new FileOutputStream( file.getPath() );
En este InputStream
escribiremos el contenido del fichero excel:
workbook.write(report); //Cerramos el fichero excel workbook.close(); //Cerramos el InputStream report.close()
Para devolver el fichero binario de forma que sea manejable con
Script utilizaremos el objeto
Asignamos el content-type:
response.setContentType("application/vnd.ms-excel;base64");
Mandamos el encabezado para que el navegador sepa que tiene que descargarse el fichero generado:
response.setHeader("Content-disposition", "attachment; filename=" + file.getName());
Leemos el fichero generado con un InputStream
FileInputStream in = new FileInputStream(file); byte[] bytes = new byte[(int)file.length()]; in.read(bytes); //Hacemos el encode de los bytes leídos String encodedBase64 = new String(Base64.encodeBase64(bytes)); //Escribimos en el objeto response el contenido del mismo response.getOutputStream().write(encodedBase64.getBytes()); //Cerramos el InputStream in.close();
El código anterior estará en el servidor, ahora se muestra el código JavaScript en la parte Cliente:
$.ajax({ url : url, contentType: "application/vnd.ms-excel", beforeSend : function(xhr) { //Aquí podemos mostrar un loader }, success : function(data, status, xhr) { //Ocultamos el loader //Si se han devuelto datos if (data != null && data != "FAIL") { var b64Data = data; var contentType = xhr.getResponseHeader("Content-Type"); //Obtenemos el tipo de los datos var filename = xhr.getResponseHeader("Content-disposition");//Obtenemos el nombre del fichero a desgargar filename = filename.substring(filename.lastIndexOf("=") + 1) || "download"; var sliceSize = 512; var byteCharacters = window.atob(b64Data); var byteArrays = []; for (var offset = 0; offset < byteCharacters.length; offset += sliceSize) { var slice = byteCharacters.slice(offset, offset + sliceSize); var byteNumbers = new Array(slice.length); for (var i = 0; i < slice.length; i++) { byteNumbers[i] = slice.charCodeAt(i); } var byteArray = new Uint8Array(byteNumbers); byteArrays.push(byteArray); } //Tras el procesado anterior creamos un objeto blob var blob = new Blob(byteArrays, { type : contentType }); // IE 10+ if (navigator.msSaveBlob) { navigator.msSaveBlob(blob, filename); } else { //Descargamos el fichero obtenido en la petición ajax var url = URL.createObjectURL(blob); var link = document.createElement('a'); link.href = url; link.download = filename; document.body.appendChild(link); link.click(); document.body.removeChild(link); } } }, complete : function(xhr, status) { if (xhr.readyState == 4) { if (xhr.status == 200) { //Ocultamos el loader var contentLength = xhr.getResponseHeader("Content-Length"); if (contentLength && contentLength == 0) //Si la descarga está vacía mostramos una alerta alert("No se ha podido descargar el archivo"); } } } });
Con éste código somos capaces de descargar con ajax un fichero binario, generado al vuelo.
Con Java 8 podemos devolver un Timestamp en UTC dada una fecha/hora local y el time zone de la misma.
Si además le aplicamos un formato con un objeto DateTimeFormatter, podemos devolver la fecha y la hora como deseemos.
/** * Convierte la fecha con el time zone indicado a UTC * @param localDateTime Fecha y hora local * @param timeZone Time zone de la hora a convertir * @return Devuelve un objeto Timpestamp con la hora en UTC */ public static Timestamp dateToUTCTimeStamp(LocalDateTime localDateTime, String timeZone){ ZonedDateTime zonedFechaExpiracion = ZonedDateTime .now(ZoneId.of(timeZone)) // fecha y hora actual en la delegación .with(localDateTime) // se asigna la fecha y hora que se recibe .withZoneSameInstant(ZoneOffset.UTC); // convertimos a formato UTC DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); return Timestamp.valueOf(zonedFechaExpiracion.format(formatter)); }
Esta es la expresíon regular que comprueba el formato de un NIF/NIE de tipo X,Y, Z, L, M o K:
((([X-Z])|([LM])){1}([-]?)((\d){7})([-]?)([A-Z]{1}))|((\d{8})([-]?)([A-Z]))
Cuando ejecutamos Tomcat o cualquier servidor web desde IntelliJ, Eclipse... puede que se no se cierre bien y se quede algún puerto a la escucha (como el 1099).
La forma de cerrar el puerto facilmente es la siguiente:
netstat -aon |find /i "listening" |find "<puerto_a_buscar>"
Si el <puerto_a_buscar> fuese el 1099, la sentencia quedaría así:
netstat -aon |find /i "listening" |find "1099"
Y obtendríamos una salida similar a la siguiente:
El número que aparece más a la derecha, es el identificador del proceso que tendremos que parar para liberar el puerto que hemos buscado (1099). La forma de hacerlo es la siguiente:
Taskkill /F /IM <numero_de_proceso>
En nuestro caso el número de proceso será el 19460 y la sentencia quedaría así:
Taskkill /F /IM 19460
Una vez ejecutada la sentencia la salida será similar a la siguiente:
Y el puerto quedará liberado para volver a lanzar nuestro servidor web preferido.
Caused by: java.lang.NoSuchFieldError: QUALIFIED at org.apache.cxf.service.model.SchemaInfo.setSchema(SchemaInfo.java:146) at org.apache.cxf.wsdl11.SchemaUtil.extractSchema(SchemaUtil.java:136) at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:73) at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:65) at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:60) at org.apache.cxf.wsdl11.WSDLServiceBuilder.getSchemas(WSDLServiceBuilder.java:372) at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:339) at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:203) at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:175) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:426) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:546) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:263) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102) at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159) at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211) at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:454) at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1608) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1549) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479) ... 53 more
mvn dependency:treeSi no tenemos el código compilado, podemos ejecutar para generar el arbol de dependencias:
mvn compile dependency:treeCon la sentencia anterior obtendremos una salida parecida a la siguiente:
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ miprosegur-ws --- [INFO] com.prosegur.miprosegur:miprosegur-ws:war:1.0-SNAPSHOT [INFO] +- com.prosegur.miprosegur:miprosegur-common:jar:1.0-SNAPSHOT:compile [INFO] | +- org.springframework:spring-core:jar:3.2.3.RELEASE:compile [INFO] | | \- commons-logging:commons-logging:jar:1.1.1:compile [INFO] | +- org.springframework:spring-context:jar:3.2.3.RELEASE:compile [INFO] | | +- org.springframework:spring-beans:jar:3.2.3.RELEASE:compile [INFO] | | \- org.springframework:spring-expression:jar:3.2.3.RELEASE:compile [INFO] | +- org.springframework:spring-context-support:jar:3.2.3.RELEASE:compile [INFO] | +- org.springframework:spring-tx:jar:3.2.3.RELEASE:compile [INFO] | | \- aopalliance:aopalliance:jar:1.0:compile [INFO] | +- org.springframework:spring-orm:jar:3.2.3.RELEASE:compile [INFO] | | \- org.springframework:spring-jdbc:jar:3.2.3.RELEASE:compile [INFO] | +- org.springframework:spring-web:jar:3.2.3.RELEASE:compile [INFO] | +- org.springframework:spring-webmvc:jar:3.2.3.RELEASE:compile [INFO] | +- org.springframework:spring-aop:jar:3.2.3.RELEASE:compile [INFO] | +- org.springframework:spring-test:jar:3.2.3.RELEASE:compile [INFO] | +- org.springframework.mobile:spring-mobile-device:jar:1.1.0.M3:compile [INFO] | +- log4j:log4j:jar:1.2.16:compile [INFO] | +- org.apache.shiro:shiro-core:jar:1.2.2:compile [INFO] | | +- org.slf4j:slf4j-api:jar:1.7.5:compile (version managed from 1.6.4) [INFO] | | \- commons-beanutils:commons-beanutils:jar:1.8.0:compile (version managed from 1.8.3) [INFO] | +- org.apache.shiro:shiro-web:jar:1.2.2:compile [INFO] | +- org.apache.shiro:shiro-spring:jar:1.2.2:compile [INFO] | +- jstl:jstl:jar:1.2:compile [INFO] | +- org.dbunit:dbunit:jar:2.4.9:compile [INFO] | | \- commons-collections:commons-collections:jar:3.1:compile (version managed from 3.2.1) [INFO] | +- commons-io:commons-io:jar:2.4:compile [INFO] | +- commons-fileupload:commons-fileupload:jar:1.2.2:compile [INFO] | +- org.apache.xmlbeans:xmlbeans:jar:2.4.0:compile [INFO] | +- javax.validation:validation-api:jar:1.0.0.GA:compile [INFO] | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.12:compile [INFO] | | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.12:compile [INFO] | +- org.codehaus.jackson:jackson-jaxrs:jar:1.9.12:compile [INFO] | +- org.codehaus.jackson:jackson-xc:jar:1.9.12:compile [INFO] | +- javax.servlet:jstl:jar:1.2:compile [INFO] | +- commons-dbcp:commons-dbcp:jar:1.2.2:compile [INFO] | | \- commons-pool:commons-pool:jar:1.3:compile [INFO] | +- org.aspectj:aspectjrt:jar:1.7.3:compile [INFO] | +- org.aspectj:aspectjweaver:jar:1.7.3:compile [INFO] | +- commons-codec:commons-codec:jar:1.8:compile [INFO] | +- org.apache.axis2:axis2-transport-http:jar:1.6.1:compile [INFO] | | \- org.apache.httpcomponents:httpcore:jar:4.0:compile [INFO] | +- org.apache.axis2:axis2-adb:jar:1.6.1:compile [INFO] | | \- org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar:1.0.2:compile [INFO] | +- org.apache.axis2:axis2-java2wsdl:jar:1.6.1:compile [INFO] | | +- org.apache.ant:ant:jar:1.7.0:compile --> [INFO] | | +- org.apache.ws.commons.schema:XmlSchema:jar:1.4.7:compile <-- ** Dependencia en conflicto ** [INFO] | | \- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.6:compile [INFO] | +- org.apache.axis2:axis2-adb-codegen:jar:1.6.1:compile [INFO] | | \- commons-cli:commons-cli:jar:1.2:compile [INFO] | +- org.apache.axis2:axis2-ant-plugin:jar:1.6.1:compile [INFO] | | +- wsdl4j:wsdl4j:jar:1.6.2:compile [INFO] | | \- org.apache.neethi:neethi:jar:3.0.1:compile [INFO] | +- org.apache.axis2:axis2-clustering:jar:1.6.1:compile [INFO] | | +- org.apache.tomcat:tribes:jar:6.0.16:compile [INFO] | | \- org.apache.tomcat:juli:jar:6.0.16:compile [INFO] | +- org.apache.axis2:axis2-codegen:jar:1.6.1:compile [INFO] | +- org.apache.axis2:axis2-corba:jar:1.6.1:compile [INFO] | | \- antlr:antlr:jar:2.7.7:compile [INFO] | +- org.apache.axis2:axis2-fastinfoset:jar:1.6.1:compile [INFO] | | +- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.7:compile [INFO] | | \- commons-httpclient:commons-httpclient:jar:3.1:compile [INFO] | +- org.apache.axis2:axis2-jaxbri:jar:1.6.1:compile [INFO] | | +- com.sun.xml.bind:jaxb-impl:jar:2.1.7:compile [INFO] | | +- com.sun.xml.bind:jaxb-xjc:jar:2.1.7:compile [INFO] | | \- javax.xml.bind:jaxb-api:jar:2.1:compile [INFO] | +- org.apache.axis2:axis2-jaxws:jar:1.6.1:compile [INFO] | | +- org.apache.geronimo.specs:geronimo-annotation_1.0_spec:jar:1.1:compile [INFO] | | +- org.apache.geronimo.specs:geronimo-jaxws_2.2_spec:jar:1.0:compile [INFO] | | \- xalan:xalan:jar:2.7.0:compile [INFO] | +- org.apache.axis2:axis2-jibx:jar:1.6.1:compile [INFO] | | +- org.jibx:jibx-bind:jar:1.2:compile [INFO] | | | \- bcel:bcel:jar:5.1:compile [INFO] | | | \- regexp:regexp:jar:1.2:compile [INFO] | | \- org.jibx:jibx-run:jar:1.2:compile [INFO] | +- org.apache.axis2:axis2-json:jar:1.6.1:compile [INFO] | | \- org.codehaus.jettison:jettison:jar:1.0-RC2:compile [INFO] | +- org.apache.axis2:axis2-kernel:jar:1.6.1:compile [INFO] | | +- org.apache.ws.commons.axiom:axiom-api:jar:1.2.12:compile [INFO] | | | +- jaxen:jaxen:jar:1.1.1:compile [INFO] | | | \- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:compile [INFO] | | +- org.apache.ws.commons.axiom:axiom-impl:jar:1.2.12:compile [INFO] | | +- org.apache.geronimo.specs:geronimo-ws-metadata_2.0_spec:jar:1.1.2:compile [INFO] | | +- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1:compile [INFO] | | +- org.apache.woden:woden-api:jar:1.0M9:compile [INFO] | | +- org.apache.woden:woden-impl-dom:jar:1.0M9:compile [INFO] | | | \- org.apache.woden:woden-impl-commons:jar:1.0M9:compile [INFO] | | \- javax.ws.rs:jsr311-api:jar:1.0:compile [INFO] | +- org.apache.axis2:axis2-metadata:jar:1.6.1:compile [INFO] | | \- com.sun.xml.ws:jaxws-tools:jar:2.1.3:compile [INFO] | +- org.apache.axis2:axis2-mtompolicy:jar:1.6.1:compile [INFO] | +- org.apache.axis2:axis2-saaj:jar:1.6.1:compile [INFO] | | +- org.apache.geronimo.specs:geronimo-saaj_1.3_spec:jar:1.0.1:compile [INFO] | | \- org.apache.ws.commons.axiom:axiom-dom:jar:1.2.12:compile [INFO] | +- org.apache.axis2:axis2-soapmonitor-servlet:jar:1.6.1:compile [INFO] | +- org.apache.axis2:axis2-spring:jar:1.6.1:compile [INFO] | +- org.apache.axis2:axis2-transport-local:jar:1.6.1:compile [INFO] | +- org.apache.axis2:axis2-xmlbeans:jar:1.6.1:compile [INFO] | | \- org.apache.ant:ant-launcher:jar:1.7.0:compile [INFO] | +- javax.jms:jms-api:jar:1.1-rev-1:compile [INFO] | \- com.tibco:jms:jar:1.0:compile [INFO] +- com.prosegur.miprosegur:miprosegur-business:jar:1.0-SNAPSHOT:compile [INFO] | +- com.prosegur.miprosegur:miprosegur-v1:jar:1.0-SNAPSHOT:compile [INFO] | | +- asm:asm-attrs:jar:2.2.3:compile [INFO] | | +- org.hibernate:hibernate:jar:3.2.7.ga:compile [INFO] | | | +- net.sf.ehcache:ehcache:jar:1.2.3:compile [INFO] | | | +- javax.transaction:jta:jar:1.0.1B:compile [INFO] | | | +- dom4j:dom4j:jar:1.6.1:compile [INFO] | | | \- cglib:cglib:jar:2.2:compile (version managed from 2.1_3) [INFO] | | +- c3p0:c3p0:jar:0.9.1.2:compile (version managed from 0.9.1) [INFO] | | +- c3p0:c3p0-oracle-thin-extras:jar:0.9.0.2:compile [INFO] | | +- org.hibernate:hibernate-core:jar:3.6.9.Final:compile [INFO] | | | +- org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile [INFO] | | | \- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final:compile [INFO] | | +- joda-time:joda-time:jar:2.1:compile [INFO] | | +- joda-time:joda-time-hibernate:jar:0.8:compile [INFO] | | +- commons-lang:commons-lang:jar:2.6:compile [INFO] | | +- org.json:json:jar:20070829:compile [INFO] | | +- com.lowagie:itext:jar:2.1.7:compile [INFO] | | | +- bouncycastle:bcmail-jdk14:jar:138:compile [INFO] | | | +- bouncycastle:bcprov-jdk14:jar:138:compile [INFO] | | | \- org.bouncycastle:bctsp-jdk14:jar:1.38:compile [INFO] | | | +- org.bouncycastle:bcprov-jdk14:jar:1.38:compile [INFO] | | | \- org.bouncycastle:bcmail-jdk14:jar:1.38:compile [INFO] | | +- javax.mail:mail:jar:1.4:compile [INFO] | | +- javax.xml:jaxrpc-api-osgi:jar:1.1-b01:compile [INFO] | | +- xerces:xercesImpl:jar:2.8.1:compile [INFO] | | | \- xml-apis:xml-apis:jar:1.3.03:compile [INFO] | | +- org.jdom:jdom:jar:1.1:compile [INFO] | | +- net.sourceforge.jexcelapi:jxl:jar:2.6.12:compile [INFO] | | +- org.ostermiller:utils:jar:1.07.00:compile [INFO] | | +- org.apache.poi:poi:jar:3.0-FINAL:compile [INFO] | | +- displaytag:displaytag:jar:1.2:compile [INFO] | | +- org.ajaxtags:ajaxtags:jar:1.1.5:compile [INFO] | | | \- net.htmlparser:jericho-html:jar:1.5-dev1:compile [INFO] | | +- taglibs:standard:jar:1.1.2:compile [INFO] | | +- com.google.code.gson:gson:jar:1.7.1:compile [INFO] | | \- net.sourceforge.javacsv:javacsv:jar:2.0:compile [INFO] | \- com.prosegur.miprosegur:miprosegur-persistence:jar:1.0-SNAPSHOT:compile [INFO] | +- org.mybatis:mybatis:jar:3.2.2:compile [INFO] | +- org.mybatis:mybatis-spring:jar:1.2.0:compile [INFO] | +- com.oracle:ojdbc6:jar:11.2.0.3:compile [INFO] | \- org.hibernate:hibernate-validator:jar:4.2.0.Final:compile [INFO] +- junit:junit:jar:4.8.2:test [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-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] | | \- org.apache.ws.xmlschema:xmlschema-core:jar:2.0.3:compile <-- ** Dependencia en conflicto ** [INFO] | +- org.apache.cxf:cxf-rt-core:jar:2.7.5: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.cxf:cxf-rt-frontend-jaxrs:jar:2.7.5:compile [INFO] | \- javax.ws.rs:javax.ws.rs-api:jar:2.0-m10:compile [INFO] +- org.apache.cxf:cxf-rt-transports-http:jar:2.7.5:compile [INFO] +- org.apache.cxf:cxf-rt-transports-http-jetty:jar:2.7.5:compile [INFO] | +- org.eclipse.jetty:jetty-server:jar:8.1.7.v20120910:compile [INFO] | | +- org.eclipse.jetty:jetty-continuation:jar:8.1.7.v20120910:compile [INFO] | | \- org.eclipse.jetty:jetty-http:jar:8.1.7.v20120910:compile [INFO] | | \- org.eclipse.jetty:jetty-io:jar:8.1.7.v20120910:compile [INFO] | | \- org.eclipse.jetty:jetty-util:jar:8.1.7.v20120910:compile [INFO] | +- org.eclipse.jetty:jetty-security:jar:8.1.7.v20120910:compile [INFO] | \- org.apache.geronimo.specs:geronimo-servlet_3.0_spec:jar:1.0:compile [INFO] \- org.codehaus.woodstox:wstx-asl:jar:3.2.8:compile [INFO] \- stax:stax-api:jar:1.0.1:compileCon los símbolos --> y <-- he han señalado las dependencias que entran en conflicto en este caso, ya que la clases contenidas en
org.apache.ws.commons.schema:XmlSchema:jar:1.4.7
ya se encuentran en org.apache.ws.xmlschema:xmlschema-core:jar:2.0.3
.<dependency> <groupId>com.prosegur.miprosegur</groupId> <artifactId>miprosegur-common</artifactId> <exclusions> <exclusion> <groupId>org.apache.ws.commons.schema</groupId> <artifactId>XmlSchema</artifactId> </exclusion> </exclusions> </dependency>