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
mployee-web

The directory structure is like this

employee
        |
        |
        ------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
        |
        |--Meta-inf
                 |--application.xml
        |
        |--Employee.ear.Employee-ejb.jar,Employee-web.war

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"?>
<application>
 <module>
  <ejb>Employee-ejb.jar</ejb>
 </module>
 <module>
  <web>
    <web-uri>Employee-web.war</web-uri>
    <context-root>/employee</context-root>
  </web>
 </module>
</application>


ejb-jar.xml code

 <?xml version="1.0"?>
<ejb-jar>
   <enterprise-beans>
      <session>
         <description>Session Bean Employee Example</description>
         <ejb-name>EmployeeBean</ejb-name>
         <home>employee.EmployeeHome</home>
         <remote>employee.Employee</remote>
         <ejb-class>employee.EmployeeBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Bean</transaction-type>
      </session>
   </enterprise-beans>
</ejb-jar>

web.xml code
<?xml version="1.0"?>
<web-app>
<web-app application="employee" name="Employee-web"
root="/employee" />
<ejb-ref>
<ejb-ref-name>EmployeeBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>employee.EmployeeHome</home>
<remote>employee.Employee</remote>
</ejb-ref>
</web-app>

Now, what could be the problem pls help

Awaiting reply

 
prem_kumar79Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
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.
0
 
girionisCommented:
 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?
0
 
ebbesenCommented:
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)
0
Never miss a deadline with monday.com

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

 
ebbesenCommented:
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...
0
 
prem_kumar79Author Commented:
delete question
0
 
girionisCommented:
 Please ask a question heer: http://www.experts-exchange.com/Community_Support/ for zero points if you want this question deleted.
0
 
CleanupPingCommented:
prem_kumar79:
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 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
ebbesenCommented:
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.
0
 
jimmackCommented:
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.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jimmack
EE Cleanup Volunteer
0
All Courses

From novice to tech pro — start learning today.