I'm using MKyiong's good guide on creating a simple internationalization file with JSF 2 and NetBeans 7.4 however the file is ignored and no message is printed.
To summarize I created a directory resources under TestApplication/src/java and a welcome.properties file with content
welcome.jsf = Happy learning JSF 2.0
Inside a index.xhtml file I insert
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<h3>
<title>#{msg['welcome.jsf']}</title>
</h3>
</h:head>
...
and inside TestApplication/web/WEB-INF I created a faces-config.xml with content
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
<application>
<locale-config>
<default-locale>en</default-locale>
</locale-config>
<resource-bundle>
<base-name>welcome</base-name>
<var>msg</var>
</resource-bundle>
</application>
</faces-config>
Server correctly starts and log is:
INFO: EclipseLink, version: Eclipse Persistence Services - 2.5.0.v20130507-3faac2b
INFO: file:/var/www/sample_projects/TestApplication/build/web/WEB-INF/classes/_TestApplicationPU login successful
INFO: EJB5181:Portable JNDI names for EJB BookShopResource: [java:global/TestApplication/BookShopResource, java:global/TestApplication/BookShopResource!rest.BookShopResource]
INFO: EJB5181:Portable JNDI names for EJB BookShopEJB: [java:global/TestApplication/BookShopEJB, java:global/TestApplication/BookShopEJB!ejb.BookShopEJB]
INFO: Registering the Jersey servlet application, named rest.BookShopResource, at the servlet mapping /webresources/*, with the Application class of the same name.
INFO: Mojarra 2.2.0 ( 20130502-2118 https://svn.java.net/svn/mojarra~svn/tags/2.2.0#11930) für Kontext '/TestApplication' wird initialisiert.
INFO: Monitoring jndi:/server/TestApplication/WEB-INF/faces-config.xml for modifications
INFO: Loading application [TestApplication] at [/TestApplication]
INFO: TestApplication wurde erfolgreich bereitgestellt in 1.207 Millisekunden.
Did anything change with NetBeans 7.4 positioning of .properties file? Anything I should consider?
If you have created a resources directory under TestApplication/src/java and placed your welcome.properties file in it, then the path to your file would be:
TestApplication/src/java/resources/welcome.properties
and therefore the proper base-name in your faces-config.xml would be resources.welcome
<base-name>resources.welcome</base-name>
Related
I am working on uplift project to uplift Apache 412 to latest Apache POI 5.2.2 version. Everything is working fine on local standalone program in Netbeans IDE 12.2. But when I move it to server WebLogic 14C that run on Java 8, its not working. Also it does not give any errors in the logs.
When I try to export to Excel in my Jdeveloper, I am getting the error "<incident 305 created with problem key "DFW-99998 [java.lang.NoSuchMethodError]" with Apache POI 522 JARS. The same java program is working fine in Apache POI 4.1.2 API.
I enabled verbose classloading in Jdeveloper but it does not give any POI specific errors.
-verbose:class -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:-DisplayVMOutput -XX:LogFile=C:\Record.log
I am using the below Apache POI JARS
commons-collections4-4.4.jar commons-compress-1.21.jar
commons-io-2.11.0.jar commons-math3-3.6.1.jar log4j-api-2.17.2.jar
log4j-core-2.17.2.jar poi-5.2.2.jar poi-ooxml-5.2.2.jar
poi-ooxml-full-5.2.2.jar SparseBitSet-1.2.jar xmlbeans-5.0.3.jar
In weblgic.xml I have below Configuration.
<prefer-application-packages>
<package-name>org.apache.commons.collections4.*</package-name>
<package-name>org.apache.commons.compress.*</package-name>
<package-name>org.apache.poi.*</package-name>
<package-name>org.apache.xmlbeans.*</package-name>
<package-name>org.openxmlformats.*</package-name>
<package-name>schemaorg_apache_xmlbeans.*</package-name>
<package-name>schemaorg_apache_xmlbeans.system.sXMLCONFIG.*</package-name>
<package-name>schemaorg_apache_xmlbeans.system.sXMLLANG.*</package-name>
<package-name>schemaorg_apache_xmlbeans.system.sXMLSCHEMA.*</package-name>
<package-name>schemaorg_apache_xmlbeans.system.sXMLTOOLS.*</package-name>
</prefer-application-packages>
<prefer-application-resources>
<resource-name>schemaorg_apache_xmlbeans/system/sXMLCONFIG/TypeSystemHolder.class</resource-name>
<resource-name>schemaorg_apache_xmlbeans/system/sXMLLANG/TypeSystemHolder.class</resource-name>
<resource-name>schemaorg_apache_xmlbeans/system/sXMLSCHEMA/TypeSystemHolder.class</resource-name>
<resource-name>schemaorg_apache_xmlbeans/system/sXMLTOOLS/TypeSystemHolder.class</resource-name>
</prefer-application-resources>
Do i need any add any configuration in weblogic.xml file ? please let me know. how to get more stacktrace and error information when the API fails. When i debugged this issue,below line fails and i am getting NoSuchMethodError.
**workbook = new SXSSFWorkbook(new XSSFWorkbook(), 100, true, true); - this line fails.
workbook.setCompressTempFiles(true);**
I found this article helpful, but there is a new dependency on IOUtils.byteArray that the answer doesn't handle. It results in this specific error because the version of commons IO that comes with WL doesn't support this method.
java.lang.NoSuchMethodError: org.apache.commons.io.IOUtils.byteArray(I)[B
Here is my modified weblogic.xml to account for that. We are on WL 14 with Java 11.
<weblogic-web-app
xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd
http://xmlns.oracle.com/weblogic/weblogic-web-app
http://xmlns.oracle.com/weblogic/weblogic-web-app/1.9/weblogic-web-app.xsd">
<context-root>xxx</context-root>
<container-descriptor>
<prefer-web-inf-classes>false</prefer-web-inf-classes>
<prefer-application-packages>
<package-name>org.apache.commons.*</package-name>
<package-name>org.apache.poi.*</package-name>
<package-name>org.apache.xmlbeans.*</package-name>
<package-name>org.openxmlformats.*</package-name>
<package-name>schemaorg_apache_xmlbeans.*</package-name>
</prefer-application-packages>
<prefer-application-resources>
<resource-name>schemaorg_apache_xmlbeans/system/sXMLCONFIG/TypeSystemHolder.class</resource-name>
<resource-name>schemaorg_apache_xmlbeans/system/sXMLLANG/TypeSystemHolder.class</resource-name>
<resource-name>schemaorg_apache_xmlbeans/system/sXMLSCHEMA/TypeSystemHolder.class</resource-name>
<resource-name>schemaorg_apache_xmlbeans/system/sXMLTOOLS/TypeSystemHolder.class</resource-name>
</prefer-application-resources>
</container-descriptor>
<description>xxx</description>
<weblogic-version>14.1.1</weblogic-version>
</weblogic-web-app>
Thanks, #kevin herein is my response to the above similar problem struggled for hrs to fix this.
Create your weblogic.xml file inside WEB-INF if not present and add the below code snippet
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app
xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app">
<container-descriptor>
<prefer-web-inf-classes>false</prefer-web-inf-classes>
<prefer-application-packages>
<package-name>org.apache.commons.*</package-name>
<package-name>org.apache.poi.*</package-name>
<package-name>org.apache.xmlbeans.*</package-name>
<package-name>org.openxmlformats.*</package-name>
<package-name>schemaorg_apache_xmlbeans.*</package-name>
</prefer-application-packages>
</container-descriptor>
</weblogic-web-app>
I have a problem with NETCONF get-config operation to Nexus 7000 with OS version 7.3(1)D1(1).
Sent message has xmlns attribute in rpc tag.
<?xml version="1.0" encoding="utf-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5">
<get-config>
<source>
<running/>
</source>
</get-config>
</rpc>
However, the result says that rpc is a bad element for missing namespaces attribute.
<?xml version="1.0" encoding="utf-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5">
<rpc-error>
<error-type>rpc</error-type>
<error-tag>missing-attribute</error-tag>
<error-severity>error</error-severity>
<error-message>Wrong document: namespaces not specified</error-message>
<error-info>
<bad-element>rpc</bad-element>
</error-info>
</rpc-error>
</rpc-reply>
In comparison, my get-config query has no problem with ASR 9000, IOS XR 6.1.4.
<?xml version="1.0" encoding="utf-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5">
<data>
...
How can I walk around this error?
I could make get-config RPC work in this way. "urib" can be replaced by any other defined subtree.
<nf:get-config
xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns="http://www.cisco.com/nxos:7.3.1.D1.1.:urib">
<nf:source>
<nf:running/>
</nf:source>
</nf:get-config>
However it lead me another issue that the result is in form of CLI commands, not XML-structured. So I asked to Cisco about it as this.
Result from NX-OS:
<?xml version="1.0" encoding="utf-8"?>
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:pfx1="http://www.cisco.com/nxos:7.3.1.D1.1.:urib"
xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0">!Command: show running-config
!Time: Tue Jan 16 18:00:27 2018
version 7.3(1)D1(1)
hostname MASKED_FOR_ANONYMITY
feature telnet
feature ospf
......
xml server max-session 6
xml server validate all</data>
Result from IOS-XR:
<?xml version="1.0" encoding="utf-8"?>
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<aaa xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-aaa-locald-admin-cfg">
<usernames>
<username>
......
</data>
We are migrating our application that runs on WebLogic 10 to WebLogic 12.
I specified the Java EE version to be 5 in application.xml:
<?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" version="5"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
I don't understand why I still got this warning message on the console...
"<Warning> <Munger> <BEA-2156203> <A version attrib
ute was not found in element "application" in the deployment descriptor weblogic
.utils.classloaders.GenericClassLoader#1e21f52 finder: weblogic.utils.classloade
rs.CodeGenClassFinder#2696ac annotation: /META-INF/application.xml. A version at
tribute is required, but this version of the WebLogic Server will assume that th
e latest version is used. Future versions of WebLogic Server will reject descrip
tors that do not specify the Java EE version. To eliminate this warning, add an
appropriate "version=" to element "application" in the deployment descriptor.>"
I was able to deploy the application. But when I run the application, I got this error:
WARN - javax.servlet.ServletException: Could not find a RenderKit for "HTML_BASIC"
javax.servlet.ServletException: Could not find a RenderKit for "HTML_BASIC"
at javax.faces.webapp._ErrorPageWriter.throwException(_ErrorPageWriter.java:549)
at javax.faces.webapp.FacesServlet.handleLifecycleException(FacesServlet.java:293)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:187)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3288)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: java.lang.IllegalArgumentException: Could not find a RenderKit for "HTML_BASIC"
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getResponseStateManager(RendererUtils.java:1181)
at org.apache.myfaces.lifecycle.DefaultRestoreViewSupport.isPostback(DefaultRestoreViewSupport.java:141)
at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:80)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:178)
... 25 more
We are using JSF 1.2 and I did deploy jsf 1.2 before I deploy the application.
Here is my weblogic-application.xml:
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application
xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-application"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_5.xsd http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.0/weblogic-application.xsd"
>
<wls:application-param>
<wls:param-name>webapp.encoding.default</wls:param-name>
<wls:param-value>UTF-8</wls:param-value>
</wls:application-param>
<wls:prefer-application-packages>
<wls:package-name>org.apache.*</wls:package-name>
<wls:package-name>javax.faces.*</wls:package-name>
<wls:package-name>com.sun.faces.*</wls:package-name>
<wls:package-name>org.mozilla.javascript.*</wls:package-name>
<wls:package-name>org.mozilla.classfile.*</wls:package-name>
</wls:prefer-application-packages>
<wls:prefer-application-resources>
<wls:resource-name>org.apache.*</wls:resource-name>
<wls:resource-name>javax.faces.*</wls:resource-name>
<wls:resource-name>com.sun.faces.*</wls:resource-name>
<wls:resource-name>META-INF/services/javax.servlet.ServletContainerInitializer</wls:resource-name>
<wls:resource-name>META-INF/services/com.sun.faces.spi.FacesConfigResourceProvider</wls:resource-name>
</wls:prefer-application-resources>
<wls:library-ref>
<wls:library-name>jsf</wls:library-name>
<wls:specification-version>1.2</wls:specification-version>
<wls:implementation-version>1.2.9.0</wls:implementation-version>
<wls:exact-match>true</wls:exact-match>
</wls:library-ref>
</wls:weblogic-application>
Update:
The 'Could not find a RenderKit for "HTML_BASIC"' error was caused by missing myfaces library. I added myfaces-api.jar and myfaces-imp.jar to /lib and the error is gone. After that my application runs fine. But I still get the warning message complaining about Jave EE Version descriptor missing.
Update 2:
It looks like the warning about Java EE version descriptor is caused by double deployments of jsf. Our application deploys jsf itself. If I don't deploy jsf 1.2 separately from admin console then I don't get the warning.
I've posted here earlier about how to make a tic tac toe for two users using jsf and I got the link for this great taglib, Primefaces. It's absolutely perfect for what I need to do, but I'm being stuck on trying to make it do anything, even render the examples from their website.
So I've been following this tutorial I found (sadly, there aren't many of them on the subject of Primefaces): http://java.dzone.com/articles/primefaces-quickstart-tutorial
Step by step, I made everything according to this tutorial, yet when I run it, it renders an empty page every time.
So I tried a simpler example from the official website: http://www.primefaces.org/gettingStarted.html
This (test.xhtml):
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>
<p:spinner />
</h:body>
</html>
renders an empty page, while this:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>
test test test test
<p:spinner />
</h:body>
</html>
renders only the "test test test test" text.
So I guess the problem must be in the tags, tomcat doesn't see them/doesn't know how to interprete them.
But, according to the tutorial and the primefaces website all I need to do is to put the jars in WEB-INF/lib as I have done (by the way, I'm using Eclipse and the empty project I created was "Dynamic Web Project").
In my WEB-INF/lib I have the following jars:
jsf-api-2.0.3.jar
jsf-impl-2.0.3.jar
jstl-1.0.2.jar
primefaces-3.3.RC1.jar
If it's of any help, here's the content of the tomcat console:
2012-05-27 13:18:11 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
2012-05-27 13:18:12 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Primefaces1' did not find a matching property.
2012-05-27 13:18:12 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
2012-05-27 13:18:12 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1127 ms
2012-05-27 13:18:12 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
2012-05-27 13:18:12 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
2012-05-27 13:18:13 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.0.3 (SNAPSHOT 20100726) for context '/Primefaces1'
2012-05-27 13:18:17 org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFO: Running on PrimeFaces 3.3.RC1
2012-05-27 13:18:17 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
2012-05-27 13:18:17 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
2012-05-27 13:18:17 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/63 config=null
2012-05-27 13:18:17 org.apache.catalina.startup.Catalina start
INFO: Server startup in 5096 ms
What can be the case? Am I putting the jars in wrong place, is it a tomcat failure or maybe something else entirely?
Ok, I solved it, maybe someone will someday find this useful.
So, when using Primefaces with JSF, not only the webpage files have to have the .xhtml extension (a solution I've found here: http://www.coderanch.com/t/473437/JSF/java/not-allowed-template-text), but also the web.xml file must be modified (a solution I've found here: Simple primefaces application not working), like this:
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
Now it works perfectly well.
I am using maven to build an ear and, after making it with java 1.6, I am trying to deploy on Websphere 6.1. Upon deployment it gives this warning and then the error below:
> +++ Warning +++: Sun Feb 12 10:17:03 AST 2012 org.xml.sax.SAXParseException: schema_reference.4: Failed to read
> schema document 'http://java.sun.com/xml/ns/javaee/application_6.xsd',
> because 1) could not find the document; 2) the document could not be
> read; 3) the root element of the document is not <xsd:schema>.
error:
> org.eclipse.jst.j2ee.commonarchivecore.internal.
> exception.DeploymentDescriptorLoadException: META-INF/application.xml
> Stack trace of nested exception:
> org.eclipse.jst.j2ee.commonarchivecore.internal.exception.ResourceLoadException:
> IWAE0007E Could not load resource "META-INF/application.xml" in
> archive "D:\IBM\SDP70\runtimes\base_v61\profiles\AppSrv
> 01\wstemp\0\upload\finapp-ear-1.0-SNAPSHOT.ear" Stack trace of nested
> exception: Wrapped exception org.xml.sax.SAXParseException: cvc-elt.1:
> **Cannot find the declaration of element 'application'.** at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)
I tried searching on the forum and on Google but couldn't really find anything concrete on it.
I even tried to put the application_6.xsd in the {WAS_HOME}/runtimes/base_61/properties/schemas/ but to no avail.
The application.xml is actually made by maven so I don't think there should be any problem with it. This is what it looks like :
<?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">
Can anyone tell me whats wrong here?
The DeploymentDescriptorLoadException means that the application.xml is not valid. The generated code:
<?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">
is incomplete. Use the WebSphere Application Server Toolkit as in these questions:
deployment.xml for WebSphere and Maven
How to install ear in local web sphere (automatically)
References
Assembling a Web services-enabled client JAR file into an EAR file