Jack P
Jack P

Reputation: 99

Migrating application from websphere to tomcat - Initializer Error

I am migrating an application from a websphere application server to tomcat 7.0.47.

When running the server (tomcat) I have one exception that I cant solve and because of this the application does not start and the mapping does not work. A former employee programmed this application and because of this I am not that familiar with its code.

I belive that the exception

java.lang.UnsupportedOperationException: This operation needs a license for Saxon-EE

is some kind of result from the first exception.

This is the part in the XML that is causing the trouble:

    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>

The log:

    jan 05, 2016 2:54:58 EM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra (1.2_12-b01-FCS) for context '/b2bws'
jan 05, 2016 2:54:58 EM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.ExceptionInInitializerError
    at com.sun.faces.config.ConfigManager$ParseTask.<init>(ConfigManager.java:373)
    at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:281)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:203)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:196)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4937)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: com.sun.faces.config.ConfigurationException: java.lang.UnsupportedOperationException: This operation needs a license for Saxon-EE
    at com.sun.faces.config.DbfFactory.initSchema(DbfFactory.java:162)
    at com.sun.faces.config.DbfFactory.<clinit>(DbfFactory.java:120)
    ... 13 more
Caused by: java.lang.UnsupportedOperationException: This operation needs a license for Saxon-EE
    at com.saxonica.jaxp.SchemaFactoryImpl.<init>(SchemaFactoryImpl.java:42)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at javax.xml.validation.SchemaFactoryFinder.loadFromService(Unknown Source)
    at javax.xml.validation.SchemaFactoryFinder._newFactory(Unknown Source)
    at javax.xml.validation.SchemaFactoryFinder.newFactory(Unknown Source)
    at javax.xml.validation.SchemaFactory.newInstance(Unknown Source)
    at com.sun.faces.config.DbfFactory.initSchema(DbfFactory.java:149)
    ... 14 more

jan 05, 2016 2:54:58 EM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
jan 05, 2016 2:54:58 EM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/b2bws] startup failed due to previous errors

Any ideas?

Thank you

Upvotes: 0

Views: 283

Answers (1)

Johannes Jander
Johannes Jander

Reputation: 5020

It's a licensing issue with the Saxon-EE XML processor. You can buy a license at their site.

Probably you already have a license that is why it is running on websphere. You need to find the saxon-license.lic file either in the mail of your ex-developer or in the websphere server and then to migrate the license file to tomcat:

 In Tomcat, for example, the license file should be treated in the same way as free-standing (unjarred) classes, and placed in the WEB-INF/classes directory.

Upvotes: 1

Related Questions