Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Info

Help is available by sending an email to csf-support@mit.edu
Have any suggestion on how improve this wiki?  Please give us your feedback at csf-support@mit.edu

Quick

Links

to:

{

Panel
Wiki Markup
Table of Contents
:
minLevel
=
4
}
unmigrated-wiki-markup
Panel
h4. *

Download

the

OC4J

stand

alone

server

* #

  1. Go
  1. to
  1. the
[*
  1. Oracle
  1. Internet
  1. Application
  1. Server
*|http://www.oracle.com/technetwork/middleware/ias/overview/index.html] site.  Click on the [*Downloads*|http://www.oracle.com/technetwork/middleware/ias/downloads/index.html] tab and all available [*Application Server 10g Release 3
  1. site.  Click on the Downloads tab and all available Application Server 10g Release 3 (10.1.3.x)
  1. Downloads
*|http://www.oracle.com/technetwork/middleware/ias/downloads/index.html]
  1. will
  1. be
  1. displayed.
\\ \\ # Scroll down until you reach the *Oracle Containers for J2EE* section and click on [*Pure Java*|http://www.oracle.com/technetwork/middleware/ias/downloads/utilsoft-090603.html].  The [*Oracle Application Server 10g Software Downloads*|http://www.oracle.com/technetwork/middleware/ias/downloads/utilsoft-090603.html] will be displayed. \\ \\ # Accept the License Agreement, then click on the *Oracle Containers for J2EE 10g (OC4J)* link. The download of the *


  1. Scroll down until you reach the Oracle Containers for J2EE section and click on Pure Java.  The Oracle Application Server 10g Software Downloads will be displayed.

  2. Accept the License Agreement, then click on the Oracle Containers for J2EE 10g (OC4J) link. The download of the oc4j_extended_101350.zip
*
  1. file
  1. will
  1. start.  Save this zip file on your workstation.
    NOTE: Before the download begins, Oracle will require you to either log in using an existing Oracle account or you will have to create a new Oracle account.

Install the OC4J stand alone server

indent
  Save this zip file on your workstation.
\\
*NOTE:* Before the download begins, Oracle will require you to either log in using an existing Oracle account or you will have to create a new Oracle account.

h4. *Install the OC4J stand alone server*
{indent}
In your $\{user.home} directory, create the directories oc4j/10.1.3.5.0 and unzip the *oc4j_extended_101350.zip* file to the $\{user.home}/oc4j/10.3.5.0 directory.  Create a system environmental variable *ORACLE_HOME* and set it's value to $\{user.home}/oc4j/10.3.5.0.
\\
\\
For example: if *$\{user.home}=/users/rstone*, then *ORACLE_HOME=/user/rstone/oc4j/10.1.3.5.0*
\\
\\
You can actually unzip to any directory you desire.  The only requirement is that all directory names cannot contain any white space.
\\
\\
*For MAC users*:  You can now [download a nice plugin | Install the Oracle OC4J 10.1.3.5 standalone server^RCEnvironment-1.4.X.dmg] that helps you manage your system environmental variables.  The plugin, *RCEnvironment*, is a preference pane for MacOS X 10.1 or higher that allows editing of your ~/.MacOSX/environment.plist file.
{indent}

h4. *Configure the OC4J stand alone server*
{indent}
{info}
The above change is made to prevent *PermGEN* errors for occurring.  If you get *PermGen Out of Memory* errors when either deploying your application or when starting the oracle server, increase the 512M values to 1024M.
{info}
# Edit the file $\

Configure the OC4J stand alone server

indent
Info

The above change is made to prevent PermGEN errors for occurring.  If you get PermGen Out of Memory errors when either deploying your application or when starting the oracle server, increase the 512M values to 1024M.

  1. Edit the file ${ORACLE_HOME}/j2ee/home/config/system-application.xml
  1. and
  1. change:
{
  1. Code Block
}
  1. 
    <import-shared-library name="oracle.toplink">
    
{code}
  1. to:
{
  1. Code Block
}
  1. 
    <!--import-shared-library name="oracle.toplink"-->
    
{code}
  1. If
  1. you
  1. want
  1. to
  1. disable
  1. the
*
  1. Oracle
  1. Enterprise
  1. Manager
*
  1. then
  1. change
{
  1. Code Block
}
  1. 
    <import-shared-library name="oracle.xml"/>
    
{code}
  1. to:
{
  1. Code Block
}
  1. 
    <!--import-shared-library name="oracle.xml"/ -->
    
{code}
  1. When
  1. you
  1. are
  1. satisfied
  1. that
  1. everything
  1. is
  1. correct,
*
  1. SAVE
*
  1. your
  1. changes.
#
  1. We
  1. need
  1. to
  1. add
  1. a
  1. datasource
  1. so
  1. that
  1. the
  1. applications
  1. can
  1. pull
  1. data
  1. from
  1. the
  1. database.
&nbsp;&nbsp;Edit $\
  1.   Edit ${ORACLE_HOME/j2ee/home/config/data-sources.xml
  1. to
  1. add
  1. a
  1. datasource.
&nbsp;
  1.   Here's
  1. an
  1. example
  1. of
  1. adding
  1. a
  1. MITSIS
  1. datasource:
\\ {code}

  1. Code Block
    
    <data-source
        class="com.evermind.sql.DriverManagerDataSource"
        name="OracleDS2"
        location="jdbc/MitsisDS"
        xa-location="jdbc/xa/StargateXADS-unused"
        ejb-location="jdbc/OracleDS-unused"
        connection-driver="oracle.jdbc.driver.OracleDriver"
        username=""
        password=""
        url="jdbc:oracle:thin:@//earth-vault-2.mit.edu:1523/sundev11"
        inactivity-timeout="30"
    />
    
{code}
  1. where
  1. obviously
*
  1. you
  1. MUST
  1. add
  1. your
  1. username
  1. and
  1. password.
*&nbsp;&nbsp;If you do not have a username and password, request a them from your team leader. \\ When you are satisfied that everything is correct, *SAVE* your changes. \\ # *FOR WINDOWS ONLY* \- setting the administrator's password \\ \\ Open a CMD window and cd to the $\
  1.   If you do not have a username and password, request a them from your team leader.
    When you are satisfied that everything is correct, SAVE your changes.
  2. FOR WINDOWS ONLY - setting the administrator's password

    Open a CMD window and cd to the ${ORACLE_HOME}/bin
  1. directory.
  1. Type
  1. the
  1. following
  1. command:
\\ {code}

  1. Code Block
    
    oc4j -start
    
{code}
  1. You
  1. will
  1. be
  1. asked
  1. to
  1. enter
  1. and
  1. confirm
  1. a
  1. password.
&nbsp;&nbsp;Pick a password that is easy for you to remember.&nbsp;&nbsp;You will need to use this password when configuring Maven. \\ \\ {anchor:parser configuration} # In order to use Spring 3.X with OC4J
  1.   Pick a password that is easy for you to remember.  You will need to use this password when configuring Maven.

    Anchor
    parser configuration
    parser configuration
  2. In order to use Spring 3.X with OC4J 10.1.3,
  1. you'll
  1. need
  1. to
  1. swap
  1. out
  1. the
  1. default
  1. XML
  1. parser
  1. in
  1. OC4J
  1. with
  1. something
  1. more
  1. modern.
&nbsp;&nbsp;xercesImpl
  1.   xercesImpl.jar
  1. and
  1. xml-apis.jar
  1. work
  1. fine.
&nbsp;&nbsp;To swap the parser
  1.   To swap the parser out,
  1. you
  1. need
  1. to
  1. create
  1. a
  1. new
  1. shared
  1. library
  1. in
  1. the
  1. OC4J
  1. enterprise
  1. manager
  1. and
  1. then
  1. edit
  1. the
  1. system-application.xml
  1. file
  1. to
  1. use
  1. your
  1. new
  1. shared
  1. library
  1. instead
  1. of
  1. the
  1. Oracle
  1. XML
  1. parser.
\\ \\ Start and stop the OC4J server. \\ \\ Open *$\


  1. Start and stop the OC4J server.

    Open ${ORACLE_HOME}/j2ee/home/application-deployments/default/orion-application.xml
*
  1. with
  1. a
  1. text
  1. editor.
&nbsp;&nbsp;If the file or any
  1.   If the file or any sub-directory
  1. does
  1. not
  1. exist,
  1. create
  1. them
  1. as
  1. needed.
\\ \\ If you had to create the file a new, these are the contents of the file: {code}


  1. If you had to create the file a new, these are the contents of the file:
    Code Block
    
    <?xml version='1.0' encoding='utf-8'?>
    <orion-application
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-application-10_0.xsd"
        schema-major-version="10"
        schema-minor-version="0"
        component-classification="internal">
        <imported-shared-libraries>
            <remove-inherited name="oracle.xml"/>
        </imported-shared-libraries>
    </orion-application>
    
{code}
  1. If
  1. you
  1. had
  1. an
  1. existing
  1. file,
  1. add
  1. this
  1. block
  1. to
  1. it:
{
  1. Code Block
}
  1. 
    <imported-shared-libraries>
        <remove-inherited name="oracle.xml"/>
    </imported-shared-libraries>
    
{code}
  1. When
  1. you
  1. are
  1. satisfied
  1. that
  1. everything
  1. is
  1. correct,
*
  1. SAVE
*
  1. your
  1. changes.
# *
  1. FOR
  1. ALL
  1. OPERATING
  1. SYSTEMS
* \
  1. -
  1. how
  1. to
  1. change
  1. the
  1. administrator
  1. password.
\\ \\ Open *$\


  1. Open ${ORACLE_HOME}/j2ee/home/config/system-jazn-data.xml
*
  1. with
  1. a
  1. text
  1. editor.
\\ \\ Find the <user> tag block for oc4jadmin.&nbsp;&nbsp;Change the


  1. Find the <user> tag block for oc4jadmin.  Change the oc4jadmin's
  1. <credentials>
  1. property
  1. to
  1. (substituting
  1. your
  1. password
  1. for
  1. myNewPassowd):
{
  1. Code Block
}
  1. 
    <credentials>!myNewPassword</credentials>
    
{code}
  1. Be
  1. sure
  1. to
  1. preface
  1. the
  1. password
  1. with
  1. an
\
  1. !
  1. to
  1. inidcate
  1. that
  1. this
  1. is
  1. a
  1. plain
  1. text
  1. value.
\\ \\ When


  1. When completed,
  1. the
  1. oc4jadmin
  1. <user>
  1. should
  1. look
  1. something
  1. like:
{
  1. Code Block
}
  1. 
    <user>
        <name>oc4jadmin</name>
        <display-name>OC4J Administrator</display-name>
        <guid>E33D5A508AA511DF8F573778FB23EDF8</guid>
        <description>OC4J Administrator</description>
        <credentials>!myNewPassword</credentials>
    </user>
    
{code}
  1. Save
  1. the
  1. changes
  1. and
  1. restart
  1. the
  1. OC4J
  1. server.

Getting Better Debugging Information From OC4J

unmigrated-wiki-markup
Panel

By

default,

some

run

time

errors

that

you'll

see

when

testing

web

apps

in

OC4J

are

not

too

helpful.

&nbsp;&nbsp;You can coax OC4J into giving you more information about certain errors by making the following changes in

  You can coax OC4J into giving you more information about certain errors by making the following changes in global-web-application.xml:

\\ \\ Open $\



Open ${ORACLE_HOME}/j2ee/home/config/global-web-application.xml

with

a

text

editor.

\\ # Turn on


  1. Turn on "development"
  1. mode
  1. -
  1. in
  1. the
  1. <orion-web-app>
  1. section
  1. at
  1. the
  1. top
  1. of
  1. the
  1. file,
  1. change
  1. the
  1. "development"
  1. setting
  1. to
  1. true:
\\ {code}

  1. Code Block
    
    <orion-web-app
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-web-10_0.xsd"
      jsp-cache-directory="./persistence"
      servlet-webdir="/servlet"
      development="true"
      jsp-timeout="0"
      jsp-cache-tlds="standard"
      schema-major-version="10"
      schema-minor-version="0">
    
{code} # Turn on debug
  1. Turn on debug mode.
  1. In
  1. the
  1. "jsp"
  1. servlet
  1. section,
  1. set
  1. a
  1. parameter
  1. debug_mode
  1. to
  1. true.
  1. The
  1. section
  1. should
  1. look
  1. like
  1. this:
{
  1. Code Block
}
  1. 
    <servlet>
          <servlet-name>jsp</servlet-name>
          <servlet-class>oracle.jsp.runtimev2.JspServlet</servlet-class>
          <init-param>
            <param-name>debug_mode</param-name>
            <param-value>true</param-value>
          </init-param>
          <load-on-startup>0</load-on-startup>
    </servlet>
    
{code}
  1. With
  1. these
  1. settings,
  1. you
  1. should
  1. get
  1. more
  1. meaningful
  1. messages
  1. in
  1. your
  1. browser
  1. when
  1. you
  1. run
  1. into
  1. certain
  1. errors
  1. (JSP
  1. syntax
  1. errors
  1. for
  1. example).
{
  1. indent
}