james-server-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mohit gupta <motgu...@gmail.com>
Subject Re: How to set the classpath in james.bat file for custom mailet ?
Date Sun, 24 Jun 2012 10:18:21 GMT
Hi Eric,

As i mentioned in my original post when i start the james with with widow
service , server starts perfectly fine.And reason is,  i mentioned below
parameter in wrapper.conf

which contains  spring-bean.xml  file.

But when i start the the james with James.bat file it does not find
spring-bean.xml  file. Now my question is how to set the classpath pointing
to ..\apps\james\SAR-INF\fip  in james.bat file  (as i did it
in wrapper.conf). I tried below option but it did not work

set CLASSPATH=D:\James-2.3.2\apps\**james\SAR-INF\fip.

It would be help if you can point me how to to set the classpath in
James.bat file pointing to D:\James-2.3.2\apps\**james\SAR-INF\fip.

On Sun, Jun 24, 2012 at 3:17 PM, Eric Charles <eric@apache.org> wrote:

> Hi Mohit,
> Seems like an external library (probably the fip one) needs to find a
> spring-beans.xml.
> Check how fip loads its spring-beans.xml (via classpath, via file path?)
> and add the needed spring-beans.xml where it is expected to be.
> Thx, Eric
> On 06/24/2012 10:46 AM, mohit gupta wrote:
>> Hi All,
>> i am facing the weird problem. I tried to google the issue but could not
>> find resolution.  Here is the issue.I have integrated the james with my
>> custom mailet and web application code.I had put my jar under
>> james/apps/james/SAR-INF/lib subdirectory and my spring beans under
>> james/apps/james/SAR-INF/fip folder
>> Now there are two ways i can start the jame server. One thru
>> window service and another thru james.bat file. When  start the james thru
>> service it works fine . But when i start the service thru James.bat
>> file, server does not start and gives the error in logs stating could not
>> find spring-bean.xml file in classpath which is actually lying at
>> james/apps/james/SAR-INF/fip . Now i tried to figure out what is the
>> difference between when server is started thru
>> service or bat file. When i run thru service it uses wrapper.conf where i
>> set the two parameters specific to my application i.e
>> wrapper.java.classpath.3=..\**apps\james\SAR-INF\fip
>> wrapper.java.additional.1=-**Dcom.foundationip.**
>> resourcesfactory.fipGroupName=**FIP_GROUP
>> Now as i want to run it thru bat file, so i need to set these paramters in
>> james.bat file too. This is how set them in bat file but james server
>> still gives the error saying could not find spring-bean.xml.
>> set CLASSPATH=D:\James-2.3.2\apps\**james\SAR-INF\fip
>> -Dcom.foundationip.**resourcesfactory.fipGroupName=**FIP_GROUP
>> To me it looks like , server is not able to recognize the classpath set
>> above as
>> D:\James-2.3.2\apps\james\SAR-**INF\fip as spring-bean.xml is lying
>> under the
>> same folder. Kindlly guid me how to set the classpath in james.bat file
>> .Also i tried setting the same class path as environment variable but it
>> did not help.
> --
> eric | http://about.echarles.net | @echarles
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: server-user-unsubscribe@james.**apache.org<server-user-unsubscribe@james.apache.org>
> For additional commands, e-mail: server-user-help@james.apache.**org<server-user-help@james.apache.org>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message