Menu

compilation of mi-portlets

2013-08-01
2013-08-14
  • Liam Thompson

    Liam Thompson - 2013-08-01

    Hi everyone

    This is a basic, possibly silly question, but I am spending alot of time trying to figure this out and I'm not making progress.

    When I compile any of the mi-portlets from the SVN repo, I get for mi-hostname-portlet
    ''The import it.infn.ct.GridEngine.JobCollection cannot be resolved'' and for mi-hostname-portlet I get ''The import it.infn.ct.GridEngine.JobResubmission cannot be resolved''.

    Now obviously, as the error says, the compile process is missing the components from the GridEngine. I am able to get the portlets to build in Eclipse, but I can't seem to get it to work on the command line. Do you have a suggestion for me please ?

    Thanks
    Liam

     
    • Riccardo Bruno

      Riccardo Bruno - 2013-08-01

      Hi Liam,

      Accordingly to the mi-hostname-portlet extracted form SVN Rev.537 there is no:

      import it.infn.ct.GridEngine.JobCollection

      Maybe you are mentioning another portlet code?
      Regards,
      Riccardo Bruno
      INFN Sez. Catania
      Via S.Sofia, 64
      95123 Catania
      Italy
      Tel. +39-095-378-5517
      Fax. +39-095-378-5518
      Skype. ct-brunor

      On 01/ago/2013, at 13:10, Liam Thompson liamthompson@users.sf.net wrote:

      Hi everyone

      This is a basic, possibly silly question, but I am spending alot of time trying to figure this out and I'm not making progress.

      When I compile any of the mi-portlets from the SVN repo, I get for mi-hostname-portlet
      ''The import it.infn.ct.GridEngine.JobCollection cannot be resolved'' and for mi-hostname-portlet I get ''The import it.infn.ct.GridEngine.JobResubmission cannot be resolved''.

      Now obviously, as the error says, the compile process is missing the components from the GridEngine. I am able to get the portlets to build in Eclipse, but I can't seem to get it to work on the command line. Do you have a suggestion for me please ?

      Thanks
      Liam

      compilation of mi-portlets

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/ctsciencegtwys/discussion/general/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/


      Sg-licence mailing list
      Sg-licence@ct.infn.it
      https://mailman.ct.infn.it/mailman/listinfo/sg-licence

       
  • Liam Thompson

    Liam Thompson - 2013-08-02

    Hi Riccardo

    Sorry, I should have been more specific. I confirm the repo revision 537.

    for portlets/mi-hostname-portlet, using ''ant test'', I get The import it.infn.ct.GridEngine.JobResubmission cannot be resolved.

    for portlets//mi-parallel-app-portlet, using ''ant test'', I get The import it.infn.ct.GridEngine.JobCollection cannot be resolved.

    Like I said in the previous email, it works in Eclipse, but not with ant. I'm not sure how to include these dependencies in the build.xml file, or whether I need to include something extra in the build path or some other config setting.

    Thanks

     
    • Liam Thompson

      Liam Thompson - 2013-08-05

      Hi Riccardo

      I tried to use Netbeans and Ant to compile and build the project, but it gave me so many errors (like above), that I went back to Eclipse, and built it successfully from there.

      I don't know why it won't compile using Ant (in command line) or Netbeans.

      Liam

       
    • Riccardo Bruno

      Riccardo Bruno - 2013-08-05

      Liam,

      If you have troubles with the import statements you probably have misconfigured the portlet.xml file.
      Could you please check that you have the following files the statements:

      1)
      $LIFERAY_SDK/build-common.xml
      ...
      <path id="lib.classpath">
      <fileset dir="${project.dir}/lib" includes="*.jar">
      <fileset dir="/opt/GridEngine/lib" includes="*.jar">
      </fileset></fileset></path>
      ...

      This is the most important file that informs ant to watch for GridEngine libraries

      2)
      $LIFERAY_SDK/portlets/mi-hostname-portlet/docroot/WEB-INF/glassfish-web.xml
      ...
      <class-loader delegate="true" extra-class-path="/opt/GridEngine/lib/hibernate3.jar ... (a ':' separated list of jars you can obtain executing the (*) command)
      ...

      () find /opt/GridEngine/lib -name '.jar' (see the customize.sh script for more information)

      Could you please check and let me know,
      Regards,
      Riccardo Bruno
      INFN Sez. Catania
      Via S.Sofia, 64
      95123 Catania
      Italy
      Tel. +39-095-378-5517
      Fax. +39-095-378-5518
      Skype. ct-brunor

      On 02/ago/2013, at 12:53, Liam Thompson liamthompson@users.sf.net wrote:

      Hi Riccardo

      Sorry, I should have been more specific. I confirm the repo revision 537.

      for portlets/mi-hostname-portlet, using ''ant test'', I get The import it.infn.ct.GridEngine.JobResubmission cannot be resolved.

      for portlets//mi-parallel-app-portlet, using ''ant test'', I get The import it.infn.ct.GridEngine.JobCollection cannot be resolved.

      Like I said in the previous email, it works in Eclipse, but not with ant. I'm not sure how to include these dependencies in the build.xml file, or whether I need to include something extra in the build path or some other config setting.

      Thanks

      compilation of mi-portlets

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/ctsciencegtwys/discussion/general/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/


      Sg-licence mailing list
      Sg-licence@ct.infn.it
      https://mailman.ct.infn.it/mailman/listinfo/sg-licence

       
      • Liam Thompson

        Liam Thompson - 2013-08-06

        Hi Riccardo

        Was there supposed to be something pasted below $LIFERAY_SDK/build-common.xml ?

        The confusing part for me is that I can build the portlet with Eclipse. Does that mean Eclipse is better at finding all the extra bits that need to go with a particular project that Netbeans is ?

        Liam

         
        • Riccardo Bruno

          Riccardo Bruno - 2013-08-07

          Liam,

          I noticed that some part of my reply was wrong on my Mail Client Sent folder.
          Inside the $LIFERAY_SDK/build-common.xml

          you must have the following:

          <path id="plugin.classpath">
                      <path refid="plugin-lib.classpath" />
                      <fileset dir="${app.server.lib.global.dir}" includes="*.jar" />
                      <fileset dir="${app.server.lib.portal.dir}" includes="annotations.jar,commons-logging.jar,log4j.jar,util-bridges.jar,util-java.jar,util-taglib.jar" />
                      <fileset dir="${project.dir}/lib" includes="activation.jar,jsp-api.jar,mail.jar,servlet-api.jar" />
                      <fileset dir="/opt/GridEngine/lib" includes="*.jar" />
              </path>
          

          I personally dislike to work with Eclipse or Netbeans for so small projects like the hostname. I also intentionally followed that approach to avoid new users to deal with specific platform issues. For this reason I'm just using what the LIFERAY SDK provides.

          Regards,
          Riccardo Bruno
          INFN Sez. Catania
          Via S.Sofia, 64
          95123 Catania
          Italy
          Tel. +39-095-378-5517
          Fax. +39-095-378-5518
          Skype. ct-brunor

          On 06/ago/2013, at 21:40, "Liam Thompson" liamthompson@users.sf.net wrote:

          Hi Riccardo

          Was there supposed to be something pasted below $LIFERAY_SDK/build-common.xml ?

          The confusing part for me is that I can build the portlet with Eclipse. Does that mean Eclipse is better at finding all the extra bits that need to go with a particular project that Netbeans is ?

          Liam

          compilation of mi-portlets

          Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/ctsciencegtwys/discussion/general/

          To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/


          Sg-licence mailing list
          Sg-licence@ct.infn.it
          https://mailman.ct.infn.it/mailman/listinfo/sg-licence

           
          • Liam Thompson

            Liam Thompson - 2013-08-07

            Hi Riccardo

            Thanks for the correction. Whilst I agree with you on using
            Eclipse/Netbeans for such a small project, I am quite new to this, so I
            thought it might be helpful.

            I will try those configuration settings and see if they make a different
            to the build and deployment.

            Liam

             
            • Liam Thompson

              Liam Thompson - 2013-08-08

              Hi Riccardo

              It's not quite working yet, although I feel like I'm close to getting
              the portlet to compile on both my computer and the server using ant. The
              number of errors I get when trying to build is much reduced.

              I did a comparison of the build-common.xml and glassfish-web.xml files
              on the SVN, and they are both identical to what I have, so that is not
              the problem.

              I've removed the general bash classpath from both machines, as the Ant
              manual says not to use it (I've also tried building with -noclasspath),
              it didn't seem to make any difference.

              I deleted and re-loaded the GridEngine libraries (one file was corrupt),
              but that didn't fix everything.

              I've made sure of my JAVA_HOME and ANT_HOME directories, and have run
              ant -v and ant -d, but I see nothing obviously wrong. Further 'javac' is
              pointing to /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/javac.

              I've tried a different ant.build.javac.source=1.5/1.6/1.7 in the
              build.user.properties file, but that doesn't seem to matter

              I have attached the output from the compilations of the
              mi-hostname-portlet, on which I ran customise.sh (without making changes),

              I hope with your expert eye (or somebody elses), you might see something
              I don't.

              Thanks
              Liam

              On 07/08/2013 10:46, Liam Thompson wrote:

              Hi Riccardo

              Thanks for the correction. Whilst I agree with you on using
              Eclipse/Netbeans for such a small project, I am quite new to this, so I
              thought it might be helpful.

              I will try those configuration settings and see if they make a different
              to the build and deployment.

              Liam


              Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/ctsciencegtwys/discussion/general/

              To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

               
  • Liam Thompson

    Liam Thompson - 2013-08-12

    Hi everyone

    In frustration, I delete the Liferay SDK directory, and recreated it using the zip file. I created a fresh customisation from mi-hostname-portlet -->

    1. it compiled fine on my computer, and I was able to build a war file.

    2. it did not compile on the server and I received only 1 error below. The slight differences between the environments will drive me insane.

    /opt/liferay-plugins-sdk-6.1.1/portlets/mi-custom-portlet/docroot/WEB-INF/src/it/infn/ct/mi_custom_portlet.java:1416: error: cannot find symbol
    [javac] jobDesc.setOutputFiles(outputSandbox); // Setup output files (OutputSandbox) (*)
    [javac] ^
    [javac] symbol: method setOutputFiles(String)
    [javac] location: variable jobDesc of type GEJobDescription
    [javac] 1 error

    Any ideas, or is this another configuration issue ?

    Thanks
    Liam

     
  • Liam Thompson

    Liam Thompson - 2013-08-12

    Hi everyone

    You can ignore my previous post, the portlet, whilst it builds on my computer, does not deploy on my computer/server giving many of the same errors as "The import it.infn.ct.GridEngine cannot be resolved", "MultiInfrastructureJobSubmission cannot be resolved to a type" and "GEJobDescription cannot be resolved to a type" when I try to deploy it.

    Perhaps someone could send me a portlet.xml file or build.user.properties or glassfish-web.xml files so I can see where I am going wrong.

    Thanks
    Liam

     
    • Roberto Barbera

      Roberto Barbera - 2013-08-12

      Dear Liam and Manuel,

      this week our Department is closed for the summer break so expect some
      delays in our answers.
      Sorry for the inconvenience,

      ciao

      Roberto

      On 12/08/2013 13.13, Liam Thompson wrote:

      Hi everyone

      You can ignore my previous post, the portlet, whilst it builds on my
      computer, does not deploy on my computer/server giving many of the same
      errors as "The import it.infn.ct.GridEngine cannot be resolved",
      "MultiInfrastructureJobSubmission cannot be resolved to a type" and
      "GEJobDescription cannot be resolved to a type" when I try to deploy it.

      Perhaps someone could send me a portlet.xml file or
      build.user.properties or glassfish-web.xml files so I can see where I am
      going wrong.

      Thanks
      Liam


      compilation of mi-portlets
      https://sourceforge.net/p/ctsciencegtwys/discussion/general/thread/225b9fb9/?limit=25#757e


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/ctsciencegtwys/discussion/general/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/


      Sg-licence mailing list
      Sg-licence@ct.infn.it
      https://mailman.ct.infn.it/mailman/listinfo/sg-licence

      --
      Department of Physics and Astronomy of the University of Catania
      Phone : +39 095 378 5504
      Mobile: +39 349 376 2671
      Fax : +39 095 337 938
      eMail : roberto.barbera@ct.infn.it
      Web : www.dfa.unict.it/home/barbera

       
  • Liam Thompson

    Liam Thompson - 2013-08-14

    Hi everyone

    I managed to fix the problem. The NoMethodError seems to be a problem between versions of libraries between compile and runtime. Hence the portlet was compiling fine on my computer, but no running properly on the server, which had not been updated to the libraries I had on my PC. Now that I've updated them, the problem is fixed

    Liam

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.