I'm having trouble with the Struts-Cocoon sample project. I've tried deploying the app to both a WAS 4 and 5 server. It builds with warnings (all about deprecated functions) and I had to add the sax2.jar that came with the latest stable jaxp.
I've made the following changes to the struts-config.xml:
<!-- Edit user registration -->
<action path="/editRegistration" type="org.apache.struts.webapp.example.EditRegistrationAction" attribute="registrationForm" scope="request" name="registrationForm" validate="false">
<forward name="success" path="registration.jsp" />
</action>
<!-- Process a user logon -->
<action path="/logon" type="org.apache.struts.webapp.example.LogonAction" name="logonForm" scope="session" input="logon.jsp">
<exception key="expired.password" type="org.apache.struts.webapp.example.ExpiredPasswordException" path="/changePassword.jsp" />
</action>
<!-- Save user registration -->
<action path="/saveRegistration" type="org.apache.struts.webapp.example.SaveRegistrationAction" name="registrationForm" scope="request" input="registration.jsp" />
<!-- Save mail subscription -->
<action path="/saveSubscription" type="org.apache.struts.webapp.example.SaveSubscriptionAction" scope="request" name="subscriptionForm" input="subscription.jsp">
<forward name="subscription" path="/subscription.jsp" />
<forward name="success" path="/editRegistration.do?action=Edit" />
</action>
When I try click the A Waling Tour of the Example Application link I get the following error:
Error 503: Cannot initialize RequestProcessor of class org.twdata.struts.CocoonRequestProcessor: java.lang.UnsupportedClassVersionError: org/apache/cocoon/util/log/ExtensiblePatternFormatter (Unsupported major.minor version 48.0)
Below is a list of the warnings I get during the build:
Warning The type org.apache.avalon.excalibur.logger.LogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 141 in CocoonHandler.logKitManager
Warning The method setFormatter(org.apache.log.format.Formatter) from the type org.apache.log.output.AbstractOutputTarget is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 866 in CocoonHandler.initLogger()
Warning The type org.apache.avalon.excalibur.logger.DefaultLogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 870 in CocoonHandler.initLogger()
Warning The constructor org.apache.avalon.excalibur.logger.DefaultLogKitManager(org.apache.log.Hierarchy) is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 870 in CocoonHandler.initLogger()
Warning The type org.apache.avalon.excalibur.logger.DefaultLogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 870 in CocoonHandler.initLogger()
Warning The method setLogger(org.apache.log.Logger) from the type org.apache.avalon.excalibur.logger.DefaultLogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 871 in CocoonHandler.initLogger()
Warning The method contextualize(org.apache.avalon.framework.context.Context) from the type org.apache.avalon.excalibur.logger.DefaultLogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 886 in CocoonHandler.initLogger()
Warning The method configure(org.apache.avalon.framework.configuration.Configuration) from the type org.apache.avalon.excalibur.logger.DefaultLogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 899 in CocoonHandler.initLogger()
Warning The method log(java.lang.String, java.lang.Throwable) from the type org.apache.log.Hierarchy is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 901 in CocoonHandler.initLogger()
Warning The method getLogger(java.lang.String) from the type org.apache.avalon.excalibur.logger.DefaultLogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 905 in CocoonHandler.initLogger()
Warning The method getLogger(java.lang.String) from the type org.apache.avalon.excalibur.logger.DefaultLogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 907 in CocoonHandler.initLogger()
Warning The method getLogger(java.lang.String) from the type org.apache.avalon.excalibur.logger.LogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 1,401 in CocoonHandler.createCocoon()
Warning The method getLogger(java.lang.String) from the type org.apache.avalon.excalibur.logger.LogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 1,456 in CocoonHandler.getInstrumentManager()
Any help would be appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm having trouble with the Struts-Cocoon sample project. I've tried deploying the app to both a WAS 4 and 5 server. It builds with warnings (all about deprecated functions) and I had to add the sax2.jar that came with the latest stable jaxp.
I've made the following changes to the struts-config.xml:
<!-- Edit user registration -->
<action path="/editRegistration" type="org.apache.struts.webapp.example.EditRegistrationAction" attribute="registrationForm" scope="request" name="registrationForm" validate="false">
<forward name="success" path="registration.jsp" />
</action>
<!-- Edit mail subscription -->
<action path="/editSubscription" type="org.apache.struts.webapp.example.EditSubscriptionAction" attribute="subscriptionForm" name="subscriptionForm" scope="request" validate="false">
<forward name="failure" path="/mainMenu.jsp" />
<forward name="success" path="/subscription.jsp" />
</action>
<!-- Process a user logon -->
<action path="/logon" type="org.apache.struts.webapp.example.LogonAction" name="logonForm" scope="session" input="logon.jsp">
<exception key="expired.password" type="org.apache.struts.webapp.example.ExpiredPasswordException" path="/changePassword.jsp" />
</action>
<!-- Save user registration -->
<action path="/saveRegistration" type="org.apache.struts.webapp.example.SaveRegistrationAction" name="registrationForm" scope="request" input="registration.jsp" />
<!-- Save mail subscription -->
<action path="/saveSubscription" type="org.apache.struts.webapp.example.SaveSubscriptionAction" scope="request" name="subscriptionForm" input="subscription.jsp">
<forward name="subscription" path="/subscription.jsp" />
<forward name="success" path="/editRegistration.do?action=Edit" />
</action>
When I try click the A Waling Tour of the Example Application link I get the following error:
Error 503: Cannot initialize RequestProcessor of class org.twdata.struts.CocoonRequestProcessor: java.lang.UnsupportedClassVersionError: org/apache/cocoon/util/log/ExtensiblePatternFormatter (Unsupported major.minor version 48.0)
Below is a list of the warnings I get during the build:
Warning The type org.apache.avalon.excalibur.logger.LogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 141 in CocoonHandler.logKitManager
Warning The method setFormatter(org.apache.log.format.Formatter) from the type org.apache.log.output.AbstractOutputTarget is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 866 in CocoonHandler.initLogger()
Warning The type org.apache.avalon.excalibur.logger.DefaultLogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 870 in CocoonHandler.initLogger()
Warning The constructor org.apache.avalon.excalibur.logger.DefaultLogKitManager(org.apache.log.Hierarchy) is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 870 in CocoonHandler.initLogger()
Warning The type org.apache.avalon.excalibur.logger.DefaultLogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 870 in CocoonHandler.initLogger()
Warning The method setLogger(org.apache.log.Logger) from the type org.apache.avalon.excalibur.logger.DefaultLogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 871 in CocoonHandler.initLogger()
Warning The method contextualize(org.apache.avalon.framework.context.Context) from the type org.apache.avalon.excalibur.logger.DefaultLogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 886 in CocoonHandler.initLogger()
Warning The method configure(org.apache.avalon.framework.configuration.Configuration) from the type org.apache.avalon.excalibur.logger.DefaultLogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 899 in CocoonHandler.initLogger()
Warning The method log(java.lang.String, java.lang.Throwable) from the type org.apache.log.Hierarchy is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 901 in CocoonHandler.initLogger()
Warning The method getLogger(java.lang.String) from the type org.apache.avalon.excalibur.logger.DefaultLogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 905 in CocoonHandler.initLogger()
Warning The method getLogger(java.lang.String) from the type org.apache.avalon.excalibur.logger.DefaultLogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 907 in CocoonHandler.initLogger()
Warning The method getLogger(java.lang.String) from the type org.apache.avalon.excalibur.logger.LogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 1,401 in CocoonHandler.createCocoon()
Warning The method getLogger(java.lang.String) from the type org.apache.avalon.excalibur.logger.LogKitManager is deprecated CocoonHandler.java StrutsCocoonPOC/Java Source/org/twdata/struts line 1,456 in CocoonHandler.getInstrumentManager()
Any help would be appreciated.
Could it be because I'm not running JVM 1.4? If so, what do I need to change to make it work with older versions?
What happens if you run the example w/o modification?