Re: Problem with ejbc and jikes

2001-09-19 Thread Saneesh Joseph

Hi Kapil,
Thanks for your reply , and I do really appreciate it.
Your workaround suggestion is cool, but the question
is how... The problem is that the TopLink CMP java
files are generated during the ejbc step and also, if
we exclude these files from being compiled and have
them compiled as a separate step, will we still be
gaining time.. I am not sure how to exclude files
which are not existing at the time of ejbc.. Anyway,
let me give it a shot, and I will let you know..
Regards,
Saneesh J.
--- [EMAIL PROTECTED] wrote:
 Hi Saneesh,
 
 The reason for this is that while compiling the
 package containing the 
 bean .java files, javac is resolving the
 interdependencies (this does not 
 happen for Jikes). I once encountered a similar
 problem and worked aroung 
 by splitting the javac of the .java files into
 multiple parts. 
 
 In your case EbeanPSTopLink.java needs EbeanPS.class
 for compilation (only 
 in case of Jikes, javac resolves this
 automatically). However the 
 compilation of EbeanPS.java goes happens only after
 EbeanPSTopLink.. 
 
 A workaround in your case can be to exclude
 EbeanPSTopLink during first 
 round of javac and add one more javac task for
 this file alone. 
 
 But I am sure there must be a better way of doing
 this :-)
 
 Regards
 _
 Kapil Singh Pawar
 Consultant - Integration
 i2 Technologies India Private Ltd.
 1 Primrose Road
 Bangalore 560 025, INDIA
 Email: [EMAIL PROTECTED]
 Tel: +91 80 558 1487-90 ext. 2416
 
 
 
 
 Saneesh Joseph [EMAIL PROTECTED]
 09/18/01 06:12 AM
 Please respond to ant-user
 
  
 To: [EMAIL PROTECTED]
 cc: 
 Subject:Problem with ejbc and jikes
 
 
 Hello,
 I am trying to use jikes compiler in my ant ejbc
 step 
 to make it faster. Our current build takes close to
 an
 hour. We are using Toplink for Weblogic for CMP. I
 am
 supplying all the toplink xml-descriptors, ejb-jar
 and
 weblogic xmls and the home,remote and implementation
 classes in one jar(which comes to around 400 files)
 as
 the input to ejbc. During ejbc, TopLink creates some
 java files for its use and compiles them, which are
 inturn used by some other similarly generated java
 files. For example, lets assume we have an entity
 bean
 Ebean. Toplink creates class EbeanPS.class and
 another
 javafile EbeanPSTopLink.java which implements
 EbeanPS.
 Now, when I am using the regular javac/classic
 compilers, it is going through fine. But, when I am
 using jikes as the compiler, it doesn't go through
 saying that While compiling EbeanPSTopLink.java, it
 couldn't find EbeanPS.class. Now, when I examined
 the
 ejbcgen directory, I could see the required class
 under it. I tried giving the ejbcgen directory in
 the
 classpath, but ejbc errored out saying that the
 destination file of ejbc can't be given in
 classpath.
 The following is the step which I am using in my
 build.xml :-
 java classname=weblogic.ejbc 
   fork=yes 
   failonerror=yes
   classpathref=project.class.path
  
arg value=-compiler /
arg value=jikes /
arg value=-nowarn /
arg value=Beans.jar /
   arg value=BeansEJBC.jar /
 /java
 Any help on the above issue is greatly appreciated..
 Thanks and Regards,
 Saneesh J.
 
 
 __
 Terrorist Attacks on U.S. - How can you help?
 Donate cash, emergency relief information

http://dailynews.yahoo.com/fc/US/Emergency_Information/
 
 
 


__
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/



Re: Problem with ejbc and jikes

2001-09-18 Thread Jim White

At 05:42 PM 9/17/2001 -0700, Saneesh Joseph wrote:
I am trying to use jikes compiler in my ant ejbc step
to make it faster. Our current build takes close to an
hour. We are using Toplink for Weblogic for CMP. I am
...

I do that this way:

   ejbjar srcdir=${build.classes}
   descriptordir=${src}/com/foo/Prog
   basejarname=Prog
  weblogic compiler=${ejbc.compiler} args=${ejbc.args}
