Weblogic 12c deployment xml errors - weblogic

I'm newbie to weblogic. I tried to deploy an application, but I got the following errors:
Unable to access the selected application.
Exception in AppMerge flows' progression
Exception in AppMerge flows' progression
VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements
'filter-class#http://java.sun.com/xml/ns/javaee async-supported
#http://java.sun.com/xml/ns/javaee init-param
#http://java.sun.com/xml/ns/javaee'
instead of 'description#http://java.sun.com/xml/ns/javaee' here in element
filter
#http://java.sun.com/xml/ns/javaee:<null>
problem: cvc-complex-type.2.4b: Element not allowed:
description#http://java.sun.com/xml/ns/javaee in element init-param
#http://java.sun.com/xml/ns/javaee:<null>
problem: cvc-complex-type.2.4b: Element not allowed: description
#http://java.sun.com/xml/ns/javaee in element init-param
#http://java.sun.com/xml/ns/javaee:<null>
problem: cvc-complex-type.2.4a: Expected elements 'servlet-class
#http://java.sun.com/xml/ns/javaee jsp-file
#http://java.sun.com/xml/ns/javaee init-param
#http://java.sun.com/xml/ns/javaee load-on-startup
#http://java.sun.com/xml/ns/javaee enabled
#http://java.sun.com/xml/ns/javaee async-supported
#http://java.sun.com/xml/ns/javaee run-as
#http://java.sun.com/xml/ns/javaee security-role-ref
#http://java.sun.com/xml/ns/javaee multipart-config
#http://java.sun.com/xml/ns/javaee' instead of 'display-name
#http://java.sun.com/xml/ns/javaee' here in element servlet
#http://java.sun.com/xml/ns/javaee:<null>
problem: cvc-complex-type.2.4a: Expected elements 'servlet-class
#http://java.sun.com/xml/ns/javaee jsp-file
#http://java.sun.com/xml/ns/javaee init-param
#http://java.sun.com/xml/ns/javaee load-on-startup
#http://java.sun.com/xml/ns/javaee enabled
#http://java.sun.com/xml/ns/javaee async-supported
#http://java.sun.com/xml/ns/javaee run-as
#http://java.sun.com/xml/ns/javaee security-role-ref
#http://java.sun.com/xml/ns/javaee multipart-config
#http://java.sun.com/xml/ns/javaee' instead of 'display-name
#http://java.sun.com/xml/ns/javaee' here in element servlet
#http://java.sun.com/xml/ns/javaee:<null>
problem: cvc-complex-type.2.4a: Expected elements 'servlet-class
#http://java.sun.com/xml/ns/javaee jsp-file
#http://java.sun.com/xml/ns/javaee init-param
#http://java.sun.com/xml/ns/javaee load-on-startup
#http://java.sun.com/xml/ns/javaee enabled
#http://java.sun.com/xml/ns/javaee async-supported
#http://java.sun.com/xml/ns/javaee run-as
#http://java.sun.com/xml/ns/javaee security-role-ref
#http://java.sun.com/xml/ns/javaee multipart-config
#http://java.sun.com/xml/ns/javaee' instead of 'display-name
#http://java.sun.com/xml/ns/javaee' here in element servlet
#http://java.sun.com/xml/ns/javaee:<null>
I tried to find weblogic.xml and web.xml, but there is just a war file. How can I modify the xxmls in the war?
Thanks for any responses.
Allen

Related

Struts2 file upload - No mapping found for dependency

I'm using Struts 2.3.20.1 with Commons File Upload 1.3.1 and Commons IO 2.4 to upload a (CSV) file. When i try to do uploading, there is this error in server log:
ERROR [io.undertow.request] (default task-24) UT005023: Exception
handling request to /private/createDatasetFromCSV:
java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.RuntimeException:
com.opensymphony.xwork2.inject.DependencyException:
com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException:
No mapping found for dependency [type=java.lang.String,
name='struts.multipart.bufferSize'] in public void
org.apache.struts2.dispatcher.multipart.JakartaStreamMultiPartRequest.setBufferSize(java.lang.String).
I've followed the official guidelines here, creating an Action class, using the JSP form tags and so on.
In struts.xml, for file upload section, I have:
<constant name="struts.multipart.maxSize" value="209715200" />
<constant name="struts.multipart.parser" value="jakarta-stream" />
The version of Struts should be updated due to WW-4466.
With WW-3025 there was a new config constant introduced: struts.multipart.bufferSize
Currently it is set as required and hence applications must specify it. The default value is always overridden.
-> should be required = false
Fix Version/s: 2.3.24

