Dear sir/madam
ABOUT ME =3D>
I am biren here. I am greate admirer of WROX publication and I luv
reading books published by WROX.
In the same journey I have purchased the book for EJB and I am trying to
learn ejb from that.
later on I'll be doing an project based on ejb. I am doing as per book.
WHAT I AM USING =3D>
I am using Bea webserver and J2EE for deployment as suggeted in book.
I have set the classpath and path in my application.
I have compiled my files and made jar files out of it.
MY SETUP =3D>
- j2ee server is installed under folder d:\j2ee
- My ejb home folder is under e:\ejb and
my working folder hierarchy is as :
e:\ejb\simpleBean =3D> all classfiles
e:\ejb\Meta-inf =3D> deployment descriptor file ejb-jar.xml
e:\ejb\client =3D> Simple Client application
PROBLEM=3D> Now when I am trying to use J2EE deploytool it is giving me
error.
[1] If I run Verifier It shows error as =3D>
Error loading E:\ejb\SimpleBean.ear: Element "application" requires
additional elements.
Exception : Error in file [META-INF/application.xml] Parsing error, line
8, uri null
DETAIL ERROR description
-----------------------------------------------------
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!DOCTYPE static-verification PUBLIC "-//Sun Microsystems, Inc.//DTD
J2EE Static Verification 1.3.1//EN"
"file:/D:/j2ee/lib/dtds/static-verification_1_3_1.dtd">
<static-verification>
<error>
<error-name>Error in file [ META-INF/application.xml ] ** Parsing error,
line 8, uri null</error-name>
<error-description>Error: Element "application" requires additional
elements. </error-description>
<error-name>Error: ** Error trying to process file:
org.xml.sax.SAXParseException: Element "application" requires additional
elements.</error-name>
<error-description>org.xml.sax.SAXParseException: Element "application"
requires additional elements.
at
org.apache.crimson.parser.Parser2.error(Parser2.java:3160)
at
org.apache.crimson.parser.ValidatingParser$ChildrenValidator.done(Valida
tingParser.java:361)
at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1519)
at
org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
at
org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
3;
at javax.xml.parsers.SAXParser.parse(SAXParser.java:393)
at
com.sun.enterprise.tools.verifier.Verifier.validate(Verifier.java:673)&#
13;
at
com.sun.enterprise.tools.verifier.Verifier.loadAppJar(Verifier.java:803)
at
com.sun.enterprise.tools.verifier.Verifier.loadJar(Verifier.java:749)
3;
at
com.sun.enterprise.tools.verifier.gui.MainPanel.run(MainPanel.java:187)&
#13;
at java.lang.Thread.run(Thread.java:484)
</error-description>
</error>
<failure-count>
<failure-number>0</failure-number>
<warning-number>0</warning-number>
<error-number>6</error-number>
</failure-count>
</static-verification>
COMMENTS: There is no file created called application.xml under META_INF
folder becoz under this folder there is mine ejb discriptor file.
which is as:
--------------------------------------------------
<?xml version=3D'1.0'?>
<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE
Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
<ejb-jar>
<description>single stateless session bean to calculate monthly
salary</description>
<display-name>Simple Bean</display-name>
=09
<enterprise-beans>
<session>
<description>test salary bean</description>
<display-name>SalaryBean</display-name>
<ejb-name>Salary</ejb-name>
<home>simpleBean.SalaryHome</home>
<remote>simpleBean.Salary</remote>
<ejb-class>simpleBean.SalaryEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans> =09
</ejb-jar>
SO, I AM NOT ABLE to use jar file and proceed further to deply my
salarybean.
please help me out and suggect me where am I wrong?
thanx
biren