Changing Liferay war file context root on JBoss EAP - jboss

I am trying to deploy Liferay 6.2 CE GA4 WAR file on my JBoss EAP 6.4 server with a specified context root. We already have an application with the context defined as "/" and this is what Liferay defaults to. I have tried following with no luck:
Specifying /liferay as the context root in jboss-web.xml
Creating portal-ext.properties in WEB-INF/classes and including portal.ctx=/liferay
Adding -
<context-param>
<param-name>root_path</param-name>
<param-value>/liferay</param-value>
</context-param>
to web.xml
Ultimately I want http://localhost:8080/liferay to bring me to the Liferay application, not http://localhost:8080. Does anyone have any other suggestions or things that worked for them? I can post full file contents if it would shed more light on my problem.
UPDATE: Here is my JBoss server.log where it is trying to register the context:
16:15:52,652 INFO [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015876: Starting deployment of "liferay.war" (runtime-name: "liferay.war")
16:16:04,500 INFO [org.jboss.web] (ServerService Thread Pool -- 324) JBAS018210: Register web context: /liferay
16:16:04,547 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015859: Deployed "liferay.war" (runtime-name : "liferay.war")
16:16:04,547 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014776: Newly corrected services:
service jboss.deployment.unit."liferay-fresh.war".component."com.liferay.alloy.taglib.alloy.AioTag".START (no longer required)
service jboss.deployment.unit."liferay-fresh.war".component."com.liferay.alloy.taglib.alloy.AutoCompleteTag".START (no longer required)
service jboss.deployment.unit."liferay-fresh.war".component."com.liferay.alloy.taglib.alloy.ButtonItemTag".START (no longer required)

Related

wildfly-preview-25.0.0.Final - ERROR Module "org.jboss.weld.core" version 3.1.5.Final

Trying to move from wildfly-25.0.0.Final (Jakarta EE 8 Full) to wildfly-preview-25.0.0.Final (Preview EE 9.1).
After adding my:
org/hibernate/ ...
org/jboss/ ...
I have WELD:
org/jboss/weld/3.1.4 ...
org/jboss/weld/4.0.0.Final ...
Error "Failed to link" at:
16:13:54,578 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 80) WFLYWS0002: Activating WebServices Extension
16:13:54,578 INFO [org.wildfly.extension.microprofile.opentracing] (ServerService Thread Pool -- 70) WFLYTRACEXT0001: Activating MicroProfile OpenTracing Subsystem
16:13:54,578 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 81) WFLYCTL0013: Operation ("add") failed - address: ([("subsystem" => "weld")]): java.lang.NoClassDefFoundError: Failed to link org/jboss/weld/exceptions/DeploymentException (Module "org.jboss.weld.core" version 3.1.5.Final from local module loader #7a1234bf (finder: local module finder #2f62ea70 (roots: /usr/local/Cellar/wildfly-as/wildfly-preview-25.0.0.Final/modules,/usr/local/Cellar/wildfly-as/wildfly-preview-25.0.0.Final/modules/system/layers/base))): javax/enterprise/inject/spi/DeploymentException
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:423)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:555)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:339)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
at org.jboss.modules.Module.loadModuleClass(Module.java:753)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
at org.jboss.as.weld#25.0.0.Final//org.jboss.as.weld.WeldSubsystemAdd.performBoottime(WeldSubsystemAdd.java:86)
at org.jboss.as.controller#17.0.1.Final//org.jboss.as.controller.AbstractBoottimeAddStepHandler.performRuntime(AbstractBoottimeAddStepHandler.java:119)
at org.jboss.as.controller#17.0.1.Final//org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:164)
at org.jboss.as.controller#17.0.1.Final//org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:1045)
at org.jboss.as.controller#17.0.1.Final//org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:777)
at org.jboss.as.controller#17.0.1.Final//org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:466)
at org.jboss.as.controller#17.0.1.Final//org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTask.run(ParallelBootOperationStepHandler.java:384)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
at java.base/java.lang.Thread.run(Thread.java:833)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Can see WELD 3.1.5 # https://weld.cdi-spec.org/news/2020/08/12/weld-315Final/
Which version of WELD should I use? 3.1.5 or 4.0.0.Final? Also where do I configure it?
(2) See 'Typo'.
Type on https://weld.cdi-spec.org/download/ for WELD 4.0.2 Finak:
WELD 4.0.2.Finak
Also error with "Download":
Not Found
The requested URL /weld/4.0.2.Finak was not found on this server.
Should be:
https://download.jboss.org/weld/4.0.2.Final/
Weld 4.x is the major version of Weld implementing EE 9 (e.g. with jakarta namespaces).
However, you don't need to declare this dependency manually. WildFly always contains Weld and the EE 9 variant is no different.
You can easily verify that by unpacking Wildfly distribution and looking into /modules/system/layers/base/org/jboss/weld
(2) See 'Typo'.
Thanks for pointing this out, I have fixed the broken link on Weld website.

