• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Unable to load dependency analyzer

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, i have problem building ejb with ant 1.5.1
<target name="build-appserver-borland">
<echo message="Building EJB Jar file ......"/>
<ejbjar srcdir="${project_home}/classes"
basejarname="projectEJB"
descriptordir="${project_home}/src/xml/"
classpath="${project_home}/src/lib;${project_home}/src/libx">
<borland destdir="${project_home}" verify="on" version="4" />
<include name="${project_home}/src/xml/ejb-jar.xml"/>
<exclude name="${project_home}/src/xml/ejb-inprise.xml"/>
</ejbjar>
<echo message="Building EJB Jar file ...... SUCCESS"/>
</target>
Problem:
[ejbjar] Unable to load dependency analyzer: org.apache.tools.ant.util.depend.bcel.AncestorAnalyzer
Question:
"org.apache.tools.ant.util.depend.bcel.AncestorAnalyzer" is in my %ANT_HOME%\lib\optional.jar
I do not understand why it is not loading? can anyone explain to me?
projectEJB.jar is the output jar
${project_home}/src/xml/ is where my descriptors are.
${project_home}/src/lib/ stores required libraries for ejbs
${project_home}/src/libx/ stores borland specific libraries such as asrt.jar....
System variables
Set ANT_HOME=D:\libraries\jakarta-ant-1.5.1
Set Path=%Path%;%ANT_HOME%\bin;%ANT_HOME%\lib;
 
Sheriff
Posts: 3064
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm ... that should work. You don't need ANT_HOME/lib in your path, but I don't see why that would hurt anything. You're picking up the EJB Jar task all right, which is also in optional.jar. Maybe that jar got corrupted? You could try downloading it again.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Charles,
Even I am facing the same problem as reported by Jeffrey.
As per your suggestion I downloaded the jar file again , however it did not help.
I did look at the java.class.path variable in the build.xml I am using and it shows the optional.jar in the classpath list.
Any suggestions ?
 
Greg Charles
Sheriff
Posts: 3064
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't call me Charles. However, that suggestion doesn't really solve your problem, does it?
It looks like this is a legitimate bug. Although optional.jar does have org.apache.tools.ant.util.depend.bcel.AncestorAnalyzer, that class uses org.apache.bcel.classfile.ClassParser, which optional.jar doesn't have, nor does any other jar that I can find. I'm not sure why that is. Maybe the next version of Ant will fix that problem, but you may want to submit a bug report to them.
 
Greg Charles
Sheriff
Posts: 3064
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Found it! You guys really owe me. What you need is bcel.jar in your ANT_HOME/lib directory. That can be found at:
http://jakarta.apache.org/builds/jakarta-bcel/release/v5.0/
Download the bcel-5.0.zip, and bcel.jar is in there.
 
