Thanks Greg, Just to get this app out the door I am trying a different approach that avoids the loader class. I may have another go for version 2 of my app :-)
On Thu, 29 Apr 2010 10:12:43 pm Greg Brown wrote: > Not sure what might be going on since I haven't used URLClassLoader myself. > FWIW, the Theme class uses the JAR service provider mechanism to look up a > concrete theme provider: > > http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service%20Provider > > It uses the org.apache.pivot.util.Service class to perform the lookup. You > may need to step through the code to see why it is failing to find a > suitable provider. The static block at the beginning of the Theme class is > where the theme is loaded, so that's where I'd start. Set a breakpoint > there and see what you can find out. > > Hope this helps. > Greg > > On Apr 29, 2010, at 7:53 AM, Scott Lanham wrote: > > Hi Greg, > > > > All Jars are encapsulated in a single jar file and the application runs > > fine from that Jar file. The error occurs when I load the same Jar file > > using URLClassLoader from within a different application. > > > > On Thu, 29 Apr 2010 09:48:19 pm Greg Brown wrote: > >> This exception is being thrown because the Theme class can't find a > >> suitable theme provider. Is the Terra JAR on your classpath? > >> > >> On Apr 28, 2010, at 11:11 PM, Scott Lanham wrote: > >>> I missed an important bit: > >>> > >>> Caused by: org.apache.pivot.wtk.ThemeNotFoundException: A theme could > >>> not be located. > >>> at org.apache.pivot.wtk.Theme.<clinit>(Theme.java:76) > >>> > >>> On Thu, 29 Apr 2010 11:50:21 am Scott Lanham wrote: > >>>> Hello, > >>>> > >>>> I am dynamically loading a pivot (1.4) app from a basic "launcher" > >>>> app using URLClassLoader. It is throwing the exception detailed below. > >>>> I was wondering if anyone has had experience with this kind of > >>>> problem? > >>>> > >>>> If you are wondering why I would do such a crazy thing, it is all in > >>>> the name of auto-updating the app in Windows ( without using webstart > >>>> ). > >>>> > >>>> Thanks, > >>>> > >>>> Scott. > >>>> > >>>> Exception in thread "AWT-EventQueue-0" > >>>> java.lang.ExceptionInInitializerError at > >>>> org.apache.pivot.wtk.Component.installThemeSkin(Component.java:737) at > >>>> org.apache.pivot.wtk.Window.<init>(Window.java:393) > >>>> at org.apache.pivot.wtk.Window.<init>(Window.java:388) > >>>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > >>>> Method) > >>>> at > >>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructo > >>>>rA cce ssorImpl.java:39) at > >>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCo > >>>>ns tru ctorAccessorImpl.java:27) at > >>>> java.lang.reflect.Constructor.newInstance(Constructor.java:513) at > >>>> java.lang.Class.newInstance0(Class.java:355) > >>>> at java.lang.Class.newInstance(Class.java:308) > >>>> at > >>>> org.apache.pivot.wtkx.WTKXSerializer.processStartElement(WTKXSerialize > >>>>r. jav a:617) at > >>>> org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:44 > >>>>9) at > >>>> org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:40 > >>>>5) at > >>>> org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:39 > >>>>2) at > >>>> org.apache.pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:37 > >>>>9) >
