jboss

How can I obtain port binding information at runtime? (JBoss 5.1)

回眸只為那壹抹淺笑 提交于 2019-12-24 08:18:10
问题 Basically what I want to do is to obtain the port number on which JBoss is listening for HTTP requests (the one that is normally 8080). I came upon this article, which sounds promising, but unfortunately some of the links are broken and I cannot figure out the part: ManagementView managementView = getManagementView(); // via JNDI lookup How could I implement getManagementView()? Or is there any other preferable way to do it? 回答1: If you are looking for a simpler interface, you might want to

Error in Referencing a Dependency Jar File from JBoss 7.1

一笑奈何 提交于 2019-12-24 08:13:04
问题 I reference a jar file from JBoss 7.1 module according to the instructions provided in a stackoverflow question here. I have used this jar in JBoss 5.x, 6.x without any issue. However, when I try to deploy a war file in JBoss 7.1 which references the above jar, it gives me the following error: 15:59:19,220 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host]. [/Max_client]] (MSC service thread 1-2) StandardWrapper.Throwable: java.lang NoClassDefFoundError: org/xml/sax

Java WebServiceException: Undefined port type with JBoss

☆樱花仙子☆ 提交于 2019-12-24 07:47:23
问题 I am new to Web Services with JBoss. A client is connecting to an EJB3 based Web Service With JBoss AS 5 and JDK 6 using JAX-WS. I am stuck with the following exception: Exception in thread "main" javax.xml.ws.WebServiceException: Undefined port type: {http://webservice.samples/}HelloRemote at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:300) at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:306) at javax.xml.ws.Service

Wildfly 10.1 stopd deployment after deploying

别说谁变了你拦得住时间么 提交于 2019-12-24 06:58:58
问题 I am deploying a WebApplication with several separate war and ear -files to a wildfly 10.1 server. What I do is this: I clean the deployments , data/content and tmp folder, then copy all necessary war and ear files into the deployments-folder. Then, I start the Server either in Debug-Mode via Spring Tool Suite 3.8.1 (basically Eclipse Neon ) or directly via standalone.sh . The server starts up normally, gets deploys all projects and publishes this message: [org.jboss.as] (Controller Boot

Log4J not really excluded in JBoss EAP6/AS7

无人久伴 提交于 2019-12-24 06:55:11
问题 In jboss-deployment-structure.xml from application war file, I have exclude log4j modules or so <?xml version="1.0" encoding="UTF-8"?> <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0"> <deployment> <dependencies> <module name="oracle" /> </dependencies> <exclusions> <module name="org.apache.log4j" /> <module name="org.apache.commons.logging" /> <module name="org.jboss.logging" /> <module name="org.jboss.logging.jul-to-slf4j-stub" /> <module name="org.jboss.logmanager" />

Web service works on Tomcat 6 but not on JBoss AS 6

百般思念 提交于 2019-12-24 06:51:30
问题 I autogenerated a SOAP webservice client from a WSDL (I use JAVA 1.6), and it works fine on Tomcat 6. However, when I put the client in a war and try to deploy it in JBoss Application Server 6.1 I get the following errors: Caused by: java.lang.ExceptionInInitializerError at com.sun.xml.ws.tx.common.Util.isJTAAvailable(Util.java:71) [:1.0] at com.sun.xml.ws.assembler.PipelineAssemblerFactoryImpl$WsitPipelineAssembler.isTransactionsEnabled(PipelineAssemblerFactoryImpl.java:468) [:1.0] at com

Authentication and Authorization in servlets

不问归期 提交于 2019-12-24 06:48:41
问题 I am using jboss server. I want to do BASIC authentication using web.xml file. How do I do that? 回答1: The tutorial on How to Configure JBoss for Basic Authentication should help you in this 回答2: The steps are Add security-constraint in web.xml for secure pages Apply login-config in web.xml In jboss-web.xml apply security-domain Create properties files for user and roles The following link explains this pretty well with an example https://community.jboss.org/wiki/BASICAuthentication users

JAX-WS + Hibernate + JAXB: How to avoid LazyInitializationException during marshalling

一曲冷凌霜 提交于 2019-12-24 06:35:07
问题 I have a JAX-WS application, which returns data objects, that were fetched from a Hibernate Database backend (Oracle 10g or Oracle 11g). I use javax.persistence.criteria.CriteriaQuery for that. It works fine, unless the object has dependencies, which should not be returned for some specific queries, e.g.: @Immutable @Entity @Table(schema = "some_schema", name = "USER_VW") public class User implements Serializable { ... @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "PRFL_ID") public

logging System.out.println getting lost in JBoss

社会主义新天地 提交于 2019-12-24 06:34:52
问题 I am using simple System.out.printf / System.out.println statements to perform JBoss logging (I am deploying to JBoss EAP 6.2). I have noticed that when an exception occurs I tend to lose println messages immediately preceding the throwing of the exception. This makes it impossible to debug the exception. To verify this, I put in my WAR the following code: System.out.println("foo"); int i = 0; if (i==0) throw new RuntimeException(); ... (the int i = 0; if (i==0) part is just to silence the

Arquillian - running tests not working

泄露秘密 提交于 2019-12-24 06:01:53
问题 I am trying to add an test based on arquillian . When I do mvn test I get this error: Test: @RunWith(Arquillian.class) public class SomeEntityServiceTest extends ApiTestCase { @Inject CartStatusService service; @Test public void testCreate() throws Exception { SomeEntity someEntity = new SomeEntity(); someEntity.setActive(1); service.create(someEntity); } } ApiTestCase: public class ApiTestCase { @PersistenceContext(unitName = "myDataSource") protected EntityManager em; @Deployment public