Error trying to execute openstream on a remote resource when using a build compiled with ANT.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Miguel_Antochiw
Posted On:   Monday, January 31, 2011 09:58 PM

I'm trying to build an EAR using ANT, but the build compiled with ANT is behaving different from the one compiled from WebSphere. The same code, compiled with Websphere works with no problems, but compiled with ANT is crashing. To be more specific, I'm trying to read an XML file from a remote resource using a Url Object. The resource path is on an XML file. The Steps are as follows: - Get the url path from the XML file [Good] - Create an instance of an Url Object and assign the url read [GOOD] - Open the remote resource [Bad - Crashes using ANT generated EAR] Im printing out the URL and the results are as follows: - When reading the value is "h   More>>

I'm trying to build an EAR using ANT, but the build compiled with ANT is behaving different from the one compiled from WebSphere. The same code, compiled with Websphere works with no problems, but compiled with ANT is crashing.



To be more specific, I'm trying to read an XML file from a remote resource using a Url Object. The resource path is on an XML file. The Steps are as follows:



- Get the url path from the XML file [Good]

- Create an instance of an Url Object and assign the url read [GOOD]

- Open the remote resource [Bad - Crashes using ANT generated EAR]



Im printing out the URL and the results are as follows:



- When reading the value is "http://domain.com:port/..."

- Assign to Url and open the resource. Crashes and displays the url as "http:domain.com:port..."



It is converting the remote url to a local url, inverting the slashes and changing the double slash for a single slash.



I'm using the same build.xml as WebSphere. I tried changing the AND version and even changing the compiler used by JAVAC and the result is the same. Any idea?



Diagnostics (ant -diagnostics):

----------------------------

Unable to locate tools.jar. Expected to find it in C:Program FilesIBMJava60lib ools.jar

------- Ant diagnostics report -------

Apache Ant(TM) version 1.8.2 compiled on December 20 2010


-------------------------------------------

Implementation Version

-------------------------------------------

core tasks : 1.8.2 in file:/C:/apache-ant-1.8.2/lib/ant.jar

-------------------------------------------

ANT PROPERTIES

-------------------------------------------

ant.version: Apache Ant(TM) version 1.8.2 compiled on December 20 2010

ant.java.version: 1.6

Is this the Apache Harmony VM? no

Is this the Kaffe VM? no

Is this gij/gcj? no

ant.core.lib: C:apache-ant-1.8.2libant.jar

ant.home: C:apache-ant-1.8.2



-------------------------------------------

ANT_HOME/lib jar listing

-------------------------------------------

ant.home: C:apache-ant-1.8.2

activation-1.1.jar (62983 bytes)

ant-antlr.jar (5748 bytes)

ant-apache-bcel.jar (8746 bytes)

ant-apache-bsf.jar (3931 bytes)

ant-apache-log4j.jar (3059 bytes)

ant-apache-oro.jar (39638 bytes)

ant-apache-regexp.jar (3761 bytes)

ant-apache-resolver.jar (4084 bytes)

ant-apache-xalan2.jar (2295 bytes)

ant-commons-logging.jar (3913 bytes)

ant-commons-net.jar (85511 bytes)

ant-jai.jar (22265 bytes)

ant-javamail.jar (7960 bytes)

ant-jdepend.jar (8222 bytes)

ant-jmf.jar (6739 bytes)

ant-jsch.jar (40175 bytes)

ant-junit.jar (102220 bytes)

ant-junit4.jar (7120 bytes)

ant-launcher.jar (12322 bytes)

ant-netrexx.jar (10392 bytes)

ant-swing.jar (7555 bytes)

ant-testutil.jar (15201 bytes)

ant.jar (1933743 bytes)

antlr-2.7.7.jar (445288 bytes)

asm-2.2.3.jar (34832 bytes)

asm-commons-2.2.3.jar (15114 bytes)

asm-tree-2.2.3.jar (16248 bytes)

bcel-5.1.jar (515920 bytes)

bsf-2.4.0.jar (113369 bytes)

bsh-2.0b4.jar (281694 bytes)

bsh-core-2.0b4.jar (143992 bytes)

commons-logging-1.0.4.jar (38015 bytes)

commons-logging-api-1.1.jar (44598 bytes)