Rajesh Bhoir
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot buddy.
It works with the bcel-5.0.zip
[ January 28, 2003: Message edited by: Rajesh Bhoir ]
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi .. I am facing the same problem that you guys faced . I tried all that you said would work but I keep getting the same error. Can you please help?
I am attaching the trace of the ant -verbose command below.
Thanks in advance ..
D:\My>D:\MFTOADEPLOY\MFTOA\ant\bin\ant -verbose ejb-jar
Apache Ant version 1.5 compiled on July 9 2002
Buildfile: build.xml
Detected Java version: 1.3 in: D:\bea\jdk131_06\jre
Detected OS: Windows 2000
parsing buildfile build.xml with URI = file :/My/build.xml
Project base dir set to: D:\My
Build sequence for target `ejb-jar' is [init, settings, compile, ejb-jar]
Complete build sequence is [init, settings, compile, ejb-jar, clean, cleanjars]
init:
settings:
compile:
[javac] com\books\Book.java omitted as D:\MFTOADEPLOY\MFTOA\build\com\books\Book.class is up to date.
[javac] com\books\BookAction.java omitted as D:\MFTOADEPLOY\MFTOA\build\com\books\BookAction.class is up to date.
[javac] com\books\BookForm.java omitted as D:\MFTOADEPLOY\MFTOA\build\com\books\BookForm.class is up to date.
[javac] com\common\ejb\BaseSessionBean.java omitted as D:\MFTOADEPLOY\MFTOA\build\com\common\ejb\BaseSessionBean.class is up to date.
[javac] com\ejb\TestEJB.java omitted as D:\MFTOADEPLOY\MFTOA\build\com\ejb\TestEJB.class is up to date.
[javac] com\ejb\TestHome.java omitted as D:\MFTOADEPLOY\MFTOA\build\com\ejb\TestHome.class is up to date.
[javac] com\ejb\TestRemote.java omitted as D:\MFTOADEPLOY\MFTOA\build\com\ejb\TestRemote.class is up to date.
ejb-jar:
[ejbjar] Unable to load dependency analyzer: org.apache.tools.ant.util.depend.bcel.AncestorAnalyzer
[ejbjar] 1 deployment descriptors located.
[ejbjar] Could not resolve ( publicId: -//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN, systemId: http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd) to a local entity
BUILD FAILED
file :/My/build.xml:94: IOException while parsing'mftoa-ejb-jar.xml'. This probably indicates that the descriptor doesn't exist. Details: java.sun.com
at org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.processDescriptor(GenericDeploymentTool.java:499)
at org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.execute(EjbJar.java:592)
at org.apache.tools.ant.Task.perform(Task.java:317)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:334)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
at org.apache.tools.ant.Main.runBuild(Main.java:610)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
--- Nested Exception ---
java.net.UnknownHostException: java.sun.com
at java.net.InetAddress.getAllByName0(InetAddress.java:566)
at java.net.InetAddress.getAllByName0(InetAddress.java:535)
at java.net.InetAddress.getByName(InetAddress.java:444)
at java.net.Socket.<init>(Socket.java:95)
at sun.net.NetworkClient.doConnect(NetworkClient.java:45)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:334)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:520)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:270)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:280)
at sun.net.www.http.HttpClient.New(HttpClient.java:292)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:417)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:510)
at java.net.URL.openStream(URL.java:793)
at org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:796)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:756)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:267)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:826)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.parseEjbFiles(GenericDeploymentTool.java:552)
at org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.processDescriptor(GenericDeploymentTool.java:424)
at org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.execute(EjbJar.java:592)
at org.apache.tools.ant.Task.perform(Task.java:317)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:334)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
at org.apache.tools.ant.Main.runBuild(Main.java:610)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
Total time: 10 seconds

And here is the classpath that I have set
[javac] '-classpath'
[javac] 'D:\MFTOADEPLOY\MFTOA\build;D:\MFTOADEPLOY\MFTOA\lib\ext\activation.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\adc_ant.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\anrmilog.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\ant.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\axis.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\bcel-5.1.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\commons-discovery.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\commons-logging.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\crimson.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\EmailDispatcherPlain.jar;D:\MFTOADEPLOY\MFTOA\
lib\ext\jaxp.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\jaxrpc.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\junit.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\junit3.7.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\junitee1.2.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\jxl.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\log4j-1.2.6.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\mail.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\optional.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\parser.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\saaj.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\starteam-sdk.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\str
uts.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\support.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\TwoStepsJRViewer.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\wsdl4j.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\xerces.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\xercesImpl.jar;D:\MFTOADEPLOY\MFTOA\lib\ext\xml-apis.jar;D:\bea\weblogic700\server\lib\weblogic.jar;D:\bea\weblogic700\server\lib\xmlx.jar;D:\bea\jdk131_06\lib\tools.jar;D:\jakarta-ant-1.5\lib\xml-apis.jar;D:\jakarta-ant-1.5\lib\xercesImpl.jar;D:\jakarta-ant-1.5\lib\optional.jar;D:\jakarta-a nt-.5lib\ant.jar;D:\j2ee.jar;C:\xerces.jar;D:\EmailDispatcherPlain.jar;D:\classes12.zip;D:\util.jar;D:\Mail\util.jar;D:\Mail\essportal-util.jar;D:\Mail\log4j-1.2.6.jar;D:\perl\bin;D:\Info\Struts\jakarta-struts-1.0.2\lib\struts.jar;D:\My'
 
reply
    Bookmark Topic Watch Topic
  • New Topic