This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Trying to embed gnu.xml.dom.DomDocumentBuilderFactory


Mohsen Saboorian writes:
 > On 4/22/07, Andrew Haley <aph-gcc@littlepinkcloud.com> wrote:
 > > Mohsen Saboorian writes:
 > >  > On 4/21/07, Andrew Haley <aph@littlepinkcloud.com> wrote:
 > >  > > Alternatively, perhaps you could link explicitly against all the XML
 > >  > > object files.
 > >  >
 > >  > Thanks for the help.
 > >  >
 > >  > I'll give scripts/makemake.tcl a try and tell you about the result ASAP.
 > >  >
 > >  > If I understand correctly you mean that currently it is possible to
 > >  > explicitly link my app with XercesImpl object file. I tried XercesImpl
 > >  > earlier and it doesn't work (NoClassDefFoundError for xerces class
 > >  > DocumentBuilderFactoryImpl if I'm correct).
 > >
 > > Assuming you want to use Xerces, yes.  I think you're wrong to say
 > > that doing so doesn't work.  I'm certain that it does help, it just
 > > isn't sufficient.
 > 
 > Andrew, I tried again to compile my app with xercesImpl, hardcoding:
 > DocumentBuilderFactory documentBuilderFactory =
 >     new org.apache.xerces.jaxp.DocumentBuilderFactoryImpl();
 > When I make binary file with -static-libgcj option executable file
 > cannot start: java.lang.Class.initializeClass complains
 > java.lang.NoClassDefFoundError: org....DocumentBuilderFactoryImpl.
 > 
 > Removing -static-libgcj results in an executable file which starts
 > with no problem (and I'm confident that it uses xerces as xml parser).
 > 
 > Now what should I do to have xercesImpl sufficed?

This is very painful because two weeks pass between each email.

We need to find out which classes are still missing.  Unless your
linker is broken, There is no doubt that
org....DocumentBuilderFactoryImpl is present in your binary.  Have a
look at the binary with `nm --demangle=java'.  Using Xerces as your
parser isn't going to make this process easy, either.  It'd be better
just to use Classpath.

 > About scripts/makemake.tcl, I had no chance to run this script.
 > Although I downloaded source package for gcj (on Edgy), I found not
 > such file.

What did you download?  I'm sure that there is no point trying this
with an old version of gcj.  4.2 might work, but 4.3pre is your best
choice.  Go to http://gcc.gnu.org/snapshots.html and grab a snapshot.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]