WildFly cannot find XMLSchema.dtd - jboss

I have WAR that I am deploying to a WildFly 10.0.0.CR5 server.
When the WAR is packaged, under WEB-INF/wsdl/dir/dir/ there is a WSDL, some XSD files, and an XMLSchema.dtd file. One of the XSDs, called xml.xsd, has the following at the top of the file:
<?xml version='1.0'?>
<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" >
<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
When I deploy this WAR, it fails to deploy with the following exception:
Failed to start service jboss.deployment.unit."MyWar.war".INSTALL:
org.jboss.msc.service.StartException in service jboss.deployment.unit."MyWar.war".INSTALL:
WFLYSRV0153: Failed to process phase INSTALL of deployment "MyWar.war"
Caused by: java.lang.RuntimeException: JBWS024076: Service
{http://my.co.com/2011}MyService, cannot publish wsdl to:
/jboss/wildfly-10.0.0.CR5/standalone/data/wsdl/MyWar.war/dir/wsdl/MyWsdl.wsdl
Caused by: java.io.FileNotFoundException:
/jboss/wildfly-10.0.0.CR5/XMLSchema.dtd (No such file or directory)
Looking under /jboss/wildfly-10.0.0.CR5/standalone/data/wsdl/MyWar.war/dir/wsdl, I don't see the XMLSchema.dtd file, but it is included in the WAR that I'm trying to deploy in the standalone/deployments folder.
Removing the <!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" > line fixes the issue, but I'm looking for a solution where I don't have to do that.

Related

keycloak RealmResourceProvider spi gives 404

I am creating a spi to do my otp config
When I deploy it as a jar and call the url auth/realms/{{myream}}/OTPConfig/otp/{{myusername}}
I get
Caused by: java.lang.ClassNotFoundException: org.keycloak.utils.TotpUtils from [Module "deployment.otp-config-spi-1.0-SNAPSHOT.jar" from Service Module Loader]
I then package and deploy as a war which includes the required dependencies and it deploys successfully but the same url fails with 404
My id is public static final String ID = "OTPConfig";
I have also seen the following error
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."keycloak-services-13.0.1.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "keycloak-services-13.0.1.jar"
I need this jar as I am using import org.keycloak.utils.TotpUtils;
It might be that the "error": "HTTP 404 Not Found" is not the actual issue?
Thanks
Go with the JAR instead of WAR and add a dependency to your JAR's META-INF/MANIFEST.MF file like this:
Manifest-Version: 1.0
Dependencies: org.keycloak.keycloak-services
Sealed: true

Websphere v8.0.0.6 WASX7017E, ADMA0209E Application exception while Deployment of EJB 2.0 EAR

I have the following problem with WebSphere 8.0.0.6 and no solution is found on the web. I hope anyone can help with this and this will help someone else with this problem.
Error Description:
Error #1 (while installing application):
WASX7017E: Exception received while running file /tmp/wsant3816346180883063201jacl;
exception information:com.ibm.websphere.management.application.client.AppDeploymentException:
com.ibm.websphere.management.application.client.AppDeploymentException
Following Error:
ADMA0209E: Enterprise JavaBeans (EJB) module ServerEJB.jar contains the following
container-managed persistence (CMP) or bean-managed persistence (BMP) :
... (list of all entities)
Explanation:
I generate an EAR with an EJB 2.0 component/project. Up to now I have deployed this EAR within WAS 6.1 successfully, but with WAS 8 it doesn't deploy anymore.
I have the necessary bind-ejbjar.xmi, even in the new format - converted with the script from IBM.
Questions:
WAS 8 still seems to know that there exists a EJB 3 component in the EAR - the question is WHY?
What is the minimum requirement for a EAR/EJB-Module to deploy in WAS 8 - there must be big changes?
Are there more bind-files to be included?
Thanks for help
UPDATE:
So obviously there are prerequisites to declare a package as EJB2.x.
See IBM-HelpCenter:
IBM WebSphere info for developers DE
But I fullfill all of this two prerequisites.
How do I have to package the jar for Websphere 8 to make it acceptable as an EJB2.x?
http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.zseries.doc%2Fae%2Frejb_consid.html&lang%3Dde
The solution was achieved by upgrading to version 2.1 ejb, because there the "version" attribute is allowed and this is required by WebSphere to recognize a non-EJB 3.0 version.
This means that an EJB 2.0 version can not work, since the above tag is not allowed in the ejb-jar_2_0.dtd. Maybe a
<cmp-version>2.x</cmp-version>
could help here, but I didn't tested it.
The conversion of the header of ejbjar.xml brought success:
from 2.0 (ejb-jar_2_0.dtd):
<?xml version="1.0" encoding="UTF-8"?>
<!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 file declaration -->
<ejb-jar id="EJBJar" version="2.0">
<display-name>Overall Bean Definition</display-name>
<enterprise-beans>
<entity id="Dcnotetext">
...
to 2.1 (ejb-jar_2_1.xsd - you need namespaces! ):
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar id="EJBJar"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.1"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
<!-- EJB-jar file declaration -->
<display-name>Overall Bean Definition</display-name>
<enterprise-beans>
<entity id="Dcnotetext">
...
No further changes to XMI or XML files were necessary!
Thanks for help!

Deploying grails 2.1.1 war to JBoss 5.1

I've recently upgraded our grails app from 1.3.7 to 2.1.1.
I'm attempting to deploy it to JBoss 5.1 but am running into problems.
I get the following error during deployment:
Failed to create Resource myapp-2.0.war - cause: java.lang.RuntimeException:org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
*** DEPLOYMENTS IN ERROR: Name -> Error vfszip:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/deploy/myapp-2.0.war/ -> org.jboss.deployers.spi.DeploymentException:
URL file:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/tmp/4sp3y1b-x797w6-haf9ykfc-1-hafaajh5-ng/myapp-2.0.war/ deployment failed DEPLOYMENTS IN ERROR:
Deployment "vfszip:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/deploy/myapp-2.0.war/" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException:
URL file:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/tmp/4sp3y1b-x797w6-haf9ykfc-1-hafaajh5-ng/app-2.0.war/ deployment failed -> org.jboss.deployers.client.spi.IncompleteDeploymentException:Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
*** DEPLOYMENTS IN ERROR: Name -> Error vfszip:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/deploy/app-2.0.war/ -> org.jboss.deployers.spi.DeploymentException:
URL file:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/tmp/4sp3y1b-x797w6-haf9ykfc-1-hafaajh5-ng/app-2.0.war/ deployment failed DEPLOYMENTS IN ERROR: Deployment "vfszip:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/deploy/app-2.0.war/" is in error due to the following reason(s):
org.jboss.deployers.spi.DeploymentException: URL file:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/tmp/4sp3y1b-x797w6-haf9ykfc-1-hafaajh5-ng/app-2.0.war/ deployment failed
After much googling I've added the following files under web-app/WEB-INF:
jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
<jboss-web>
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
com.app.deals:loader=app-2.0.war
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
</jboss-web>
jboss-classloading.xml:
<?xml version="1.0" encoding="UTF-8"?>
<classloading xmlns="urn:jboss:classloading:1.0"
export-all="NON_EMPTY" import-all="true" domain="DefaultDomain"
top-level-classloader="true" parent-first="false">
</classloading>
jboss-scanning.xml
<?xml version='1.0' encoding='UTF-8' ?>
<scanning xmlns='urn:jboss:scanning:1.0'>
<path name='WEB-INF/lib/grails-datastore-gorm-*.jar'>
<include name='org.grails.datastore' />
</path>
</scanning>
I added the scanning file after reading this link.
But still no luck.
Any ideas?
So I downgraded to grails 2.1.0 and everything worked without needing any classloading.xml.
I ran into multiple issues with grails 2.1.1 and JBoss 5. Classloading.xml appeared to have no effect and I continued to get various clasloading issues (Parent last config seemed to be doing nothing).

Error Deploying War File on jboss 7.1

I am trying to deploy a war file on RHEL5 server using jboss 7.1 and it is failing once I put it in the deployment folder, I checked the server.log and found that it is getting this error when trying to deploy:
[org.jboss.modules] (MSC service thread 1-8) Failed to define class
tag.TagBean in Module "deployment.AppWeb.war:main" from Service Module
Loader: java.lang.UnsupportedClassVersionError: tag/TagBean :
Unsupported major.minor version 51.0
Where tag is a namespace in the Web project AppWeb and TagBean is the class name.
One more thing, in the struts file it is added like this:
<package name="tag" namespace="/tag" extends="struts-default">
<action name="default" class="tag.TagBean">
<result>myForm.submitpage.jsp</result>
</action>
</package>
It seems you are trying to run application (at least class tag.TagBean) compiled with Java 7 on older JVM.
Either switch JVM to Java 7 or recompile with Java 6.

Deploying my GWT Application on Tomcat Server

I want to setup a GWT application (Version 2.0.0) with many dependencys in my local Tomcat Server. I started to write a maven2 build script for deploying and packaging of the application.
I wrote a maven2 script which works really fine in my eyes, but I get an error when trying to deploy the out coming war on my tomcat.
2011-04-21 18:14:13,951 ERROR org.apache.catalina.startup.ContextConfig - Parse error in application web.xml file at jndi:/localhost/quickfinder.ui-1.0-SNAPSHOT/WEB-INF/web.xml
org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
The web.xml is look like the following:
here and my maven2 script looks like this:
here
After compiling and linking and the other stuff my "deploy" directory (named war) looks like:
|-AnswerPanel.css
|-common.css
|-DomainListPanel.css
|-glossary.css
|-glossary.html
|-images
|-META-INF
|-MulitpleChoiceEditPanel.css
|-MultipleChoiceDisclosurePanel.css
|-NaviPanel.css
|-QuestionnairePanel.css
|-quickfinder
|-Quickfinder.css
|-Quickfinder.html
|-quickfinderportlet
|-QuickfinderPortlet.html
|-styles-css2.css
|-styles-css3.css
|-WEB-INF
|--lib
Under lib in the WEB-INF directory, all needed library's are available. The Project has got some RPC calls and so on.
With mvn compile war:war a .war file and a folder named #artifactId#-SNAPSHOT-1.00 are created under /target.
I don't know how to handle with this error form tomcat, or is there a logical mistake in the pom.xml.
BR,
mybecks
Your web.xml is not well-formed: fix the below section
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" [
<!ENTITY GlossaryWebXml SYSTEM "glossary.web.xml"> -->
]>
I would suggest to add maven-xml-plugin to your validate phase. It will check your web.xml automatically.