If you are extending WebCenter Spaces with custom ADF Task Flows - make sure to deploy custom ADF Task Flows project library as ADF Library JAR, not just as a simple JAR (more about this - Wrong Deployment Profile to Extend WebCenter Spaces). What else to keep in mind? Well there is one thing, you don't want to get when extending WebCenter Spaces - java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. This exception will be thrown, if WebCenter Spaces workspace (one we are using to deploy custom code to WebCenter Spaces) contains invalid web.xml file. I will describe in this post how this configuration file can become invalid and how to fix it.
First, let's refer to Oracle documentation specific to this subject - Using WebCenter Spaces Extension Samples (11.1.1.5.0). Documentation says that web.xml entries should be commented out if we don't want to deploy session timeout related custom code - means web.xml should be empty in the most of the cases:
Use empty web.xml from WebCenter Spaces workspace to extend WebCenter Spaces with custom library:
Once we are familiar with the process of extending WebCenter Spaces, what we would do now? Most likely develop one more ADF library and add it to the project inside WebCenter Spaces workspace to be uploaded to WebCenter server:
Once new library is imported, we can deploy entire package to the WebCenter server:
And here comes exception - could not find Factory: javax.faces.application.ApplicationFactory:
Obviously WebCenter Spaces extending failed, if we try to access WebCenter Spaces - it shows similar exception:
You can follow predefined procedure to rollback custom WebCenter Spaces library, if extending fails. But why it would break?
Double check web.xml:
Its not empty anymore, contains lots of entries:
How come these entries were added? Simply JDeveloper is synchronizing web.xml each time, when you add new ADF Library:
It adds ADF library configuration entries, however these entries are not required when extending WebCenter Spaces and are causing extending failure. Each time after you import new ADF library, make sure web.xml stays clean:
Extended WebCenter Spaces is fixed and works:
First, let's refer to Oracle documentation specific to this subject - Using WebCenter Spaces Extension Samples (11.1.1.5.0). Documentation says that web.xml entries should be commented out if we don't want to deploy session timeout related custom code - means web.xml should be empty in the most of the cases:
Use empty web.xml from WebCenter Spaces workspace to extend WebCenter Spaces with custom library:
Once we are familiar with the process of extending WebCenter Spaces, what we would do now? Most likely develop one more ADF library and add it to the project inside WebCenter Spaces workspace to be uploaded to WebCenter server:
Once new library is imported, we can deploy entire package to the WebCenter server:
And here comes exception - could not find Factory: javax.faces.application.ApplicationFactory:
Obviously WebCenter Spaces extending failed, if we try to access WebCenter Spaces - it shows similar exception:
You can follow predefined procedure to rollback custom WebCenter Spaces library, if extending fails. But why it would break?
Double check web.xml:
Its not empty anymore, contains lots of entries:
How come these entries were added? Simply JDeveloper is synchronizing web.xml each time, when you add new ADF Library:
It adds ADF library configuration entries, however these entries are not required when extending WebCenter Spaces and are causing extending failure. Each time after you import new ADF library, make sure web.xml stays clean:
Extended WebCenter Spaces is fixed and works:
1 comment:
What if we want to set the session timeout, can we still set it in web.xml? will that work?
Thank you!
Post a Comment