MyEclipse Forums
This thread has been locked & this forum has been archived.
Please post new topics to Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
View previous topic Printable version Log in to check your private messages View next topic
Author Message
bradm
Post subject: [Workaround] Deploying to oc4j 10g (10.1.2.0.)  PostPosted: Jul 27, 2005 - 08:51 PM
Veteran Member
Veteran Member


Joined: Nov 24, 2003
Posts: 106

I pointed my eclipse to the j2ee/home directory in the oc4j directory; hooked up a jdk, and successfully started the server from within My Eclipse (this is the pure Java J2EE Containers version). I also deployed an application to the server, and My Eclipse reports that it was successful. The app doesn't really get deployed though, it seems: I see no evidence of it on the server, and a "Not Found" error results if I try to browse to it.

Is it too early for 10g (i.e. is 9i the only one supported)?

I'm on Eclipse 3.1RC4, and MyEclipse 4M2.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
bradm
Post subject:   PostPosted: Jul 28, 2005 - 12:28 AM
Veteran Member
Veteran Member


Joined: Nov 24, 2003
Posts: 106

I forgot to mention that I also tried the suggestions in the oc4j "Sticky" re: the server.xml and http-app.xml file adjustments, and that I tried deploying both an exploded app and a WAR.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-scott
Post subject:   PostPosted: Jul 28, 2005 - 03:00 AM
Moderator
Moderator


Joined: May 06, 2003
Posts: 6761

OC4J is a strange beast. Exploded applications don't work at all. I *think* a war works and I'm sure an EAR works. Can you try creating an EAR project, adding your WAR to it (in the wizard) and deploying that as a packaged archive? That should work fine, provided you've set up the autodeploy directory in server.xml correctly.

_________________
--Scott
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Necron99
Post subject:   PostPosted: Jul 28, 2005 - 03:22 PM
Veteran Member
Veteran Member


Joined: Jan 14, 2004
Posts: 24

 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
bradm
Post subject:   PostPosted: Jul 29, 2005 - 02:50 AM
Veteran Member
Veteran Member


Joined: Nov 24, 2003
Posts: 106

Thank you Dave. I had looked at that thread and tried what was suggested there with no luck.

I work for a university that has just committed to oc4j (or rather a department that has... but I digress....).

If anybody is looking at this who can share some battle scars please speak up! Thanks in advance.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-scott
Post subject:   PostPosted: Jul 29, 2005 - 03:36 PM
Moderator
Moderator


Joined: May 06, 2003
Posts: 6761

Brad,

Did deploying a packaged EAR work?

_________________
--Scott
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
bradm
Post subject:   PostPosted: Aug 02, 2005 - 12:05 AM
Veteran Member
Veteran Member


Joined: Nov 24, 2003
Posts: 106

Scott,

Sorry to admit it, but I can't see how to take this project (which I initiated with Web Project abilities) and export it as an EAR file. I tried to export what I have, but I get a message saying that suggests I need to START a project with EAR capabilities first (" No EAR projects Found for Export. This wizard displays only those EAR projects that are currently OPEN."

What am I missing?
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-scott
Post subject:   PostPosted: Aug 02, 2005 - 02:13 AM
Moderator
Moderator


Joined: May 06, 2003
Posts: 6761

Brad,

You need to create an addition project using File > New > Project... > MyEclipse > J2EE Projects > Enterprise Application Project.
In the first page of the wizard under Creation Tasks > Available Tasks, uncheck the create ejb project settings. Click next and then select your web project in the bottom section of the next page under "Select Applicable Web Module Projects". Let the wizard finush running and then deploy this new EAR project (as packaged) to Oracle and you'll have a .ear file that properly includes you're web project's .war file.

_________________
--Scott
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
bradm
Post subject:   PostPosted: Aug 02, 2005 - 11:15 AM
Veteran Member
Veteran Member


Joined: Nov 24, 2003
Posts: 106

Hi Scott. All went just as you describe above, and again I'm told that deployment was successful. But again when I try to load a page from it in a browser oc4j tells me it "can't be found" (404).

For what it's worth this same app is loaded up just fine on Tomcat. How could Oracle have managed to make something so basic to the notion of a web server so impossibly complex and cryptic?
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Aug 02, 2005 - 03:07 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

Brad,
I know that typically J2EE application servers require that you additionally "install" or "deploy" the EAR from within the server's administrative console, and MyEclipse's step of "deploying" it isn't the end of the road. So I looked up deploying an app into OC4J and found this link for 9, check the last section here: http://www.oracle.com/technology/sample_code/tech/xml/customermanagement/Install.html

