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 14:27:28 GMT
Thank Eric. I was able to figure out how to set the classpath in bat file.
This is how did it

"-Djava.ext.dirs=%PHOENIX_**HOME%\lib;%PHOENIX_HOME%\**tools\lib;%PHOENIX_**
HOME%\apps\james\SAR-INF\fip"

With this  i got rid of class path exception. But now getting new exception

javax.ejb.EJBException: java.lang.IllegalArgumentException: Unable to find
an entry in java:comp/env (or global JNDI) for /fip/group/FIP_Group

*I am not getting how come this exception only coming when running james
thru bat file not thru window service. Though i did not set any special
parameter specific to this in wraapper.conf file. Any pointer?*

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

> Hi Mohit,
>
> I run James3 on Linux, not James2.3 on Windows, so I am in a bad position
> to help...
>
> Looking at run.bat, I see
> "%PHOENIX_JAVACMD%" %DEBUG% "-Djava.ext.dirs=%PHOENIX_**
> HOME%\lib;%PHOENIX_HOME%\**tools\lib" "-Dphoenix.home=%PHOENIX_HOME%**"
> "-Djava.security.policy=jar:**file:%PHOENIX_HOME%/bin/**
> phoenix-loader.jar!/META-INF/**java.policy" %PHOENIX_JVM_OPTS%
> %PHOENIX_SM% -jar "%PHOENIX_HOME%\bin\phoenix-**loader.jar" %1 %2 %3 %4
> %5 %6 %7 %8 %9
>
> I would add there -cp C://james_path/apps/james/SAR-**INF/fip
>
> (you need to run on jdk6 to benefit from classpath definition with
> folders).
>
> Hope this helps,
>
> Eric
>
>
>
> On 06/24/2012 12:18 PM, mohit gupta wrote:
>
>> 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
>>
>> wrapper.java.classpath.3=..\**apps\james\SAR-INF\fip
>> 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
>>>> set PHOENIX_JVM_OPTS=%PHOENIX_JVM_****OPTS%
>>>> -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<server-user-unsubscribe@james.apache.org>
>>> >
>>> For additional commands, e-mail: server-user-help@james.apache.****org<
>>> server-user-help@james.**apache.org <server-user-help@james.apache.org>>
>>>
>>>
>>>
>>
> --
> 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>
>
>

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