- This topic has 26 replies, 8 voices, and was last updated 15 years, 11 months ago by Riyad Kalla.
-
AuthorPosts
-
capt_houseyiiMemberCould someone please point me in the right direction for implementing myeclipse deployment with OC4J. I have read all the topics in the forum and still cant get it to work.
-capt_houseyii
Scott AndersonParticipantTwo things that trip people up with OC4J: first you need to modify server.xml to turn on auto-deployment like this:
<application-server application-directory="../applications" application-auto-deploy-directory="../application-autodeploy" deployment-directory="../application-deployments" >
Second, I don’t believe OC4J supports exploded deployment, only packaged.
If that doesn’t get you moving, please let us know. And remember, more specific you can make your question, the faster we’ll be able to answer them correctly. 🙂
Also, if you’d provide all the configuration information we request in the ‘Posting Guidelines’ thread at the top of this forum we’ll have at least a minimal context with which to work.
capt_houseyiiMemberOS: 2k SP4
Eclipse was freshly installed for My Eclipse
The only other plugin is for Source Safe
I am using MyEclipse Verson 3.71
JDK version 1.4.2
OC4j oc4j_extended_rel3)is running on 1.4.2 (to the best of my knowledge)I have an enterprise project called EASE_1 containing a web module called EASE
here is the application.xml
application>
<display-name>EASE_1</display-name>
<module id=”myeclipse.1081260834687″>
<web>
<web-uri>EASE.war</web-uri>
<context-root>/EASE</context-root>
</web>
</module>
</application>I have EASE_1 project deployment set to packaged:
C:\oc4j_extended_rel3\j2ee\home\application-autodeployI have my server.xml file as follows:
<application-server application-directory=”../applications”
application-auto-deploy-directory=”../application-autodeploy”
deployment-directory=”../application-deployments”
connector-directory=”../connectors”
>
<rmi-config path=”./rmi.xml” />
<jms-config path=”./jms.xml” />
<log>
<file path=”../log/server.log” />
</log>
<transaction-config timeout=”30000″ />
<global-application name=”default” path=”application.xml” />
<application name=”EASE_1″ path=”C:\oc4j_extended_rel3\j2ee\home\application-autodeploy\EASE_1.ear” auto-start=”true” />
<global-web-app-config path=”global-web-application.xml” />
<web-site path=”./http-web-site.xml” />
<cluster id=”-1332567986″ />
</application-server>With tomcat, I was simply able to hit the save button and all changes were automatilcly deployed and compiled. With OC4j I Must stop the server, delete any insance of “EASE” in the application directory , redeploy and then re-start the server.
There are no errors in the log
Scott AndersonParticipantWith tomcat, I was simply able to hit the save button and all changes were automatilcly deployed and compiled.
That works with Tomcat and exploded deployment since our hot sync deployer will automatically update the complete installation. However, we don’t automatically sync all changes with each save for packaged deployments since we’d have to completely repackage the entire application, the overhead of which could be huge. For packaged deployments, you must use the ‘Redeploy’ button in the deployment manager dialog to tell MyEclipse when the deployment should be resync’ed. This is the basic difference between exploded and packaged deployments. It also shows why servers that support exploded deployment are so much better for development and testing.
With OC4j I Must stop the server, delete any insance of “EASE” in the application directory , redeploy and then re-start the server.
Unfortunately, how well each server supports hot deployment of applications varies widely. However, even though OC4J doesn’t support exploded deployments, I haven’t seen any issues with its handling of packaged deployments. Here’s what works for me, so please let me know if you see something else:
1) Create a web project and an EAR to contain it.
2) Deploy it as ‘packaged’ to OC4J
3) Start the server, test the application
4) Make code changes in MyEclipse. Java code changes will be hot-synced into the server JVM immediately on save and will be available until the server is restarted. Changes to JSP’s or other artifacts will require redeploying the EAR.
5) Open the deployment management dialog, select OC4J deployment and hit ‘Redeploy’
6) At that point I see the following messages in the console, letting me know that my application was redeployed:Auto-deploying file:/C:/dev/appservers/oc4j_rel2/j2ee/home/application-autodeploy/TestEAR/TestWeb/ (New server version detected)…
Auto-unpacking C:\dev\appservers\oc4j_rel2\j2ee\home\application-autodeploy\TestEAR.ear… done.
Auto-unpacking C:\dev\appservers\oc4j_rel2\j2ee\home\application-autodeploy\TestEAR\TestWeb.war… done.
Auto-deploying TestEAR (Assembly had been updated)…
Auto-deploying file:/C:/dev/appservers/oc4j_rel2/j2ee/home/application-autodeploy/TestEAR/TestWeb/ (Assembly had been updated)…Can you try the steps I outlined above and see that they work for you? Please note that I specifically did not need to restart the OC4J server while doing any of this.
capt_houseyiiMemberScott,
Thanks 10^6 !
Looks like I have it as good as it is going to get. It just amazes me how politics and CBS can really mess things up. Oracle must have some really good salespersons because JDeveloper and OC4J are a sad joke compared to open source application servers and the Eclipse/MyEclipse IDE. A small fortune was paid for our “turnkey” solution, which does nothing but hinder developers. At least the powers that be are allowing us to use the Eclipse solutions over Jdeveloper. I am quite pleased in my investment with your product…
As far as I am concerned, Oracle should stick to the database business…
-Mike
Scott AndersonParticipantMike,
Glad to hear that we’ve gotten you moving. 🙂
Now that you probably have about a year before management has to decide whether or not to pay Oracle again (upgrades, support, etc) here’s what you need to do.
First, if your company doesn’t already have one, lobby to create an “Employee Suggested Cost Savings” program. In the program, employees make suggestions on how to save money (corporate wonks love this stuff) and for each suggestion that’s accepted, the employee gets some percentage of the savings as a bonus. Propose something significant, like 30% because they’ll try to knock it down or cap it anyway.
<digression> Legend has it that an IBM employee retired on the revenue he garnered back in the late 70’s for suggesting that IBM buy all their coax from a single vendor, thus saving tens of millions due to volume discounts. </digression>
Second, evangalize MyEclipse internally and once the program is up and running suggest that you stop paying Oracle ridiculous sums of money for dev tools and use MyEclipse instead.
Three, take your substantial bonus and have a nice vacation. 🙂
myuMemberI still have the same problem. I could not launch the jsp page after I successfully deployed my web project from my eclipse to oc4j.
The error message from browser is: http 404 error. I have spent hours doing the research and modify the server.xml by adding auto deployment entry. It won’t help.
Please give me help.
Mark
Scott AndersonParticipantMark,
Does the server report that it loaded your application in the log? If not, that’s the cause of your error. If so, it’s possible that you’re referencing it under the wrong web context name or your application simply is misconfigured. Also please note that OC4J does not support exploded deployment, so you’ll need to use packaged deployment for your application to be recognized by the server.
Lots of additional information can be found in our Application Server Quickstart and our Web Development Quickstart, which are located in the Documenation section here: http://www.myeclipseide.com/ContentExpress-display-ceid-67.html
Dave TrussellParticipant@support-scott wrote:
1) Create a web project and an EAR to contain it.
Scott, could you (or someone) please expand on how this is done, or point me to where it is explained? I have never created an EAR to contain anything. I’ve been through the tutorials and it is not readily apparent to me how to create an EAR after the fact.
I already have a Web Project and I need to deploy to OC4J. I can do this by editing applications.xml and http-web-site.xml and manually copying a .war into <oc4j_home>/applications. I’d rather do it from within MyEclipse.
Thank you very much,
Dave
Riyad KallaMemberI’ve been through the tutorials and it is not readily apparent to me how to create an EAR after the fact.
Necron anything we step you through will just be straight from the tutorial, when you use the deployment tool on an Enterprise Application Project, the EAR is created for your and deployed out to the app server. That is where it comes from. Just add your projects as “modules” to the EAR and MyEclipse will take care of the rest.
Dave TrussellParticipantThank you, Riyad. I did the following:
- 1. Created a new Enterprise Application Project.
2. Added my Web Project as a module.
3. Deployed to OC4J.
4. Received the error about a bogus xmlns root-tag attribute.
5. Researched your archives and changed to J2EE 1.3 instead of 1.4.
6. Redeployed to OC4J. So far so good.Now my new question: Do I have to change a configuration file somewhere for OC4J (Orion) to recognize the newly deployed project? Accessing http://localhost:8888/<NewEARProject> returns a 404. Normally, OC4J is looking at <OC4J_HOME>/applications for it’s root. The newly deployed project is in <OC4J_HOME>/application-autodeploy.
Thanks again,
Dave
Scott AndersonParticipantDave,
Sometimes Oracle isn’t defaulted to auto-deploy. Please check the server.xml file in the installation and add this if it’s not present.
<application-server application-directory="../applications" application-auto-deploy-directory="../application-autodeploy" deployment-directory="../application-deployments" >
Riyad KallaMemberDave,
Some J2EE app servers (like WebSphere) require that you fire up the adaministrative console and “deploy” the application into the app server before it is loaded… OC4J might be the same way.
Dave TrussellParticipant@support-rkalla wrote:
Some J2EE app servers (like WebLogic) require that you fire up the adaministrative console and “deploy” the application into the app server before it is loaded… OC4J might be the same way.
OC4J has no administrative console. However, Scott’s change to server.xml above was the key.
Initially, this didn’t work and I spent hours doing research until I realized that I had to have Packaged Archive instead of Exploded Archive selected. Now all is as well in OC4JLand as it can be.
Thanks to both Riyad and Scott for your help.
Dave
Scott AndersonParticipantDave,
I realized that I had to have Packaged Archive instead of Exploded Archive selected.
Darn! I should’ve mentioned that. I just slipped my mind. OC4J just doesn’t support exploded archive formats. Sorry about that.
-
AuthorPosts