Return-Path: X-Original-To: apmail-james-server-user-archive@www.apache.org Delivered-To: apmail-james-server-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E1A9EC932 for ; Sun, 24 Jun 2012 16:13:57 +0000 (UTC) Received: (qmail 3353 invoked by uid 500); 24 Jun 2012 16:13:57 -0000 Delivered-To: apmail-james-server-user-archive@james.apache.org Received: (qmail 3314 invoked by uid 500); 24 Jun 2012 16:13:57 -0000 Mailing-List: contact server-user-help@james.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "James Users List" Reply-To: "James Users List" Delivered-To: mailing list server-user@james.apache.org Received: (qmail 3305 invoked by uid 99); 24 Jun 2012 16:13:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jun 2012 16:13:57 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=RCVD_IN_DNSWL_NONE,RCVD_NUMERIC_HELO,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [195.238.6.176] (HELO mailrelay009.isp.belgacom.be) (195.238.6.176) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jun 2012 16:13:51 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArMGAAE8509btyYw/2dsb2JhbABEs1yCHoEJghQEAQEFOBYIIhEIAxgJFg8JAwIBAgEfCB4GCAUCBAEBAQEZBIUoB4IkG7dxizMahWgDlS6BEo5vgmGBXQ Received: from 48.38-183-91.adsl-static.isp.belgacom.be (HELO localhost) ([91.183.38.48]) by relay.skynet.be with ESMTP; 24 Jun 2012 18:13:28 +0200 MIME-Version: 1.0 X-UserIsAuth: true Received: from 91.178.31.5 (EHLO [192.168.1.5]) ([91.178.31.5]) by srv002 (JAMES SMTP Server ) with ESMTPA ID 1701986151; Sun, 24 Jun 2012 06:13:28 +0200 (CEST) Message-ID: <4FE73CA5.4020403@apache.org> Date: Sun, 24 Jun 2012 18:13:25 +0200 From: Eric Charles User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120402 Thunderbird/11.0.1 To: James Users List Subject: Re: How to set the classpath in james.bat file for custom mailet ? References: <4FE6E24F.8000205@apache.org> <4FE7133B.7040802@apache.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org good, java.ext.dirs usage is more a workaround, but if it's working, that's fine. for the EJBException, I would double check all FIP requirements (expected config files on the classpath or path, expected jar dependency...) and ensure you have them via the launch command in bat file. With linux, I would also invoke 'ps -ef' to have the complete command with parameters that is effectively issued when launching as a service and check if there is a difference with the command when launching via bat/sh. Thx, Eric On 06/24/2012 04:27 PM, mohit gupta wrote: > 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 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 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 >>>>> >>>> For additional commands, e-mail: 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 >> For additional commands, e-mail: server-user-help@james.apache.**org >> >> > -- eric | http://about.echarles.net | @echarles --------------------------------------------------------------------- To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org For additional commands, e-mail: server-user-help@james.apache.org