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
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>
It appears that jOOQs Code Generator has introduces a problem in v3.6.3. I cannot produces POJOs using this configuration file in v3.6.3
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration>
<!-- Configure the database connection here -->
<jdbc>
<driver>org.postgresql.Driver</driver>
<url>jdbc:postgresql://localhost:5432/my_db</url>
<user>postgres</user>
<password>pw</password>
</jdbc>
<generator>
<database>
<name>org.jooq.util.postgres.PostgresDatabase</name>
<inputSchema>public</inputSchema>
</database>
</generator>
</configuration>
but it starts to work again with v3.6.2. The error stack I'm getting in the latest version :
org.jooq.util.GeneratorException: Error generating code for schema public
at org.jooq.util.JavaGenerator.generate(JavaGenerator.java:268)
at org.jooq.util.GenerationTool.run(GenerationTool.java:426)
at org.jooq.util.GenerationTool.generate(GenerationTool.java:176)
at org.jooq.util.GenerationTool.main(GenerationTool.java:151)
Caused by: java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index 9
(?s:^.*?\Rpackage\s+(.*?);?\R.*?$)
^
at java.util.regex.Pattern.error(Unknown Source)
at java.util.regex.Pattern.escape(Unknown Source)
at java.util.regex.Pattern.atom(Unknown Source)
...
[main] ERROR org.jooq.util.GenerationTool - Cannot read jooq-config.xml. Error : Error generating code for schema public
org.jooq.util.GeneratorException: Error generating code for schema public
at org.jooq.util.JavaGenerator.generate(JavaGenerator.java:268)
at org.jooq.util.GenerationTool.run(GenerationTool.java:426)
at org.jooq.util.GenerationTool.generate(GenerationTool.java:176)
at org.jooq.util.GenerationTool.main(GenerationTool.java:151)
Caused by: java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index 9
(?s:^.*?\Rpackage\s+(.*?);?\R.*?$)
^
at java.util.regex.Pattern.error(Unknown Source)
...
at org.jooq.util.JavaWriter.beforeClose(JavaWriter.java:121)
at org.jooq.util.GeneratorWriter.close(GeneratorWriter.java:237)
at org.jooq.util.JavaGenerator.generateSchema(JavaGenerator.java:3131)
at org.jooq.util.JavaGenerator.generate(JavaGenerator.java:298)
at org.jooq.util.JavaGenerator.generate(JavaGenerator.java:265)
... 3 more
[main] ERROR org.jooq.util.GenerationTool - Usage : GenerationTool <configuration-file>
Yes, this is a known regression that applies only to jOOQ 3.6.3:
https://github.com/jOOQ/jOOQ/issues/4576
You can work around it by using Java 8 to run the source code generator.
I was using Hazelcast 2.5. Recently we noticed "APPARENT DEADLOCK" issue on our production servers. Somewhere we find that upgrading to Hazelcast 3.0 or greater can solve the problem. Now when I am trying to upgrade to 3.1, i am getting following error in ApplicationContext.xml and it is not recognizing namespace "hz" anymore.
applicationContext-hazelcast.xml contents before upgrading to 3.1 (Removed some namespaces)
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:hz="http://www.hazelcast.com/schema/spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd
http://www.hazelcast.com/schema/spring http://www.hazelcast.com/schema/spring/hazelcast-spring-2.5.xsd">
applicationContext-hazelcast.xml contents after upgrading to 3.1 (Removed some namespaces)
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:hz="http://www.hazelcast.com/schema/spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd
http://www.hazelcast.com/schema/spring http://www.hazelcast.com/schema/spring/hazelcast-spring-3.1.xsd">
Error Message:
Multiple annotations found at this line:
- schema_reference.4: Failed to read schema document 'http://www.hazelcast.com/schema/spring/hazelcast-spring-3.1.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>.
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'hz:hazelcast'.
How can i do this ?
You're right looks like there's a problem downloading the 3.1 XSD. I'm getting a HTTP 403 when I try to use hazelcast-spring-3.1.
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://www.hazelcast.com/schema/spring/hazelcast-spring-3.1.xsd
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:637)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:582)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:685)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:530)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2175)
... 31 more
When I upgrade to using hazelcast-spring-3.2 everything works for me and I can get a Hazelcast Instance via a Spring Bean. Could you try to upgrade to 3.2 and let me know if that works for you. In the meantime I'm going to raise an issue in github.com/hazelcast for the 3.1 issue.
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.