?
Solved

Oracle 9i Application Server deployment problem

Posted on 2003-02-24
10
Medium Priority
?
1,042 Views
Last Modified: 2013-11-24
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

 
0
Comment
Question by:prem_kumar79
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 8008682
 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
 

Expert Comment

by:ebbesen
ID: 8028797
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
 

Expert Comment

by:ebbesen
ID: 8042681
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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Accepted Solution

by:
ebbesen earned 800 total points
ID: 8057429
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
 

Author Comment

by:prem_kumar79
ID: 8149479
delete question
0
 
LVL 35

Expert Comment

by:girionis
ID: 8150409
 Please ask a question heer: http://www.experts-exchange.com/Community_Support/ for zero points if you want this question deleted.
0
 

Expert Comment

by:CleanupPing
ID: 9059114
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
 

Expert Comment

by:ebbesen
ID: 9070256
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
 
LVL 15

Expert Comment

by:jimmack
ID: 9671333
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question