hi
I've noticed, and read about, some issues with adf-faces-impl.jar and jsf-impl.jar when migrating between recent JDeveloper versions.
If I create a simple JSF JSP page in "JDev 10.1.3" and I "migrate" that to "JDev 10.1.3.1" I observe what has been described in bug 5607187 on October 18, 2006. The project in "JDev 10.1.3", before migration, contains "adf-faces-impl.jar 10_1_3_0_4" and "jsf-impl.jar 1_1". The migrated project in "JDev 10.1.3.1" contains the new "adf-faces-impl.jar 10_1_3_1_0 sobryan", but still the old "jsf-impl.jar 1_1" instead of "jsf-impl.jar 1.1_02-b08".
Using the same scenario, I migrate from "JDev 10.1.3.1 developer preview" to "JDev 10.1.3.1". The project in "JDev 10.1.3.1 developer preview", before migration, contains "adf-faces-impl.jar 10_1_3_1_0 awijeyek". The migrated project in "JDev 10.1.3.1" still contains "adf-faces-impl.jar 10_1_3_1_0 awijeyek" and not "adf-faces-impl.jar 10_1_3_1_0 sobryan". (They both use "jsf-impl.jar 1.1_02-b08".)
This causes the following exception when I run the migrated application:
java.lang.NoSuchMethodError: oracle.adf.view.faces.context.AdfFacesContextFactory.createContext(Ljava/lang/Object;Ljava/lang/Object;)Loracle/adf/view/faces/context/AdfFacesContext;
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:187)
at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:106)
...
This seems to be caused by an API change in AdfFacesContextFactory:
In "JDev 10.1.3.1 developer preview" adf-faces-api.jar\oracle\adf\view\faces\context\AdfFacesContextFactory.class the createContext() methods looks like
public abstract oracle.adf.view.faces.context.AdfFacesContext createContext(java.lang.Object p1, java.lang.Object p2) { }
While in "JDev 10.1.3.1" adf-faces-api.jar\oracle\adf\view\faces\context\AdfFacesContextFactory.class the createContext() methods looks like
public abstract oracle.adf.view.faces.context.AdfFacesContext createContext(oracle.adf.view.faces.webapp.wrapper.ContextWrapper p1, oracle.adf.view.faces.webapp.wrapper.RequestWrapper p2) { }
This method gets called by oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl which is in adf-faces-impl.jar that has a migration issue as explained above.
The embedded OC4J also displays this warning:
WARNING: Code-source D:\oracle\jdevstudio10131\jlib\adf-faces-impl.jar (from <classpath> in D:\temp\JSFMigrationIssue10131dp-mig10131\View\public_html) has the same filename but is not identical to /D:/temp/JSFMigrationIssue10131dp-mig10131/View/public_html/WEB-INF/lib/adf-faces-impl.jar
(from WEB-INF/lib/ directory in D:\temp\JSFMigrationIssue10131dp-mig10131\View\public_html\WEB-INF\lib). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.JSFMigrationIssue10131dp-View-webapp:0.0.0.
(*) workaround
Manually replacing the adf-faces-impl.jar in the WEB-INF\lib folder of my project with the one in the "JDev 10.1.3.1"\jlib folder solved my "NoSuchMethodError" problem.
(*) suggestion
Maybe some of this deserves a place on
http://www.oracle.com/technology/products/jdev/htdocs/10.1.3.1/10.1.3.1addendum.html
(*) about the versions
"JDev 10.1.3" = JDeveloper 10g Studio Edition Version 10.1.3.0.4 (SU5) : Build JDEVADF_10.1.3_NT_060125.0900.3673
"JDev 10.1.3.1 developer preview" = Oracle JDeveloper Developer Preview Studio Edition Version 10.1.3.1.0.3914 : Build JDEVADF_10.1.3.1.0_NT_060807.1321.3914
"JDev 10.1.3.1" = JDeveloper Studio Edition Version 10.1.3.1.0.3984 : Build JDEVADF_10.1.3.1.0_NT_061009.1404.3984
(*) about JAR files
- "adf-faces-impl.jar 10_1_3_0_4" = "JDev 10.1.3" adf-faces-impl.jar\META-INF\MANIFEST.MF
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.5.3
Created-By: Apache Maven
Built-By: awijeyek
Package: oracle.adfinternal.view.faces
Build-Jdk: 1.4.2_09
Extension-Name: adf-faces-impl
Specification-Title: ADF Faces Implementation
Specification-Vendor: Oracle Corporation
Implementation-Title: oracle.adfinternal.view.faces
Implementation-Vendor: Oracle Corporation
Implementation-Version: 10_1_3_0_4
- "jsf-impl.jar 1_1" = "JDev 10.1.3" jsf-impl.jar\META-INF\MANIFEST.MF
Manifest-Version: 1.0
Created-By: Apache Ant 1.5.1
Specification-Title: JavaServer Faces
Specification-Version: 1.1
Implementation-Title: 'jsf-impl': JavaServer Faces RI
Implementation-Version: 1_1
Implementation-Vendor: Sun Microsystems, Inc.
Implementation-Vendor-Id: com.sun
Extension-Name: com.sun.faces
- "adf-faces-impl.jar 10_1_3_1_0 awijeyek" = "JDev 10.1.3.1 developer preview" adf-faces-impl.jar\META-INF\MANIFEST.MF
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.5.3
Created-By: Apache Maven
Built-By: awijeyek
Package: oracle.adfinternal.view.faces
Build-Jdk: 1.4.2_12
Extension-Name: adf-faces-impl
Specification-Title: ADF Faces Implementation
Specification-Vendor: Oracle Corporation
Implementation-Title: oracle.adfinternal.view.faces
Implementation-Vendor: Oracle Corporation
Implementation-Version: 10_1_3_1_0
- "jsf-impl.jar 1.1_02-b08" = "JDev 10.1.3.1 developer preview" jsf-impl.jar\META-INF\MANIFEST.MF (exactly the same file in "JDev 10.1.3.1")
Manifest-Version: 1.0
Created-By: Apache Ant 1.5.1
Specification-Title: JavaServer Faces
Specification-Version: 1.1
Implementation-Title: 'jsf-impl': JavaServer Faces RI
Implementation-Version: 1.1_02-b08
Implementation-Vendor: Sun Microsystems, Inc.
Implementation-Vendor-Id: com.sun
Extension-Name: com.sun.faces
- "adf-faces-impl.jar 10_1_3_1_0 sobryan" = "JDev 10.1.3.1" adf-faces-impl.jar\META-INF\MANIFEST.MF
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.5.3
Created-By: Apache Maven
Built-By: sobryan
Package: oracle.adfinternal.view.faces
Build-Jdk: 1.4.2_09
Extension-Name: adf-faces-impl
Specification-Title: ADF Faces Implementation
Specification-Vendor: Oracle Corporation
Implementation-Title: oracle.adfinternal.view.faces
Implementation-Vendor: Oracle Corporation
Implementation-Version: 10_1_3_1_0
(*) about the scenario
I created a simple JSPX document using the "Create JSF JSP wizard". On the "Create JSF JSP - Stef 4 of 5: Tag Libraries" panel I selected "ADF Faces Components <version>" and "ADF Faces HTML <version>". In "JDev 10.1.3" this version was "10_1_3_0_4", In "JDev 10.1.3.1 developer preview" and "JDev 10.1.3.1" this version was "10_1_3_1_0". I also added a PanelPage component from the "ADF Faces Core" component pallet.
(*) about migration
Migrating to another JDeveloper version is just opening the application (.jws file) in the new JDeveloper. I got an "Open Warning" that says "You are about to migrate the application <path>\JSFMigrationIssue.jws to JDeveloper version 10.1.3.1.0 file format. ..." where I answer "Yes" to the question "Do you want to migrate these files?". After that I get "Migration successfilly completed for the following file(s): ...".
(*) related threads
"ADF Faces; how to see bug fix in 10.1.3.1 (need to manually copy jars?)"
http://forums.oracle.com/forums/thread.jspa?threadID=434578
"10.1.3.1 first crash after migration"
http://forums.oracle.com/forums/thread.jspa?threadID=435615
regards
Jan Vervecken