We are getting the below response when trying to hit SOAP web service from SOAP UI after deploying in EAP 7.1 with necessary changes in standalone XML. The same works fine in JBoss EAP 6.4 version
<html>
<head>
<title>Error</title>
</head>
<body>HTTP method POST is not supported by this URL</body>
</html>
EAP JBoss 7 introduced undertow as web server and servlet container.
There were some changed introduced with it, particularly regarding POST for .html pages, which I think it's your case.
Workaround
Compiling your project as JSP to be deployed as servlet container, perhaps.
Obs
Please post the server.log and configuration files (in case it's not vanilla installation).
Related
I am trying to get singe sign-on to work with WildFly-prevew 26.0.1. I found a tutorial WildFly Elytron - Add Kerberos Authentication To Existing Web Application by Darran Lofthouse.
After it did not work I searched for further resources and found How to Set Up SSO for JBoss EAP with Kerberos. There is a JBoss Negotiation Toolkit mentioned. It is said that yout should use the same version of the toolkit as the JBoss Negotiation included in JBoss EAP (EAP_HOME/modules/system/layers/base/org/jboss/security/negotiation/main/module.xml).
Sadly I did not find the folder EAP_HOME/modules/system/layers/base/org/jboss/security/negotiation in the Wildfly 26.0.1-preview. At first I thought that it may be an JBoss EAP feature not included in WildFly. But actually the folder is included in WildFly 24.0.1. Starting with version 25.0.0, the folder is missing. And starting with version 26.0.0.Beta, the whole EAP_HOME/modules/system/layers/base/org/jboss/security folder is missing.
So my question is weather this is a bug or a feature (maybe it migrated to another module). And if it is a bug, may it be a reason my single sign-on is not working?
In a WildFly 25 release post (https://www.wildfly.org/news/2021/10/05/WildFly25-Final-Released/) it is said that
We deprecated the use of legacy security long ago and in the WildFly 25 release we have removed support for it.
Most probably that is the reason these packages are missing.
I'm migrating an existing J2EE (EJB 2.1) web-application from JBoss EAP 5.1 (JBoss AS 5.1.0.GA) to EAP 6.2 (JBoss AS 7.3.0.Final).
The existing jboss-web.xml defines a dependency to the EJB jar by using the <depends> XML element. The jboss-web.xml looks like this:
<?xml version="1.0" encoding=UTF-8"?>
<jboss-web>
<depends>jboss.j2ee:module="myEJB.jar",service=EjbModule</depends>
</jboss-web>
JBoss 7.x does not support this <depends> XML element anymore. (You get a parse error during deployment, and validation fails against the XML schema).
How to migrate the jboss-web.xml <depends> behavior to JBoss 7?
Tried google, the JBoss EAP 6.2 migration guide, and searched/asked the JBoss Developer Forum without success. Couldn't find any resources / hints on migrating the above jboss-web.xml configuration.
Any pointers to documentation and other resources would be appreciated. (Or simply the solution.) Thank you!
We are encountering issues while deploying the new core SDM modules (wars) in weblogic 12c version. The new SDM core module (wb-tss-core-sdm-web-war-0.9.1.war) uses the JSF ,SeamListeners & FacesServlet (version 1.2 jars) and we have found that the JSF 1.2 version is not directly compatible with the weblogic 12c version. Hence, the application deployment is failed with user defined listener conflict issue
As per Weblogic 12c documentation,
"WebLogic Server 12.1.1 has enhanced support for JSF and JSTL. In this
release, JSF 2.x and JSTL 1.2 have been incorporated directly in the
server's classpath. Your applications deployed to WebLogic Server can
seamlessly make use of JSF 2.x and JSTL 1.2 without requiring you to
deploy and reference separate shared libraries, as was the case in
previous releases. For backward compatibility, WebLogic Server
provides JSF and JSTL libraries that can be deployed and referenced by
applications. See Deploying JSF 1.2 and JSTL Libraries. "
We had tried to install the JSF 1.2 wars explicitly in the weblogic server path as per the documentation to support the backward compatibility and forced the SDM application/war to use the JSF 1.2 version jars by adding the below entries in the weblogic.xml .
<wls:library-ref>
<wls:library-name>jsf</wls:library-name>
<wls:specification-version>1.2</wls:specification-version>
<wls:implementation-version>1.2</wls:implementation-version>
<wls:exact-match>false</wls:exact-match>
</wls:library-ref>
But the deployment is failed again with FacesServlet listener issue as the "jsf-impl-1.2_04_P02.jar" jar is already part of (wb-tss-core-sdm-web-war-0.9.1.war) war .
Tried to add the following entries in the weblogic,xml to force the application to use the application specific jars/classes which are part of the application war file.
<wls:prefer-application-packages>
<wls:package-name>javax.faces.*</wls:package-name>
<wls:package-name>com.sun.faces.*</wls:package-name>
<wls:package-name>com.bea.faces.*</wls:package-name>
<wls:package-name>com.sun.facelets.*</wls:package-name>
</wls:prefer-application-packages>
After adding the above entries, the application deployment is completed successfully but have noticed the following errors in the console:
<BEA-101162> <User defined listener com.sun.faces.config.ConfigureListener failed: javax.faces.FacesException: org.jboss.seam.jsf.SeamApplicationFactory.
javax.faces.FacesException: org.jboss.seam.jsf.SeamApplicationFactory
Due to this above error, some of the Jasper file upload SDM screens are not accessible and it is getting failed with this error:
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.render.RenderKitFactory. Attempting to find backup.
How do we get past this?
We had the same issue during migration of JBoss Seam application from Weblogic 10.3.3 to Weblogic 12.1.1.
It was resolved by switching to Weblogic's default JSF 2.1.14 and updating Seam version to 2.3.
Hope this helps.
Not sure if you saw the longer discussion on this question:
Migrating JSF-Application to Weblogic 12
This helped me when analysing a similar library migration issues (hibernate was on my list).
While deploying my project on Redhat 6 with Jboss 4.2.3 I was having following difficulties so I decided to put it on stackoverflow so that it can help other people. If anyone could suggest a good title so that it can easily be searched, please
Q: How to make Jboss 4.2.x to ignore old JSF libraries and use one within your project libs?
Q: How to make Jboss scan specific path for WAR file scanning?
Q: How to bind Jboss with IP address rather then localhost?
Q: Where Jboss put exploded WAR file?
Q: Hibernate-annotations conflict with Jboss 4.2.3 annotations and throwing following Exception.
java.lang.ClassCastException: org.hibernate.validator.event.ValidateEventListener cannot be cast to org.hibernate.event.PreInsertEventListener
Q: How to run JSF 2.0.x on JBoss 4.0.x ? As JSF 2.0 supports at least Servlet 2.5 API and JBoss has Tomcat 5.x that can support Servlet 2.4 at max.
Q: How to change Servlet version of a Dynamic Web Project?
Q: How to make Jboss scan specific path for WAR file scanning?
Open $JBOSS_HOME/server/default/conf/jboss-service.xml
Add the path where you put your war after comma in the following tag. Suppose my war are pasted at /Oracle/my-web-apps
<attribute name="URLs">
deploy,/Oracle/my-web-apps <as many comma separated path for Jboss to scan war>
</attribute>
Q: How to bind Jboss with IP address rather then localhost?
Bind JBOSS with ip address so that you can access if with IP with following command
sh /Jboss/bin/run.sh -b 0.0.0.0
Q: Where Jboss put exploded WAR file?
Your WAR will be exploded at /Jboss/server/default/temp/deploy but please note on thing that deploy folder will only be visible when you run your Jboss server, because when you stop your Jboss server it undeploys all the projects.
Q: How to make Jboss 4.2.x to ignore old JSF libraries and use one within your project libs?
For this you don't need to change anything on JBoss side but in web.xml of your own project. Put following context-param and all done
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
Link: http://docs.jboss.org/jbossas/6/JSF_Guide/en-US/html/
Q: Hibernate-annotations conflict with Jboss 4.2.3 annotations and throwing following Exception.
Go to /jboss-4.2.3.GA/server/default/lib and copy hibernate-annotations.jar and replace it with your hibernate-annotations jar. Then again export and deploy project. Problem Solved. :-)
Q: How to run JSF 2.0.x on JBoss 4.0.x ? As JSF 2.0 supports at least Servlet 2.5 API and JBoss has Tomcat 5.x that can support Servlet 2.4 at max.
There is merely a difference of EL tags providing that you are not using any advance features of Servlet 3.0 like Async Support etc. Follow the steps below and You can run JSF 2.0 on Jboss 4.x
Link to Original Answer of this question --> https://stackoverflow.com/a/5998625/185022
JSF 2.0 depends heavily on EL 2.1 which is part of Servlet 2.5 and is a major change as opposed to EL 2.0 which is part of Servlet 2.4, but it does not depend on any particular Servlet 2.5 specific API. Servlet 2.4 should work as good. So in theory, you could get JSF 2.0 to work on Servlet 2.4 if you provide your own EL 2.1 API and implementation in /WEB-INF/lib. I did a quick test here on Tomcat 5.5.33 with the following libraries in /WEB-INF/lib:
el-api.jar file copied from lib folder of Tomcat 6.0.x
jboss-el.jar file (implements EL 2.1 and supports EL 2.2 like method invocation with arguments)
jsf-api.jar and jsf-impl.jar from Mojarra 2.0.x
And a Servlet 2.4 web.xml where the JBoss EL is been declared:
<context-param>
<param-name>com.sun.faces.expressionFactory</param-name>
<param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<context-param>
<param-name>com.sun.faces.validateXML</param-name>
<param-value>false</param-value>
A simple JSF 2.0 Facelet (not JSP!) with a simple <h:form> with a button with <f:ajax> and a simple #ViewScoped #ManagedBean works for me on Tomcat 5.5.33. Give it a try on your JBoss 4.0.5 and test it thoroughly.
Note that you need a minimum of JDK 1.5, not JDK 1.4. Also note that your application is this way unportable to any Servlet 3.0 container due to presence of the Servlet 2.5 specific el-api.jar file.
Q: How to change Servlet version of a Dynamic Web Project?
In Eclipse right click a project and go to properties and then click on Project Facet as shown in the image below if it will allow you to change then it's good otherwise there is a hack to do it.
If Eclipse doesn't allows you to do that then go to $ProjectWorkSpace/.settings/org.eclipse.wst.common.project.facet.core.xml and change the value of facet="jst.web" to 2.4 and also don't forget to change XML Schema for Servlet 2.4 in your Web.xml as shown below
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
I am currently working on a project which has a GWT frontend and a seperate Java module with servlets and a REST interface on the backend. The project when deployed runs on a single JBoss server.
I am running into difficulties though as when I run the GWT app in hosted mode (in eclipse) the jetty server does not have a deployed Java module to interact with.
My idea was to setup a JBoss server which eclipse could deploy into for development purposes, the problem with this is that the installer for the product sets up a JBoss server with a GWT app already embedded in it, so redeploying into this JBoss instance might cause problems?
My other idea would be to create a second JBoss server to host the GWT app, with some sort of url redirect for the rest calls which would redirect to the first JBoss instance. Is this possible?
EDIT: Can I do this with the built in jetty server in eclipse and not have to worry about using a seperate JBoss server. In other words can I somehow get the jetty server in eclipse to redirect particular requests to a different URL?