facebook

Stupid Generics Question: I Know It Isn’t MyEclipse, but …

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #255814 Reply

    mstrong4867
    Member

    I only post this here, because it seems I am doing what the pure Java forums claim I should be doing; however, the MyEclipse warning claims I’m still off base.

    I suspect the MyEclipse editor just uses the Java compiler for validating code, but I’m puzzled.

    I have a map, diagnosisTypeMap that groups lists of diagnosis records by type. It’s declared like this:

    
    private Map<String, List<DiagnosisView>> diagnosisTypeMap = new HashMap<String, List<DiagnosisView>>();
    

    … then later, done in one of the methods, I do …

    
            List<DiagnosisView> list = diagnosisTypeMap.get(diagType);
            Collections.sort(list);
    

    Even though I explicity type the list immediately before the call to Collections.sort(…), I still get a complaint that seems to indicate I haven’t.

    I get a yellow warning with the message:

    Type saftey: Unchecked invocation sort(List<DiagnosisView>) of the generic method sort(Link<T>) of type Collections.

    Any thoughts / suggestions?

    Mike

    #255842 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

    Mike,
    I think this is the issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=90137

    #255846 Reply

    mstrong4867
    Member

    Spot on. Sounds like it!

    Thanks, Riyad.

    #255847 Reply

    Riyad Kalla
    Member

    No problem.

    #258187 Reply

    mominaqeel
    Member

    Hi,
    I’m new to J2EE and trying to work on a simple struts project. I’m using myeclipse trial version with JBOSS4.1 to figure out if myeclipse would simplify our task.
    I’m facing problems when I deploy all of the tutorials given at myeclipse website. I understand this is due to some incorrect settings but I’m undable to figure out where the problem is.
    I mention 2 typical cases I end up with

    hen I deploy I get following messages in Application server log

    2006-09-06 17:07:51,868 DEBUG [org.jboss.mx.loading.ClassLoaderUtils] Multiple class loaders found for pkg: org.apache.commons.beanutils.converters
    2006-09-06 17:07:51,868 DEBUG [org.jboss.mx.loading.ClassLoaderUtils] Multiple class loaders found for pkg: org.apache.commons.beanutils

    1) WHen I try to test this I get
    17:09:59,985 ERROR [RequestProcessor] No action instance for path /InputAction could be created
    java.lang.ClassNotFoundException: com.antares.solutions.action.InputAction
    at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    at java.security.AccessController.doPrivileged(Native Method)

    or I get this
    2)
    javax.servlet.ServletException: Exception creating bean of class com.antares.struts.form.RegisterForm: {1}
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)

    Can anyone please help me so that I can test this and decide about the product.

    Regards
    Aqeel..

    #258188 Reply

    Riyad Kalla
    Member

    Aqeel,
    First resolve the multiple-classloader errors first. This is most likely happening because JBoss already ships some of the the commons util JARs in it’s /lib directory, so you may be having a conflict with that. Also as far as why you are getting the no action instance for path InputAction, it looks like your class isn’t getting correctly deployed or you have created it in a odd location. Give us more information about your project if you need help figure it out please.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Stupid Generics Question: I Know It Isn’t MyEclipse, but …

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