Oracle 9i Application Server deployment problem

I am trying to deploy a simply application in Oracle 9i Application server. When I try to deploy it in throws the following error

Error in application employee: Error loading package at file:/G:/OC4J/oc4j_exten
ded/J2EE/HOME/employee/Employee-ejb.jar, Unable to find/read assembly info for G
:\OC4J\oc4j_extended\J2EE\HOME\employee/Employee.EAR/Employee-ejb.jar (META-INF/ejb-jar.xml)
Error initializing server: Could not read web-app config file at Employee-web: E

The directory structure is like this

        ------Ejb_Module (for Ejb Classes)
        |                 |
        |                 |--employee
        |                 |           |--EmployeeBean. , Employee, EmployeeHome
        |                  |
        |                 |--Meta-Inf
        |                             |--ejb-jar.xml
        | --- --Web_Module
        |                  |--Web-Inf
        |                  |           |--classses
        |                  |                     |--EmployeeServlet.classe
        |                  |
        |                  |--Meta-Inf
        |                            |--web.xml

For creating Employee-ejb.jar file
G:\OcEjb\employee\Ejb_Module\ jar cvf Employee-ejb.jar *.*

For creating Employee-web.war file
G:\OcEjb\employee\Web_Module\ jar cvf Employee-web.war *.*

For creating  Employee.EAR File
G:\OcEjb\employee\jar cvfM Employee.EAR *.*

Then adding
<web-app application="employee" name="Employee-web" root="/employee" />
to http-web-site.xml file in config  directory

<application name="employee" path="../employee/Employee.EAR" auto-start="true" />
to server.xml file in config  directory
Application.xml code
<?xml version="1.0"?>

ejb-jar.xml code

 <?xml version="1.0"?>
         <description>Session Bean Employee Example</description>

web.xml code
<?xml version="1.0"?>
<web-app application="employee" name="Employee-web"
root="/employee" />

Now, what could be the problem pls help

Awaiting reply

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

ebbesenConnect With a Mentor Commented:
Hi, prem kumar79.  

Please let me know if this fixed your issue -- if it did, please grade my answer so I can get points.

If it did not solve your issue, let me know what your current problems are.  I have just finished three implementations of OC4J and have seen and worked through plenty of errors, so I am confident that I can assist you.

Thank you.
 Look at the following line:

>Unable to find/read assembly info for G
:\OC4J\oc4j_extended\J2EE\HOME\employee/Employee.EAR/Employee-ejb.jar (META-INF/ejb-jar.xml)

  You will notice that half of the path uses "/" slash while the rest half uses "\". Do you think this could be the case?
Hello, prem kumar79.

girionis' post raises a valid point, but this is not the issue.  I think the reason for the inconsistent slashes has to do with the different ways you input them for DOS (\) and .xml files (/).  OC4J sorts this out itself and you needn't worry about it.

Your problem is that OC4J cannot locate ejb-jar.xml at G:\OC4J\oc4j_extended\J2EE\HOME\employee\Employee.EAR\, either because the .xml file is not in a META-INF directory in the .jar, or because the .jar is not in the specified directory.  What catches my eye initially is that the server is looking for a directory called Employee.EAR, where this should be just a directory that has your .ear in it (G:\OC4J\oc4j_extended\J2EE\HOME\employee\, according to your entry in server.xml).

The default .ear location for OC4J is the /j2ee/home/applications/ directory.  You may want to try placing your .ear here, then changing your server.xml file thusly:
<application name="employee" path="../applications/employee.ear" auto-start="true" />

I recommend you search your .xml files and find out why OC4J thinks there should be a directory called Employee.EAR.  Unless theirs a case sensitivity issue, the fact that you have EAR capitalized in server.xml shouldn't matter.  You could change it just to be sure, however.

Looking at your commands for creating your .jar and .ear files, it looks like there may be another two directories involved (Ejb_Module and Web_Module) that you'll want to make sure are not in your .ear.  Your ear should contain your .jars, but your .jars should not have a path entry when you open the .ear with WinZip.

1.  Check your employee-ejb.jar file to make sure that ejb-jar.xml exists in a META-INF directory.
2.  Check your .ear file to make sure that your .jars don't reside within any directory.
3.  After you start the sever, look at the path that OC4J says it can't find anything in -- make sure that you have this path (G:\OC4J\oc4j_extended\J2EE\HOME\employee\Employee.EAR, in your case) and that Employee.jar exists in here and not in some other directory within it.
4.  Look at the demo application(s) that came with your OC4J version for extra clues -- concentrate on what is different between your .xml files and the ones in the demo.

Here is what I get when I remove the ejb-jar.xml file from my myapp-ejb.jar:
Error in application myapp: Error loading package at file:/C:/dir/j2ee
/home/applications/myapp/myapp-ejb.jar, Unable to find/read assembly info for C:\dir\j2ee\home\applications\myapp/myapp-ejb.jar (META-INF/ejb-jar.xml)
Never miss a deadline with

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

On the point raised by gironis, note the slashes in this message on the console:

Copying default deployment descriptor from archive at C:\rossiiaoc4j\j2ee\home\a
pplications\rossiia/META-INF/orion-application.xml to deployment directory C:\rossiiaoc4j\j2ee\home\application-deployments\rossiia...
prem_kumar79Author Commented:
delete question
 Please ask a question heer: for zero points if you want this question deleted.
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
I entered my recommendations, but no reply has been forthcoming from prem_kumar79!  Either the issue was resolved (in which case I'd like to know the resolution), or the issue is no longer important to the poster.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept ebbesen's comment as answer.

Please leave any comments here within the next seven days.


EE Cleanup Volunteer
All Courses

From novice to tech pro — start learning today.