Deploying JHeadstart 10.1.2 applications to OC4J 10.1.3

Xavier found out how to deploy his JHeadstart 10.1.2 application to Oracle Application Server 10.1.3, so I'd like to share it with you.

He followed the instructions in Ric Smith's Deploying a 10.1.2 UIX Application to a 10.1.3.x OC4J Instance. When running the application, he got an error:

java.lang.NullPointerException
at oracle.jheadstart.controller.AuthenticationFilter.doFilter (AuthenticationFilter.java:182)


The problem was caused by the AuthenticationFilter being called for requests where the ADFBindingFilter was not called. The ADFBindingFilter takes care of creating a new HttpSession, and if this is not done you get the NullPointerException.

This can be solved by changing the WEB-INF/web.xml file. The filter mappings for the AuthenticationFilter (and the CharacterEncodingFilter) should be similar to those of the ADFBindingFilter:

  <filter-mapping>
    <filter-name>ADFBindingFilter</filter-name>
    <url-pattern>*.jsp</url-pattern>
  </filter-mapping>
  <filter-mapping>
    <filter-name>ADFBindingFilter</filter-name>
    <url-pattern>*.jspx</url-pattern>
  </filter-mapping>
  <filter-mapping>
    <filter-name>ADFBindingFilter</filter-name>
    <servlet-name>action</servlet-name>
  </filter-mapping>
  <filter-mapping>
    <filter-name>ADFBindingFilter</filter-name>
    <servlet-name>uix</servlet-name>
  </filter-mapping>
  <filter-mapping>
    <filter-name>ADFBindingFilter</filter-name>
    <servlet-name>ordDeliverMedia</servlet-name>
  </filter-mapping>

So remove the existing filter mappings for AuthenticationFilter and CharacterEncodingFilter, and copy the above filter mappings instead while replacing ADFBindingFilter by AuthenticationFilter and CharacterEncodingFilter respectively.

That should do the trick. Thank you, Xavier!

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Java EE Consultants - JHeadstart, ADF, JSF

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today