wildfly

@Consumes doesn't work with JSON

风流意气都作罢 提交于 2019-12-11 04:07:49
问题 I have a following rest service: @Path("/add") @POST @Consumes(MediaType.APPLICATION_JSON) public Response add(SomeEntity entity) { entity = someService.addEntity(entity); return Response.ok("Entity added with id=" + entity.getId()).build(); } After deploying my app to Wildfly I send HTTP request with json: {"id":0,"param1":value1,"param2":value2} and get following error message: Bad arguments passed to org.jboss.resteasy.spi.metadata.ResourceMethod@4ab32ab7 ( java.util.LinkedHashMap {id=0,

Logback + Wildfly 8 - incorrect pattern

岁酱吖の 提交于 2019-12-11 04:07:33
问题 I have a problem with logback + wildfly 8 configuration. I'm using simple ConsoleAppender: appender("STDOUT", ConsoleAppender) { encoder(PatternLayoutEncoder) { pattern = "%d{HH:mm:ss.SSS} [%thread] %-5level %logger{70} - %msg%n" } } logger("com.package.app", INFO) root(DEBUG, ["STDOUT"]) The problem is that Wildfly appends to logback messages also server's log pattern. It looks like: 11:31:49,954 INFO [stdout] (default task-1) 11:31:49.951 [default task-1] INFO com.package.app.controller

How to set version to your war in WildFly?

自古美人都是妖i 提交于 2019-12-11 04:00:53
问题 In apache I use, projectname#1.9-Test##1.9-TEST to set version my war. What is the equivalent of that in WildFly? 回答1: Wildfly doesn't have the parallel deployment feature that tomcat has. As far as I know this feature is pretty unique to Tomcat. There is a feature request in the Wildfly Jira for this: https://issues.jboss.org/browse/WFLY-4701 but IMO it is going to be a long time before we see this. It is much harder to implement this feature in a full app server than it is in a servlet

EL expressions in Omnifaces CDN resource handler not resolved in Wildfly 9

人走茶凉 提交于 2019-12-11 03:33:08
问题 I am playing around with new Wildfly 9.0.0.Final. After the deployment of my JSF2.2 web application, the Omnifaces2.1 CDNResourceHandler stopped resolving EL expression. My definition in web.xml: <context-param> <param-name>org.omnifaces.CDN_RESOURCE_HANDLER_URLS</param-name> <param-value> styles:*=#{CDNResourcesBean.styles}/* </param-value> </context-param> In .xhtml, style.css file exists in resources of the project structure <h:outputStylesheet library="styles" name="style.css"/> Generated

Weblogic 12.2.1.2 - How to tune the object Serializer to use Jackson 2 and strange phenomena on jaxrs enablement for application/json endpoints

大憨熊 提交于 2019-12-11 03:23:09
问题 On Weblogic JEE 7 (version 12.2.1.2), I am finding it quite strange to understand the behavior of the application server in relation to the enablement and configuration of the JAX-RS web services. The first point that I am trying to understand is a phenomena that I find quite inexplicable. On a sample application where I was testing a trivial jax-rs web service where initially there were only to components: Component (A) @ApplicationPath("rest") public class RestApplication extends

WildFly: EJB invocations from a remote client

余生颓废 提交于 2019-12-11 03:17:38
问题 I was trying to lookup and call an EJB deployed as EAR in WildFly. I have tried different ways. Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); properties.put(Context.PROVIDER_URL, "remote://localhost:4447"); properties.put(Context.SECURITY_PRINCIPAL, myUser); properties.put(Context.SECURITY_CREDENTIALS, myPassword); properties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

Specify root context for web application in wildfly 8 at deployment

不羁的心 提交于 2019-12-11 02:28:57
问题 Is it possible to override the root context specified in WEB-INF/jboss-web.xml at deploy time? I have this jboss-web.xml <?xml version="1.0" encoding="UTF-8"?> <jboss-web> <context-root>my-context</context-root> </jboss-web> And I want to be able to deploy the application with different root context in in e.g. /another-context for some of my environments, but keep /my-context in other environments. 回答1: You can do this via WildFly Maven Plugin (as part of your CI job) or using the WildFly CLI

Replicated infinispan cache with Wildfly 11

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 02:22:15
问题 I'm developing a web application distributed on multi nodes with java 8 and java ee7 on wildfly-11.0.0.Final, and i used infinispan cache for share data. This is the configuration of cache: <cache-container name="mycache-container" default-cache="my-cache" jndi-name="infinispan/mycache-container"> <transport lock-timeout="60000"/> <replicated-cache name="my-cache" jndi-name="infinispan/mycache-container/my-cache" mode="ASYNC"> <locking isolation="READ_COMMITTED"/> <transaction locking=

(JAVA) Wildfly 10 CXF native dependency module issues

依然范特西╮ 提交于 2019-12-11 02:13:20
问题 I'm trying to migrate from wildfly8 to wildfly10 .. by the same way i'm upgrade some dependency like spring,hibernate and CXF ... but i have some issue with CXF embedded module from wildfly. on wildfly i was on 2.7.8 version on CXF to 3.1.4 on wildfly 10. here my pom.xml <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>${cxf.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId

Nashorn class not found in WildFly

百般思念 提交于 2019-12-11 01:58:36
问题 I need to access an internal class from nashorn inside a web application running in WildFly. The following code is working fine in my machine: public class NashornTest { public static void main(String[] args) throws ClassNotFoundException { Class<?> cls = Class.forName("jdk.nashorn.internal.objects.ScriptFunctionImpl"); System.out.println(cls); } } But the following servlet is throwing a ClassNotFoundException when I run inside WildFly: @WebServlet("/nashorn") public class NashornServlet