Netbeans 8.2 : GlassFish 5 Server, deploy, null false - The module has not been deployed

I'm a new Java WebEnt student, and I'm having issues deploying some basic Entity Classes and JSF Pages.
I loaded up some things without any edit to the files, and when trying to deploy. I get the "\nbproject\build-imp.xml:1045 The module has not been deployed" message. I checked the GlassFish server and here is the beginning log:
java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 10;
columnNumber: 18; Deployment descriptor file META-INF/persistence.xml in
archive [classes]. cvc-complex-type.2.4.d: Invalid content was found
starting with element 'properties'. No child element is expected at this point.
The rest of the log is pasted below
https://pastebin.com/7rXsyRit
EDIT
Pastebin to include the XML files in WEB-INF and persistence.xml
https://pastebin.com/6kRJyA54
Thanks for the help/advice
Yes the issue was <properties/> after I had removed that and tried to deploy, I had gotten that error which following the instructions in this link had resolved.

weblogic 12c with richfaces 4.0.0 - For <rich:fileUpload> Deployment Failed

Issue when I try to deploy in to weblogic 12C
Steps that I followed,
JSTL - 1.2
JSF - 1.2
richfaces-rich-4.5.17.Final
richfaces-a4j-4.5.17.Final
richfaces-core-4.5.17.Final
Also I included,
guava-18.0.jar
cssparser-0.9.19.jar
sac-1.3.jar
annotations-4.0.0.Final.jar
Deployment was successful, but when I tried to upload a file using <rich:fileUpload> I got the following error:
The JSF implementation 1.0.0.0_2-1-5 does not support the RichFaces ExtendedPartialViewContext. Please upgrade to at least Mojarra 2.1.28 or 2.2.6
Then I upgrade JSF1.2 to jsf-api-2.1.28 and jsf-impl-2.1.28 with Richfaces 4.5.17.
When I try to file upload received:
javax.servlet.ServletException: IO Error parsing multipart request
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
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:352)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:75)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:343)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:75)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:302)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:367)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:75)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:75)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:75)
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:2091)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1512)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: org.ajax4jsf.exception.FileUploadException: IO Error parsing multipart request
at org.ajax4jsf.request.MultipartRequest.parseRequest(MultipartRequest.java:388)
at org.richfaces.component.FileUploadPhaselistener.beforePhase(FileUploadPhaselistener.java:63)
at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
... 29 more
Found The JSF default version of 12.1.1 WLS server is lower than 2.1.28 JSF version, so I changed JSF version to jsf-api-2.0.0 and jsf-impl-2.0.0 and
changed RichFaces version from 4.5.17 to:
richfaces-core-api-4.0.0.Final
richfaces-core-impl-4.0.0.Final
richfaces-components-ui-4.0.0.Final
richfaces-components-api-4.0.0.Final.
Deployment Failed:
<Critical error during deployment:
com.sun.faces.config.ConfigurationException: The tag named remove from namespace http://java.sun.com/jsf/facelets has a null handler-class defined
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processHandlerClass(FaceletTaglibConfigProcessor.java:415)
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:371)
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:314)
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:263)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:362)
Truncated. see log file for complete stacktrace
>
<Jul 12, 2016 6:29:19 PM SGT> <Warning> <HTTP> <BEA-101162> <User defined listener com.sun.faces.config.ConfigureListener failed: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: The tag named remove from namespace http://java.sun.com/jsf/facelets has a null handler-class defined.
java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: The tag named remove from namespace http://java.sun.com/jsf/facelets has a null handler-class defined
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:582)
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)
Truncated. see log file for complete stacktrace
Caused By: com.sun.faces.config.ConfigurationException: The tag named remove from namespace http://java.sun.com/jsf/facelets has a null handler-class defined
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processHandlerClass(FaceletTaglibConfigProcessor.java:415)
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:371)
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:314)
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:263)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:362)
Truncated. see log file for complete stacktrace
I changed web.xml header to:
<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
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/web-app_2_5.xsd"
version="2.5">
Please advice for rich:fileUpload in WebLogic 12c using RichFaces.
richfaces-xxx-4.5 works with JSF 2. It means you cannot deploy it with JSF 1.2

Axis2 generated Client to web service call - Unable to access unsupported property javax.xml.stream.supportDTD