destdir=${ejb-jar.lib}
  classpath refid=prog.ejb.classpath/
  /weblogic
  include name=ejb-jar.xml/
  exclude name=weblogic-ejb-jar.xml/
   /ejbjar

The property ejbc.compiler is set to either jikes or javac.  Which is 
actually quite annoying since I also use a property for the compiler in the 
javac tasks and must be set to either jikes or modern (javac not 
being legal but should be an alias for modern or perhaps classic).

Don't forget that Jikes needs the rt.jar in the classpath.  And of course 
all of the classes used must be accessible in the classpath too, regardless 
of which compiler.

jim


James P. White Netscape DevEdge Champion for IFC
IFC Exchange   *   Insanely great Java   *   http://www.ifcx.org
[EMAIL PROTECTED] Pagesmiths' home is http://www.pagesmiths.com




Re: Problem with ejbc and jikes

2001-09-18 Thread Saneesh Joseph

Hi Jim,
Thanks for the reply. I had tried using ejbjar task as
you have written.. The problem is , my input classes
and descriptor files are in a single jar, so, I can't
give it in the srcdir parameter. I believe the basejar
name is the jar name that has to be created. Also
could you please explain why we need to have a
separate ejb classpath in the weblogic element, and
what should it constitute.. Right now, I have every
class required as part of the classpath. Yes, I do
have the rt.jar in my classpath. I am able to
successfully compile all my java files using jikes in
a previous step. Only ejbc is giving a headache..
Regards,
Saneesh J.
--- Jim White [EMAIL PROTECTED] wrote:
 At 05:42 PM 9/17/2001 -0700, Saneesh Joseph wrote:
 I am trying to use jikes compiler in my ant ejbc
 step
 to make it faster. Our current build takes close to
 an
 hour. We are using Toplink for Weblogic for CMP. I
 am
 ...
 
 I do that this way:
 
ejbjar srcdir=${build.classes}
descriptordir=${src}/com/foo/Prog
basejarname=Prog
   weblogic compiler=${ejbc.compiler}
 args=${ejbc.args}
 destdir=${ejb-jar.lib}
   classpath
 refid=prog.ejb.classpath/
   /weblogic
   include name=ejb-jar.xml/
   exclude name=weblogic-ejb-jar.xml/
/ejbjar
 
 The property ejbc.compiler is set to either jikes
 or javac.  Which is 
 actually quite annoying since I also use a property
 for the compiler in the 
 javac tasks and must be set to either jikes or
 modern (javac not 
 being legal but should be an alias for modern or
 perhaps classic).
 
 Don't forget that Jikes needs the rt.jar in the
 classpath.  And of course 
 all of the classes used must be accessible in the
 classpath too, regardless 
 of which compiler.
 
 jim
 


 James P. White Netscape DevEdge
 Champion for IFC
 IFC Exchange   *   Insanely great Java   *  
 http://www.ifcx.org
 [EMAIL PROTECTED] Pagesmiths' home is
 http://www.pagesmiths.com
 


__
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/



Re: Problem with ejbc and jikes

2001-09-18 Thread Jim White

Hi Saneesh.

Sorry I don't have more help to offer.  While I've seen the While 
compiling Foo, can't find Bar, I don't remember anything more specific 
about it.  Pretty sure it is some classpath issue.  That path element I use 
also includes /weblogic/classes:

path id=weblogic.classpath
pathelement path=${weblogic.lib}/weblogicaux.jar/
pathelement path=${weblogic.classes}/
/path

Plus I think the ejbjar task also does some additional classpath fiddling.

jim

At 10:14 AM 9/18/2001 -0700, Saneesh Joseph wrote:
Hi Jim,
Thanks for the reply. I had tried using ejbjar task as
you have written.. The problem is , my input classes
and descriptor files are in a single jar, so, I can't
give it in the srcdir parameter. I believe the basejar
name is the jar name that has to be created. Also
could you please explain why we need to have a
separate ejb classpath in the weblogic element, and
what should it constitute.. Right now, I have every
class required as part of the classpath. Yes, I do
have the rt.jar in my classpath. I am able to
successfully compile all my java files using jikes in
a previous step. Only ejbc is giving a headache..
Regards,
Saneesh J.
--- Jim White [EMAIL PROTECTED] wrote:
  At 05:42 PM 9/17/2001 -0700, Saneesh Joseph wrote:
  I am trying to use jikes compiler in my ant ejbc
  step
  to make it faster. Our current build takes close to
  an
  hour. We are using Toplink for Weblogic for CMP. I
  am
  ...
 
  I do that this way:
 
 ejbjar srcdir=${build.classes}
 descriptordir=${src}/com/foo/Prog
 basejarname=Prog
