jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@pivolis.com>
Subject RE: cactus problem
Date Mon, 23 Aug 2004 08:59:38 GMT
Hi Man,

That's strange. It seems the Xerces parser is trying to connect to
java.sun.com to validate the DTD of your application.xml file. If fails
because you're not connected to internet (or it cannot access it - that
could happen if you're behind a proxy). However what's strange is that we
have specific code in Cactus so that Xerces does not go on the internet to
validate the DTD (we have set up our own Entity Resolver).

Could you please check that the DTD specified in your application.xml is
valid. It should be either one of:

<!DOCTYPE application
  PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN'
  'http://java.sun.com/j2ee/dtds/application_1_3.dtd'>

Or

<!DOCTYPE application
  PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN'
  'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>

Thanks
-Vincent

> -----Original Message-----
> From: Man Kul [mailto:contact2mbk@yahoo.com]
> Sent: mardi 17 août 2004 17:05
> To: cactus-user@jakarta.apache.org
> Subject: cactus problem
> 
> Hello,
>  I am trying to run a unit test as per the guidelines given in JUnit in
> Action(Chapter 16)
>  I am using cactus for unit-testing my EJB.
> 
> I have a session bean in My ejb-jar.xml file.
> Problem is whenever i am trying to execute the ant-script given in the
> book...it is giving me an error,
> 
> file:D:/sampleCactusTest/build-cactus.xml:98: Failed to parse deployment
> descrip
> tor for EAR file [D:\sampleCactusTest\target\ejb.ear].
>         at
> org.apache.cactus.integration.ant.container.EarParser.parse(EarParser
> .java:126)
>         at
> org.apache.cactus.integration.ant.CactusTask.execute(CactusTask.java:
> 190)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
>         at org.apache.tools.ant.Task.perform(Task.java:341)
>         at org.apache.tools.ant.Target.execute(Target.java:309)
>         at org.apache.tools.ant.Target.performTasks(Target.java:336)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
>         at org.apache.tools.ant.Main.runBuild(Main.java:609)
>         at org.apache.tools.ant.Main.start(Main.java:196)
>         at org.apache.tools.ant.Main.main(Main.java:235)
> Caused by: java.net.UnknownHostException: java.sun.com
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
>         at java.net.Socket.connect(Socket.java:452)
>         at java.net.Socket.connect(Socket.java:402)
>         at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
>         at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
>         at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
>         at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
>         at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
>         at sun.net.www.http.HttpClient.New(HttpClient.java:339)
>         at sun.net.www.http.HttpClient.New(HttpClient.java:320)
>         at sun.net.www.http.HttpClient.New(HttpClient.java:315)
>         at
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
> ction.java:510)
>         at
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
> .java:487)
>         at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
> nection.java:615)
>         at java.net.URL.openStream(URL.java:913)
>         at
> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown So
> urce)
>         at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
> Source)
>         at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
> Source
> )
>         at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
> Sourc
> e)
>         at
> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(
> Unknown Source)
>         at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
> known Source)
>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> Source)
>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> Source)
>         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>         at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>         at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
> Source)
>         at
> javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:76)
>         at
> org.apache.cactus.integration.ant.deployment.ApplicationXmlIo.parseAp
> plicationXml(ApplicationXmlIo.java:187)
>         at
> org.apache.cactus.integration.ant.deployment.DefaultEarArchive.getApp
> licationXml(DefaultEarArchive.java:126)
>         at
> org.apache.cactus.integration.ant.container.EarParser.getUriOfCactifi
> edWebModule(EarParser.java:200)
>         at
> org.apache.cactus.integration.ant.container.EarParser.parse(EarParser
> .java:98)
>         ... 10 more
> --- Nested Exception ---
> java.net.UnknownHostException: java.sun.com
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
>         at java.net.Socket.connect(Socket.java:452)
>         at java.net.Socket.connect(Socket.java:402)
>         at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
>         at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
>         at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
>         at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
>         at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
>         at sun.net.www.http.HttpClient.New(HttpClient.java:339)
>         at sun.net.www.http.HttpClient.New(HttpClient.java:320)
>         at sun.net.www.http.HttpClient.New(HttpClient.java:315)
>         at
> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
> ction.java:510)
>         at
> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
> .java:487)
>         at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
> nection.java:615)
>         at java.net.URL.openStream(URL.java:913)
>         at
> org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown So
> urce)
>         at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
> Source)
>         at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown
> Source
> )
>         at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown
> Sourc
> e)
>         at
> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(
> Unknown Source)
>         at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
> known Source)
>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> Source)
>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> Source)
>         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>         at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>         at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown
> Source)
>         at
> javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:76)
>         at
> org.apache.cactus.integration.ant.deployment.ApplicationXmlIo.parseAp
> plicationXml(ApplicationXmlIo.java:187)
>         at
> org.apache.cactus.integration.ant.deployment.DefaultEarArchive.getApp
> licationXml(DefaultEarArchive.java:126)
>         at
> org.apache.cactus.integration.ant.container.EarParser.getUriOfCactifi
> edWebModule(EarParser.java:200)
>         at
> org.apache.cactus.integration.ant.container.EarParser.parse(EarParser
> .java:98)
>         at
> org.apache.cactus.integration.ant.CactusTask.execute(CactusTask.java:
> 190)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
>         at org.apache.tools.ant.Task.perform(Task.java:341)
>         at org.apache.tools.ant.Target.execute(Target.java:309)
>         at org.apache.tools.ant.Target.performTasks(Target.java:336)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
>         at org.apache.tools.ant.Main.runBuild(Main.java:609)
>         at org.apache.tools.ant.Main.start(Main.java:196)
>         at org.apache.tools.ant.Main.main(Main.java:235)
> 
> However if i try to execute the same "ejb.jar" file on Jboss it deploys
> successfully !
> I dont know what the error is?
> Can anybody help me please?
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!


Mime
View raw message