I am getting the following exception when I access the web service from my Axis2 generated stub client.
Can anyone put some light one it?
Thanks.
Caused by: org.apache.axis2.AxisFault: Unable to access unsupported property javax.xml.stream.supportDTD
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:123)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:354)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at amdocs.cl.utils.CollectionsServiceStub.GetEquipmentInfo(CollectionsServiceStub.java:267)
at amdocs.cl.utils.DDPCollectionConnectorUtils.getEquipmentInfo(DDPCollectionConnectorUtils.java:162)
... 7 more
Caused by: java.lang.IllegalArgumentException: Unable to access unsupported property javax.xml.stream.supportDTD
at weblogic.xml.stax.ConfigurationContextBase.check(ConfigurationContextBase.java:60)
at weblogic.xml.stax.ConfigurationContextBase.setProperty(ConfigurationContextBase.java:54)
at weblogic.xml.stax.XMLStreamInputFactory.setProperty(XMLStreamInputFactory.java:280)
at org.apache.axiom.util.stax.dialect.StAXDialectUtils.disallowDoctypeDecl(StAXDialectUtils.java:40)
at org.apache.axiom.util.stax.dialect.UnknownStAXDialect.disallowDoctypeDecl(UnknownStAXDialect.java:39)
at org.apache.axiom.om.util.StAXParserConfiguration$4.configure(StAXParserConfiguration.java:116)
at org.apache.axiom.om.util.StAXUtils$7.run(StAXUtils.java:520)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axiom.om.util.StAXUtils.newXMLInputFactory(StAXUtils.java:495)
at org.apache.axiom.om.util.StAXUtils.getXMLInputFactory_perClassLoader(StAXUtils.java:566)
at org.apache.axiom.om.util.StAXUtils.getXMLInputFactory(StAXUtils.java:172)
at org.apache.axiom.om.util.StAXUtils.getXMLInputFactory(StAXUtils.java:137)
at org.apache.axiom.om.util.StAXUtils.createXMLStreamReader(StAXUtils.java:196)
at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:64)
at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:197)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:145)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:108)
I too had the same issue and finally found that the problem is with incorrect context config.
Axis2 configuration context is being created with weblogic.jar file instead of axis2 jar, so change the build class path order. First point all the axis2 jars and atlast point the weblogic.jar in class path.
I resolved this by adding jax-rt jar in my classPath.
Or Add below dependency in your pom
<depepdency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2.10</version>
</dependency>

spring Jaxb2Marshaller+contextPath+tomcat embedded in maven throws

I'm using spring's Jaxb2Marshaller (without web services) to unmarshal some xml. The xml code is code-gen via maven-jaxb-plugin, and I instantiate the Jaxb2Marshaller in spring via:
<bean id="unmarshaller" class="...Jaxb2Marshaller" p:contextPath="my.package.path" />
Then start with:
mvn clean package
mvn tomcat:run
The first unmarshaller is created fine, the second throws with org.springframework.oxm.jaxb.JaxbSystemException because it can't find ObjectFactory (which is generated by the maven-jaxb-plugin, and I've verified is in fact present in the jar, in the correct package).
I actually have two unmarshallers, (although I've tried with one unmarshaller and contextPath with colon separated package paths, with same results).
I don't think this is generally a problem with spring or my configuration, because if I deploy into a full tomcat container it works fine. I did notice that maven puts tomcat in my project/target/tomcat folder and there are some differences, such as there is no lib directory. I actually don't know what all the differences are between embedded tomcat and a regular installation.
Can someone explain:
1) exactly how embedded tomcat differs from a regular installation
2) if there are known limitations
3) if it can be configured to work properly in this situtation
Full stack trace:
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'unmarshaller' defined in class path resource [spring.xml]: Invocation of init method failed; nested exception is org.springframework.oxm.jaxb.JaxbSystemException: "my.package.path" doesnt contain ObjectFactory.class or jaxb.index; nested exception is javax.xml.bind.JAXBException: "my.package.path" doesnt contain ObjectFactory.class or jaxb.index
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at org.apache.catalina.startup.Embedded.start(Embedded.java:825)
at org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:558)
at org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:255)
For anyone else who runs across this, I eventually solved the problem by using classesToBeBound property instead of contextPath. The reason I had initially avoided classesToBeBound was that I thought I had to specify every single class in the model in the classesToBeBound list, which isn't the case. You simply specify the class that has the #XmlRootElement annotation.