Return-Path: Delivered-To: apmail-pivot-user-archive@www.apache.org Received: (qmail 30325 invoked from network); 30 Apr 2010 03:03:03 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Apr 2010 03:03:03 -0000 Received: (qmail 29789 invoked by uid 500); 30 Apr 2010 03:03:03 -0000 Delivered-To: apmail-pivot-user-archive@pivot.apache.org Received: (qmail 29705 invoked by uid 500); 30 Apr 2010 03:03:03 -0000 Mailing-List: contact user-help@pivot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@pivot.apache.org Delivered-To: mailing list user@pivot.apache.org Received: (qmail 29697 invoked by uid 99); 30 Apr 2010 03:03:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Apr 2010 03:03:02 +0000 X-ASF-Spam-Status: No, hits=-0.9 required=10.0 tests=AWL,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [203.10.1.244] (HELO outbound-mail03.westnet.com.au) (203.10.1.244) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Apr 2010 03:02:54 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAH/l2Ut8lAFF/2dsb2JhbACdG3K+AYUQBA X-IronPort-AV: E=Sophos;i="4.52,299,1270396800"; d="scan'208";a="70613335" Received: from dsl-124-148-1-69.qld.westnet.com.au (HELO mail.sael.com.au) ([124.148.1.69]) by outbound-mail03.westnet.com.au with ESMTP; 30 Apr 2010 11:02:29 +0800 Received: by mail.sael.com.au (Postfix, from userid 5001) id DB1CFB0034D; Fri, 30 Apr 2010 13:02:27 +1000 (EST) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on server.sael X-Spam-Level: Received: from workstation.localnet (workstation.sael [192.168.3.12]) by mail.sael.com.au (Postfix) with ESMTP id A847EB0031D for ; Fri, 30 Apr 2010 13:02:14 +1000 (EST) From: Scott Lanham To: user@pivot.apache.org Subject: Re: Dynamic Loading of Pivot App Date: Fri, 30 Apr 2010 13:02:11 +1000 User-Agent: KMail/1.12.2 (Linux/2.6.31-20-generic; KDE/4.3.2; x86_64; ; ) References: <201004291150.21397.lists@sael.com.au> <201004292153.36288.lists@sael.com.au> <072AFA1B-4B3E-489B-9897-C94123465E7F@mac.com> In-Reply-To: <072AFA1B-4B3E-489B-9897-C94123465E7F@mac.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201004301302.11098.lists@sael.com.au> X-Old-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 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.(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.(Window.java:393) > >>>> at org.apache.pivot.wtk.Window.(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) >