facebook

previously working project not work for upgraded MyEclipse

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #206702 Reply

    yax3
    Member

    My project worked in previous MyEclipse(3.7.0 with Eclipse M7) before, but after I upgraded to MyEclipse 3.7.2 (together with Eclipse M8.0) and re-load the project, I got two error messages and two warnings I didn’t see with the previus version of Eclipse (although I didn’t change the code at all).

    Error 1:
    “could not load TLD for uri=http://www.sas.com/taglib/sasads”

    In my jsp file, there is a line:
    <%@taglib uri=”http://www.sas.com/taglib/sasads&#8221; prefix=”sasads”%>

    And I have pointed the location in web.xml file:
    <taglib>
    <taglib-uri>http://www.sas.com/taglib/sasads</taglib-uri&gt;
    <taglib-location>/META-INF/sasads.tld</taglib-location>
    </taglib>

    I’ve already copied “sasads.tld” file into the folder /META-INF
    Anything I’m missing here?

    Error 2:
    “The method setAttribute(String, Object) in the type ServletRequest is not applicable for the arguments (String, boolean)”

    Although actually in my code, I never attempted taking arguments (String, boolean) for this method.
    And I never see this error with previous MyEclipse. What could be wrong?

    Warnigs:
    “The import com.sas.psg.security is never used”
    “The import java.sql is never used”

    I suspect some configaration is not well taken care of. But not sure how to fix it. Can you please help?
    Thanks a lot!

    #206705 Reply

    Riyad Kalla
    Member

    Error 1:
    “could not load TLD for uri=http://www.sas.com/taglib/sasads”

    In my jsp file, there is a line:
    <%@taglib uri=”http://www.sas.com/taglib/sasads&#8221; prefix=”sasads”%>

    And I have pointed the location in web.xml file:
    <taglib>
    <taglib-uri>http://www.sas.com/taglib/sasads</taglib-uri&gt;
    <taglib-location>/META-INF/sasads.tld</taglib-location>
    </taglib>

    I’ve already copied “sasads.tld” file into the folder /META-INF
    Anything I’m missing here?

    If you have /META-INF/sasads.tld for your location, that means you have a META-INF directory immediately under your webroot folder with the tld file in it. For example, a user would typically have something like “/WEB-INF/struts-bean.tld” for that taglib-location. If you have a META-INF directory under your WEB-INF directory, that is fine, just adjust the directory. If you have a META-INF at the top level of your project, and its outside of the scope of the webroot folder, then you will need to copy to someplace within your webroot to be accessible.

    Error 2:
    “The method setAttribute(String, Object) in the type ServletRequest is not applicable for the arguments (String, boolean)”

    Although actually in my code, I never attempted taking arguments (String, boolean) for this method.
    And I never see this error with previous MyEclipse. What could be wrong?

    If you double click the error it should load the offending code. Its try that you cannot set a native type to the servlet request using setAttribute, so there is nothing wrong with that error message. I’m actually surprised you didn’t get it before as I’m not aware of ServletRequest *ever* supporting the setting of native types like that (since the value is set in a backing hashmap). If you NEED to set a booling use the methods on the Boolean class to derive a Boolean instance to save (don’t use new Boolean as its a waste).

    You mentioned that you don’t use this method directly, and I didn’t quite understand that part… when you double click the error, what code does it point to? Can you paste it here for us to look at?

    Warnigs:
    “The import com.sas.psg.security is never used”
    “The import java.sql is never used”

    I would clear the errors first, sometimes unused imports get reported incorrectly if there are errors in the file. Once the errors are cleared, if you still get unused import errors, go ahead and remove them. You can always let the autocomplete reinsert missing imports.

    #206727 Reply

    yax3
    Member

    Just to let you know that I solved the problem by deleting the contents in \workspace\.metadata\.plugins\org.eclipse.core.resources\.projects. All the errors and warnings went away now.

    It looks like MyEclipse caches a wrong .project which was generated before I copied the required .tld file into the right place. I thought it would automatically updated with the change in the workbench. Evidently it didn’t.

    Thanks for your help anyway!

    #206729 Reply

    Riyad Kalla
    Member

    Nice job tracking that down, and thank you for posting your solution so others can see it.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: previously working project not work for upgraded MyEclipse

You must be logged in to post in the forum log in