weblogic compiler=${ejbc.compiler}
  args=${ejbc.args}
  destdir=${ejb-jar.lib}
classpath
  refid=prog.ejb.classpath/
/weblogic
include name=ejb-jar.xml/
exclude name=weblogic-ejb-jar.xml/
 /ejbjar
 
  The property ejbc.compiler is set to either jikes
  or javac.  Which is
  actually quite annoying since I also use a property
  for the compiler in the
  javac tasks and must be set to either jikes or
  modern (javac not
  being legal but should be an alias for modern or
  perhaps classic).
 
  Don't forget that Jikes needs the rt.jar in the
  classpath.  And of course
  all of the classes used must be accessible in the
  classpath too, regardless
  of which compiler.
 
  jim
 
 

  James P. White Netscape DevEdge
  Champion for IFC
  IFC Exchange   *   Insanely great Java   *
  http://www.ifcx.org
  [EMAIL PROTECTED] Pagesmiths' home is
  http://www.pagesmiths.com
 


__
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/


James P. White Netscape DevEdge Champion for IFC
IFC Exchange   *   Insanely great Java   *   http://www.ifcx.org
[EMAIL PROTECTED] Pagesmiths' home is http://www.pagesmiths.com




Re: Problem with ejbc and jikes

2001-09-18 Thread Kapil_Pawar

Hi Saneesh,

The reason for this is that while compiling the package containing the bean .java files, javac is resolving the interdependencies (this does not happen for Jikes). I once encountered a similar problem and worked aroung by splitting the javac of the .java files into multiple parts. 

In your case EbeanPSTopLink.java needs EbeanPS.class for compilation (only in case of Jikes, javac resolves this automatically). However the compilation of EbeanPS.java goes happens only after EbeanPSTopLink.. 

A workaround in your case can be to exclude EbeanPSTopLink during first round of javac and add one more javac task for this file alone. 

But I am sure there must be a better way of doing this :-)

Regards
_
Kapil Singh Pawar
Consultant - Integration
i2 Technologies India Private Ltd.
1 Primrose Road
Bangalore 560 025, INDIA
Email: [EMAIL PROTECTED]
Tel: +91 80 558 1487-90 ext. 2416






Saneesh Joseph [EMAIL PROTECTED]
09/18/01 06:12 AM
Please respond to ant-user


To:[EMAIL PROTECTED]
cc:
Subject:Problem with ejbc and jikes


Hello,
I am trying to use jikes compiler in my ant ejbc step 
to make it faster. Our current build takes close to an
hour. We are using Toplink for Weblogic for CMP. I am
supplying all the toplink xml-descriptors, ejb-jar and
weblogic xmls and the home,remote and implementation
classes in one jar(which comes to around 400 files) as
the input to ejbc. During ejbc, TopLink creates some
java files for its use and compiles them, which are
inturn used by some other similarly generated java
files. For example, lets assume we have an entity bean
Ebean. Toplink creates class EbeanPS.class and another
javafile EbeanPSTopLink.java which implements EbeanPS.
Now, when I am using the regular javac/classic
compilers, it is going through fine. But, when I am
using jikes as the compiler, it doesn't go through
saying that While compiling EbeanPSTopLink.java, it
couldn't find EbeanPS.class. Now, when I examined the
ejbcgen directory, I could see the required class
under it. I tried giving the ejbcgen directory in the
classpath, but ejbc errored out saying that the
destination file of ejbc can't be given in classpath.
The following is the step which I am using in my
build.xml :-
java classname=weblogic.ejbc 
 fork=yes 
 failonerror=yes
 classpathref="project.class.path
 
arg value=-compiler /
arg value=jikes /
arg value=-nowarn /
arg value=Beans.jar /
   arg value=BeansEJBC.jar /
  /java
Any help on the above issue is greatly appreciated..
Thanks and Regards,
Saneesh J.


__
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/