FAQ Database Discussion Community


Wildfly Kafka clients module javax/management/JMException not found

java-ee,jboss,wildfly,kafka
I'm try to create Kafka clients module for Wildfly. Here is module.xml: <?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.0" name="org.apache.kafka.clients"> <resources> <resource-root path="kafka-clients-0.8.2.0.jar"/> <resource-root path="lz4-1.2.0.jar"/> <resource-root path="snappy-java-1.1.1.6.jar"/> </resources> <dependencies> <module name="org.slf4j"/> </dependencies> </module> Wildfly (8.2.0-Final) gives this error on boot:...

what should be jboss.bind.address should be when running jboss instance?

jboss,jboss7.x,jboss6.x
One of our web projects is configured to run on JBoss EAP 6. In our development machine, I set jboss.bind.address=192.168.XX.X (This is the IP of the machine I run JBOSS) jboss.bind.address.management=192.168.XX.X what should I have for my local development box. I tried the following: 127.0.0.1 192.168.YY.YY (This is the ip...

How to set HttpServletResponse on Jboss EAP 6.2?

java,spring-mvc,jboss
I have a simple method where I need to change the contentType to "text/plain" but when I am using Jboss EAP 6.2 it is ignored and the returned value is "application/json. @RestController @RequestMapping("/upload") public class UploadController { ... @RequestMapping(method = RequestMethod.POST) public Result foo(MultipartFile arquivo, HttpServletResponse response) { response.setContentType("text/plain"); return...

“Destroying connection that could not be successfully matched”

java,jboss,jackrabbit
I have an application that seems to work fine, but if I browse the log files I see a lot of these kind of errors: 2015-06-04 08:23:55,656 WARN [org.jboss.resource.connectionmanager.InternalManagedConnectionPool] [DA366C7824A976BA8D1121A6E9A4F1C1.Node23] Destroying connection that could not be successfully matched: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnec[email protected][state=NORMAL [email protected] handles=0 lastUse=1433398630770 permit=false trackByTx=false...

“Visual Page Editor has experimental support for Windows 64-bit”

eclipse,jsp,jboss
I am using Eclipse Luna and JBoss AS 7. When I create a JSP page in Eclipse, then I get the below error: I changed my server to Tomcat 7, still I am getting the same error. How is this caused and how can I solve it?...

JBPM 4.4 vs JBPM 6.2

java,java-ee,jboss,jbpm
I am planning to use advance version of JBPM i.e. JBPM 6.2. Currently my project is using JBPM 4.4 but there are issues with JBPM4 DB tables which are accessed internally by JBPM API. I need inputs regarding this udgradation activity: Since existing workflows will be continue to use. So...

Valid “protocols” for HornetQ

java,jboss,jms,hornetq
I have some code like this for connecting to HornetQ. Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); properties.put(Context.PROVIDER_URL, "remote://127.0.0.1:4447"); properties.put(Context.SECURITY_PRINCIPAL, "user"); properties.put(Context.SECURITY_CREDENTIALS, "pwd"); ConnectionFactory connectionFactory = null; Destination destination = null; try { Context context = new InitialContext(properties); I inherited this, and am trying to get a...

Itextpdf stop transform pdf correctly

java,pdf,jboss,itext,itextpdf
I have a next issue with itextpdf. private void generatePdf() throws Exception { FileOutputStream fos = null; try { PdfReader reader = new PdfReader("template.pdf"); fos = new FileOutputStream("test.pdf"); PdfStamper stamper = new PdfStamper(reader, fos); stamper.close(); } catch (Exception e) { throw e; } finally { if (fos != null) {...

Restricting access to particular URL for sesame server deployed on JBoss (WildFly 8.2)

jboss,wildfly,sesame
I have a sesame server running deployed in a WildFly 8.2.0 final container. How can I restrict access to some particular URLs? I know I have to edit some XML files (deployment descriptor and some other files) but I don't know which files and where to find them....

WildFly 8.2 does not start project while Jboss 7.1 do

jsf,jsf-2,jboss,wildfly-8
My project originally developed under Jboss but if start it on WildFly there is only message in browser: "Not Found" and any errors. Is there something what I missed? web.xml mapping <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> index.jsp <jsp:forward page="./faces/index.xhtml" /> So it works on Jboss but does't on WildFly....

java.lang.NoSuchMethodError: javax.persistence.EntityManager.createQuery when using jpa / hibernate

java,hibernate,jpa,jboss,jboss5.x
We are running an app in jboss 5.1.0.GA, and it's complaining when we try to use the EntityManager.createQuery method. An implementation of this method is available in org.hibernate.ejb.AbstractEntityManagerImpl (and probably a few other places included in our code). I suspect that it's picking up an older version of hibernate from...

Set system properties in standalone-full.xml in wildfly 8.2

jboss,jboss7.x,wildfly,wildfly-8
I have added system-properties tag in standalone-full.xml but its not working in standalone mode. But if I add the same tag in domain.xml its working for domain mode. <?xml version='1.0' encoding='UTF-8'?> <server xmlns="urn:jboss:domain:2.2"> <extensions> .... </extensions> <system-properties> <property name="java.util.Arrays.useLegacyMergeSort" value="true"/> </system-properties> </server> In this article https://docs.jboss.org/author/display/WFLY8/General+configuration+concepts Its written...

How to use DatabaseCertificate login module

authentication,jboss,authorization,wildfly
I want to use DatabaseCertificate login module to load groups from DB. Current config: > <security-domain name="LDAPAuth"> > <authentication> > <login-module code="LdapExtended" flag="required"> > <module-option name="java.naming.factory.initial" value="com.sun.jndi.ldap.LdapCtxFactory"/> > <module-option name="java.naming.provider.url" value="***************"/> > <module-option name="java.naming.security.authentication" value="simple"/> > <module-option name="bindDN"...

JBoss7/WildFly webapp - how to access properties file from class

java,file,properties,jboss,wildfly
I try to load webapp project's settings from own config.properties file, but there's no success: the file not found. I can't use ServletContext method, because i've access the file from ordinary class. file = Config.class.getClassLoader().getResourceAsStream("/config.properties"); - it's returns null. I've tried to put the file to WEB-INF and resources folders,...

Spring Integration with RESTEasy

jboss,spring-integration,resteasy
In our existing integration, we are planning to replace Queue ( the entry point to our integration processing) with RESTEasy services. We are processing the HTTP requests as below: 1) Asynchronous HTTP Request Processing for GET 2) Asynchronous Job Service for POST I understand that spring integration provides and for...

what is the difference between jndi binding of module and app in Java ee 6/7?

jboss,jboss7.x,jndi,jboss6.x,java-ee-7
We migrated from Jboss EAP 5 to EAP 6 in our development environment. I now see the following in my JBOSS logs. I am trying to understand how this binding happens. I have read JBOSS docs on JNDI namespace binding. Still I am not totally clear how it works. Here...

jboss deployment error spring hibernate maven

java,spring,jboss
I am tring to deploy an application to jBoss 4.2.3 I think I have missed something in jboss configuration. What i have made. I download jboss 4.2.3, place tuxgrh-ws-1.0.x.war in "jboss-4.2.3.GA\server\default\deploy" folder and launch run.bat in a console. I have a mysql server with a database. I get next errors...

Modeshape initial content creation

jboss,jcr,modeshape
I try to add initial content to my repository. But in the log I can see : 10:12:46.934 DEBUG o.m.jcr.InitialContentImporter - Importing node at path /{}accounts 10:12:46.941 DEBUG o.m.jcr.InitialContentImporter - Importing node at path /{}users 10:12:46.941 DEBUG o.m.jcr.InitialContentImporter - Importing node at path /{}accounts/{}foo why it add {} ? Cause...

java.lang.IllegalStateException: Unable to retrieve EntityManagerFactory for unitName HorizonPU with Arquillian

java,jpa,jboss,jboss-arquillian
I hope someone can help me with an extremely frustrating issue. I want to use Arquillian to test a webapp I am developing and I am having a hard time trying to get the JPA tests to run. I am pretty new to Arquillian and I must admit that I...

Does Bluemix include a JBoss runtime?

jboss,cloudfoundry,bluemix
How can I create a JBoss runtime on Bluemix? The JBoss buildpack for Cloud Foundry does not support all features. The current buildpack is focused on running web applications in the servlet container and nothing further. Are there more docs on this and any updates on the plans going forward,...

setMessageDrivenContext is not invoked

java,java-ee,jboss,ejb,jboss5.x
I am using EJB 2.0 without annotation. I have a ejb-jar.xml like: <?xml version="1.0"?> <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd"> <ejb-jar> <enterprise-beans> <message-driven> <ejb-name>XMLEventQueueBean00</ejb-name> <ejb-class>com.test.XMLEventRequestService</ejb-class> <transaction-type>Bean</transaction-type>...

404 Error while deploying simple web-app in JBoss AS 6 and JBoss AS 7?

rest,jboss,ejb,jboss7.x,java-ee-6
I followed this blog for injecting EJB in REST layer. Here is the code that I tried deploying in JBOSS AS 6 and 7 using Eclipse: REST: package com.example.rest; import javax.ejb.EJB; import javax.ejb.Stateless; import javax.ws.rs.GET; import javax.ws.rs.Path; @Stateless @Path("current") public class ServiceFacade { @EJB ServiceImpl service; @GET public String getDate(){...

Failed to execute goal on project. Unable to find POM in project

java,maven,jboss
I am trying to build an application having following dependency. <properties> <version.jboss.as>7.5.0.Final-redhat-21</version.jboss.as> </properties> <dependencies> <dependency> <groupId>org.jboss.as</groupId> <artifactId>jboss-as-jms-client-bom</artifactId> <version>${version.jboss.as}</version> <type>pom</type> </dependency> </dependencies> This is an example which i found on Red Hat Site -...

Multiple Context path for the same war in jboss

web,jboss,jboss6.x
I am deploying my web app in jboss 6 eap I would like to have different context path for the same war http://localhost:8080/path1/xyx http://localhost:8080/path2/xyx Can you please suggest me on how to do this...

JBOSS 7.1.1 server hangs during the compilation of jasper reports

java,jboss,jasper-reports,client,server
My developer server is JBOSS AS 7.1.1 final and I have an app where I make dynamically an jasper report based on some arguments with these basic operations(download, compile, export to pdf, encode to base64, display on screen). The thing is that on my JBOSS it works perfectly, but when...

Each SLF4J log message contains a nested message

java,jboss,slf4j,jboss5.x
I use JBoss 5.2 and whenever I log something, slf4j outputs a nested log message, e.g. private final static Logger logger = LoggerFactory.getLogger(MyClass.class); ... logger.info("FOOBAR") will result in the log message: 2015-06-11 09:54:37,154 INFO [STDOUT] (quartzScheduler_Worker-1) 09:54:37,154 INFO [MyClass] FOOBAR The inner message is the correct one, why does the...

Connecting remote JBoss-eap-6.2 to pass message in java

java,jboss,jms,hornetq
Code runs without any problem up to creating connection factory but it cannot create topic connection. When creating topic connection it throws following exception.(My code is for creating publisher and subscriber) Here is the terminal output I received, Jun 03, 2015 10:51:55 AM org.xnio.Xnio <clinit> INFO: XNIO Version 3.0.7.GA-redhat-1 Jun...

Getting the jsp source code appended with the file content when I download files

java,jsp,jboss,struts2,weblogic
I am working on a File upload/download functionality, in Java using Struts2 framework, where we are uploading to and downloading from a remote server path. All seems to work fine when I check the functionality at my local machine with a local path as the destined path from where i...

How to truly turn off Tiered Compilation?

java,jboss,jvm
My local Java environment is still on java version "1.6.0_35" Java(TM) SE Runtime Environment (build 1.6.0_35-b10) Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode) When I configure Jboss, I tried to turn off Tiered Compiler as Oracle suggested here, now there is the jvm parameters (with -XX:-TieredCompilation): VM Arguments:...

Java external property on Wildfly

java,properties,jboss,wildfly
Actually, I have this code to get a folder with properties Properties props=System.getProperties(); String path = props.getProperty("jym.classpath"); And the "jym.classpath" is defined on Apache Tomcat console -> Java -> Java Options, like: -Djym.classpath=C:\JAVA_SYS\props\jym\props I want to do the same on a JBoss Wildfly 8.2, without doing it on my code,...

Does JBoss 7.x Support J2EE 5.0 and EJB 2.0?

java,java-ee,jboss,jboss7.x,ejb-2.x
I have an application build on J2EE EJB 2.0 deployed on JBoss 5.1.0. I want to migrate that application to JBoss 7. Does JBoss 7.x Support J2EE 5.0 and EJB 2.0? If Yes, then how to Migrate Jboss 5.1.0 to JBoss 7.x?

ClassLoader classes are not properly loaded in the thread

java,jar,jboss,casting,classloader
I am creating a new classLoader using URLClassLoader and trying to set it as the classLoader for the current thread. But it is not working properly for me. As per my understanding, if I set a classLoader to the current thread, the methods and interfaces referenced by the Current Thread...

In a JavaEE stateless session bean, why is the SessionContext responsible for rolling transactions back and not the EntityManager?

java-ee,jboss,hibernate-entitymanager
To me (someone who is new to JavaEE development), I would think that a container managed EntityManager would be responsible for rolling back failed transactions and not a SessionContext instance. Suppose the following scenario... @Stateless public class MySessionBean implements MySessionBeanRemoteInterface { @PersistenceContext(unitName="MYPu") private EntityManager em; @Resource private SessionContext sctx; @Override...

Cannot enable a .war in JBoss AS 7.1

java,deployment,jboss
I have a problem while enabling the .war project in JBoss AS, here is the log from standalone/log/server.txt 18:57:51,727 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "booking-war.war" 18:58:15,025 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."booking-war.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."booking-war.war".PARSE: Failed to process...

Wildfly - “Connector 'netty' not found on the main configuration file”

java,eclipse,jboss,netty,wildfly
I've added a connection factory at the standalone-full file of Wildfly: <jms-connection-factories> <connection-factory name="K19Factory"> <connectors> <connector-ref connector-name="netty"/> </connectors> <entries> <entry name="K19Factory"/> <entry name="java:jboss/exported/jms/K19Factory"/> </entries> </connection-factory> ... </jms-connection-factories> And I have the following code to use it: Properties props = new Properties();...

Linkage Error with Apache CXF (JAXBAttachmentMarchaller) and JBOSS 5.2

java,maven,jboss,cxf,java.lang.linkageerror
I have a Linkage error where it seems like Jboss (5.2) provides one version of the class org.apache.cxf.jaxb.attachment.JAXBAttachmentMarchaller whereas I somewhere provide another implementation of the class. I have searched for the class and it is the maven project cxf-rt-databinding-jaxb which contains it, so I've excluded that project from my...

Sync jboss modules and jbossdatahome between devs

java,maven,jboss,jboss7.x,jboss-arquillian
We're using local jboss 7 instances (maven jboss plugin) with custom modules for local development. Each dev can work on multiple projects. For each project, each dev needs to have the proper jboss modules and jbossdatahome folder. Each dev needs the same path to these folders, as they are hard...

RESTful services on Jboss 7 not responding

web-services,rest,jboss,ejb,resteasy
I got some application in which i try to expose some RESTful webservices. Unfortunately I'm stuck. Project builds and deploys fine but i just cannot access my services using GET requests. My war looks alike: war. war |--index.html |--WEB-INF |--web.xml |--classes |--classes here.. I got empty web.xml: <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"...

How to load properties files dynamically when using servlet with war file?

java,properties,jboss,resources,war
I'm using JBoss AS 7. How can I use properties files which I download everytime(with translations) from an external folder? I'm deploying the servlet as a .WAR file and I want to use these properties files from a random temp folder from the disk. How do I that ? The...

Seam Quartz Dispatcher not firing on seconds and minutes field for a given cron expression

java,jboss,quartz-scheduler,seam,cronexpression
I have a Quartz job that is to fire for a certain time repeatedly. Unfortunately it does not fire for some unknown reasons. Here is my cron expression : 0/5 0 0 * * ? So basically the job should be fired every 5 seconds. This is the part which...

Why JBoss EAP 6.4 fail to load the session using the http session replication mechanism?

java,jboss,web.xml,jboss-eap-6,session-replication
I have been using session replication successfully in JBoss EAP 6.1 in Windows. But then I changed to JBoss EAP 6.4 for dev testing in ubuntu and the same code stopped working. There's not much to it, I just added the <distributable/> tag and didn't added any manual serialVersionUID value...

How do i set up datasource on Jboss 6 EAP for as400 db2?

java,jboss,ibm-midrange,jboss6.x,db2400
I am trying to setup a jboss 6.3 data-source to an ibm as400 jboss 6.3 is running on a windows server 2012 VM java 1.8.0_31 64 bit i am getting this error in the console on start up of jboss 1 4:02:09,332 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status...

Possible to detect when application starts successfully in Wildfly?

jboss,wildfly,wildfly-8
Is there a way to detect when a war file is successfully loaded by Wildfly and cause some code to execute?

Write a Java Program to connect to HornetQ Messaging Service in Jboss EAP 6.3?

java,jboss,jms,hornetq
I am using Jboss EAP 6.3 and need to use Messaging facility. I have worked in Jboss 4x, where we can make connection easily using following code: public static final String PROVIDER_URL = "jnp://localhost:5445"; public static final String JNP_INTERFACES = "org.jboss.naming:org.jnp.interfaces"; public static final String INITIAL_CONTEXT_FACTORY = "org.jnp.interfaces.NamingContextFactory"; private static...

How to configure WildFly 8.2 to use AccessLogHandler

jboss,wildfly
I have found that there is a handler io.undertow.server.handlers.accesslog.AccessLogHandler that can log http access. However I am not able to configure it so it will produce any log messages. Here is a code snippet from my standalone.xml: <filter class-name="io.undertow.server.handlers.accesslog.AccessLogHandler" name="access-log-handler" module="io.undertow.core"> <param name="formatString" value="common"/> <param name="accessLogReceiver" value="io.undertow.server.handlers.accesslog.JBossLoggingAccessLogReceiver"/>...

JBoss EAP 6.x - PolicyContext.getContext remains null

jboss,jboss6.x,jaas,java-security
I'm using JBoss EAP 6.4 for my enterprise app and I'm a little stuck when I attempt to retrieve the active subject. Of course, the user would need to authenticate, which goes through the following code snippet LoginContext loginContext = new LoginContext("CONTEXTNAME", callbackHandler); loginContext.login(); return loginContext.getSubject(); That works just fine...

How to get ProcessDefinition using jpdl for JBPM 4.4?

java,jboss,jbpm,jpdl
In my project there is an existing old.jpdl.xml definition. It is working fine. Now I want to run another new.jpdl.xml definition. After deployment of ear file I tried to read new.jpdl.xml using new ProcessDefinitionId with help of below code. I believe that I am missing deployment steps. Can someone guide...

Jboss-cli: JBAS014653 (“Expected [OBJECT] but was LIST”) when trying to add datasource

postgresql,jboss,wildfly,xa,jboss-cli
I tried inserting a new XA-Datasource in Wildfly 8.1: /opt/wildfly/bin/jboss-cli.sh --connect --controller=192.168.1.220:9990 [[email protected]:9990 /] xa-data-source add --name=myName --jndi-name=java:jboss/datasources/myDS --driver-name=postgresql --user-name=myUser --password=myPass --use-java-context=true --use-ccm=true --min-pool-size=10 --max-pool-size=100 --transaction-isolation=TRANSACTION_READ_COMMITTED --pool-prefill=true --allocation-retry=1 --prepared-statements-cache-size=32...

How to load config.properties file in a Seam Application using web.xml context-param

jboss,seam,web.xml
I have a seam web application in which I have to include a security module for integrated authentication. I can see that the module isn't based on seam application because it uses a spring-like notation. As the module works defining a listener and a properties file in the web.xml I...

wildfly docker image authentication issue

jboss,docker,wildfly,dockerfile
I've followed the instructions on the following link: WildFly Docker image in the section Extending the image However, after I make the build, when I go to the URL http://localhost:9990, I have the following message: The management interface could not be loaded. Authentication required. ...

Run Micro-benchmark in application servers [JMH]

java,jboss,microbenchmark,jmh
I read about JMH and tried the samples provided. What I am trying to do is measure the stats of following scenario, [ 1] client order -> [2] server -> [3] start processing the order -> [4] processed the order successfully and ready to send -> [5] client receive the...

Spring - configure Jboss Intros for xml with java config?

java,xml,spring,spring-mvc,jboss
I'm in the process of writing a spring web app and want to convert my objects to xml without annotations. I know with xml config you can do this: <bean id="jaxb2Marshaller" class="software.bytepushers.userprofile.models.JaxbIntroductionsMarshaller"> <property name="classesToBeBound"> <list> <value>software.bytepushers.userprofile.models.Person</value> <value>software.bytepushers.userprofile.models.WebServiceResponse</value> </list> </property> <property...

Java JBoss Fatal error: cannot find the required native library named JLinkNativeLibrary

java,jboss,kernel,wolfram-mathematica
I'm trying to work with Wolfram Mathematica Kernel from Java Web Application using JBoss. Here is a Main Class. public class Main { static KernelLink ml; static KernelLink ml2; public Main(){ String path = "-linkmode launch -linkname 'C:/Program Files/Wolfram Research/Mathematica/9.0/MathKernel.exe'"; try { ml = MathLinkFactory.createKernelLink(path);// подключаем ядро ml.setComplexClass(MyComplex.class); System.out.println(ml.getComplexClass()); ml.discardAnswer();...

I am trying to run a war file in jboss using resteasy services but not able to do so

java,maven,jboss,resteasy
I am trying to run a rest easy web services on my jboss eap 6.0 server my jboss server is up and running but when I am trying to copy my war file in deployment folder of jboss it is throughing an ModuleClassLoader exception....please help me finding the solution for...

JBPM 6.1.0 KIE workbench evaluation form rendering not properly

jboss,jbpm,kie
This might be too specific of a question. But I'm really lost. I followed the installation of jBPM 6.1.0 on the website http://docs.jboss.org/jbpm/v6.1/userguide/jBPMInstaller.html and successfully configured Eclipse, KIE workbench, and WildFly server. When I opened the Evaluation bpm file on KIE workbench as described in the KIE workbench tutorial in...

Why we need to configure and deploy an ActiveMQ Queue to JBoss?

spring,jboss,activemq
For sending and receiving messages we use apache activemq which is open source.activemq is integrated with jboss to perform this operation.But I want to know without integrating into jboss can we achieve this functionality , secondly why we need to use jboss integration with activemq. I want to refine the...

Wildfly server:Partial Content and Range Requests

http,jboss,jboss7.x,wildfly,wildfly-8
Is there a way for wildfly server support http range header? We are requesting file for server with http get and http header "Range: bytes 200-400" The files that served from apache tomcat server responds http status code 206 and partial file content but wildfly server responds same request with...

Exception in thread “main” java.lang.NoSuchMethodError: org.jboss.resteasy.util.CaseInsensitiveMap.add(Ljava/lang/String;Ljava/lang/Object;)V

java,web-services,rest,jboss,resteasy
I am new to RestEasy web-service .I am getting the proper response from the restEasy Web-Serivce but when I try to write a web-service client ,I am getting above error.Please find the code as below. Please let me know where is the issue. I am using RestEasy 3.0.9 Final. RestServiceClient.java...

Issues with CDI when injecting generic type : Wildfly 8.2.0.Final

jboss,cdi,wildfly,wildfly-8,weld
We are facing weird injection issues in Widfly due to CDI changes. We have interface public interface Command<I, O> { } and many classes implement this interface like this public class ApproveUserRequests implements Command<ApproveUserRequestsRequest, List<String>> { } Application listener classes likes to get list of all classes available and uses...

For what exactly @XXXXX is used for? [duplicate]

java,syntax,jboss
This question already has an answer here: Java Annotations 7 answers Beginner's question. I see a lot of @XXXXX s in our code base. So I would like to know what is the significance of this syntax. Below is a snippet of our code and example @Process public Message...

why the deployement of .jar on JBOSS gives me :java.lang.NoClassDefFoundError?

java,eclipse,maven,jboss,ejb
I have tow maven projects: 1) named test where i have my tow interfaces: package interfaces.locals; import javax.ejb.Local; @Local public interface IClientLocal { void showClientName(); } package interfaces.Remotes; import javax.ejb.Remote; @Remote public interface IClientRemote { void showClientName(); } The pom.xmllooks like: <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">...

Refactoring some legacy camel code, is this code unnecessary or am I missing something?

jboss,apache-camel,jbossfuse
I'm refactoring some apache camel legacy code in a JBoss Fuse instance and I've run into some code that I'm not sure what it's purpose is for. <when condition> <loadBalance id="someVar"> <failover roundRobin="true" maximumFailoverAttempts="3" /> <to uri="fabric:FABRICENDPOINT" /> </loadBalance> </when> I haven't used Fabric's load balancer before but from what...

Create alias for conditions in Drools Decision table

jboss,drools,drools-guvnor
Attached is my decision table, where in I'm using sv2.SV202_CompMedProcedId.get("SV202-02") several times in my condition. Is there any way that we can create an alias for sv2.SV202_CompMedProcedId.get("SV202-02") (for example, S) and use that alias in my condition instead of using the entire line every time? CONDITION sv2.SV202_CompMedProcedId.get(""SV202-02"").Value >= '70010' &&...

How To find a WebSocket from a REST bean

rest,jboss,websocket
I have a javascript client that connects to a server via websockets and sends data via ajax to a server. Once the server finished processing the data, I want to send a message via the websocket to the client. Problem is: How do I find the WebSocket from the REST...

How to get JBoss 7.1.3 to use my $JAVA_HOME environment varaible?

jboss,environment-variables,jboss7.x,java-home
I'm using Mac 10.9.5 with JBoss 7.1.3.Final. I am launching JBoss through the termianl (bash shell), like so Daves-MacBook-Pro:core davea$ cd $JBOSS_HOME/bin Daves-MacBook-Pro:bin davea$ sudo sh standalone.sh Within the shell, I can see that $JAVA_HOME is defined ... Daves-MacBook-Pro:bin davea$ echo $JAVA_HOME /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home However, JBoss is not picking up this...

Configure specific SFSB stateful-timeout in standalone.xml (JBOSS)

java,java-ee,jboss
For my JEE 3.1 application I have a SFSB for which I have set a specific timeout. I need to have easy access to this value to allow it to be easily configurable. First I had the annotation in my SFSB class: @StatefulTimeout(value = 2, unit = TimeUnit.HOURS) This works...

How do I enable XSLT 2.0 processor in JBoss eap 6.1 server, to get rid of errors like XSLT 2.0 functions are not available

java,xml,xslt,jboss,exslt
I am trying date formatting in XSLT 2.0. When I try to run it in my workspace it runs fine and I get a proper response. But when I try to achieve the same after deploying the my jar on JBoss eap 6.1, I get below error: 16:35:02,311 ERROR [XSLTUtil]...

REST jBPM API, where is kie-services-client for v6.2

maven,jboss,jbpm
jBPM 6.2 is running nicely on JBoss. From a WebSphere v855 application (camel route) we want to use the jBPM REST API to communicate to jBPM. Preferably with as little as possible dependencies. In the user guide chapter 17.2 REST the documentation says: "When using Java code to interface with...

Modifying Wildfly logging configuration on application deploy

logging,jboss,wildfly
I'm using Wildfly 9 and I want to have a separate log file for my application. I also want to use Wildfly Administation Console's Log viewer to view this log file. It also would be great if each node's apllication logs will be available from Wildfly domain controller, like it's...

Javamail ClassCastException when sending multipart messages

java,jboss,jax-ws,javamail,classloader
I am getting the following exception when attempting to send a multipart message: java.lang.ClassCastException: com.sun.xml.internal.ws.encoding.StringDataContentHandler cannot be cast to javax.activation.DataContentHandler at javax.activation.MailcapCommandMap.getDataContentHandler(MailcapCommandMap.java:609) at javax.activation.MailcapCommandMap.createDataContentHandler(MailcapCommandMap.java:563) at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:625) at...

WildFly 8.2.0 (JBOSS) standalone server unable to start

java,jboss,startup,wildfly-8
I'm new to application servers. I downloaded the latest version of JBOSS (WildFly 8.2.0) and I wanted to start the standalone server as specified here. I have properly set the JAVA_HOME (I use jdk 1.8.0_40) and JBOSS_HOME variables and also used the standalone.bat opposed to .sh file specified in the...

Where does jboss eap6.2 deploy the war file?

jboss,jboss-eap-6
I used the jboss web console http://xxxxx:9990/console/App.html#deployments to successfully deploy my web app. And I can visit the page in this app. But I can not find my war file under jboss-eap-6.2/standalone/deployments. Where does jboss backend put the war file? thanks....

Right way to configure the log in Wildfly 8.2

java,logging,jboss,wildfly,wildfly-8
I have confusion in setting up the log in Wildfly-8.2.0. Initially I had used my own logging system, with log4j.xml built into the WAR file, all worked very well. But, when I make any changes to the log configuration I need to redeploy the app to make the changes effect....

WildFly context forwarding

jboss,wildfly
Default installation of WildFly has only root context specified - for welcome pages <subsystem xmlns="urn:jboss:domain:undertow:1.2" instance-id="main"> <buffer-cache name="default"/> <server name="default-server"> <http-listener name="default" socket-binding="http"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content"/> <filter-ref name="server-header"/> <filter-ref name="x-powered-by-header"/> </host> </server>...

JBoss Forge does not respond to command

java,maven,jboss,build,jboss-forge
Following setup: I am using Win 7, Java 1.7 I successfully installed JBoss Forge 2.15.1 I added /.../forge-distribution-2.15.1.Final/bin/ to my PATH I can start forge with forge But none of the commands works: [D:\]$ list-commands Command: list-commands was not found The same goes for new-project. BUT: version command goes fine....

Hibernate configuration error while reading schema

java,hibernate,postgresql,jboss,jboss-tools
Hey stackoverflow, I tried to add a Hibernate configuration to my workspace in order to reverse engineer my database. When I am opening the database point in the 'Hibernate Configurations' view, i get a Reading schema error: null with the following exception: java.lang.NullPointerException at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$1.compare(LazyDatabaseSchemaWorkbenchAdapter.java:76) at java.util.TimSort.countRunAndMakeAscending(Unknown Source) at java.util.TimSort.sort(Unknown...

(Jboss 5) Annotated Message Driven beans not detected/deployed in War file

java-ee,jboss,java-ee-6,jboss5.x
Got the following annotated mdb which works when deployed as a jar(even without the ejb.jar.xml) into Jboss but doesn't work when deployed within a war, mdbs seem to be ignored.I have an existing project which is a war and would like to just inject as is today as the mdb...

Error when configuring MariaDB driver on Wildfly server

java,jboss,mariadb,wildfly-8
I am trying to configure a MariaDB datasource on Wildfly. This seems like it should be a simple operation, but I can't seem to get the datasource module to load properly. I have added the maria-java-client-1.1.8.jar archive and a module.xml file to the wildfly-8.2.0.Final/modules/com/mariadb/main directory. The module.xml file is as...

Embedded Message Driven Resource Adapter fails to deploy

jboss,wildfly,ear,wildfly-8,jca
I have been struggling to get an example of a Message driven (inbound) resource adapter to deploy and interact with an EAR on Wildfly 8.2.0. I used this Java EE 7 JCA sample as the basis of my application. I can see in the log files that the Resource Adapter...

Find duplicate properties file from class path of a deployed application in JBOSS

java,jboss
My Application (ear) has 2 jar and 2 war files. I want to find out if a properties file (xyz.xml) appear twice or more in the class path. I tried withURL url = Thread.currentThread().getContextClassLoader().getResource("xyz.xml"); . But this process return only the 1st appearance of the properties file. It's stop looking...

java.lang.AbstractMethodError: org.jboss.arquillian.config.descriptor.impl.EngineDefImpl.getDeploymentExportExploded()Ljava/lang/Boolean;

java,jboss,spock,wildfly-8,jboss-arquillian
When I try to deploy my artifact during integration test I'm getting this error. @RunWith(ArquillianSputnik) class WebServiceTest extends Specification { @Deployment static WebArchive createDeployment() { ShrinkWrap.createFromZipFile(WebArchive.class, new File("target/project.war")) } } where arquillian.xml is: <arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.org/schema/arquillian...

Error while deploying ear in JBoss AS7

java,jboss,jboss7.x
I am migrating EJB application from OC4j to JBoss AS7, I am able to deploy ear on JBoss, however i am getting one New missing/unsatisfied dependencies error in console, console log is mentioned below: 17:30:38,055 INFO [org.jboss.as.ejb3] (MSC service thread 1-3) JBAS014211: No jndi bindings will be created for EJB...

Annotations on fields not processed between different deployments in JBoss

java-ee,jboss,annotations,jboss6.x,jboss-modules
We have an issue where we have a superclass with an annotation (@Resource) and subclasses that extend that superclass are are stateless beans. Very similar to this, if the superclass and subclass are in the same module then the resource is injected successfully. If they are in separate modules then...

@Resource datasource breaking DB connection

java,jpa,jdbc,jboss,wildfly
I recently wrote a class, in my web application, for parsing a huge XML file and feed a db table with its content. My application is running on Wildfly9, and uses JPA with Hibernate provider to handle a MySQL DB. The AS configuration is pretty standard, I just added my...

How to deploy WildFly datasource with Arquillian?

java,jboss,integration-testing,wildfly-8,jboss-arquillian
I tried to deploy my datasource as follows: @Deployment(name = "test", order=2) static WebArchive createDeployment() { ShrinkWrap.createFromZipFile(WebArchive, new File("target/test.war")).addAsWebInfResource(new File("src/test/resources/test-DS.xml"), "test-DS.xml") } but it seems that my datasource is ignored, I see no info about deployment in jboss console. Is there any other possibility to deploy datasource with arquillian? @Deployment(name...

Spring Security Kerberos chained with basic

java,spring,jboss,spring-security,wildfly
I have a hopefully quick question about Spring Security. I am looking for a solution to integrate security into our application which provides SSO but HTTP basic as well. One of the automated pieces of our system can only support basic authentication and we are pretty locked into it. Currently...

Adding an item to a HornetQ queue from a servlet

java,jboss,hornetq,jboss-eap-6
I have a project that gets built as a war file and deployed to a JBOSS server. The JBOSS server's standalone-full-ha.xml file is configured to create several queues. The war file uses Spring to register a class to listen to these queues, and process the messages it gets. The application...

Deploye two wars with different domain name but same context-path in same jboss-4.0.3

tomcat,jboss,web-deployment,contextpath
I've two web application wars STORE_ABC.war and STORE_DEF.war and single JBoss server running on my machine. I want to deploye both war with same context path in my jboss as follows. http://localhost:8080/home For STORE_ABC.war http://testsite1:8080/home For STORE_DEF.war jboss-web.xml for STORE_ABC.war and STORE_DEF.war <jboss-web> <context-root>/</context-root> </jboss-web> How could I achieve above...

java.lang.IllegalStateException: Already installed InitialContextProperties

unit-testing,java-ee,jboss,testng,seam
I am trying to run a unit test using TestNG with Eclipse (right-click in unit test-> run as TestNg Test). The test fails right away during init phase. I think this is related to testng is loading two different datasources but I have no idea how to fix that. This...

Why do the JBoss/wildfly BOMs not contain all of the provided modules?

jboss,dependencies,pom.xml,wildfly,wildfly-8
Wildfly 8.x ships with BOMs for easy dependency management: https://github.com/wildfly/boms These are useful for the module-based classloading described here: https://docs.jboss.org/author/display/WFLY8/Implicit+module+dependencies+for+deployments However, when I look in $JBOSS_HOME\modules\system\layers\base, I see many, many more included modules. For example, dozens of org.apache modules like commons-lang, etc. are included. These deps are also not in...

How to set external folders in classpath through command line while starting wildfly server

jboss,classpath,jboss7.x,wildfly,wildfly-8
I want to set external folders in classpath through command line while starting wildfly server. Unable to set it through -p standalone.sh -p path of folder ...

Getting R6034 error when starting Eclipse for Java EE Developers

eclipse,java-ee,jboss,windows-7-x64,eclipse-luna
I use Windows 7 64-bit, Java 8. I'm getting the following error: and the following screen is left behind after the process is manually terminated: I believe it started happening right after I installed a plugin from JBoss Tools - xulrunner.site - ­ Update Site that was supposed to help...

JBoss 5.1.0.GA - Redirect to port 443 not working, always get redirected to 8443

java,redirect,jboss
I have an issue with setting up a redirect from 8080 to port 443. Here the scenario: I have a load balancer, listening to ports 80 and 443. All requests for port 80 are forwarded to port 8080 on the hosts behind the load balancer. All requests for port 443...

JBoss REST WS application doesn't work when deployed as WAR file but works when expanded to a folder

web-services,jboss,war,web-deployment,resteasy
I am deploying an application on JBoss server (EAP-6.4.0, JBoss Web/7.5.7.Final-redhat-1). I get a very strange behavior. Let's say the application is called Engine.war. The application implements a REST Web service server. When I deploy the application by copying the WAR file to c:\EAP-6.4.0\standalone\deployments\Engine.war file, it is successfully deployed, but...

Wildfly and Process controller

jboss,wildfly,administration
I see here and there the term of process controller in Jboss articles, but I can't find any description of it in the official documentation. Search in the documentation : no trace old documentation : some trace question in Stack : seems important So the question is : what is...

JmsTemplate and CachingConnectionFactory

jboss,jms,spring-jms,jmstemplate
I'm finding some difficulties in trying to reduce the connection and session creation when sending messages to a Jboss Queue. <bean name="jbmTemplate-${jbmQueue}" class="org.springframework.jms.core.JmsTemplate" lazy-init="true"> <property name="sessionTransacted" value="true" /> <!-- connection factory --> <property name="connectionFactory"> <ref bean="jbmCachingConnectionFactory"/> </property> <property name="pubSubDomain"> <value>false</value> </property> <property...

how many maximum concurrent users can a tomcat instance, jboss instance and weblogic instance handle?

java,linux,tomcat,jboss,weblogic
I am willing to launch a web application. It was completely on the structs only and no springs are used in it. We are willing to launch in either tomcat or jboss or weblogic application servers. So, I may get many users' hits to the application. My hardware is 32GB/8cores...

Maven Dependency for EJB 3.1 [jboss-ejb-api_3.1_spec]

java,maven,java-ee,jboss,ejb-3.1
I followed some tutorials on EJB 3.1 and those were using the following dependency for EJB-API. <dependency> <groupId>org.jboss.spec.javax.ejb</groupId> <artifactId>jboss-ejb-api_3.1_spec</artifactId> <version>1.0.2.Final</version> </dependency> My problem is, this is only for jboss or can I used this in any other application servers. If not why there are dependency like these which are not...

org.apache.catalina.realm.RealmBase.java file located in Jboss EAP 6.3

jboss,catalina
I tried to run simple Web APP in JBoss EAP 6.3 and from the log and I saw DEBUG [org.apache.catalina.realm] (http-/127.0.0.1:8080-1) User data constraint has no restrictions This logging message is from org.apache.catalina.realm.RealmBase.java I would like to know, where does this file located in EAP 6.3? Which jar file? I...

@Context object not injected when unit testing resteasy

java,unit-testing,jboss,jax-rs,resteasy
I'm trying to register a @Provider which would inject Locale object into the @Context so that I can reuse it in my REST resources. Following the article http://bill.burkecentral.com/2011/03/09/adding-objects-that-are-context-injectable/ I managed to get the provider running @Provider public class LocaleProvider implements ContainerRequestFilter { public static final String DEFAULT_LANGUAGE_CODE_VALUE = "en-US"; @Context...