Raible's Wiki
Raible Designs AppFuseHomepage- Korean - Chinese - Italian - Japanese QuickStart Guide User Guide Tutorials Other ApplicationsStruts ResumeSecurity Example Struts Menu
Set your name in
UserPreferences
Referenced by
JSPWiki v2.2.33
Hide Menu |
This is version 4.
It is not the current version, and thus it cannot be edited. Steps for running Appfuse under OracleAs (Orion) OC4J 9.0.4Contributed by Mike Lawrence (mike at systemsplanet.com) Feb 04, 2004. Original is attached at the bottom of this page. This page includes instructions for installing and configuring AppFuse to run on the Oracle Application Server (Orion). Special Thanks to Matt for his help in getting this up and running! OC4J Installation1. Download Oracle App Server 9.0.4.
2. Unzip the files to the path c:\oc4j-9.0.4 3. Complete the install with the commands:
4. Set the administrator password to: welcome 5. Run the App Server: java -jar oc4j.jar 6. Verify it's running by loading http://localhost:8888/index.html. 7. Stop the App Server: java -jar admin.jar ormi://localhost:23791 admin welcome -shutdown Configure OC4J for AppFuse1. Edit C:\oc4j-9.0.4\j2ee\home\config\applications.xml and add the following line:<web-module id="appfuse" path="../../home/applications/appfuse.war" />2. Comment out the line (Note this was the default in version 9.0.3) to force the use of principals.xml: <!-- <jazn provider="XML" location="./jazn-data.xml"/> -->3. Edit C:\oc4j-9.0.4\j2ee\home\config\http-web-site.xml and add the line: <web-app application="default" name="appfuse" root="/appfuse" />4. Edit C:\oc4j-9.0.4\j2ee\home\config\principals.xml and add the following to the <group> element: <group name="tomcat"> <description>tomcat grp</description> </group> <group name="admin"> <description>admin grp</description> </group>Then add the following to the <users> element: <user username="tomcat" password="536c0b339345616c1b33caf454454d8b8a190d6c" deactivated="false"> <description>tomcat user</description> <group-membership group="tomcat" /> </user> <user username="mraible" password="536c0b339345616c1b33caf454454d8b8a190d6c" deactivated="false"> <description>The appfuse administrator</description> <group-membership group="admin" /> </user>
5. Edit C:\oc4j-9.0.4\j2ee\home\config\data-sources.xml and add the following: <data-source class="com.evermind.sql.DriverManagerDataSource" name="jdbc/appfuse" location="jdbc/appfuse" connection-driver="com.mysql.jdbc.Driver" username="root" password="" url="jdbc:mysql://localhost/appfuse" inactivity-timeout="30" /> 6. Copy C:\appfuse\lib\mysql-connector-java-3.0.9-stable\mysql-connector-java-3.0.9-stable-bin.jar to C:\oc4j-9.0.4\j2ee\home\applib. Set Environment Variables1. Create an environment variable ORACLE10_HOME with the value c:\oc4j-9.0.4AppFuse Modifications1. Add the a target to deploy to Oracle/Orion in build.xml (or course, you could also simply modify the existing deploy target):<target name="deploy-oracle10" depends="package-web" description="deploy war to /j2ee/home/applications under $ORACLE10_HOME"> <echo>Copying ${webapp.dist}/${webapp.war} to </echo> <echo> ${env.ORACLE10_HOME}/j2ee/home/applications/${webapp.name}.war</echo> <copy file="${webapp.dist}/${webapp.war}" tofile="${env.ORACLE10_HOME}/j2ee/home/applications/${webapp.name}.war"/> </target>2. Edit \appfuse\metadata\web\filter-mappings.xml and comment out all the filters except for the actionFilter: <filter-mapping> <filter-name>actionFilter</filter-name> <url-pattern>*.do</url-pattern> </filter-mapping>
3. Orion starts Servlets before Listeners, so LoginServlet.init() gets called before StartupListener.contextInitialized(). To fix that problem, you'll need to add code StartupListener.contextInitialized():
This way it doesnt matter who gets started 1st. The context will be initialized and added to. This works for Tomcat and Orion. 4. Orion doesnt like Matts cool error page trick. Heres how to get around it.
<form-error-page>/security/loginError.jsp</form-error-page>
<%@ include file="/common/taglibs.jsp"%> <jsp:include page="/security/login.jsp" flush="true"> <jsp:param name="error" value="true"/> </jsp:include>
Verify AppFuse Installation using Tomcat* C:\mysql-4.0.17\bin\mysqld.exe --console (start MySQL) * ant setup-tomcat (Configure Tomcat) * ant setup-db (Configure MySQL) * ant test-all (Run all tests) * ant test-reports (Generate Test Results) * View C:\appfuse\build\test\reports\index.html (Verify results) * C:\jakarta-tomcat-5.0.16\bin\startup.bat (start Tomcat) * http://localhost:8080/appfuse (Verify Appfuse is running in Tomcat)
Build for Oracle1. Use ant to create a war and deploy it.ant -Dhttp.port=8888 clean package-web ant -Dhttp.port=8888 deploy-oracle10 You should see the following message: Copying C:\appfuse/dist/webapps/appfuse-1.3.war to c:\oc4j-9.0.4/j2ee/home/applications/appfuse.war
Test with OC4J1. Start the App Server (cd c:\oc4j-9.0.4\j2ee\home; java -jar oc4j.jar)04/02/04 09:32:43 Auto-unpacking C:\oc4j-9.0.4\j2ee\home\applications\appfuse.war... done. 04/02/04 10:39:42 Auto-deploying appfuse (New server version detected)... 04/02/04 10:39:43 Oracle Application Server Containers for J2EE 10g (9.0.4.0.0) initialized 2. Open page http://localhost:8888/appfuse and login with username/password tomcat/tomcat. EclipseModified the Eclipse Project, Properties, Java Build Path. A couple of Jars were incorrect. MyEclipse allows you to do source-level debugging under Tomcat and OC4J.Differences between Tomcat and OC4JThese messages display when Tomcat is started, but dont display under OC4J. This one is probably because I'm not using the database for authentication yet.AbandonedObjectPool is used (org.apache.commons.dbcp.AbandonedObjectPool@137d4a4) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 60 NamingHelper.bind(68) | Creating subcontext: hibernate OC4J Version 9.0.3 Notes
Useful Links
Attachments:
|