I'm preparing some service using Apache Axis 1.4. So far I've generated Java classes using WSDL file (with IntelliJ), prepared server-config.wsdd file and deploy service on Websphere Application Server 8.5.5.18.
When I hit http://localhost:9081/MyService/services/SmsNotification in browser, I get:
but when I invoke service using SoapUI, I'm getting the following error:
org.apache.axis.types.URI$MalformedURIException: No scheme found in URI.
What could cause this error?
server-config.wsdd:
<!-- Use this file to deploy some handlers/chains and services -->
<!-- Two ways to do this: -->
<!-- java org.apache.axis.client.AdminClient deploy.wsdd -->
<!-- after the axis server is running -->
<!-- or -->
<!-- java org.apache.axis.utils.Admin client|server deploy.wsdd -->
<!-- from the same directory that the Axis engine runs -->
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<!-- Services from SmsNotificationService WSDL service -->
<service name="SmsNotification" provider="java:RPC" style="rpc" use="literal">
<parameter name="wsdlTargetNamespace" value="http://www.csapi.org/wsdl/parlayx/sms/notification/v1_0/service" />
<parameter name="wsdlServiceElement" value="SmsNotificationService" />
<parameter name="schemaUnqualified" value="http://www.csapi.org/schema/parlayx/common/v1_0,http://www.csapi.org/schema/parlayx/sms/v1_0" />
<parameter name="wsdlServicePort" value="SmsNotification" />
<parameter name="className" value="org.csapi.www.wsdl.parlayx.sms.notification.v1_0.service.SmsNotificationBindingSkeleton" />
<parameter name="wsdlPortType" value="SmsNotification" />
<parameter name="typeMappingVersion" value="1.2" />
<parameter name="allowedMethods" value="*" />
<typeMapping xmlns:ns="http://www.csapi.org/schema/parlayx/common/v1_0" qname="ns:EndUserIdentifier"
type="java:org.csapi.www.schema.parlayx.common.v1_0.EndUserIdentifier" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" />
<typeMapping xmlns:ns="http://www.csapi.org/schema/parlayx/common/v1_0" qname="ns:ApplicationException"
type="java:org.csapi.www.schema.parlayx.common.v1_0.ApplicationException" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" />
</service>
<transport name="http">
<requestFlow>
<handler type="java:org.apache.axis.handlers.http.URLMapper" />
</requestFlow>
</transport>
</deployment>
web.xml mapping:
<servlet>
<servlet-name>AxisServlet</servlet-name>
<servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>AdminServlet</servlet-name>
<servlet-class>org.apache.axis.transport.http.AdminServlet</servlet-class>
<load-on-startup>100</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/servlet/AxisServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>*.jws</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AdminServlet</servlet-name>
<url-pattern>/servlet/AdminServlet</url-pattern>
</servlet-mapping>
EDIT:
Here's some logging when I call service:
[11.11.2021 9:05:50:752 CET] 00000139 SystemOut O [DEBUG] (ProjectResourceBundle.java: [org.apache.axis.i18n.ProjectResourceBundle:handleGetObject:72]) org.apache.axis.i18n.resource::handleGetObject(popHandler00)
[11.11.2021 9:05:50:752 CET] 00000139 SystemOut O [DEBUG] (DeserializationContext.java: [org.apache.axis.encoding.DeserializationContext:popElementHandler:829]) Popping handler org.apache.axis.encoding.ser.SimpleDeserializer#f243ae8d
[11.11.2021 9:05:50:753 CET] 00000139 SystemOut O [DEBUG] (DeserializationContext.java: [org.apache.axis.encoding.DeserializationContext:endElement:1106]) Popped element stack to org.apache.axis.message.MessageElement:senderAddress
[11.11.2021 9:05:50:753 CET] 00000139 SystemOut O [DEBUG] (DeserializationContext.java: [org.apache.axis.encoding.DeserializationContext:endElement:1107]) Exit: DeserializationContext::endElement()
[11.11.2021 9:05:50:753 CET] 00000139 SystemOut O [DEBUG] (ProjectResourceBundle.java: [org.apache.axis.i18n.ProjectResourceBundle:handleGetObject:72]) org.apache.axis.i18n.resource::handleGetObject(toAxisFault00)
[11.11.2021 9:05:50:797 CET] 00000139 SystemOut O [DEBUG] (JavaProvider.java: [org.apache.axis.enterprise:invoke:332]) Mapping Exception to AxisFault
org.apache.axis.types.URI$MalformedURIException: No scheme found in URI.
at org.apache.axis.types.URI.initialize(URI.java:653)
at org.apache.axis.types.URI.<init>(URI.java:311)
at org.apache.axis.types.URI.<init>(URI.java:272)
at org.apache.axis.encoding.ser.SimpleDeserializer.makeBasicValue(SimpleDeserializer.java:324)
at org.apache.axis.encoding.ser.SimpleDeserializer.makeValue(SimpleDeserializer.java:209)
at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:172)
at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:502)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:81)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1233)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:782)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:79)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.__handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:40020)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:949)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:213)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
[11.11.2021 9:05:50:807 CET] 00000139 SystemOut O [DEBUG] (SOAPPart.java: [org.apache.axis.SOAPPart:<init>:182]) Enter: SOAPPart ctor(FORM_FAULT)
[11.11.2021 9:05:50:808 CET] 00000139 SystemOut O [DEBUG] (ProjectResourceBundle.java: [org.apache.axis.i18n.ProjectResourceBundle:handleGetObject:72]) org.apache.axis.i18n.resource::handleGetObject(setMsgForm)
[11.11.2021 9:05:50:808 CET] 00000139 SystemOut O [DEBUG] (SOAPPart.java: [org.apache.axis.SOAPPart:setCurrentForm:374]) Setting current message form to: FORM_FAULT (currentMessage is now org.apache.axis.AxisFault)
[11.11.2021 9:05:50:808 CET] 00000139 SystemOut O [DEBUG] (SOAPPart.java: [org.apache.axis.SOAPPart:<init>:188]) Exit: SOAPPart ctor()
[11.11.2021 9:05:50:810 CET] 00000139 SystemOut O [DEBUG] (ProjectResourceBundle.java: [org.apache.axis.i18n.ProjectResourceBundle:handleGetObject:72]) org.apache.axis.i18n.resource::handleGetObject(axisFault00)
[11.11.2021 9:05:50:812 CET] 00000139 SystemOut O [DEBUG] (AxisServlet.java: [org.apache.axis.EXCEPTIONS:processAxisFault:386]) AxisFault:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.apache.axis.types.URI$MalformedURIException: No scheme found in URI.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:org.apache.axis.types.URI$MalformedURIException: No scheme found in URI.
at org.apache.axis.types.URI.initialize(URI.java:653)
at org.apache.axis.types.URI.<init>(URI.java:311)
at org.apache.axis.types.URI.<init>(URI.java:272)
at org.apache.axis.encoding.ser.SimpleDeserializer.makeBasicValue(SimpleDeserializer.java:324)
at org.apache.axis.encoding.ser.SimpleDeserializer.makeValue(SimpleDeserializer.java:209)
at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:172)
at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:502)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:81)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1233)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:782)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:79)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.__handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:40020)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:949)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:213)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
{http://xml.apache.org/axis/}hostname:mycompany-ro-02
org.apache.axis.types.URI$MalformedURIException: No scheme found in URI.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1233)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:782)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:79)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.__handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:40020)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:949)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:213)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
Caused by: org.apache.axis.types.URI$MalformedURIException: No scheme found in URI.
at org.apache.axis.types.URI.initialize(URI.java:653)
at org.apache.axis.types.URI.<init>(URI.java:311)
at org.apache.axis.types.URI.<init>(URI.java:272)
at org.apache.axis.encoding.ser.SimpleDeserializer.makeBasicValue(SimpleDeserializer.java:324)
at org.apache.axis.encoding.ser.SimpleDeserializer.makeValue(SimpleDeserializer.java:209)
at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:172)
at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:502)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:81)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
Related
emphasized textI'm working on migration of log4j version from 1.2.17 to Log4j2 , as part of migration I have chosen bridge option
as per the guideliness , while migrating log4j.xml to log4j2.xml for RollingFile we are having properties to substitute for file creation as below
<RollingFile name="file"
fileName="${log.directory}server.log.${log.id}server.log"
filePattern="${log.directory}server.log.${log.id}server.log">
<PatternLayout pattern="%d{ISO8601} %-5p (%t %X{RequestId} %X{CallerId}) [%c{1}] %m%n" />
<Policies>
<SizeBasedTriggeringPolicy size="5000 KB" />
</Policies>
<DefaultRolloverStrategy max="5" />
</RollingFile>
And these variables resolved after execution of one of custom (com.MyCustomListener) written during startup , This flow is working as expected with log4j 1.2.17 .
With log4j2 as per the Specification provided by apache auto-initialization of log4j2 happens during server startup automatically , due to this auto-initialization at the being of server startup my listener which resolves variables is executing after initialization of log4j as a result variables are not resolving, I am using servlet version 4.0
I tried to disable auto-initialization by adding below beginning of my web.xml
<context-param>
<param-name>isLog4jAutoInitializationDisabled</param-name>
<param-value>true</param-value>
</context-param>
But still this is not helping me , log4j2 initialization is happening before my execution
I want my execution first before log4j2 initialization.
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>MyApplication</display-name>
<listener>
<listener-class>org.apache.logging.log4j.web.Log4jServletContextListener</listener-class>
</listener>
<filter>
<filter-name>log4jServletFilter</filter-name>
<filter-class>org.apache.logging.log4j.web.Log4jServletFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>log4jServletFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
<context-param>
<param-name>isLog4jAutoInitializationDisabled</param-name>
<param-value>true</param-value>
</context-param>
<!-- init properties shared by entire application -->
<context-param>
<param-name>earDeploymentDescriptorPath</param-name>
<param-value>application.xml</param-value>
</context-param>
<listener>
<listener-class>com.MyCustomListener</listener-class>
</listener>
<!-- bootstrap Log4j -->
<!-- Log4j refresh interval -->
<context-param>
<param-name>log4jRefreshInterval</param-name>
<param-value>60000</param-value>
</context-param>
<context-param>
<param-name>log4jExposeWebAppRoot</param-name>
<param-value>false</param-value>
</context-param>
<!-- welcome file list-->
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
I have enabled TRACE logs for log4j2 , From the logs I have observed that log4j is initializing before my custom listener(com.MyCustomListener)
*2021-05-19 05:11:49,314 INFO [stdout] (ServerService Thread Pool -- 71) 2021-05-19 05:11:49,314 ServerService Thread Pool -- 71 TRACE TypeConverterRegistry initializing.
2021-05-19 05:11:49,314 INFO [stdout] (ServerService Thread Pool -- 71) 2021-05-19 05:11:49,314 ServerService Thread Pool -- 71 DEBUG PluginManager 'TypeConverter' found 26 plugins
2021-05-19 05:11:49,330 INFO [stdout] (ServerService Thread Pool -- 71) 2021-05-19 05:11:49,330 ServerService Thread Pool -- 71 DEBUG PatternLayout$Builder(pattern="%d{ISO8601} %-5p (%t) [%c{1}] %m%n", PatternSelector=null, Configuration(vfs:/C:/SL3/CPS_EMR_ALL/jboss/standalone/deployments/PracticeEAR.ear/lib/Practice.jar/log4j2.xml), Replace=null, charset="null", alwaysWriteExceptions="null", disableAnsi="null", noConsoleNoAnsi="null", header="null", footer="null")
2021-05-19 05:11:49,330 INFO [stdout] (ServerService Thread Pool -- 71) 2021-05-19 05:11:49,330 ServerService Thread Pool -- 71 DEBUG PluginManager 'Converter' found 46 plugins
2021-05-19 05:11:49,330 INFO [stdout] (ServerService Thread Pool -- 71) 2021-05-19 05:11:49,330 ServerService Thread Pool -- 71 DEBUG Building Plugin[name=appender, class=org.apache.logging.log4j.core.appender.ConsoleAppender].
2021-05-19 05:11:49,345 INFO [stdout] (ServerService Thread Pool -- 71) 2021-05-19 05:11:49,345 ServerService Thread Pool -- 71 DEBUG ConsoleAppender$Builder(target="SYSTEM_OUT", follow="null", direct="null", bufferedIo="null", bufferSize="null", immediateFlush="null", ignoreExceptions="null", PatternLayout(%d{ISO8601} %-5p (%t) [%c{1}] %m%n), name="console", Configuration(vfs:/C:/SL3/CPS_EMR_ALL/jboss/standalone/deployments/PracticeEAR.ear/lib/Practice.jar/log4j2.xml), Filter=null, ={})
2021-05-19 05:11:49,345 INFO [stdout] (ServerService Thread Pool -- 71) 2021-05-19 05:11:49,345 ServerService Thread Pool -- 71 DEBUG Starting OutputStreamManager SYSTEM_OUT.false.false
2021-05-19 05:11:49,345 INFO [stdout] (ServerService Thread Pool -- 71) 2021-05-19 05:11:49,345 ServerService Thread Pool -- 71 DEBUG Building Plugin[name=layout, class=org.apache.logging.log4j.core.layout.PatternLayout].
2021-05-19 05:11:49,345 INFO [stdout] (ServerService Thread Pool -- 71) 2021-05-19 05:11:49,345 ServerService Thread Pool -- 71 DEBUG PatternLayout$Builder(pattern="%d{ISO8601} %-5p (%t %X{RequestId} %X{CallerId}) [%c{1}] %m%n", PatternSelector=null, Configuration(vfs:/C:/SL3/CPS_EMR_ALL/jboss/standalone/deployments/PracticeEAR.ear/lib/Practice.jar/log4j2.xml), Replace=null, charset="null", alwaysWriteExceptions="null", disableAnsi="null", noConsoleNoAnsi="null", header="null", footer="null")
2021-05-19 05:11:49,580 INFO [stdout] (ServerService Thread Pool -- 71) 2021-05-19T05:11:49,580 INFO (ServerService Thread Pool -- 71) [MyCustomListner] ********************** Entry to MyCustomListner class **********************
2021-05-19 05:11:49,611 INFO [stdout] (ServerService Thread Pool -- 71) 2021-05-19T05:11:49,611 ERROR (ServerService Thread Pool -- 71) [MyCustomListner] ********************** Exit from MyCustomListner class ***********************
Your help is apricated
I'm using next configuration:
Application Server - Wildfly 9.0
Primefaces 5.1 RC1, Atmosphere 2.2.2 - added as modules (all dependencies were added).
I've stopped on this configuration, because any other is falling down with heap of errors.
I'm going to use primepush, I've done all as in example http://www.primefaces.org/showcase/push/notify.xhtml, but it does not work for me.
My part of web.xml for primepush conf:
<filter-mapping>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<servlet>
<servlet-name>Push Servlet</servlet-name>
<servlet-class>org.primefaces.push.PushServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>Push Servlet</servlet-name>
<url-pattern>/primepush/*</url-pattern>
</servlet-mapping>
I have in my project class annotated with #PushEndpoint, in xhtml file I have socket connected to the same channel. After deploying I don't have any errors, but there is a strange string in the first line
21:25:24,433 ERROR [org.primefaces.push.PushServlet] (MSC service thread 1-8) No Annotated class using #PushEndpoint found. Push will not work.
21:25:24,433 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0021: Registered web context: /oasa
21:25:24,556 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0016: Replaced deployment "oasa.war" with deployment "oasa.war"
21:25:24,701 INFO [org.atmosphere.cpr.AtmosphereFramework] (Thread-150) Latest version of Atmosphere's JavaScript Client 2.2.4
After googling I found solution to add to my web.xml
<init-param>
<param-name>org.atmosphere.annotation.packages</param-name>
<param-value>org.primefaces.push</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.packages</param-name>
<param-value>MY_PACKAGE_WITH_PUSH_ENDPOINTS</param-value>
</init-param>
All is deploying fine, but when I send message using
EventBusFactory.getDefault().eventBus().publish(MY_CHANNEL, MY_VARIABLE);
Here is what I've gotten on wildfly console :
22:02:54,284 ERROR [io.undertow.request] (default task-19) UT005023: Exception handling request to /MY_PROJECT/primepush/MY_CHANNEL: org.atmosphere.cpr.AtmosphereMappingException: No AtmosphereHandler maps request for /MY_PROJECT/primepush/MY_CHANNEL
at org.atmosphere.cpr.AsynchronousProcessor.map(AsynchronousProcessor.java:355)
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:154)
at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:104)
at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:66)
at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2063)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:211)
at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:197)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:129) [undertow-websockets-jsr-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:259) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:246) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:75) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:165) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:737) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_67]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
22:02:55,634 WARN [org.atmosphere.websocket.DefaultWebSocketProcessor] (default task-20) Failed invoking AtmosphereFramework.doCometSupport(): org.atmosphere.cpr.AtmosphereMappingException: No AtmosphereHandler maps request for http://localhost:8080/MY_PROJECT/primepush/MY_CHANNEL
at org.atmosphere.cpr.AsynchronousProcessor.map(AsynchronousProcessor.java:355)
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:154)
at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:104)
at org.atmosphere.container.Servlet30CometSupport.service(Servlet30CometSupport.java:66)
at org.atmosphere.cpr.AtmosphereFramework.doCometSupport(AtmosphereFramework.java:2063)
at org.atmosphere.websocket.DefaultWebSocketProcessor.dispatch(DefaultWebSocketProcessor.java:568)
at org.atmosphere.websocket.DefaultWebSocketProcessor.open(DefaultWebSocketProcessor.java:213)
at org.atmosphere.container.JSR356Endpoint.onOpen(JSR356Endpoint.java:192)
at io.undertow.websockets.jsr.EndpointSessionHandler.onConnect(EndpointSessionHandler.java:84) [undertow-websockets-jsr-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.websockets.jsr.JsrWebSocketFilter$1.handleUpgrade(JsrWebSocketFilter.java:121) [undertow-websockets-jsr-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.protocol.http.HttpReadListener.exchangeComplete(HttpReadListener.java:285) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.protocol.http.HttpServerConnection.exchangeComplete(HttpServerConnection.java:212) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.HttpServerExchange.invokeExchangeCompleteListeners(HttpServerExchange.java:1141) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.HttpServerExchange.terminateResponse(HttpServerExchange.java:1361) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.Connectors.terminateResponse(Connectors.java:98) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.protocol.http.ServerFixedLengthStreamSinkConduit.channelFinished(ServerFixedLengthStreamSinkConduit.java:51) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.exitFlush(AbstractFixedLengthStreamSinkConduit.java:300) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.flush(AbstractFixedLengthStreamSinkConduit.java:234) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at org.xnio.conduits.ConduitStreamSinkChannel.flush(ConduitStreamSinkChannel.java:162)
at io.undertow.channels.DetachableStreamSinkChannel.flush(DetachableStreamSinkChannel.java:118) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at org.xnio.channels.Channels.flushBlocking(Channels.java:63)
at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputStreamImpl.java:607) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.spec.HttpServletResponseImpl.closeStreamAndWriter(HttpServletResponseImpl.java:483) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:566) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:307) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:246) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:75) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:165) [undertow-servlet-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:737) [undertow-core-1.1.0.Beta7.jar:1.1.0.Beta7]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_67]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
22:02:55,649 WARN [org.atmosphere.websocket.protocol.SimpleHttpProtocol] (default task-20) org.atmosphere.cpr.AtmosphereMappingException: No AtmosphereHandler maps request for http://localhost:8080/MY_PROJECT/primepush/MY_CHANNEL. Unable to deliver the websocket messages to installed component. Status 500 Message Server Error
In any case websockets is not working for me...
Please, advise how to fix that.
P.S. I've just repeated all steps on wildfly 8.1 Final. I have the same picture - all errors as in the wildfly 9.0 case....
P.P.S.
module.xml
atmosphere
<module xmlns="urn:jboss:module:1.3" name="org.atmosphere">
<resources>
<resource-root path="atmosphere-runtime-2.2.2.jar"/>
</resources>
<dependencies>
<module name="javax.servlet.api"/>
<module name="javax.websocket.api" export="true"/>
<module name="org.slf4j" export="true"/>
</dependencies>
</module>
primefaces
<module xmlns="urn:jboss:module:1.3" name="org.primefaces" slot="5">
<resources>
<resource-root path="primefaces-5.1.RC1.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.annotation.api"/>
<module name="javax.faces.api"/>
<module name="org.apache.commons.fileupload"/>
<module name="org.atmosphere"/>
</dependencies>
</module>
I'm using mojarra 2.2, gf4, swf 2.3.2.
The problem comes during loading of the pages in webflow. the error comes when webflow (i think) is sending the pages to faces for rendering. I have tried with swf2.0.8 upto the current swf2.3.2.
INFO: 2013-07-12 09:46:09 DEBUG RequestLoggingPhaseListener:42 - Entering JSF Phase: RENDER_RESPONSE 6
INFO: 2013-07-12 09:46:09 DEBUG RequestLoggingPhaseListener:42 - Entering JSF Phase: RENDER_RESPONSE 6
SEVERE: Error Rendering View[/WEB-INF/pages/index/index.xhtml]
java.lang.UnsupportedOperationException
at javax.faces.context.ExternalContext.getClientWindow(ExternalContext.java:1500)
at com.sun.faces.context.ExternalContextImpl.encodeActionURL(ExternalContextImpl.java:562)
at org.springframework.faces.webflow.ExternalContextWrapper.encodeActionURL(ExternalContextWrapper.java:29)
at com.sun.faces.renderkit.html_basic.FormRenderer.getActionStr(FormRenderer.java:234)
at com.sun.faces.renderkit.html_basic.FormRenderer.encodeBegin(FormRenderer.java:134)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:869)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:443)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
at org.springframework.faces.webflow.FlowLifecycle.render(FlowLifecycle.java:80)
at org.springframework.faces.webflow.JsfView.render(JsfView.java:89)
at org.springframework.webflow.engine.ViewState.render(ViewState.java:296)
at org.springframework.webflow.engine.ViewState.refresh(ViewState.java:243)
at org.springframework.webflow.engine.ViewState.resume(ViewState.java:221)
at org.springframework.webflow.engine.Flow.resume(Flow.java:545)
at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:258)
at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:169)
at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
at org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:152)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:724)
INFO: 2013-07-12 09:46:09 DEBUG JsfView:98 - View rendering complete
on the flow for a page i have
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.4.xsd"
parent="parent-views">
<view-state id="index" view="index.xhtml"/>
the webflow configuration is
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:webflow="http://www.springframework.org/schema/webflow-config"
xmlns:faces="http://www.springframework.org/schema/faces"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd
http://www.springframework.org/schema/faces
http://www.springframework.org/schema/faces/spring-faces-2.2.xsd">
<bean class="org.springframework.webflow.scope.ScopeRegistrar"/>
<!-- Spring Webflow central configuration component -->
<webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry">
<webflow:flow-execution-listeners>
<webflow:listener ref="facesContextListener"/>
</webflow:flow-execution-listeners>
</webflow:flow-executor>
<!-- Installs a listener that creates and releases the FacesContext for each request. -->
<bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener"/>
<webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices" base-path="/WEB-INF/pages" >
<webflow:flow-location-pattern value="/**/*-views.xml" />
</webflow:flow-registry>
<!-- Configures the Spring Web Flow JSF integration -->
<faces:flow-builder-services id="facesFlowBuilderServices" development="true" />
<bean id="mvcViewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator"/>
<!-- Dispatches requests mapped to flows to FlowHandler implementations -->
<bean class="org.springframework.faces.webflow.JsfFlowHandlerAdapter">
<property name="flowExecutor" ref="flowExecutor" />
</bean>
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
<property name="flowRegistry" ref="flowRegistry"/>
<property name="order" value="1"/>
</bean>
which i borrowed from somewhere
whenever i try to open the page i get this error
I have the same problem on Tomcat 6. The current stable releases of Spring WebFlow does not implement the JSF 2.2 API correctly. Thats why the invoke of javax.faces.context.ExternalContext.getClientWindow(...) fails. The source of the problem seems to be the clientWindowId feature.
The only solution for this is to update your Spring Webflow libraries to 2.4 SNAPSHOT. I grabbed the library files from http://maven.springframework.org/snapshot/org/springframework/webflow . My Spring Framework is the latest stable release.
A note for Tomcat users. Spring Webflow 2.4 requires some Java EE features now. You need to have an implementation for the CDI specification in your project. The Weld library suits very well to implement this specification on servers that aren't Java EE compatible (see http://www.seamframework.org/Weld for more information).
This is a bug in SWF 2.3.2: it doesn't support JSF 2.2
Here's the bug report: https://jira.spring.io/browse/SWF-1613
Starting from 2.3.3 it is fixed.
I'm trying to connect to an exchange server with IMAPS on port 443 (it's been configured this way on the other end) using the following code:
.
.
.
props.setProperty("javax.net.ssl.trustStore", "C:/Program Files/Java/jdk1.6.0_30/jre/lib/security/cacerts");
props.setProperty("javax.net.ssl.trustStorePassword", "changeit");
props.setProperty("javax.net.ssl.trustStoreType", "jks");
props.setProperty("javax.net.debug", "ssl");
System.setProperties(props);
props = System.getProperties();
final Session session = Session.getInstance(props, null);
session.setDebug(debug);
com.sun.mail.imap.IMAPFolder inbox = null;
Store store = null;
store = session.getStore("imaps");
store.connect(host, 443, username, password);
inbox = (com.sun.mail.imap.IMAPFolder) store.getFolder("INBOX");
.
.
.
Judging from the fact that I get no certificate errors, they are correctly loaded from the store location. However, I get the following trace once the code reaches the connect statement:"
[29/01/13 18:23:02:811 CST] 0000007d SystemOut O DEBUG: getProvider() returning javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc]
[29/01/13 18:23:02:812 CST] 0000007d SystemOut O DEBUG: mail.imap.fetchsize: 16384
[29/01/13 18:18:42:814 CST] 0000007d SystemErr R javax.mail.MessagingException;
nested exception is:
java.io.IOException
[29/01/13 18:18:42:814 CST] 0000007d SystemErr R at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:479)
[29/01/13 18:18:42:814 CST] 0000007d SystemErr R at javax.mail.Service.connect(Service.java:275)
[29/01/13 18:18:42:814 CST] 0000007d SystemErr R at com.scots.utils.MailPoller$1.run(MailPoller.java:74)
[29/01/13 18:18:42:815 CST] 0000007d SystemErr R at java.lang.Thread.run(Thread.java:738)
[29/01/13 18:18:42:815 CST] 0000007d SystemErr R Caused by: java.io.IOException
[29/01/13 18:18:42:815 CST] 0000007d SystemErr R at com.sun.mail.iap.ResponseInputStream.read0(ResponseInputStream.java:99)
[29/01/13 18:18:42:815 CST] 0000007d SystemErr R at com.sun.mail.iap.ResponseInputStream.readResponse(ResponseInputStream.java:67)
[29/01/13 18:18:42:815 CST] 0000007d SystemErr R at com.sun.mail.iap.Response.<init>(Response.java:83)
[29/01/13 18:18:42:815 CST] 0000007d SystemErr R at com.sun.mail.imap.protocol.IMAPResponse.<init>(IMAPResponse.java:48)
[29/01/13 18:18:42:815 CST] 0000007d SystemErr R at com.sun.mail.imap.protocol.IMAPResponse.readResponse(IMAPResponse.java:122)
[29/01/13 18:18:42:815 CST] 0000007d SystemErr R at com.sun.mail.imap.protocol.IMAPProtocol.readResponse(IMAPProtocol.java:230)
[29/01/13 18:18:42:815 CST] 0000007d SystemErr R at com.sun.mail.iap.Protocol.<init>(Protocol.java:91)
[29/01/13 18:18:42:815 CST] 0000007d SystemErr R at com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:87)
[29/01/13 18:18:42:815 CST] 0000007d SystemErr R at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:446)
[29/01/13 18:18:42:816 CST] 0000007d SystemErr R ... 3 more
And nothing else! I've searched everywhere for the possible meanings or causes for an IOException thrown during the connect execution, but I've got nothing so far.
Given that the stacktrace doesn't go any further and the only line of my own code referenced in it is the connect statement itself (com.scots.utils.MailPoller$1.run(MailPoller.java:74), I really don't have much to go on.
The only thing that comes to mind that could be causing throuble is that I've put the mail polling mechanics inside another thread (a run method). Could that be causing trouble?
Any ideas you could provide will be greatly appreciated!
Thanks in advance.
There's not much information in the exceptions, but I think the underlying cause is most likely that you really aren't handling the SSL connection properly. The JavaMail SSLNOTES.txt file has some debugging tips and pointers.
I'm getting a strange parsing issue when I try to start Tomcat6 with my application (that I am trying to port from Tomcat7 to Tomcat6). The Digester itself does not declare an error until it hits an unexpected end of file - this parsing itself must be wrong.
Does anyone have any ideas?
My web.xml is below, followed by part of the console.
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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/web-app_2_5.xsd">
<description>ilearn web.xml</description>
<display-name>iLearn</display-name>
<welcome-file-list>
<welcome-file>home.jsf</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<context-param>
<param-name> javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL </param-name>
<param-value>true</param-value>
</context-param>
<filter>
<filter-name>Extensions Filter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
<init-param>
<param-name>uploadRepositoryPath</param-name>
<param-value>/iLearnData/temp/</param-value>
</init-param>
</filter>
</web-app>
This is the faces-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
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/web-facesconfig_2_0.xsd"
version="2.0">
<!-- Config here -->
</faces-config>
This is the beans.xml
<?xml version="1.0" encoding="UTF-8"?>
This is part of the log from the console
[methodName=setComponentFamily, paramCount=0, paramTypes={java.lang.String}]
2012-09-04 02:20:42,503 DEBUG [main] digester.Digester (CallMethodRule.java:615) - [CallMethodRule]{faces-config/render-kit/renderer/component-family} Call org.apache.myfaces.config.impl.digester.elements.Renderer.setComponentFamily(javax.faces.SelectMany/java.lang.String)
2012-09-04 02:20:42,503 DEBUG [main] Digester.sax (Digester.java:1094) - characters(
)
2012-09-04 02:20:42,503 DEBUG [main] Digester.sax (Digester.java:1410) - startElement(http://java.sun.com/xml/ns/javaee,renderer-type,renderer-type)
2012-09-04 02:20:42,503 DEBUG [main] digester.Digester (Digester.java:1417) - Pushing body text '
'
2012-09-04 02:20:42,503 DEBUG [main] digester.Digester (Digester.java:1436) - New match='faces-config/render-kit/renderer/renderer-type'
2012-09-04 02:20:42,503 DEBUG [main] digester.Digester (Digester.java:1451) - Fire begin() for CallMethodRule[methodName=setRendererType, paramCount=0, paramTypes={java.lang.String}]
2012-09-04 02:20:42,503 DEBUG [main] Digester.sax (Digester.java:1094) - characters(javax.faces.Checkbox)
2012-09-04 02:20:42,503 DEBUG [main] Digester.sax (Digester.java:1164) - endElement(http://java.sun.com/xml/ns/javaee,renderer-type,renderer-type)
2012-09-04 02:20:42,503 DEBUG [main] digester.Digester (Digester.java:1167) - match='faces-config/render-kit/renderer/renderer-type'
2012-09-04 02:20:42,504 DEBUG [main] digester.Digester (Digester.java:1168) - bodyText='javax.faces.Checkbox'
2012-09-04 02:20:42,504 DEBUG [main] digester.Digester (Digester.java:1190) - Fire body() for CallMethodRule[methodName=setRendererType, paramCount=0, paramTypes={java.lang.String}]
2012-09-04 02:20:42,504 DEBUG [main] digester.Digester (Digester.java:1210) - Popping body text '
'
2012-09-04 02:20:42,567 DEBUG [main] digester.Digester (Digester.java:1190) - Fire body() for ObjectCreateRule[className=org.apache.myfaces.config.impl.digester.elements.FacesConfig, attributeName=null]
2012-09-04 02:20:42,567 DEBUG [main] digester.Digester (Digester.java:1190) - Fire body() for SetPropertiesRule[]
2012-09-04 02:20:42,568 DEBUG [main] digester.Digester (Digester.java:1190) - Fire body() for SetPropertiesRule[]
2012-09-04 02:20:42,568 DEBUG [main] digester.Digester (Digester.java:1210) - Popping body text ''
2012-09-04 02:20:42,568 DEBUG [main] digester.Digester (Digester.java:1220) - Fire end() for SetPropertiesRule[]
2012-09-04 02:20:42,568 DEBUG [main] digester.Digester (Digester.java:1220) - Fire end() for SetPropertiesRule[]
2012-09-04 02:20:42,568 DEBUG [main] digester.Digester (Digester.java:1220) - Fire end() for ObjectCreateRule[className=org.apache.myfaces.config.impl.digester.elements.FacesConfig, attributeName=null]
2012-09-04 02:20:42,568 DEBUG [main] digester.Digester (ObjectCreateRule.java:219) - [ObjectCreateRule]{faces-config} Pop org.apache.myfaces.config.impl.digester.elements.FacesConfig
2012-09-04 02:20:42,568 DEBUG [main] Digester.sax (Digester.java:1254) - endPrefixMapping()
2012-09-04 02:20:42,568 DEBUG [main] Digester.sax (Digester.java:1254) - endPrefixMapping(xsi)
2012-09-04 02:20:42,568 DEBUG [main] Digester.sax (Digester.java:1114) - endDocument()
Sep 4, 2012 2:20:42 AM org.apache.myfaces.config.DefaultFacesConfigurationProvider getWebAppFacesConfig
INFO: Reading config /WEB-INF/faces-config.xml
2012-09-04 02:20:42,571 DEBUG [main] Digester.sax (Digester.java:1341) - setDocumentLocator(com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser$LocatorProxy#154e4e31)
2012-09-04 02:20:42,572 DEBUG [main] Digester.sax (Digester.java:1375) - startDocument()
2012-09-04 02:20:42,574 ERROR [main] digester.Digester (Digester.java:1655) - Parse Fatal Error at line 3 column 1: Premature end of file.
org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1427)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1056)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.commons.digester.Digester.parse(Digester.java:1745)
at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.getFacesConfig(DigesterFacesConfigUnmarshallerImpl.java:309)
at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.getFacesConfig(DigesterFacesConfigUnmarshallerImpl.java:36)
at org.apache.myfaces.config.DefaultFacesConfigurationProvider.getWebAppFacesConfig(DefaultFacesConfigurationProvider.java:345)
at org.apache.myfaces.config.DefaultFacesConfigurationMerger.getFacesConfigData(DefaultFacesConfigurationMerger.java:75)
at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:416)
at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:338)
at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73)
at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:140)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:119)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Sep 4, 2012 2:20:42 AM org.apache.myfaces.webapp.AbstractFacesInitializer initFaces
SEVERE: An error occured while initializing MyFaces: org.xml.sax.SAXParseException: Premature end of file.
javax.faces.FacesException: org.xml.sax.SAXParseException: Premature end of file.
at org.apache.myfaces.config.DefaultFacesConfigurationProvider.getWebAppFacesConfig(DefaultFacesConfigurationProvider.java:357)
at org.apache.myfaces.config.DefaultFacesConfigurationMerger.getFacesConfigData(DefaultFacesConfigurationMerger.java:75)
at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:416)
at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:338)
at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73)
at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:140)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:119)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1231)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.commons.digester.Digester.parse(Digester.java:1745)
at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.getFacesConfig(DigesterFacesConfigUnmarshallerImpl.java:309)
at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.getFacesConfig(DigesterFacesConfigUnmarshallerImpl.java:36)
at org.apache.myfaces.config.DefaultFacesConfigurationProvider.getWebAppFacesConfig(DefaultFacesConfigurationProvider.java:345)
... 21 more
Sep 4, 2012 2:20:42 AM org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
at javax.faces.FactoryFinder._getFactory(FactoryFinder.java:286)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:206)
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:116)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Sep 4, 2012 2:20:42 AM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /ilearn threw load() exception
java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
at javax.faces.FactoryFinder._getFactory(FactoryFinder.java:286)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:206)
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:116)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Sep 4, 2012 2:20:42 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Sep 4, 2012 2:20:42 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Sep 4, 2012 2:20:42 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/19 config=null
Sep 4, 2012 2:20:42 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 7062 ms
You can use JBoss EL.
Instructions
Download the latest version of Seam 2
Extract lib/jboss-el.jar
Copy it to WEB-INF/lib/jboss-el.jar
In your web.xml set:
<context-param>
<param-name>com.sun.faces.expressionFactory</param-name>
<param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
</context-param>