wildfly

How to set hibernate.hbm2ddl.auto on deployment in Wildfly NOT using persistence.xml

柔情痞子 提交于 2019-12-22 14:02:42
问题 I need on deployment schema generation for a webapp that uses JPA. The server is Wildfly 9 with Hibernate as JPA provider. I can achieve this by adding <property name="hibernate.hbm2ddl.auto" value="create" /> to persistence.xml. Is there another way to set this property per webapp and on deployment in Wildfly 9? I also tried hibernate.properties, but this had no effect. 回答1: There is no webapp specific deployment property out of the box. But you can set a webapp specific system property

using Jackson annotations in Wildfly

会有一股神秘感。 提交于 2019-12-22 10:49:41
问题 I'm struggling to get Jackson Annotations to work in my project which is deployed in wildfly. I already tried implementing a MessageBodyWriter but no success. My project looks like this: I have an ear with an ejb module which holds the annotated Pojos and I have a web module with the REST services. This is my current configuration / dependencies: ejb-module pom.xml: <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> <version>2.2.3</version>

Error When Starting Wildfly 10 on Linux FileNotFoundException

天涯浪子 提交于 2019-12-22 10:32:12
问题 Hello I cant get the Wildfly 10 Server to start on Linux. Below is the error message. I did look into the directory but there is no folder called "log". Do I need to give Netbeans more permissions, so it can create it? JAVA_OPTS already set in environment; overriding default settings with values: -Xms128m -Xmx512m -server -Dhttp.nonProxyHosts=localhost,127.0.0.1,AnonPC -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.management

Custom Security mechanism in Java EE 6/7 application

故事扮演 提交于 2019-12-22 10:10:02
问题 I would like to create (implement by my own) authentication mechanism which will be plugged into my Java EE application. As far as I know I have to implement LoginModule and connect this implementation with container mechanisms somehow. But the problem is that I don't know how to do it. Maybe You know where I can find sample code or tutorial about it? In other words I would like to force container to call my classes whenever methods: authenticate, login, and logout are called. Sample

Single page application with Java EE/Wildfly: server-side configuration

半世苍凉 提交于 2019-12-22 09:55:02
问题 I want to write an SPA with AngularJS on client side and Java EE on server side. If I understand it correctly, the idea for the frontend is to create a default page (let's call it index.html ) and implement routing to exchange parts of this default page. So with every request the default page is loaded and the routing logic replaces its parts depending on context path: <!-- index.html --> <html> <body> <!-- this block is replaced depending on context --> <div ng-view></div> </body> </html> <!

JAX-RS (Resteasy 3.5.0.Final) + Wildfly 12 + Java 9 + maven = 404 not found, but JAX-RS (Resteasy 3.5.0.Final) + Wildfly 12 + Java 8 + maven works

ⅰ亾dé卋堺 提交于 2019-12-22 08:59:43
问题 I have got a simple Hello World example JAX-RS project. Really simple and stupid. Just minimal configuration, which I intend to enhance in future, just imagine something like this with : https://robferguson.org/blog/2016/12/02/getting-started-with-resteasy/ . Well, my problem is, that when I set the Java version to "1.9", I always receive a "404 not found" error. But when I change it back to 1.8, mvn clean install and deploy, it works fine. The java version is the only delta, which makes it

Injecting EntityManager in JBoss/WildFly

纵然是瞬间 提交于 2019-12-22 08:38:48
问题 I am learning JPA, EJB and JBoss/WildFly. I need to inject an EntityManager into my application. I am trying to do it in the following way: @Stateless @LocalBean public class ProductsService implements IProductsService { @PersistenceContext(unitName = "myUnit") EntityManager entityManager; //.... } And I have persistence.xml file in the META-INF directory in my .war archive: <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">

wildfly or jboss 7.1 standalone.xml dtd

安稳与你 提交于 2019-12-22 07:04:04
问题 I understand that this question is not very specific to programming but I am trying to find the description of each tag in standalone.xml in wildfly or jboss 7.1 so that I can learn about each tag and it will be helpful for configuration. Where can I find a document that describes tags used in standalone.xml? jBoss or Wildfly administration guide does not give all the information. 回答1: James R. Perkins's right. Under $JBOSS_HOME/docs/schema there are several schemas, which describe the tags

Wildfly 10 can't connect datasource: invalid connection

£可爱£侵袭症+ 提交于 2019-12-22 05:51:07
问题 Problem I'm trying test my connection and it keeps giving me the same error while at first sight I can't see what I did wrong. Maybe I'm overlooking something... Error nexpected HTTP response: 500 Request { "address" => [ ("subsystem" => "datasources"), ("data-source" => "ProjectenDS") ], "operation" => "test-connection-in-pool" } Response Internal Server Error { "outcome" => "failed", "failure-description" => "WFLYJCA0040: failed to invoke operation: WFLYJCA0047: Connection is not valid",

How to force https on wildfly 8.1 in openshift?

我们两清 提交于 2019-12-22 00:52:44
问题 So I have this app running on openshift that uses the wildfly 8.1 cartridge. I would like to force all urls to go through https instead of http. Https is working fine, but I can also access the same pages using http. Which is what I want to disable. I've found this KB article: https://www.openshift.com/kb/kb-e1044-how-to-redirect-traffic-to-https but this doesn't describe the configuration for wildfly specifc. This is my standalone.xml config from wildfly on openshift: http://pastebin.com