Deploy Fuse Camel Project on EAP

I build a simple Camel Project with a SOAP Web Service that writes a file and sends the response: it's packaged as bundle and I deployed it successfully on Karaf, you can find the source here
Firefox Send
Then I'd like to convert this project in a WAR module and deploy it on Fuse on EAP: following these instructions
Apache Camel: Tutorial on using Camel in a Web Application
I modified (in pom.xml) bundle -> war, I moved applicationContext.xml under src/main/webapp, and I created a web.xml with the Spring context loader: when I install the WAR I see (on server logs) that the Camel route is started but the SOAP WS isn't exposed
10:03:40,981 INFO [org.apache.camel.spring.SpringCamelContext] (ServerService Thread Pool -- 75) Apache Camel 2.15.1 (CamelContext: camelId) is starting
10:03:40,994 INFO [org.apache.camel.management.ManagedManagementStrategy] (ServerService Thread Pool -- 75) JMX is enabled
10:03:41,120 INFO [org.apache.camel.impl.converter.DefaultTypeConverter] (ServerService Thread Pool -- 75) Loaded 197 type converters
10:03:41,339 INFO [org.apache.camel.spring.SpringCamelContext] (ServerService Thread Pool -- 75) AllowUseOriginalMessage is enabled. If access to the original message is not needed, then its recommended to turn this option off as it may improve performance.
10:03:41,339 INFO [org.apache.camel.spring.SpringCamelContext] (ServerService Thread Pool -- 75) StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
10:03:41,370 INFO [org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean] (ServerService Thread Pool -- 75) Creating Service {http://www.springframework.org/schema/beans}CamelHelloWorldService from WSDL: classpath:wsdl/Hello.wsdl
10:03:41,732 INFO [org.apache.cxf.endpoint.ServerImpl] (ServerService Thread Pool -- 75) Setting the server's publish address to be /CamelHelloWorld
10:03:41,764 INFO [org.apache.camel.spring.SpringCamelContext] (ServerService Thread Pool -- 75) Route: route2 started and consuming from: Endpoint[cxf://bean:helloWorldEndpointId]
10:03:41,764 INFO [org.apache.camel.spring.SpringCamelContext] (ServerService Thread Pool -- 75) Total 1 routes, of which 1 is started.
10:03:41,764 INFO [org.apache.camel.spring.SpringCamelContext] (ServerService Thread Pool -- 75) Apache Camel 2.15.1 (CamelContext: camelId) started in 0.783 seconds
10:03:41,764 INFO [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 75) Root WebApplicationContext: initialization completed in 2131 ms
10:03:41,826 INFO [org.jboss.as.server] (HttpManagementService-threads - 2) JBAS015859: Deployed "camel-hello-world-0.0.21-SNAPSHOT.war" (runtime-name : "camel-hello-world-0.0.21-SNAPSHOT.war")
To be honest I see this exception too
10:03:39,711 WARN [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (ServerService Thread Pool -- 75) Ignored XML validation warning: org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 419; SchemaLocation: schemaLocation value = ' http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd http://camel.apache.org/schema/cxf/camel-cxf-spring.xsd' must have even number of URI's.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196)
at org.apache.xerces.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:97)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:322)
but I think it's only a warning.
Does anyone have any idea?
Thanks in advance
The 'must have even number of URI's' exception is because you have a superfluous entry for camel-cxf-spring.xsd at the end of the xsi:schemaLocation.
You may find it better to base your code on the Camel Tomcat CXF example as it demonstrates how to set up CXFServlet in web.xml. You'll need this is you want the CXF consumer to work. E.g like this:
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/webservices/*</url-pattern>
</servlet-mapping>
If you're using Fuse on EAP 7.0 or 7.1, you can avoid the Spring ContextLoaderListener and CXFServlet as the app server takes care of bootstrapping Spring & CXF for you. There's an example project here.

Simple JSF with Managed Bean cannot be loaded by JBoss 7.1 (JBAS018210)

I am getting a strange error in my JBoss log when i try to do a very simple JSF app via Eclipse. So i created a simple scenario to ask, if i have missed something fundamental in my JSF example. Alternatively, i suspect there might be a mis-configuration or bug in my particular tooling or environment.
I have created a very simple JSF app. It's just one JSF html page (hello.jsp) which collects a name via a ManagedBean and transitions to a second JSF html page (ok.jsp). The bean has 1 getter, 1 setter, and 1 action method (addContact).
I am not using annotations, just a simple faces-config.xml file with one ManagedBean entry and one navigation rule. The bean is named "contact" and the class is "com.mbeans.ContactBean". I believe that the mapping is all correct.
I am using JBoss 7.1 via Eclipse Juno SR2. It's a JSF 2.0 app. I have loaded the latest JBoss Tools 4.0 for Juno.
The app only consists of the following files:
web.xml
faces-config.xml
ContactBean.java
hello.jsp
ok.jsp
The file contents are below. But I'll add some colour commentary on how they were created via Eclipse (which you might want to skim or ignore):
I go into Eclipse and create a new project. I select "Dynamic Web Project" with the following settings:
Target runtime = JBoss 7.1 Runtime
Configuration = Dynamic Configuration for JBoss 7.1 Runtime
Generate a web.xml = CHECKED
I right-click WebContent and create a new JSP file (Filename = hello.jsp). I use JSP Template = New JSF Page (html).
I add a few lines representing a simple form accessing a ManagedBean named "contact" so that hello.jsp looks like this:
<%# page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%# taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%# taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Add Contact</title>
</head>
<body>
<f:view>
<h2>Add Contact</h2>
<h:form>
Name:<br>
<h:inputText value="#{contact.name}" />
<h:commandButton value="Add Contact"
action="#{contact.addContact}" type="submit" />
</h:form>
</f:view>
</body>
</html>
Similarly, I add the following JSP file (ok.jsp):
<%# page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%# taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%# taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OK - Added New Contact</title>
</head>
<body>
<f:view>
<p>
The address for
<h:outputText value="#{contact.name}" />
was successfully added.
</p>
</f:view>
</body>
</html>
I right-click on the project (JSFTest) and add a class with the following settings:
Package = com.mbeans
Name = ContactBean
and I edit the class to appear like so:
package com.mbeans;
public class ContactBean {
public ContactBean() {super();}
String name;
public String getName() {return name;}
public void setName(String name) {this.name = name;}
public String addContact() {
System.out.println("Name: " + getName());
return "success";
}
}
Then I right-clicked the WEB-INF folder and selected New->Other->JBoss Tools Web->JSF->Faces Config with the following settings:
Folder:* = /JSFTest
Name:* = faces-config
Version: 2.0
Register in web.xml = CHECKED
In the new faces-config.xml that is created, I right-click Managed Beans->New->Managed Bean... and set the following:
Scope = application
Class:* = com.mbeans.ContactBean
Name:* = contactBean
Then I right-clicked Navigation Rules->New->Rule ... and left the dialog box blank and clicked Finish.
I right-clicked "[any]"->New->Case... and set the following:
From Outcome: = success
From Action: = #{contact.addContact}
ToView ID:* = /ok.jsp
this, finally, yields the following faces-config.xml file in the WEB-INF folder:
<?xml version="1.0"?>
<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
<managed-bean>
<managed-bean-name>contact</managed-bean-name>
<managed-bean-class>com.mbeans.ContactBean</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
<navigation-rule>
<navigation-case>
<from-action>#{contact.addContact}</from-action>
<from-outcome>success</from-outcome>
<to-view-id>/ok.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
Then I right-clicked the hello.jsp and selected Run As->Run On Server
I selected the JBoss 7.1 Runtime Server (it's the only one). The server starts successfully. (I know this JBoss server correctly runs other stuff outside of Eclipse.)
I get a 500 error and in particular, I see the following message in the log which I think is the root of the problem:
23:33:08,612 ERROR [org.jboss.web] (MSC service thread 1-3) JBAS018211: Could not load JSF managed bean class: com.mbeans.ContactBean
I think the NullPointerException may be caused by something else which I did wrong unrelated to that error message above. I am most concerned about the above error. But if anyone can point out my mistake which clears this NullPointerException, I would appreciate it so that I can eliminate it. Previously I got a different 500 error without the NPE but still had that JBAS018211 in the log. In other words, I think the NPE is annoying but irrelevant.
The full log is:
23:33:06,543 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
23:33:06,761 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
23:33:06,824 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
23:33:07,636 INFO [org.xnio] XNIO Version 3.0.3.GA
23:33:07,638 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
23:33:07,647 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
23:33:07,655 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
23:33:07,678 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
23:33:07,686 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
23:33:07,689 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
23:33:07,717 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
23:33:07,725 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
23:33:07,749 INFO [org.jboss.as.security] (MSC service thread 1-10) JBAS013100: Current PicketBox version=4.0.7.Final
23:33:07,749 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
23:33:07,752 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
23:33:07,789 INFO [org.jboss.as.connector] (MSC service thread 1-7) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
23:33:07,797 INFO [org.jboss.as.naming] (MSC service thread 1-4) JBAS011802: Starting Naming Service
23:33:07,825 INFO [org.jboss.as.mail.extension] (MSC service thread 1-12) JBAS015400: Bound mail session [java:jboss/mail/Default]
23:33:07,844 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
23:33:07,971 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-7) JBoss Web Services - Stack CXF Server 4.0.2.GA
23:33:07,982 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) Starting Coyote HTTP/1.1 on http--127.0.0.1-7070
23:33:08,341 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
23:33:08,352 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) JBAS015012: Started FileSystemDeploymentService for directory /usr/local/jboss-as-7.1.1.Final/standalone/deployments
23:33:08,358 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found JSFTest.war in deployment directory. To trigger deployment create a file called JSFTest.war.dodeploy
23:33:08,360 INFO [org.jboss.as.remoting] (MSC service thread 1-10) JBAS017100: Listening on /127.0.0.1:9999
23:33:08,362 INFO [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on /127.0.0.1:4447
23:33:08,475 INFO [org.jboss.as.server.deployment] (MSC service thread 1-12) JBAS015876: Starting deployment of "JSFTest.war"
23:33:08,612 ERROR [org.jboss.web] (MSC service thread 1-3) JBAS018211: Could not load JSF managed bean class: com.mbeans.ContactBean
23:33:08,792 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-10) Initializing Mojarra 2.1.7-jbossorg-1 (20120227-1401) for context '/JSFTest'
23:33:09,663 INFO [org.hibernate.validator.util.Version] (MSC service thread 1-10) Hibernate Validator 4.2.0.Final
23:33:09,805 INFO [org.jboss.web] (MSC service thread 1-10) JBAS018210: Registering web context: /JSFTest
23:33:09,818 INFO [org.jboss.as] (MSC service thread 1-2) JBAS015951: Admin console listening on http://127.0.0.1:9990
23:33:09,819 INFO [org.jboss.as] (MSC service thread 1-2) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 3541ms - Started 172 of 249 services (76 services are passive or on-demand)
23:33:09,873 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "JSFTest.war"
23:33:29,683 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/JSFTest].[jsp]] (http--127.0.0.1-7070-1) Servlet.service() for servlet jsp threw exception: java.lang.NullPointerException
at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1858) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
at org.apache.jsp.hello_jsp._jspx_meth_f_005fview_005f0(hello_jsp.java:103)
at org.apache.jsp.hello_jsp._jspService(hello_jsp.java:78)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jbossweb-7.0.13.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) [jbossweb-7.0.13.Final.jar:]
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jbossweb-7.0.13.Final.jar:]
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [jbossweb-7.0.13.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_17]
That's it. That's the problem.
(as an aside, Eclipse also does not display the hover-over tag descriptions for JSF. HTML tags are OK. This makes me wonder if there's some deeper JBoss Tools misconfiguration.)
Thank you for any time spent reviewing my problem.
Try to do the following in addition to what you did:
Right click the project → Properties → Project Facets
Add the Java Server Faces facet with the correct version (yours was 2.0)
Click the additional configuration link at the bottom, select "Library provided by server runtime" (the default) and check the option to configure web.xml. Map the Faces Servlet at /faces/* (for the sake of this answer; you can change it later but remember to change the URLs accordingly)
(may be optional, but try it this way first) I prefer to deploy my applications by openning the server tab, right clicking on the server → Add/Remove... → select your application and deploy
After the app is successfully deployed (check the console) get the URL: http://localhost:8080/JSFTest/faces/hello.jsp
Remember the Faces Servlet mapping - /faces/*? You have to include it in the URL.
This works for me.
By the way, prefer Facelets (the XHTML option) over JSP.

EAR Content not Bounded Exception

I am using JBoss AS 5.0.1 and and I am getting the following error when i Try to Invoke my Servlet.
17:11:48,060 ERROR [STDERR] javax.naming.NameNotFoundException: EJBSvcApp not bound
I have Created an EAR by the Above name to which I have Added my EJB and Web Project.
I have also Included EJBClient in deployment assembly of my Web App. Below is the JBoss Log Trace. I also See a warning in the Log Which I am not sure what it is.
17:09:27,962 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext#457214762{vfszip:/C:/jboss- 5.0.1.GA/server/default/deploy/EJBSvcApp.ear/EJBSvcEJB.jar/}
17:09:27,963 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext#457214762{vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/EJBSvcApp.ear/EJBSvcEJB.jar/}
17:09:27,963 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext#457214762{vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/EJBSvcApp.ear/EJBSvcEJB.jar/}
7:09:27,986 WARN [Ejb3AnnotationHandler] JBMETA-4: did not find any bean meta data for annotation bean OrderBean, will create some
17:09:33,622 INFO [JBossASKernel] Created KernelDeployment for: EJBSvcEJB.jar
17:09:33,626 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=EJBSvcApp.ear,jar=EJBSvcEJB.jar,name=OrderBean,service=EJB3
17:09:33,626 INFO [JBossASKernel] with dependencies:
17:09:33,626 INFO [JBossASKernel] and demands:
17:09:33,627 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
17:09:33,627 INFO [JBossASKernel] and supplies:
17:09:33,627 INFO [JBossASKernel] Class:com.webpage.ejb.Order
17:09:33,627 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=EJBSvcApp.ear,jar=EJBSvcEJB.jar,name=OrderBean,service=EJB3) to KernelDeployment of: EJBSvcEJB.jar
17:09:33,776 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=EJBSvcApp.ear,jar=EJBSvcEJB.jar,name=OrderBean,service=EJB3
17:09:33,786 INFO [EJBContainer] STARTED EJB: com.webpage.ejb.OrderBean ejbName: OrderBean
17:09:33,791 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
17:09:33,850 WARN [WebServiceDeployerEJB] Ingore ejb deployment with null classname: org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData#6012d7fe{OrderBean}
17:09:33,928 INFO [TomcatDeployment] deploy, ctxPath=/EJBSvcWeb
I have Created An EJB INterface
#Remote()
public interface Order {...
and Bean
#Stateless(name = "OrderBean")
public class OrderBean implements Order { ...
I am making a lookup in My Servlet as below
Order o = (Order)(new InitialContext()).lookup("EJBSvcApp/OrderBean/remote");
I was curious about this part:
[Ejb3AnnotationHandler] JBMETA-4: did not find any bean meta data for annotation bean OrderBean, will create some
It seems to be that the problem is a Jboss AS 5.1.0 GA's bug.
If I understood the post correctly, the problem is originated because you have an empty META-INF/ejb-jar.xml file.
I would try to:
a) delete the file. (I think this will be enough).
b) or try to fill it with the next :
<ejb-jar version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
</ejb-jar>

Orbeon deployment on JBoss AS 7

We are trying to deploy Orbeon Forms 3.9 on JBoss AS 7 and getting the following errors:
15:34:36,621 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/adg-xforms]] (MSC service thread 1-2) Exception sending context initialized event to listener instance of class org.orbeon.oxf.webapp.OrbeonServletContextListenerDelegate: org.orbeon.oxf.common.OXFException: no implementation of regexp was found.
at org.orbeon.oxf.webapp.OrbeonServletContextListenerDelegate.contextInitialized(OrbeonServletContextListenerDelegate.java:43) [orbeon.jar:]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_25]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]
15:34:36,670 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-2) Error listenerStart
15:34:36,670 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-2) Context [/adg-xforms] startup failed due to previous errors
15:34:36,682 ERROR [stderr] (MSC service thread 1-2) Starting Orbeon Forms 3.8.0.201005141856 CE
15:34:36,693 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/adg-xforms]] (MSC service thread 1-2) Exception sending context destroyed event to listener instance of class org.orbeon.oxf.webapp.OrbeonServletContextListenerDelegate: org.orbeon.oxf.common.OXFException: Could not initialize class com.sun.msv.datatype.xsd.AnyURIType
at org.orbeon.oxf.webapp.OrbeonServletContextListenerDelegate.contextDestroyed(OrbeonServletContextListenerDelegate.java:52) [orbeon.jar:]
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3465) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3970) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3888) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_25]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]
Do you support JBoss AS 7 or anyone tried deploying orbeon on this app server.
I just added xsdlib-20030225.jar to lib directory (It's just one I had to hand ;-O). This is a HACK, I don't know what it affects and don't know if there are any side effects...but it works so far ;-)
This was tested with JBoss AS 7.1.1.Final "Brontes".
Follow the following steps:
for Orbeon Forms PE
unzip orbeon.war
place your license.xml file under WEB-INF/resources/config/license.xml
re-zip orbeon.war
start a standalone server with bin/standalone.sh
drop orbeon.war into the JBoss standalone/deployments folder
(source)
The joy of class loaders. Some code in MSV tries to load com.sun.msv.datatype.xsd.AnyURIType, which shouldn't fail as this class is in WEB-INF/lib/msv-xsdlib-20070407_orbeon_20100309.jar. I suspect that because of the way the class loaders is structured in JBoss, Orbeon ends up using a version of MSV coming from JBoss which is unable to load AnyURIType which is a jar that only comes with Orbeon. But I might be wrong on this.
This type of application-server specific question can be rather time consuming to resolve. So I would recommend you to use Tomcat or to get Orbeon to resolve this for you under a Development Support subscription.