RE: Couldn't load XMLC class

Jacob Kjome <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Here's what you should do...

String className = "com.efi.apps.mayfly.presentation.xmlc.account.loginHTML";

doc = DefaultDOMLoader.getGlobalInstance().getDOM(Class.forName(className, 
true, Thread.currentThread().getContextClassLoader()));

That should work just fine.

Of course you are free to modify Barracuda as you wish.  However, that is a 
maintenance issue you don't need, IMO.  You could also use XMLC dynamic 
loading (or Jivan dynamic loading), but that requires some extra 
configuration that you probably don't want and you will also not be able to 
compile against XMLC convenience methods such as get/setTextMyId() as they 
won't exist at compile time.

Jake

At 07:26 AM 11/8/2003 -0800, you wrote:
>Jake,
>
>I work with Rajesh and know what the app is trying to do.  We define the 
>class name to load in a database table, which is why we are using 
>getDOM(String className).  The class referred to is already compiled, but 
>just not hardwired in the code.  That requirement will not change.  Can we 
>use the getDOM(String docPath) method instead?  If not, we will need to 
>modify our copy of Barracuda to support this feature.
>
>Thanks,
>Dave
>
>
>Dave Bouvier            [email protected]
>650.357.3056 (office)
>650.224.8902 (cell)     [email protected]
>
>
>-----Original Message-----
>From: Jacob Kjome [mailto:[email protected]]
>Sent: Friday, November 07, 2003 3:34 PM
>To: [email protected]
>Subject: Re: [Barracuda] Couldn't load XMLC class
>
>
>Hi Rajesh,
>
>At 11:00 AM 11/7/2003 -0800, you wrote:
> >Hi,
> >I was using Barracuda 1.2.0 with xmlc2.2 in my applicaiton and everything
> >was working as expected. Yesterday I downlaoded the latest version of
> >Barracuda1.2.5 with xmlc2.2.3 and I am getting xmlc error - Couldn't load
> >XMLC class when I am trying to login into my applicaiton.
> >I looks to me that I need to change some configuratioin file but I don't
> >know what to change and where.
> >I will appreciate for your help.
> >Thanks.
> >Rajesh
>
>Hmm...
>
>When you say "1.2.5", do you actually mean post-1.2.5?  That is, latest
>CVS?  It seems so based on the stack trace.  In that case, I see the
>problem.  You were using a getDOM(String className) method.  That has been
>changed to getDOM(String docPath).  I'm guessing that you aren't intending
>to use dynamic loading (loading an XMLC document without having compiled it
>first).  Try changing your getDOM() call to this....
>
>doc = DefaultDOMLoader.getGlobalInstance().getDOM(loginHTML.class);
>
>Sorry about that change.  It is documented in the
>A_Changes_History.java.  I didn't figure many people were using
>getDOM(String className).  Apparently at list one person was :-(  However,
>the change made the interface much simpler and more clear.  I think you can
>count on it not changing again at this point.
>
>Make sure to let me know if the above works for you.
>
>Jake
>
>_______________________________________________
>Barracuda mailing list
>[email protected]
>http://barracudamvc.org/lists/listinfo/barracuda
>_______________________________________________
>Barracuda mailing list
>[email protected]
>http://barracudamvc.org/lists/listinfo/barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.