MyEclipse: Deployment with OC4J [Closed]
capt_houseyii - Jun 01, 2004 - 03:21 PM
Post subject: Deployment with OC4J [Closed]
Could 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.
support-scott - Jun 01, 2004 - 03:31 PM
Two things that trip people up with OC4J: first you need to modify server.xml to turn on auto-deployment like this:
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_houseyii - Jun 01, 2004 - 04:29 PM
OS: 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
I have EASE_1 project deployment set to packaged:
I have my server.xml file as follows:
<rmi-config path="./rmi.xml" />
<jms-config path="./jms.xml" />
<file path="../log/server.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" />
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
support-scott - Jun 01, 2004 - 05:00 PM
With 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_houseyii - Jun 02, 2004 - 04:25 PM
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…
support-scott - Jun 02, 2004 - 04:43 PM
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. :-)
myu - Dec 23, 2004 - 07:01 PM
Post subject: deployment to oc4j
I 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.
support-scott - Dec 23, 2004 - 08:05 PM
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
Necron99 - May 12, 2005 - 10:12 PM
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,
support-rkalla - May 12, 2005 - 11:45 PM
I'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.
Necron99 - May 13, 2005 - 03:43 PM
Thank you, Riyad. I did the following:
1. Created a new Enterprise Application Project.
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.
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.
support-scott - May 13, 2005 - 03:56 PM
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.
support-rkalla - May 13, 2005 - 03:57 PM
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.
Necron99 - May 13, 2005 - 05:27 PM
|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.
support-scott - May 17, 2005 - 06:13 PM
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.
mheir - May 18, 2005 - 05:25 PM
OC4J *does* support expanded deployment directories. Please see this article by Oracle's Debu Panda:
mheir - May 18, 2005 - 05:51 PM
Also, for more information, please see:
dshitzu1 - Nov 16, 2006 - 07:04 PM
Is there an example ANYWHERE that shows how to create WebApplication in MyEclipse 5 and deploy it to OC4J 10.1.2??
support-rkalla - Nov 16, 2006 - 07:34 PM
There is no document that covers specific deployment to OC4J, the steps of:
1) Creating web application
2) Creating deployment
3) Running application
are all exactly the same for all the app servers. The only different is that you need to setup the Oracle connector to launch OC4J. Other than that, all the other documentation is identical across all the app servers (you use the same deployment tool, same run/stop/restart tool, and so on).
Is there a specific problem you have been having setting up OC4J?
dshitzu1 - Nov 16, 2006 - 07:44 PM
Thanks for all of your help. I believe the problem is with OC4J v.10.1.2 . I think creating a build.xml file may be the way to go since there are no examples of deploying to this particular version of the app server from MyEclipse 5.0 and nothing I've tried over the last 2 days works.
support-rkalla - Nov 16, 2006 - 08:01 PM
Well I haven't really helped much yet... can you tell me exactly the problems you are having with deployment? There are only two ways to deploy, packaged (WAR) or exploded (just a direct copy of your WebRoot over). We had some JSP-debugging questions earlier on in the year so I played with 10.1.3 to make sure I could get it working and didn't have any problems with the out of the box copy, but I didn't happen to spend time with 10.1.2, so I wonder what the problem might be.
Is it a startup problem maybe? (errors during app server startup)
dshitzu1 - Nov 16, 2006 - 11:41 PM
I've created a build.xml file that deploys to OC4J v.10.1.2 without complaint. The ear file is exploded and the directory structure appears to be correct. HOWEVER (and I don't know if anyone here can help with this), the browser URL continually comes up with a 404 message.
Here are my entries in the revelant OC4J config. files:
server.xml = <application name="CMS" path="../applications/CMS.ear" auto-start="true" />
http-web-site.xml = <application name="CMS" path="../applications/CMS.ear" auto-start="true" />
The directory structure for the application is:
The URLs I've tried are:
All return 404 not found....
There are welcome files defined in the web.xml file. I'm at a loss but maybe it will be better tomorrow.
support-rkalla - Nov 17, 2006 - 01:59 AM
Normally most Java app servers run on 8080, did you setup OC4J to run on 8888? (Or does it by default? I'm not terribly familiar with it)
dshitzu1 - Nov 17, 2006 - 04:59 PM
I got it - the port was not used. On another note, I've imported 2 projects into MyEclipse 5.0 . There are only source files - no compiled classes. I cannot get the 'build' or 'build all' or 'build automatically' to work on these apps. What do I need to set to get these items to work like they work with projects I create?
support-rkalla - Nov 17, 2006 - 05:05 PM
I need more information as to what "cannot get it to work" means... are there compilation errors?If you have build path errors in the problem view, what do they say? If you imported these projects from an older install, you might have an older JRE referenced on your build path, that no longer exists in this new install or something like that which will stop the entire project from building.
badgerduke - Jan 20, 2009 - 08:16 PM
Post subject: Maven?
I am following all the helpful exceptions but I'm using a Maven (with MyEclipse 7.0) project. if I set my pom.xml to produce an EAR file, will MyEclipse deploy an EAR to OC4J?
support-rkalla - Jan 23, 2009 - 07:26 PM
Post subject: RE: Maven?
If you use the MyEclipse deployment tool on an enterprise application project, yes it will create an EAR. If you are creating an EAR with Maven, you will have to manually deploy that -- MyEclipse's deployment tool doesn't pay attention to Maven artifacts, it generates it's own based on the J2EE spec.
All times are GMT - 6 Hours
Powered by PNphpBB2
© 2003-2004 The PNphpBB GroupCredits