db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nirmal Fernando <nirmal070...@gmail.com>
Subject Re: Enabling XML Operations: Setting XALAN in CLASSPATH
Date Sat, 17 Apr 2010 14:16:22 GMT
Hi Knut,

Thanks for recommending me to start ij like:
          java org.apache.derby.tools.ij

After I issuing this xml operations worked perfectly ok.

But when I issue this: java -jar derbyrun.jar ij
         it failed and providing that error about classpath not containing
xalan.jar.

So, this arose questions why this happens like this, and what is the best
way to start ij.

If any of you can clarify that would be great.

Thanks for all the support by all of you.



On Sat, Apr 17, 2010 at 4:15 PM, Knut Anders Hatlen <Knut.Hatlen@sun.com>wrote:

> On 04/17/10 08:22 AM, Nirmal Fernando wrote:
> > Hi,
> >
> > On Fri, Apr 16, 2010 at 10:37 PM, Rick Hillegas
> > <rick.hillegas@oracle.com <mailto:rick.hillegas@oracle.com>> wrote:
> >
> >     Hi Nirmal,
> >
> >     In my classpath, the tools/java jars are included before the Derby
> >     jars. But I don't think that's significant. If I were debugging
> >     this from your end, the next experiments I would try would be:
> >
> >     o Try running one of the xalan classes as a java program. If you
> >     get a ClassNotFoundException, then something is wrong with the
> >     classpath. If you get an exception complaining that the class
> >     doesn't have a main() entry point, then the classpath is good.
> >
> >
> > I checked for this earlier, it was fine --> Xalan works fine.
> >
> >
> >     o If the first experiment shows that the classpath is good, then
> >     start looking into why ij is picking up a different classpath than
> >     the one you are echoing.
> >
> >
> > Yes, I think this is the case. I verified this by deleting the
> > classpath variable (ij was still runnable).
> >
> > Then I tried issuing following command:
> >
> > java -cp
> >
> C:\OtherNirmal\GSoC\Code\tools\java\xalan.jar;C:\OtherNirmal\GSoC\Code\tools\java\xercesImpl.jar;C:\OtherNirmal\GSoC
> >
> \Code\tools\java\serializer.jar;C:\OtherNirmal\GSoC\Code\tools\java\xml-apis.jar
> >  -jar derbyrun.jar ij
> >
>
> Hi Nirmal,
>
> When you give a -jar argument to java, the -cp argument and the
> CLASSPATH environment variable are ignored. See here:
> http://java.sun.com/javase/6/docs/technotes/tools/solaris/java.html
>
> It says: "When you use [the -jar] option, the JAR file is the source of
> all user classes, and other user class path settings are ignored."
>
> So I think you need to set up your classpath to point to xalan.jar and
> derbyrun.jar, and then start ij like this:
>
> java org.apache.derby.tools.ij
>
> --
> Knut Anders
>
>


-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.

Mime
View raw message