Deploying grails 2.1.1 war to JBoss 5.1 - jboss5.x

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).

Related

WildFly cannot find XMLSchema.dtd

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.

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!

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.

failed to run wicket examples on tomcat7

I downloaded wicket examples 1.6.0 and built successfully in netbeans7.2. but got errors when I tried to deploy on tomcat 7:
Cannot deploy the module. The context.xml file seems to be broken. Check whether it is well-formed and valid.
The module has not been deployed.
See the server log for details.
at
org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
at
org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:178)
at
org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:130)
at
org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:212)
at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
heres the contents in context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<!-- <Loader className="org.atmosphere.util.AtmosphereClassloader"/> -->
<Loader delegate="true"/>
</Context>
I prefer to run wicket in eclipse as it negates the requirement to mess around with an external tomcat instance.
If you are comfortable with eclipse and maven i would download wicket 1.6 example archetype via maven, import into eclipse and then in the test directory you can run the run.java class to get an internal jetty server host wicket for you.
this should get you started quickly without having to wrestle with tomcat configurations too.
Not really an answer but an alternative route to the same end point
Add parameter path to context tag, same path that app will be served:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/application-path-name/">
<!-- <Loader className="org.atmosphere.util.AtmosphereClassloader"/> -->
<Loader delegate="true"/>
</Context>
Answer obtained from this question.

Jboss 6.1.0 application is already installed

I am trying to migrate an application from JBoss 4.0.5 to JBoss 6.1.0. I use ant for deployment. This is my application.xml file.
<?xml version="1.0" encoding="UTF-8"?>
<application 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/application_6.xsd"
version="6">
<application-name>Fantana</application-name>
<module>
<ejb>fantana.jar</ejb>
</module>
<module>
<web>
<web-uri>fantantaWeb.war</web-uri>
<context-root>/</context-root>
</web>
</module>
<module>
<web>
<web-uri>fantanaTerm.war</web-uri>
<context-root>/</context-root>
</web>
</module>
</application>
When I deploy I have the following files generated in the "deploy" folder of the server.
fantana.jar
fantana.war
fantanaWeb.war
fantanaTerm.war
When runnning the server I get the following issue:
15:34:29,296 WARN [Digester] Empty stack (returning null)
15:34:29,319 INFO [TomcatDeployment] deploy, ctxPath=/crud
15:34:29,364 ERROR [AbstractKernelController] Error installing to Real: name=vfs:///D:/abujdei/develop/jboss-6.1.0.Final/server/brendolan/deploy/fantana.war state=PreReal mode=Manual requiredState=Real: org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.naming:application=fantana
Caused by: java.lang.IllegalStateException: jboss.naming:application=fantana is already installed.
I know this issue has been adressed before but I am unable to understand why this happends.
If necessary I can provide more information. Thank you.
#ionutab
So ok. I have renamed the file
fantana.war
into
fantanaCore.war
I have read in several posts over the internet that somehow necause fantana.jar and fantana.war have the same name it is not ok.
I have renamed it in the ant task, not in the filesystem. (VERY IMPORTANT)
If you come upon something like this write me here. Maybe I can help.
I found the link here very useful. Thanks.