commons-net-1.4.1.jar (180792 bytes)

jai-codec-1.1.3.jar (258160 bytes)

jai-core-1.1.3.jar (1900631 bytes)

jasper-compiler-4.1.36.jar (184124 bytes)

jasper-runtime-4.1.36.jar (72397 bytes)

jdepend-2.9.1.jar (57933 bytes)

jdtCompilerAdapter.jar (12610 bytes)

jruby-0.9.8.jar (1683526 bytes)

js-1.6R7.jar (813521 bytes)

jsch-0.1.42.jar (185746 bytes)

junit-4.8.1.jar (237047 bytes)

log4j-1.2.14.jar (367444 bytes)

mail-1.4.jar (388864 bytes)

maven-artifact-ant-2.0.4-dep.jar (887507 bytes)

NetRexxC.jar (355931 bytes)

org.eclipse.jdt.core_3.2.0.v_671.jar (3902645 bytes)

oro-2.0.8.jar (65261 bytes)

regexp-1.2.jar (29871 bytes)

regexp-1.3.jar (25429 bytes)

serializer-2.7.1.jar (278281 bytes)

servlet-api-2.3.jar (77977 bytes)

which-1.0.jar (17398 bytes)

xalan-2.7.1.jar (3176148 bytes)

xml-apis-1.3.04.jar (194354 bytes)

xml-resolver-1.2.jar (84091 bytes)



-------------------------------------------

USER_HOME/.ant/lib jar listing

-------------------------------------------

user.home: C:Documents and Settings[XXX]

No such directory.



-------------------------------------------

Tasks availability

-------------------------------------------

wlrun : Not Available (the implementation class is not present)

stlist : Not Available (the implementation class is not present)

starteam : Not Available (the implementation class is not present)

stlabel : Not Available (the implementation class is not present)

stcheckin : Not Available (the implementation class is not present)

stcheckout : Not Available (the implementation class is not present)

ejbc : Not Available (the implementation class is not present)

wlstop : Not Available (the implementation class is not present)

ddcreator : Not Available (the implementation class is not present)

A task being missing/unavailable should only matter if you are trying to use it



-------------------------------------------

org.apache.env.Which diagnostics

-------------------------------------------

#---- BEGIN: Which report

Which.version=Which.java:($Revision: 1.2 $) WhichJar.java:($Revision: 1.2 $)

java.version=1.6.0

file.encoding=Cp1252

java.ext.dirs=C:Program FilesIBMJava60jrelibext

java.class.path=C:apache-ant-1.8.2libant-launcher.jar;C:apache-ant-1.8.2 in.;C:Program



