|
From: <ral...@de...> - 2011-07-18 07:19:20
|
That did the trick. Thanks! Ralf > -----Original Message----- > From: Christian Mueller [mailto:chr...@ta...] > Sent: Friday, July 15, 2011 3:32 AM > To: wra...@li... > Subject: Re: [Wrapper-user] Spring Application in Executable JAR - > ClasspathWoes > > Ralf, > > could you please try setting > ../lib/ampa-feed-morningstar-11.07.000-SNAPSHOT-jar-with- > dependencies.jar > to the classpath: > > wrapper.java.classpath.2=../lib/ampa-feed-morningstar-11.07.000- > SNAPSHOT-jar-with-dependencies.jar > > Your application is probably loading the resource from the System > classloader and not the classloader of your class. Please note that > the WrapperJarApp is setting the classloader for your class but can't > change the System classloader after the JVM has been launched. > Therefore setting the classpath in your conf file accordingly should > fix the issue. > > > Best Regards, > Christian > > On Fri, Jul 15, 2011 at 1:56 AM, > <ral...@de...> wrote: > > Hello all, > > > > > > > > I am using version 3.5.9 for Windows (32 bit) on Windows Server 2008 > > (64bit). > > > > > > > > I am trying to run a Camel/Spring application as a Windows service > with the > > help of the Java Service Wrapper. I have packaged the application as > an > > executable jar that lists all runtime dependencies in the classpath > entry in > > its MANIFEST file. > > > > I have created what I think is the standard directory layout: > > > > > > > > <base>/conf (wrapper.conf) > > > > <base>/lib (wrapper.dll, wrapper.jar, the executable jar, the runtime > deps > > of the exec. Jar) > > > > <base>/bin (appStart.bat) > > > > > > > > If I navigate to <base>/lib and issue 'java -jar myApp.jar' then the > > application starts up fine. > > > > > > > > If I navigate to <base>/bin and execute the appStart.bat then the > Spring > > context cannot be initialized: > > > > > > > > WrapperJarApp Error: > > org.springframework.beans.factory.BeanDefinitionStoreException: Could > not > > resolve bean definition resource pattern [META-INF/spring/*.xml]; > nested > > exception is java.io.FileNotFoundException: class path resource > > [META-INF/spring/] cannot be resolved to URL because it does not > exist. > > > > > > > > Something is not quite right with the classpath. Can anyone help me > out on > > how to fix this? The META-INF/spring directory in question is present > inside > > the executable jar. > > > > > > > > Also, every JAR file seems to be twice on the classpath. SLF4J > complains > > about multiple bindings on the classpath: > > > > > > > > <base>/bin/../lib/the.jar and > > > > <base>/lib/the.jar > > > > > > > > My wrapper.conf and the wrapper.log are attached. > > > > > > > > > > > > Thanks! > > > > Ralf > > > > --------------------------------------------------------------------- > --------- > > AppSumo Presents a FREE Video for the SourceForge Community by Eric > > Ries, the creator of the Lean Startup Methodology on "Lean Startup > > Secrets Revealed." This video shows you how to validate your ideas, > > optimize your ideas and identify your business strategy. > > http://p.sf.net/sfu/appsumosfdev2dev > > _______________________________________________ > > Wrapper-user mailing list > > Wra...@li... > > https://lists.sourceforge.net/lists/listinfo/wrapper-user > > > > > > ----------------------------------------------------------------------- > ------- > AppSumo Presents a FREE Video for the SourceForge Community by Eric > Ries, the creator of the Lean Startup Methodology on "Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user |