ant-user mailing list archives

hi folks,
Sorry for the high traffic i am generating but i could just deploy the Ejb
file.
thanks to Conor,Dan Smith and host of other fellows ,their earlier
discussions helped me a lot.
I used this code only
<ejbjar srcdir="${build.classes}"
descriptordir="${build.classes}/com/claimiq/common/data/domain/META-INF"
destdir="junk" >
<weblogic destdir="${build.classes}/com/claimiq/common/data/domain" />
<include name="**/*ejb*.xml"/>
<exclude name="**/*weblogic*.xml"/>
</ejbjar>
but what wonders me is that i have to change my ejb-jar.xml to
DomainTable-ejb-jar.xml
and similaraly the Weblogic XML's to DomainTable-weblogic....
Can someone elucidate WHY???
thanks and regards
-Saket
-----Original Message-----
From: Saket Raizada [mailto:Saket.Raizada@claimiq.com]
Sent: Wednesday, January 10, 2001 1:12 PM
To: 'ant-user@jakarta.apache.org'
Subject: ejbjar weblogic problems!
hi,
as pointed by conor in one of old archives that the name of weblogic xml
should be like
EJBeanName-weblogic-cmp-ejb-jar.xml etc...
I use this code
<ejbjar srcdir="${build.classes}"
descriptordir="${build.classes}/com/claimiq/common/data/domain/META-INF"
destdir="junk" >
<weblogic destdir="junk" />
</ejbjar>
using this got me this error
[copy] Copying 2 files to
D:\workspace\saket\IBA\java\classes\com\claimiq\common\data\domain\META-INF
[ejbjar] building DomainTable.jar with 3 files
weblogic.ejb.deployment.dd.DescriptorLoaderException: Received low-level
error when processing DOM: message was
"weblogic.xml.dom.ChildCountException"
at
weblogic.ejb.deployment.dd.DescriptorLoader.addDOMProcessingError(Descriptor
Loader.java:1731)
at
weblogic.ejb.deployment.dd.DescriptorLoader.createEntityBeanDescriptors(Desc
riptorLoader.java, Compiled Code)
at
weblogic.ejb.deployment.dd.DescriptorLoader.createDeploymentUnit(DescriptorL
oader.java:259)
at weblogic.ejbc.runBody(ejbc.java, Compiled Code)
at weblogic.utils.compiler.Tool.run(Tool.java:80)
at weblogic.ejbc.main(ejbc.java:353)
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:107)
at org.apache.tools.ant.taskdefs.Java.run(Java.java:245)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:122)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:86)
at
org.apache.tools.ant.taskdefs.optional.ejb.WeblogicDeploymentTool.buildWeblo
gicJar(WeblogicDeploymentTool.java:241)
at
org.apache.tools.ant.taskdefs.optional.ejb.WeblogicDeploymentTool.writeJar(W
eblogicDeploymentTool.java:260)
at
org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.processDesc
riptor(GenericDeploymentTool.java, Compiled Code)
at
org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.execute(EjbJar.java,
Compiled Code)
at org.apache.tools.ant.Target.execute(Target.java, Compiled Code)
at org.apache.tools.ant.Project.runTarget(Project.java:818)
at org.apache.tools.ant.Project.executeTarget(Project.java, Compiled
Code)
at org.apache.tools.ant.Project.executeTargets(Project.java,
Compiled Code)
at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
at org.apache.tools.ant.Main.main(Main.java:149)
weblogic.ejb.deployment.dd.DescriptorLoaderException: Received low-level
error when processing DOM: message was
"weblogic.xml.dom.ChildCountException"
at
weblogic.ejb.deployment.dd.DescriptorLoader.addDOMProcessingError(Descriptor
Loader.java:1731)
at
weblogic.ejb.deployment.dd.DescriptorLoader.createSessionBeanDescriptors(Des
criptorLoader.java, Compiled Code)
at
weblogic.ejb.deployment.dd.DescriptorLoader.createDeploymentUnit(DescriptorL
oader.java:261)
at weblogic.ejbc.runBody(ejbc.java, Compiled Code)
at weblogic.utils.compiler.Tool.run(Tool.java:80)
at weblogic.ejbc.main(ejbc.java:353)
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:107)
at org.apache.tools.ant.taskdefs.Java.run(Java.java:245)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:122)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:86)
at
org.apache.tools.ant.taskdefs.optional.ejb.WeblogicDeploymentTool.buildWeblo
gicJar(WeblogicDeploymentTool.java:241)
at
org.apache.tools.ant.taskdefs.optional.ejb.WeblogicDeploymentTool.writeJar(W
eblogicDeploymentTool.java:260)
at
org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.processDesc
riptor(GenericDeploymentTool.java, Compiled Code)
at
org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.execute(EjbJar.java,
Compiled Code)
at org.apache.tools.ant.Target.execute(Target.java, Compiled Code)
at org.apache.tools.ant.Project.runTarget(Project.java:818)
at org.apache.tools.ant.Project.executeTarget(Project.java, Compiled
Code)
at org.apache.tools.ant.Project.executeTargets(Project.java,
Compiled Code)
at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
at org.apache.tools.ant.Main.main(Main.java:149)
ERROR: Error from ejbc: Received low-level error when processing DOM:
message was
"weblogic.xml.dom.ChildCountException"
ERROR: Error from ejbc: Received low-level error when processing DOM:
message was
"weblogic.xml.dom.ChildCountException"
ERROR: Error from ejbc: Bean "DomainTable" specified in weblogic-ejb-jar.xml
was not found in
ejb-jar.xml
BUILD FAILED
M:\build.xml:33: Exception while calling ejbc. Details:
weblogic.utils.compiler.ToolFailureException: ERROR: ejbc found errors
weblogic.utils.compiler.ToolFailureException: ERROR: ejbc found errors
at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:116)
at org.apache.tools.ant.taskdefs.Java.run(Java.java:245)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:122)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:86)
at
org.apache.tools.ant.taskdefs.optional.ejb.WeblogicDeploymentTool.buildWeblo
gicJar(WeblogicDeploymentTool.java:241)
at
org.apache.tools.ant.taskdefs.optional.ejb.WeblogicDeploymentTool.writeJar(W
eblogicDeploymentTool.java:260)
at
org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.processDesc
riptor(GenericDeploymentTool.java, Compiled Code)
at
org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.execute(EjbJar.java,
Compiled Code)
at org.apache.tools.ant.Target.execute(Target.java, Compiled Code)
at org.apache.tools.ant.Project.runTarget(Project.java:818)
at org.apache.tools.ant.Project.executeTarget(Project.java, Compiled
Code)
at org.apache.tools.ant.Project.executeTargets(Project.java,
Compiled Code)
at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
at org.apache.tools.ant.Main.main(Main.java:149)
Total time: 6 seconds
-----Original Message-----
From: Saket Raizada [mailto:Saket.Raizada@claimiq.com]
Sent: Wednesday, January 10, 2001 11:53 AM
To: 'ant-user@jakarta.apache.org'
Subject: ejbjar weblogic problems!
hi ,
thanks to you people and esp Conor I have came a long way but
Now a new problem
I have source classes in $build.classes and XML's (3 of them 1 for
ejb-jar.xml and 2 for weblogic(weblogic-ejb-jar.xml and weblogic-cmp...)
Now i want to generate a deployable jar from them!
using
<ejbjar srcdir="${build.classes}"
descriptordir="${build.classes}/META-INF"
destdir="junk" >
</ejbjar>
generates 2 jar fileS 1 ith with the Home Remote Bean and ejb-jar.xml as a
single JAR and another with only
EJB-JAR.xml no mention of weblogic xml's!!!
WHAT ABOUT THE WEBLOGIC XML'S???
using
<ejbjar srcdir="${build.classes}"
descriptordir="${build.classes}/com/claimiq/common/data/domain/META-INF"
destdir="junk" >
<weblogic destdir="junk" />
</ejbjar>
this weblogic element causes this error
[ejbjar] building ejb.jar with 4 files
ERROR: Error from ejbc: The JNDI name of bean DomainTable was not set
ERROR: Error from ejbc: No JNDI name set for the referenced resource factory
for reference jdbc/IBADEV of type javax.sql.DataSource
any guidance or code towards producing a deployable jar for weblogic/any
server will be really appreciated.
thanks and regards
-Saket
-----Original Message-----
From: Conor MacNeill [mailto:conor@ebinteractive.com.au]
Sent: Tuesday, January 09, 2001 5:30 PM
To: ant-user@jakarta.apache.org
Subject: RE: ejbjar problems!
Saket,
You need to tell ejbjar which files are the deployment descriptor files. By
just specifying srcdir, you are telling ejbjar that all the files there are
descriptor files. This is why it is complaining about the .class file.
Try this
<ejbjar srcdir="${build.classes}/domain"
destdir="junk">
<include name="**/ejb-jar.xml"/>
<exclude name="**/weblogic*.xml"/>
</ejbjar>
If you are not using weblogic, you can leave out the exclude clause. If you
are using weblogic, you'll probably want to add a <weblogic> element as
well. Check out the documentation for further info
http://jakarta.apache.org/ant/jakarta-ant/docs/ejb.html#ejbjar
Cheers
Conor
--
Conor MacNeill
conor@cortexebusiness.com.au
Cortex eBusiness
http://www.cortexebusiness.com.au
> -----Original Message-----
> From: Saket Raizada [mailto:Saket.Raizada@claimiq.com]
> Sent: Wednesday, 10 January 2001 12:12
> To: 'ant-user@jakarta.apache.org'
> Subject: ejbjar problems!
>
>
>
> hi,
> i have a directory ${build.classes}/domain in which the .class files and
> deployment descriptors are kept
> the jar ordinarily compiles when used from simple ejbc etc...
> but when
> I use
>
> <ejbjar srcdir="${build.classes}/domain"
> destdir="junk">
> </ejbjar>
> it gives me this error..
> any insights??
>
>
>
> BUILD FAILED
>
> M:\build.xml:32: SAXException while parsing 'DomainTable.class'. This
> probably indicates badly-formed XML. Details: Character conversion error
> encoding declaration missing?" (line number may be too low).
> org.xml.sax.SAXParseException: Character conversion error:
> "Malformed UTF-8
> char -- is an XML encoding declaration missing?" (line number may b
> at com.sun.xml.parser.InputEntity.fatal(InputEntity.java:974)
> at com.sun.xml.parser.InputEntity.fillbuf(InputEntity.java:946)
> at com.sun.xml.parser.InputEntity.peek(InputEntity.java:777)
> at com.sun.xml.parser.Parser.peek(Parser.java:2690)
> at com.sun.xml.parser.Parser.maybeXmlDecl(Parser.java:980)
> at com.sun.xml.parser.Parser.parseInternal(Parser.java:477)
> at com.sun.xml.parser.Parser.parse(Parser.java:283)
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
> at
> org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.p
> rocessDesc
> riptor(GenericDeploymentTool.java, Compiled Code)
> at
> org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.execute(EjbJar.java,
> Compiled Code)
> at org.apache.tools.ant.Target.execute(Target.java, Compiled Code)
> at org.apache.tools.ant.Project.runTarget(Project.java:818)
> at
> org.apache.tools.ant.Project.executeTarget(Project.java, Compiled
> Code)
> at org.apache.tools.ant.Project.executeTargets(Project.java,
> Compiled Code)
> at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
> at org.apache.tools.ant.Main.main(Main.java:149)
>
> thanks and regards
> -Saket
>