FilesJavajre6libextQTJava.zip;C:PROGRA~1IBMSQLLIBjavadb2java.zip;C:PROGRA~1IBMSQLLIBjavadb2jcc.jar;C:PROGRA~1IBMSQLLIBjavasqlj.zip;C:PROGRA~1IBMSQLLIBjavadb2jcc_license_cu.jar;C:PROGRA~1IBMSQLLIB in;C:PROGRA~1IBMSQLLIBjavacommon.jar;C:apache-ant-1.8.2libactivation-1.1.jar;C:apache-ant-1.8.2libant-antlr.jar;C:apache-ant-1.8.2libant-apache-
bcel.jar;C:apache-ant-1.8.2libant-apache-bsf.jar;C:apache-ant-1.8.2libant-apache-log4j.jar;C:apache-ant-1.8.2libant-apache-oro.jar;C:apache-ant-1.8.2libant-apache-regexp.jar;C:apache-ant-1.8.2libant-apache-resolver.jar;C:apache-ant-1.8.2libant-apachexalan2.jar;C:apache-ant-1.8.2libant-commons-logging.jar;C:apache-ant-1.8.2libant-commons-net.jar;C:apache-ant-1.8.2libant-jai.jar;C:apache-ant-1.8.2libant-javamail.jar;C:apache-ant-1.8.2libant-jdepend.jar;C:apache-ant-1.8.2libant-jmf.jar;C:apache-ant-1.8.2libant-jsch.jar;C:apache-ant-1.8.2libant-junit.jar;C:apache-ant-1.8.2libant-junit4.jar;C:apache-ant-1.8.2libant-launcher.jar;C:apache-ant-1.8.2libant-netrexx.jar;C:apache-ant-1.8.2libant-swing.jar;C:apache-ant-1.8.2libant-testutil.jar;C:apache-ant-1.8.2libant.jar;C:apache-ant-1.8.2libantlr-2.7.7.jar;C:apache-ant-1.8.2libasm-2.2.3.jar;C:apache-ant-1.8.2libasm-commons-2.2.3.jar;C:apache-ant-1.8.2libasm-tree-2.2.3.jar;C:apache-ant-1.8.2lib cel-5.1.jar;C:apache-ant-1.8.2lib sf-2.4.0.jar;C:apache-ant-1.8.2lib sh-2.0b4.jar;C:apache-ant-1.8.2lib sh-core-2.0b4.jar;C:apache-ant-1.8.2libcommons-logging-1.0.4.jar;C:apache-ant-1.8.2libcommons-logging-api-1.1.jar;C:apache-ant-1.8.2libcommons-net-1.4.1.jar;C:apache-ant-1.8.2libjai-codec-1.1.3.jar;C:apache-ant-1.8.2libjai-core-1.1.3.jar;C:apache-ant-1.8.2libjasper-compiler-4.1.36.jar;C:apache-ant-1.8.2libjasper-runtime-4.1.36.jar;C:apache-ant-1.8.2libjdepend-2.9.1.jar;C:apache-ant-1.8.2libjdtCompilerAdapter.jar;C:apache-ant-1.8.2libjruby-0.9.8.jar;C:apache-ant-1.8.2libjs-1.6R7.jar;C:apache-ant-1.8.2libjsch-0.1.42.jar;C:apache-ant-1.8.2libjunit-4.8.1.jar;C:apache-ant-1.8.2liblog4j-1.2.14.jar;C:apache-ant-1.8.2libmail-1.4.jar;C:apache-ant-1.8.2libmaven-artifact-ant-2.0.4-dep.jar;C:apache-ant-1.8.2libNetRexxC.jar;C:apache-ant-1.8.2liborg.eclipse.jdt.core_3.2.0.v_671.jar;C:apache-ant-1.8.2liboro-2.0.8.jar;C:apache-ant-1.8.2lib
egexp-1.2.jar;C:apache-ant-1.8.2lib
egexp-1.3.jar;C:apache-ant-1.8.2libserializer-2.7.1.jar;C:apache-ant-1.8.2libservlet-api-2.3.jar;C:apache-ant-1.8.2libwhich-1.0.jar;C:apache-ant-1.8.2libxalan-2.7.1.jar;C:apache-ant-1.8.2libxml-apis-1.3.04.jar;C:apache-ant-1.8.2libxml-resolver-1.2.jar
os.name=Windows XP
java.vendor=IBM Corporation
sun.boot.class.path=C:Program FilesIBMJava60jrelibvm.jar;C:Program FilesIBMJava60jrelibannotation.jar;C:Program FilesIBMJava60jrelib eans.jar;C:Program FilesIBMJava60jrelibjava.util.jar;C:Program FilesIBMJava60jrelibjndi.jar;C:Program FilesIBMJava60jreliblogging.jar;C:Program FilesIBMJava60jrelibsecurity.jar;C:Program FilesIBMJava60jrelibsql.jar;C:Program FilesIBMJava60jrelibibmorb.jar;C:Program FilesIBMJava60jrelibibmorbapi.jar;C:Program FilesIBMJava60jrelibibmcfw.jar;C:Program FilesIBMJava60jrelib
t.jar;C:Program FilesIBMJava60jrelibcharsets.jar;C:Program FilesIBMJava60jrelib
esources.jar;C:Program FilesIBMJava60jrelibibmpkcs.jar;C:Program FilesIBMJava60jrelibibmcertpathfw.jar;C:Program FilesIBMJava60jrelibibmjgssfw.jar;C:Program FilesIBMJava60jrelibibmjssefw.jar;C:Program FilesIBMJava60jrelibibmsaslfw.jar;C:Program FilesIBMJava60jrelibibmjcefw.jar;C:Program FilesIBMJava60jrelibibmjgssprovider.jar;C:Program FilesIBMJava60jrelibibmjsseprovider2.jar;C:Program FilesIBMJava60jrelibibmcertpathprovider.jar;C:Program FilesIBMJava60jrelibibmxmlcrypto.jar;C:Program FilesIBMJava60jrelibmanagement-agent.jar;C:Program FilesIBMJava60jrelibxml.jar;C:Program FilesIBMJava60jrelibjlm.jar;C:Program FilesIBMJava60jrelibjavascript.jar

java.runtime.name=Java(TM) SE Runtime Environment

#---- END: Which report



-------------------------------------------

XML Parser information

-------------------------------------------

XML Parser : org.apache.xerces.jaxp.SAXParserImpl

XML Parser Location: unknown

Namespace-aware parser : org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser

Namespace-aware parser Location: unknown



-------------------------------------------

XSLT Processor information

-------------------------------------------

XSLT Processor : org.apache.xalan.transformer.TransformerIdentityImpl
XSLT Processor Location: unknown



-------------------------------------------

System properties

-------------------------------------------

java.vendor : IBM Corporation

sun.java.launcher : SUN_STANDARD

os.name : Windows XP

sun.boot.class.path : C:Program FilesIBMJava60jrelibvm.jar;C:Program
FilesIBMJava60jrelibannotation.jar;C:Program FilesIBMJava60jrelib eans.jar;C:Program FilesIBMJava60jrelibjava.util.jar;C:Program FilesIBMJava60jrelibjndi.jar;C:Program FilesIBMJava60jreliblogging.jar;C:Program FilesIBMJava60jrelibsecurity.jar;C:Program FilesIBMJava60jrelibsql.jar;C:Program FilesIBMJava60jrelibibmorb.jar;C:Program FilesIBMJava60jrelibibmorbapi.jar;C:Program FilesIBMJava60jrelibibmcfw.jar;C:Program FilesIBMJava60jrelib
t.jar;C:Program FilesIBMJava60jrelibcharsets.jar;C:Program FilesIBMJava60jrelib
esources.jar;C:Program FilesIBMJava60jrelibibmpkcs.jar;C:Program FilesIBMJava60jrelibibmcertpathfw.jar;C:Program FilesIBMJava60jrelibibmjgssfw.jar;C:Program FilesIBMJava60jrelibibmjssefw.jar;C:Program FilesIBMJava60jrelibibmsaslfw.jar;C:Program FilesIBMJava60jrelibibmjcefw.jar;C:Program FilesIBMJava60jrelibibmjgssprovider.jar;C:Program FilesIBMJava60jrelibibmjsseprovider2.jar;C:Program FilesIBMJava60jrelibibmcertpathprovider.jar;C:Program FilesIBMJava60jrelibibmxmlcrypto.jar;C:Program FilesIBMJava60jrelibmanagement-agent.jar;C:Program FilesIBMJava60jrelibxml.jar;C:Program FilesIBMJava60jrelibjlm.jar;C:Program FilesIBMJava60jrelibjavascript.jar

sun.java2d.fontpath :

java.vm.specification.vendor : Sun Microsystems Inc.

ant.home : C:apache-ant-1.8.2

java.runtime.version : jvmwi3260-20080816_22093

user.name : [XXX]

java.compiler : j9jit24

os.encoding : UTF8

com.ibm.util.extralibs.properties :

com.ibm.jcl.checkClassPath :

user.language : en

com.ibm.oti.vm.bootstrap.library.path : C:Program FilesIBMJava60jre in

sun.boot.library.path : C:Program FilesIBMJava60jre in

java.version : 1.6.0

user.timezone : America/New_York

sun.arch.data.model : 32

com.ibm.zero.version : 1

java.endorsed.dirs : C:Program FilesIBMJava60jrelibendorsed

com.ibm.oti.vm.library.version : 24

sun.jnu.encoding : Cp1252

jxe.current.romimage.version : 13

file.separator :

java.specification.name : Java Platform API Specification

java.class.version : 50.0

user.country : US

java.home : C:Program FilesIBMJava60jre

java.vm.info : J2RE 1.6.0 IBM J9 2.4 Windows XP x86-32
jvmwi3260-20080816_22093 (JIT enabled,

AOT enabled)

J9VM - 20080816_022093_lHdSMr

JIT - r9_20080721_1330ifx2

GC - 20080724_AA

os.version : 5.1 build 2600 Service Pack 3

java.awt.fonts :

path.separator : ;

java.vm.version : 2.4

java.util.prefs.PreferencesFactory :
java.util.prefs.WindowsPreferencesFactory
user.variant :

ant.library.dir : C:apache-ant-1.8.2lib

console.encoding : Cp437

java.awt.printerjob : sun.awt.windows.WPrinterJob

sun.io.unicode.encoding : UnicodeLittle

awt.toolkit : sun.awt.windows.WToolkit

ibm.signalhandling.sigint : true

java.assistive : ON

user.home : C:Documents and Settings[XXX]

com.ibm.cpu.endian : little

java.specification.vendor : Sun Microsystems Inc.

ibm.signalhandling.sigchain : true

java.library.path : C:Program FilesIBMJava60jre in;.;%commonprogramfiles%microsoft sharedwindows live;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSsystem32wbem;c:program fileswinmerge;c:program filescommon files eleca shared;c:javajre6 in;c:dmserver ools;c:program filesputty;c:program filesquicktimeqtsystem;c:program filesibmgsk8lib;C:PROGRA~1IBMSQLLIBBIN;C:PROGRA~1IBMSQLLIBFUNCTION;C:PROGRA~1IBMSQLLIBSAMPLESREPL;C:Program FilesTortoiseSVN in;C:apache-ant-1.8.2 in;C:Program FilesCommon FilesMicrosoft SharedWindows Live;C:Program FilesCVSNT;C:Program FilesPalmSDK in;C:Program FilesPalmSDK in
ovacom
java.vendor.url : http://www.ibm.com/
java.vm.vendor : IBM Corporation
java.fullversion : J2RE 1.6.0 IBM J9 2.4 Windows XP x86-32 jvmwi3260-20080816_22093 (JIT enabled, AOT enabled)

J9VM - 20080816_022093_lHdSMr

JIT - r9_20080721_1330ifx2

GC - 20080724_AA

java.runtime.name : Java(TM) SE Runtime Environment

sun.java.command : org.apache.tools.ant.launch.Launcher -cp .;C:Program FilesJavajre6libextQTJava.zip;C:PROGRA~1IBMSQLLIBjavadb2java.zip;C:PROGRA~1IBMSQLLIBjavadb2jcc.jar;C:PROGRA~1IBMSQLLIBjavasqlj.zip;C:PROGRA~1IBMSQLLIBjavadb2jcc_license_cu.jar;C:PROGRA~1IBMSQLLIB in;C:PROGRA~1IBMSQLLIBjavacommon.jar -diagnostics

