-
1. Re: Inconvenience in the migration of REST services jboss 7.1.2 Wildfly 8.1.0
ctomc Sep 22, 2014 9:36 AM (in response to burgosjc)WildFly implements newer JAX-RS 2.0 standard.
Are you using newer jax-rs api jars for compiling?
-
2. Re: Inconvenience in the migration of REST services jboss 7.1.2 Wildfly 8.1.0
burgosjc Sep 22, 2014 10:28 AM (in response to ctomc)The module was compiled with the 3.0.6 version RestEasy, change it to the same version of WildFly which is 3.0.8, Using java 1.7.0_51 OpenJDK to compile, but server using Java SE Runtime Environment 1.7.0_55-b13 Oracle Corporation
-
3. Re: Inconvenience in the migration of REST services jboss 7.1.2 Wildfly 8.1.0
ctomc Sep 22, 2014 10:35 AM (in response to burgosjc)That is not what I asked but anyhow.
if you are using maven can you post your pom.xml or list of jars in lib used for compiling if you are using some archaic tool like ant.
-
4. Re: Re: Inconvenience in the migration of REST services jboss 7.1.2 Wildfly 8.1.0
burgosjc Sep 22, 2014 11:28 AM (in response to ctomc)Module POM
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>selsa.arqos</groupId> <artifactId>selsa.arqos.gr.servicios.api</artifactId> <version>1.0</version> <packaging>ejb</packaging> <name>selsa.arqos.gr.servicios.api</name> <properties> <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>org.jboss.resteasy</groupId> <artifactId>resteasy-jaxrs</artifactId> <version>3.0.8.Final</version> <scope>provided</scope> </dependency> <dependency> <groupId>${project.groupId}</groupId> <artifactId>selsa.arqos.gr.datos.api</artifactId> <version>${project.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>${project.groupId}</groupId> <artifactId>selsa.arqos.gr.utilidades</artifactId> <version>${project.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>7.0</version> <scope>provided</scope> </dependency> </dependencies> <build> <finalName>${project.artifactId}</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> <target>1.7</target> <compilerArguments> <endorseddirs>${endorsed.dir}</endorseddirs> </compilerArguments> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ejb-plugin</artifactId> <version>2.3</version> <configuration> <ejbVersion>3.1</ejbVersion> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.6</version> <executions> <execution> <phase>validate</phase> <goals> <goal>copy</goal> </goals> <configuration> <outputDirectory>${endorsed.dir}</outputDirectory> <silent>true</silent> <artifactItems> <artifactItem> <groupId>javax</groupId> <artifactId>javaee-endorsed-api</artifactId> <version>7.0</version> <type>jar</type> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
-
5. Re: Re: Re: Inconvenience in the migration of REST services jboss 7.1.2 Wildfly 8.1.0
burgosjc Sep 22, 2014 1:22 PM (in response to burgosjc)Reviewing more thoroughly I find the error because it is not layered generic type recover, so in my class ResourceAdapter implements a method getType() I recover the object type of the superclass and this solves the drawback
public abstract class ResourceAdapter<T> implements ResourceAdapterInterface<T> { public Type getType() { Type type = ((ParameterizedType) getClass().getGenericSuperclass()) .getActualTypeArguments()[0]; return type; } @Override public Response buscarPor(UriInfo info) { try { List<T> list = getGestionDatos().listarPor(ParametrosUtil.MutlimapToMap(info.getQueryParameters())); if (list == null || list.isEmpty()) { return Response.noContent().build(); } return Response.ok(new GenericEntity<T>(list.get(0), getType())).build(); } catch (FechaUtilExcepcion ex) { logger.error("buscarPor", ex); return Response.status(500).entity(generarRespuesta("96", ex)).build(); } }
Thank you for your help