jboss6.x

Enable Hibernate logging

喜欢而已 提交于 2019-12-17 10:45:11
问题 I'm trying to create a log of hibernate statements. I perform my sql statements using JPA where Hibernate 2.0 is the persistence provider (my application server is JBoss AS 6.0). I call my CRUD methods using the EntityManager interface provided by EJB 3.0. I read many posts about enabling hinernate logging but actually i can't see any log :-( I create a log4j.properties file and I put it in the root folder of my Netbeans project. I put also log4j library in the classpath of the project. My

Java RestFull WebService: JAX-RS implementation with Jersey 2.3.1 libraries

ε祈祈猫儿з 提交于 2019-12-17 05:03:09
问题 I am trying to run a simple "Hallo World" application Jersey 2.3.1 REST service on JBoss jboss-eap-6.1 AS. In web.xml i have disabled restEasy library. During deployment i am getting the error: JBWEB000289: Servlet com.sun.jersey.samples.helloworld.resources.MyApplication threw load() exception: java.lang.NoSuchMethodError: javax.ws.rs.core.Application.getProperties()Ljava/util/Map; In POM i put these dependencies: <dependency> <groupId>org.glassfish.jersey.core</groupId> <artifactId>jersey

Simple web project deploys on Tomcat 6, not on JBoss 6

北战南征 提交于 2019-12-14 02:29:49
问题 I use the latest Eclipse (Java EE development). I have two servers defined in the servers view: Tomcat 6, and JBoss 6 (I have to use these). I am trying to test the following simple web application: http://viralpatel.net/blogs/spring-3-mvc-create-hello-world-application-spring-3-mvc/ When I start Tomcat 6 (from eclipse), I can access the project home page. Then, when I stop Tomcat 6 and start JBoss 6, when I try to access the project home page - I get HTTP status 404. What is wrong here? What

NameNotFoundException when starting JBoss with an EAR using HornetQ ConnectionFactory via JNDI

冷暖自知 提交于 2019-12-13 17:25:23
问题 I am currently trying to deploy an app on JBoss 6.1 which has some JMS MessageListeners in it. The MessageListeners get the connection factory via JNDI (using Spring), I am using the HornetQ default connection factory which is named ConnectionFactory . I am currently just using the default JMS Queues that JBoss starts with: DLQ and ExpiryQueue When I deploy via JMX the app has no problem starting. When I deploy by copying the app in to the deploy directory and start the server the app will

Cannot set timeout on Resteasy Client on JBoss

瘦欲@ 提交于 2019-12-13 16:11:39
问题 I am trying to create a rest client on a JBoss EAP server, and I need to make sure that a timeout will end the connection if it gets stuck. My code looks like this: int timeout = 5000; RequestConfig defaultRequestConfig = RequestConfig.custom().setConnectionRequestTimeout(timeout).setSocketTimeout(timeout).setConnectTimeout(timeout).build(); HttpClientBuilder builder = HttpClientBuilder.create(); HttpClient httpClient = builder.setDefaultRequestConfig(defaultRequestConfig).build(); //

Must close browser to get authentication data in PostConstruct method

纵饮孤独 提交于 2019-12-13 07:22:47
问题 I am trying to cache the authentication information in a SessionScoped managed bean. When I open a browser and login into the server (the browser asks me for username/password) the first time, it works as it should. The trouble comes when I restart the webapp or the server (it is a development setup). Then, accessing the webapp from one of the browser where I had previously logged in, causes that in my @PostConstruct method, FacesContext.getCurrentInstance().getExternalContext()

JAAS and acess from android

落花浮王杯 提交于 2019-12-13 04:13:41
问题 Hi i have secured my server using JAAS and i have performed the web authentification , now i have to authenticate from mobile application using android app , how can we use the Rest web services after authentication , is JAAS support access from mobile app ? i have a ws that allow me to verify if the login and password are corect ; haw can i access this ws ? on the web app there is the container authentification so after doing this , i am allowed to use all my ws is there any thing like this

Can you use bean validation 1.1 (JSR 349) in JBoss EAP 6.4.4?

匆匆过客 提交于 2019-12-13 02:39:58
问题 We are using bean validation in JBoss EAP 6.4.4 (resteasy & hibernate-validator 4) to validate REST payload data. As it seems JBoss 6.4.4 uses bean validation 1.0 which doesn't support method validation. So, requests are not being blocked by bean validation and reach the db. Is there any jboss deployment file or something similar where I can enable version 1.1? I cannot change the bundled libs because we'll lose jboss support for the AS. JBoss 7 seems to work out of the box, but it's still in

JNDI Lookup on JBoss AS 6.0

旧巷老猫 提交于 2019-12-13 00:48:28
问题 I have an application deployed at localhost on JBoss 6.0 AS. This application has one remote EJB bean called ExampleEJB. Now I'm trying to code a simple client application that consumes ExampleEJB. This client application will not be deployed at any application server. The idea is to code a simple Java SE client program. I've written the following trying to perform a lookup: Properties env = new Properties(); env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");

JBoss6 with REST client (jersey-client)

◇◆丶佛笑我妖孽 提交于 2019-12-12 23:06:24
问题 I want to consume a REST service in my web app (.war with 6.0.0.Final), but have problems adding jersey-client libs: <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-client</artifactId> <version>1.9.1</version> <type>jar</type> <scope>compile</scope> </dependency> With this configuration I get the following error during JBoss startup: 08:11:28,297 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web]. [localhost].[/test]] Exception starting filter Resteasy: java.lang