It looks like you need to edit some config files to let the app server become aware of the installed app. I can't imagine that OC4J dosen't include an administrative console much like WebSphere has that you can "Install" the EAR from, does it?

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
kinjalsonpal
Post subject:   PostPosted: Aug 03, 2005 - 06:29 AM



Joined: Feb 25, 2004
Posts: 20

After good amount of research on OC4J deployment, I've managed to achieve true hot deployment (for both, the web content and java content). Following is a step by step procedure. I've tested this on MEI 3.8.4 with OC4J 9.0.4 and 10.1.3. The standalone OC4J installation in both the cases was a fresh install on a Windows XP (SP1) m/c. Go through and follow contents of the ReadMe in the downloaded OC4J archive. Configure OC4J in MEI as described in the tutorial.

1) modify server.xml to achive following effect.

<application-server application-directory="../applications"
deployment-directory="../application-deployments"
connector-directory="../connectors"
application-auto-deploy-directory="../application-autodeploy"
check-for-updates="true"
>

2) Create a directory called application-autodeploy under $OC4J_HOME\j2ee\home.

3) Start OC4J using the server launcher. Create a J2EE Enterprise Application Project and a subproject (typically a webproject), if you already do not have one. OC4J recognises only .ear files for auto-deploy.

4) Click on the Deploy button to bring up deployment dialog. Choose the Enterprise Application's project from the selection box, Click Add button, choose Oracle 9i/AS as target server, choose Packaged Archive and click Deploy.

5) Once the deployment is successful, on the OC4J console, there would be good number of informational messages regarding the deployment process. Test your newly deployed application. Now, shutdown OC4J.

6) While the server is down, again go to deployment dialog, choose the same project in the list of deployments below the project selection box. Click on Remove. Now repeat deployment with only one exception. Instead of choosing Packaged Deployment, choose Exploded Deployment option.

7) Start OC4J as usual, now it'll have a fully hot deployable application.

I've observed that sometimes, changes are not HotSynched. This typically happens if MEI is restarted. If this happens, just do Exploded Deployment again. Btw, if you guys have a choice, use version 10.1.x. It comes with a pretty comprehensive admin console running on port 1810.

I'm sure the MEI team will be able to refine this further and correct it if required.

HTH.

Regards,
Kinjal
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
bradm
Post subject:   PostPosted: Aug 03, 2005 - 12:22 PM
Veteran Member
Veteran Member


Joined: Nov 24, 2003
Posts: 106

Thank you very much for your detailed instructions Kinjal. I'm sorry to report that following them to the letter still leads to the same problem: "Page Not Found".

I'm going to just lobby this department against using oc4j! This one takes the cake.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
kinjalsonpal
Post subject:   PostPosted: Aug 03, 2005 - 01:46 PM



Joined: Feb 25, 2004
Posts: 20

bradm wrote:
Thank you very much for your detailed instructions Kinjal. I'm sorry to report that following them to the letter still leads to the same problem: "Page Not Found".


There're good number of reasons why you would receive "Page Not Found" error. It ranges from a typo in the address bar of your browser to misconfiguration of the application server. Is the same application working on some other application server, like, say Tomcat which only deals with a .war file? Also, were you able to follow all the above steps successfully?

Quote:
I'm going to just lobby this department against using oc4j! This one takes the cake.
Lobbying against a product just because it's a tough cookie does not look to be a good thing to do IMHO. Sometimes people do not have such a luxury of liking or disliking a product, they're just asked to make it work.

My 2 cents.

Regards,
Kinjal
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
bradm
Post subject:   PostPosted: Aug 03, 2005 - 10:27 PM
Veteran Member
Veteran Member


Joined: Nov 24, 2003
Posts: 106

Yes, all the steps you outlined appeared to be successful; and yes: the same app has been deployed as a WAR file and in exploded form on two different servers using Tomcat.

I'm curious: is there anything about oc4j that other options don't provide that would explain it's comparative complexity and fussiness?
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-scott
Post subject:   PostPosted: Aug 04, 2005 - 12:26 AM
Moderator
Moderator


Joined: May 06, 2003
Posts: 6761

One thing we haven't covered is what port you're trying to access to see the server. See (http://www.johntopley.com/kb/oracle/0025.html) which shows the default port is 8888. So, try http://localhost:8888/...

_________________
--Scott
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits