The new JMeter uses a URLClassLoader to load classes (this allows JMeter to
be run without complex scripts to set up the classpath), and, I suspect this
is causing some problem in 1.3

It seems the URLClassLoader is less than perfect.  I had to make a small
modification to JTidy's source code to fix a problem loading a static inner
class that referenced a static public method of it's parent.  Pretty obscure
- but fortunately easy to fix.

Your test is using the normal class loader, so, no problem shows.

-Mike

> -----Original Message-----
> From: Lowe, Jeff [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 20, 2002 1:44 PM
> To: 'JMeter Developers List'
> Subject: RE: Parser error
> 
> 
> The following isolated code runs fine under 1.3:
> 
> ---------------------------------------------------------
> import javax.xml.parsers.SAXParserFactory;
> 
> public class Test {
>     public static void main(String args[]) {
>         SAXParserFactory xmlParser = SAXParserFactory.newInstance();
>         System.out.println( xmlParser );    }
> 
> }
> ---------------------------------------------------------
> java -cp .;C:\Projects\jakarta-jmeter\lib\xerces.jar Test
> org.apache.xerces.jaxp.SAXParserFactoryImpl@2dd2dd
> ---------------------------------------------------------
> 
> Any ideas on what can be causing this problem?
> 
> 
> 
> -----Original Message-----
> From: Stover, Michael [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, June 20, 2002 11:29 AM
> To: 'JMeter Developers List'
> Subject: RE: Parser error
> 
> 
> Ok, I'm guessing it's a JDK version problem, and I'll see if 
> I can make some
> changes that will work for both 1.3 and 1.4
> 
> -Mike
> 
> > -----Original Message-----
> > From: Lowe, Jeff [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, June 20, 2002 11:15 AM
> > To: 'JMeter Developers List'
> > Subject: RE: Parser error
> > 
> > 
> > >> Would you be willing (and able) to load JDK1.4 on a
> > machine somewhere and
> > try there?
> > 
> > I'll try that as a last resort.  We're a 1.3 shop right now,
> > so I need to
> > get this to run on 1.3.
> > 
> > >> Your LOCALCLASSPATH environment variable looks like the
> > old JMeter stuff
> > 
> > This gets set in build.bat. Enclosing the batch script within
> > setlocal and
> > endlocal will keep it contained.  No impact on the problem though.
> > 
> > >> And last, do you have a SAX parser in your JRE's ext directory?
> > 
> > Nothing in lib/ext.
> > 
> > 
> > In the code, I tried adding the following line, which 
> should tell the 
> > factory what implementation to use:
> >  
> > System.setProperty("javax.xml.parsers.SAXParserFactory","org.a
> pache.xerces.j
> > axp.SAXParserFactoryImpl");
> > 
> > No luck.  Finally I changed:
> >   temp = SAXParserFactory.newInstance();
> > To:
> >   temp = new org.apache.xerces.jaxp.SAXParserFactoryImpl();
> > 
> > This worked and the application ran fine.  I've run out of
> > ideas for the
> > moment.
> > 
> > -Jeff
> > 
> > 
> > 
> > 
> > 
> > -----Original Message-----
> > From: Mike Stover [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 19, 2002 8:54 PM
> > To: JMeter Developers List
> > Subject: RE: Parser error
> > 
> > 
> > Thanks.  Would you be willing (and able) to load JDK1.4 on 
> a machine 
> > somewhere and try there?  If there's an issue with JDK1.3, I should 
> > fix it.  I haven't
> > run 1.3 in a 
> > while, though.
> > 
> > Your LOCALCLASSPATH environment variable looks like the old
> > JMeter stuff.
> > You 
> > should get rid of it, and JMeter shouldn't recreate it 
> > anymore (so if it
> > does, that 
> > would indicate a problem too).
> > 
> > And last, do you have a SAX parser in your JRE's ext
> > directory?  The error
> > your 
> > getting I've seen before, and it was caused by a conflict 
> between the
> > xerces.jar file 
> > that comes with JMeter and a different (or older version of 
> > xerces) SAX
> > parser that 
> > the person had on their system.  Your classpath is empty, but I just
> > realized 
> > another way of adding jars to the system is to put them in the "ext"
> > directory of 
> > your JRE.  I also notice you have the J2EE stuff loaded - is 
> > that adding
> > jars to the 
> > system classpath in some hidden manner?
> > 
> > Do you have a clean machine you could install JMeter on and
> > experiment?  It 
> > could be informative.
> > 
> > Thanks again, I appreciate your efforts in helping me track
> > this problem
> > down.
> > 
> > -Mike
> > 
> > 
> > On 19 Jun 2002 at 18:04, Lowe, Jeff wrote:
> > 
> > > Did a cold reboot
> > > Got a fresh copy of source from CVS in a fresh directory 
> Did build 
> > > OK cd to /bin
> > > ran jmeter.bat
> > > 
> > > java.lang.reflect.InvocationTargetException:
> > > javax.xml.parsers.FactoryConfigurat
> > > ionError: Provider
> > org.apache.xerces.jaxp.SAXParserFactoryImpl not found
> > >         at
> > > 
> > javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactor
> > y.java:141)
> > >         at
> > org.apache.jmeter.util.JMeterUtils.<clinit>(JMeterUtils.java:100)
> > >         at
> > org.apache.jmeter.JMeter.initializeProperties(JMeter.java:194)
> > >         at org.apache.jmeter.JMeter.start(JMeter.java:139)
> > >         at java.lang.reflect.Method.invoke(Native Method)
> > >         at org.apache.jmeter.NewDriver.main(NewDriver.java:152)
> > > 
> > > My OS is WinXP
> > > Here are my system environment properties:
> > > 
> > > ANT_HOME=C:\jakarta-ant
> > > APPDATA=C:\Documents and Settings\jlowe\Application Data
> > > BUILDFILE=build.xml CLIENTNAME=Console
> > > CommonProgramFiles=C:\Program Files\Common Files
> > > ComSpec=C:\WINDOWS\system32\cmd.exe
> > > HOMEDRIVE=C:
> > > HOMEPATH=\Documents and Settings\jlowe
> > > J2EE_HOME=C:\j2sdkee1.3.1
> > > JAVA_HOME=C:\jdk1.3.1
> > > JUNIT_HOME=C:\junit3.7
> > >
> > LOCALCLASSPATH=C:\jdk1.3.1\lib\tools.jar;.\lib\ant-1.4.1.jar;.
> > \lib\avalon-ex
> > > cali
> > >
> > bur-4.1.jar;.\lib\avalon-framework-4.1.2.jar;.\lib\jakarta-ant
> > -1.4.1-optiona
> > > l.ja
> > >
> > r;.\lib\jakarta-oro-2.0.1.jar;.\lib\junit.jar;.\lib\log4j-core
> > .jar;.\lib\log
> > > 4j.j
> > > ar;.\lib\Tidy.jar;.\lib\util.jar;.\lib\xerces.jar
> > > NUMBER_OF_PROCESSORS=1
> > >
> > OLDPATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbe
> > m;C:\jdk1.3.1\
> > > bin;
> > > C:\j2sdkee1.3.1\bin;C:\jakarta-ant\bin;C:\Program 
> Files\GNU\WinCvs 
> > > 1.2;C:\Progra m Files\Microsoft SQL Server\80\Tools\BINN
> > > OS=Windows_NT
> > >
> > Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C
> > :\jdk1.3.1\bin
> > > ;C:\
> > > j2sdkee1.3.1\bin;C:\jakarta-ant\bin;C:\Program Files\GNU\WinCvs 
> > > 1.2;C:\Program F iles\Microsoft SQL Server\80\Tools\BINN
> > > PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
> > > PROCESSOR_ARCHITECTURE=x86
> > > PROCESSOR_IDENTIFIER=x86 Family 15 Model 1 Stepping 2, 
> GenuineIntel
> > > PROCESSOR_LEVEL=15
> > > PROCESSOR_REVISION=0102
> > > ProgramFiles=C:\Program Files
> > > PROMPT=$P$G
> > > SESSIONNAME=Console
> > > SystemDrive=C:
> > > SystemRoot=C:\WINDOWS
> > > TEMP=C:\DOCUME~1\jlowe\LOCALS~1\Temp
> > > TMP=C:\DOCUME~1\jlowe\LOCALS~1\Temp
> > > USERNAME=jlowe
> > > USERPROFILE=C:\Documents and Settings\jlowe
> > > windir=C:\WINDOWS
> > > 
> > > 
> > > 
> > > 
> > > -----Original Message-----
> > > From: Mike Stover [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, June 19, 2002 5:25 PM
> > > To: JMeter Developers List
> > > Subject: RE: Parser error
> > > 
> > > 
> > > Tell me about your setup:
> > > OS
> > > JDK version
> > > Any changes to JMeter files?  Did you build this over an
> > older JMeter
> > > version, or is it "fresh"?
> > > 
> > > -Mike
> > > 
> > > On 19 Jun 2002 at 15:53, Lowe, Jeff wrote:
> > > 
> > > > I don't have a classpath environment variable defined.
> > > > 
> > > > -----Original Message-----
> > > > From: Mike Stover [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, June 19, 2002 2:21 PM
> > > > To: JMeter Developers List
> > > > Subject: Re: Parser error
> > > > 
> > > > 
> > > > Does your system classpath have anything in it?  If so,
> > try clearing
> > > > it first
> > > > 
> > > > -Mike
> > > > 
> > > > On 19 Jun 2002 at 13:17, Lowe, Jeff wrote:
> > > > 
> > > > > I'm embarking on some JMeter development and just got 
> the latest 
> > > > > from CVS. It builds fine but when I run it I get the 
> following 
> > > > > error:
> > > > > 
> > > > > java.lang.reflect.InvocationTargetException: 
> > > > >   javax.xml.parsers.FactoryConfigurationError:
> > > > >   Provider 
> org.apache.xerces.jaxp.SAXParserFactoryImpl not found
> > > > >      at
> > > > >
> > > 
> > 
> javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:1
> > > 41)
> > > > >      at
> > > org.apache.jmeter.util.JMeterUtils.<clinit>(JMeterUtils.java:100)
> > > > >      at
> > org.apache.jmeter.JMeter.initializeProperties(JMeter.java:194)
> > > > >      at org.apache.jmeter.JMeter.start(JMeter.java:139)
> > > > >      at java.lang.reflect.Method.invoke(Native Method)
> > > > >      at org.apache.jmeter.NewDriver.main(NewDriver.java:152)
> > > > > 
> > > > > I'm puzzled why it can't find SAXParserFactoryImpl
> > which is in the
> > > > > same jar as SAXParserFactory (which it obviously found).
> > > > > 
> > > > > Thanks for the help.
> > > > > -Jeff
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > > <mailto:[EMAIL PROTECTED]>
> > > > > For additional commands, e-mail:
> > > > > <mailto:[EMAIL PROTECTED]>
> > > > > 
> > > > 
> > > > 
> > > > 
> > > > --
> > > > Michael Stover
> > > > [EMAIL PROTECTED]
> > > > Yahoo IM: mstover_ya
> > > > ICQ: 152975688
> > > > 
> > > > --
> > > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail: 
> > > > <mailto:[EMAIL PROTECTED]>
> > > > 
> > > > --
> > > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail: 
> > > > <mailto:[EMAIL PROTECTED]>
> > > > 
> > > 
> > > 
> > > 
> > > --
> > > Michael Stover
> > > [EMAIL PROTECTED]
> > > Yahoo IM: mstover_ya
> > > ICQ: 152975688
> > > 
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > 
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > 
> > 
> > 
> > 
> > --
> > Michael Stover
> > [EMAIL PROTECTED]
> > Yahoo IM: mstover_ya
> > ICQ: 152975688
> > 
> > --
> > To unsubscribe, e-mail:   
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > 
> > --
> > To unsubscribe, e-mail:   
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to