java.class.path : C:apache-ant-1.8.2libant-launcher.jar;C:apache-ant-1.8.2 in.;C:Program FilesJavajre6libextQTJava.zip;C:PROGRA~1IBMSQLLIBjavadb2java.zip;C:PROGRA~1IBMSQLLIBjavadb2jcc.jar;C:PROGRA~1IBMSQLLIBjavasqlj.zip;C:PROGRA~1IBMSQLLIBjavadb2jcc_license_cu.jar;C:PROGRA~1IBMSQLLIB in;C:PROGRA~1IBMSQLLIBjavacommon.jar;C:apache-ant-1.8.2libactivation-1.1.jar;C:apache-ant-1.8.2libant-antlr.jar;C:apache-ant-1.8.2libant-apache-bcel.jar;C:apache-ant-1.8.2libant-apache-bsf.jar;C:apache-ant-1.8.2libant-apache-log4j.jar;C:apache-ant-1.8.2libant-apache-oro.jar;C:apache-ant-1.8.2libant-apache-regexp.jar;C:apache-ant-1.8.2libant-apache-resolver.jar;C:apache-ant-1.8.2libant-apache-xalan2.jar;C:apache-ant-1.8.2libant-commons-logging.jar;C:apache-ant-1.8.2libant-commons-net.jar;C:apache-ant-1.8.2libant-jai.jar;C:apache-ant-1.8.2libant-javamail.jar;C:apache-ant-1.8.2libant-jdepend.jar;C:apache-ant-1.8.2libant-jmf.jar;C:apache-ant-1.8.2libant-jsch.jar;C:apache-ant-1.8.2libant-junit.jar;C:apache-ant-1.8.2libant-junit4.jar;C:apache-ant-1.8.2libant-launcher.jar;C:apache-ant-1.8.2libant-netrexx.jar;C:apache-ant-1.8.2libant-swing.jar;C:apache-ant-1.8.2libant-testutil.jar;C:apache-ant-1.8.2libant.jar;C:apache-ant-1.8.2libantlr-2.7.7.jar;C:apache-ant-1.8.2libasm-2.2.3.jar;C:apache-ant-1.8.2libasm-commons-2.2.3.jar;C:apache-ant-1.8.2libasm-tree-2.2.3.jar;C:apache-ant-1.8.2lib cel-5.1.jar;C:apache-ant-1.8.2lib sf-2.4.0.jar;C:apache-ant-1.8.2lib sh-2.0b4.jar;C:apache-ant-1.8.2lib sh-core-2.0b4.jar;C:apache-ant-1.8.2libcommons-logging-1.0.4.jar;C:apache-ant-1.8.2libcommons-logging-api-1.1.jar;C:apache-ant-1.8.2libcommons-net-1.4.1.jar;C:apache-ant-1.8.2libjai-codec-1.1.3.jar;C:apache-ant-1.8.2libjai-core-1.1.3.jar;C:apache-ant-1.8.2libjasper-compiler-4.1.36.jar;C:apache-ant-1.8.2libjasper-runtime-4.1.36.jar;C:apache-ant-1.8.2libjdepend-2.9.1.jar;C:apache-ant-1.8.2libjdtCompilerAdapter.jar;C:apache-ant-1.8.2libjruby-0.9.8.jar;C:apache-ant-1.8.2libjs-1.6R7.jar;C:apache-ant-1.8.2libjsch-0.1.42.jar;C:apache-ant-1.8.2libjunit-4.8.1.jar;C:apache-ant-1.8.2liblog4j-1.2.14.jar;C:apache-ant-1.8.2libmail-1.4.jar;C:apache-ant-1.8.2libmaven-artifact-ant-2.0.4-dep.jar;C:apache-ant-1.8.2libNetRexxC.jar;C:apache-ant-1.8.2liborg.eclipse.jdt.core_3.2.0.v_671.jar;C:apache-ant-1.8.2liboro-2.0.8.jar;C:apache-ant-1.8.2lib
egexp-1.2.jar;C:apache-ant-1.8.2lib
egexp-1.3.jar;C:apache-ant-1.8.2libserializer-2.7.1.jar;C:apache-ant-1.8.2libservlet-api-2.3.jar;C:apache-ant-1.8.2libwhich-1.0.jar;C:apache-ant-1.8.2libxalan-2.7.1.jar;C:apache-ant-1.8.2libxml-apis-1.3.04.jar;C:apache-ant-1.8.2libxml-resolver-1.2.jar

java.vm.specification.name : Java Virtual Machine Specification

java.vm.specification.version : 1.0

java.io.tmpdir : C:DOCUME~1[XXX]LOCALS~1Temp

java.jcl.version : 20080808_02

ibm.system.encoding : Cp1252

os.arch : x86

java.awt.graphicsenv : sun.awt.Win32GraphicsEnvironment

ibm.signalhandling.rs : false

java.ext.dirs : C:Program FilesIBMJava60jrelibext

user.dir : C:apache-ant-1.8.2 in

line.separator :

java.vm.name : IBM J9 VM

com.ibm.oti.shared.enabled : false

com.ibm.vm.bitmode : 32

jxe.lowest.romimage.version : 13

file.encoding : Cp1252

com.ibm.oti.jcl.build : 20080613_1526

java.specification.version : 1.6

com.ibm.oti.configuration : scar



-------------------------------------------

Temp dir

-------------------------------------------

Temp dir is C:DOCUME~1[XXX]LOCALS~1Temp

Temp dir is writeable

Temp dir alignment with system clock is 0 ms



-------------------------------------------

Locale information

-------------------------------------------

Timezone Eastern Standard Time offset=-18000000


-------------------------------------------

Proxy information

-------------------------------------------

Java1.5+ proxy settings:

Direct connection

   <<Less
About | Sitemap | Contact