facebook

castor method not recognized [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #203676 Reply

    blaplante
    Member

    I am not sure that this is a MyEclipse workbench problem but I am sure I am at my wits end. I hope this has happened to someone else.

    I created Java project and added the \eclipse\workspace\castor-xml\lib\castor-0.9.5.2.jar to the java.build.path in the project. When I create a class using castor it creates a class that uses Marshaller.marshal(this, contentHandler) where contentHandler is an org.xml.sax.ContentHandler. The java editor complains that no such method signature is found yet when I scroll down to the castor package org.exolab.castor.xml.Marshaller I can see the method that takes the arguments explained here.

    The same thing happened to me at work and I resolved it by overwriting my .classpath file in eclipse with one I got from a fellow team member. Has this happened to anyone else?

    WinXP pro
    Eclipse 2.1.0
    MyEclipse 2.6.4

    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.jboss4_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.jboss_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.jetty4_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.jetty5_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.jetty_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.jonas3_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.jonas_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.jrun4_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.jrun_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.oracle9_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.oracle_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.orion1_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.orion2_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.resin2_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.resin3_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.resin_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.tomcat4_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.tomcat5_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.tomcat_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.weblogic6_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.weblogic7_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.weblogic8_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.weblogic_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.websphere5_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.websphere_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.j2eedt.core_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.wdt.jsp.debug_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.wizards_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.myeclipse.ast_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.myeclipse.core_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.myeclipse.doc_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.myeclipse.enterprise_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.myeclipse.help_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.myeclipse.perspective_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.myeclipse.wdt_2.6.4
    \MyEclipse\eclipse\plugins\de.bb.bje.eclipse_2.6.4
    \MyEclipse\eclipse\plugins\net.sf.solareclipse.ui_2.5.1
    \MyEclipse\eclipse\plugins\net.sf.solareclipse.xml.core_2.5.1
    \MyEclipse\eclipse\plugins\net.sf.solareclipse.xml.ui_2.5.1
    \MyEclipse\eclipse\plugins\org.eclipse.debug.core_2.5.1
    \MyEclipse\eclipse\plugins\org.eclipse.debug.ui_2.5.1
    \MyEclipse\eclipse\plugins\org.eclipse.jdt.debug.ui_2.5.1
    \MyEclipse\eclipse\plugins\org.eclipse.jdt.debug_2.5.1
    \MyEclipse\eclipse\plugins\org.jboss.ide.eclipse.apache.xalan_2.6.4
    \MyEclipse\eclipse\plugins\org.jboss.ide.eclipse.core_2.6.4
    \MyEclipse\eclipse\plugins\org.jboss.ide.eclipse.xdoclet.assist_2.6.4
    \MyEclipse\eclipse\plugins\org.jboss.ide.eclipse.xdoclet.core_2.6.4
    \MyEclipse\eclipse\plugins\org.jboss.ide.eclipse.xdoclet.run_2.6.4
    \MyEclipse\eclipse\plugins\org.jboss.ide.eclipse.xdoclet.ui_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.ast.deploy.core_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.core_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.bejy_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.core_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.jboss2_2.6.4
    \MyEclipse\eclipse\plugins\com.genuitec.eclipse.easie.jboss3_2.6.4

    \eclipse\plugins\org.eclipse.compare_2.1.0
    \eclipse\plugins\org.eclipse.core.boot_2.1.0
    \eclipse\plugins\org.eclipse.core.resources.win32_2.1.0
    \eclipse\plugins\org.eclipse.core.resources_2.1.0
    \eclipse\plugins\org.eclipse.core.runtime_2.1.0
    \eclipse\plugins\org.eclipse.debug.core_2.1.0
    \eclipse\plugins\org.eclipse.debug.ui_2.1.0
    \eclipse\plugins\org.eclipse.draw2d_2.1.0
    \eclipse\plugins\org.eclipse.emf.codegen.ecore.ui_1.1.0
    \eclipse\plugins\org.eclipse.emf.codegen.ecore_1.1.0
    \eclipse\plugins\org.eclipse.emf.codegen.ui_1.1.0
    \eclipse\plugins\org.eclipse.emf.codegen_1.1.0
    \eclipse\plugins\org.eclipse.emf.common.ui_1.1.0
    \eclipse\plugins\org.eclipse.emf.common_1.1.0
    \eclipse\plugins\org.eclipse.emf.ecore.edit_1.1.0
    \eclipse\plugins\org.eclipse.emf.ecore.editor_1.1.0
    \eclipse\plugins\org.eclipse.emf.ecore.xmi_1.1.0
    \eclipse\plugins\org.eclipse.emf.ecore_1.1.0
    \eclipse\plugins\org.eclipse.emf.edit.ui_1.1.0
    \eclipse\plugins\org.eclipse.emf.edit_1.1.0
    \eclipse\plugins\org.eclipse.emf.mapping.ui_1.1.0
    \eclipse\plugins\org.eclipse.emf.mapping_1.1.0
    \eclipse\plugins\org.eclipse.emf_1.1.0
    \eclipse\plugins\org.eclipse.gef_2.1.0
    \eclipse\plugins\org.eclipse.help.appserver_2.1.0
    \eclipse\plugins\org.eclipse.help.ui.win32_2.1.0
    \eclipse\plugins\org.eclipse.help.ui_2.1.0
    \eclipse\plugins\org.eclipse.help.webapp_2.1.0
    \eclipse\plugins\org.eclipse.help_2.1.0
    \eclipse\plugins\org.eclipse.jdt.core_2.1.0
    \eclipse\plugins\org.eclipse.jdt.debug.ui_2.1.0
    \eclipse\plugins\org.eclipse.jdt.debug_2.1.0
    \eclipse\plugins\org.eclipse.jdt.doc.isv_2.1.0
    \eclipse\plugins\org.eclipse.jdt.doc.user_2.1.0
    \eclipse\plugins\org.eclipse.jdt.junit_2.1.0
    \eclipse\plugins\org.eclipse.jdt.launching_2.1.0
    \eclipse\plugins\org.eclipse.jdt.source_2.1.0
    \eclipse\plugins\org.eclipse.jdt.ui_2.1.0
    \eclipse\plugins\org.eclipse.jdt_2.1.0
    \eclipse\plugins\org.eclipse.jface.text_2.1.0
    \eclipse\plugins\org.eclipse.jface_2.1.0
    \eclipse\plugins\org.eclipse.pde.build_2.1.0
    \eclipse\plugins\org.eclipse.pde.core_2.1.0
    \eclipse\plugins\org.eclipse.pde.doc.user_2.1.0
    \eclipse\plugins\org.eclipse.pde.runtime_2.1.0
    \eclipse\plugins\org.eclipse.pde.source_2.1.0
    \eclipse\plugins\org.eclipse.pde.ui_2.1.0
    \eclipse\plugins\org.eclipse.pde_2.1.0
    \eclipse\plugins\org.eclipse.platform.doc.isv_2.1.0
    \eclipse\plugins\org.eclipse.platform.doc.user_2.1.0
    \eclipse\plugins\org.eclipse.platform.source_2.1.0
    \eclipse\plugins\org.eclipse.platform.win32.source_2.1.0
    \eclipse\plugins\org.eclipse.platform.win32_2.1.0
    \eclipse\plugins\org.eclipse.platform_2.1.0
    \eclipse\plugins\org.eclipse.sdk.win32_2.1.0
    \eclipse\plugins\org.eclipse.search_2.1.0
    \eclipse\plugins\org.eclipse.swt.win32_2.1.0
    \eclipse\plugins\org.eclipse.swt_2.1.0
    \eclipse\plugins\org.eclipse.team.core_2.1.0
    \eclipse\plugins\org.eclipse.team.cvs.core_2.1.0
    \eclipse\plugins\org.eclipse.team.cvs.ssh_2.1.0
    \eclipse\plugins\org.eclipse.team.cvs.ui_2.1.0
    \eclipse\plugins\org.eclipse.team.extras_2.1.0
    \eclipse\plugins\org.eclipse.team.ftp_2.1.0
    \eclipse\plugins\org.eclipse.team.ui_2.1.0
    \eclipse\plugins\org.eclipse.team.webdav_2.1.0
    \eclipse\plugins\org.eclipse.text_2.1.0
    \eclipse\plugins\org.eclipse.tomcat_4.0.6
    \eclipse\plugins\org.eclipse.ui.editors_2.1.0
    \eclipse\plugins\org.eclipse.ui.externaltools_2.1.0
    \eclipse\plugins\org.eclipse.ui.views_2.1.0
    \eclipse\plugins\org.eclipse.ui.win32_2.1.0
    \eclipse\plugins\org.eclipse.ui.workbench.texteditor_2.1.0
    \eclipse\plugins\org.eclipse.ui.workbench_2.1.0
    \eclipse\plugins\org.eclipse.ui_2.1.0
    \eclipse\plugins\org.eclipse.update.core.win32_2.1.0
    \eclipse\plugins\org.eclipse.update.core_2.1.0
    \eclipse\plugins\org.eclipse.update.ui.forms_2.1.0
    \eclipse\plugins\org.eclipse.update.ui.win32_2.1.0
    \eclipse\plugins\org.eclipse.update.ui_2.1.0
    \eclipse\plugins\org.eclipse.webdav_2.1.0
    \eclipse\plugins\org.graysky.eclipse.logwatcher_1.2.0
    \eclipse\plugins\org.junit_3.8.1
    \eclipse\plugins\com.cloudgarden.jigloo_2.2.0
    \eclipse\plugins\com.ibm.able.ablex_2.0.1
    \eclipse\plugins\com.ibm.able.doc_2.0.1
    \eclipse\plugins\com.ibm.able.examples_2.0.1
    \eclipse\plugins\com.ibm.able.gui_2.0.1
    \eclipse\plugins\com.ibm.able.platform_2.0.1
    \eclipse\plugins\com.ibm.able.ui.agenteditor_2.0.1
    \eclipse\plugins\com.ibm.able.ui.ruleeditor_2.0.1
    \eclipse\plugins\com.ibm.able_2.0.1
    \eclipse\plugins\com.objfac.xmleditor_2.0.2
    \eclipse\plugins\com.omondo.uml.doc.user_1.1.2
    \eclipse\plugins\com.omondo.uml.example.openapi_1.1.2
    \eclipse\plugins\com.omondo.uml_1.2.1
    \eclipse\plugins\com.pnehrer.castor_1.2.1
    \eclipse\plugins\com.strecl.jsp_0.8.3
    \eclipse\plugins\com.strecl.textModel_0.7.0
    \eclipse\plugins\com.waldura.eclipse.jndiexplorer_1.1.0-b4
    \eclipse\plugins\de.gebit.planty_0.9.0
    \eclipse\plugins\jadclipse
    \eclipse\plugins\JFaceDbcPlugin1.0.1
    \eclipse\plugins\net.sourceforge.jseditor_0.0.3
    \eclipse\plugins\org.apache.ant_1.5.2
    \eclipse\plugins\org.apache.lucene_1.2.1
    \eclipse\plugins\org.apache.xerces_4.0.7
    \eclipse\plugins\org.easyexplore_1.0.1
    \eclipse\plugins\org.eclipse.ant.core_2.1.0

    #203682 Reply

    Riyad Kalla
    Member

    I use Castor (that version too) in a project currently and double checked on my classes… the generated classes do not generate a marshal method with that signature. Infact the marshal method only takes 1 parameter, and that is the ContentHandler… I’m curious if you are generating with an older version and then adding the newer JAR to your classpath and that is why you are getting the descrepency…

    How are you generating the classes? Are you using the Castor Eclipse plugin? (version 1.2.2_fix is the newest I believe).

    #203683 Reply

    Riyad Kalla
    Member

    Note that I’ve closed this subject because its not related to MyEclipse, but I will be notified of any responses you make and will be more than happy to help get you up and running anyway.

    #203688 Reply

    blaplante
    Member

    I probably wasn’t clear about what I meant. You know how any object reference followed by a “.” dot operator will produce context sensitive dropdown that shows the members of that object. The following 4 signatures are available from the Marshal object but only the writer, node and the document handler are recognized by the editor. The content handler argument is said to be a compiler error and it is missing from the dropdown even though you can view the method from the member window when Marshaller is chosen in the types window.

    public static void marshal(Object object, Writer out)
    public static void marshal(Object object, DocumentHandler handler)
    public static void marshal(Object object, ContentHandler handler)
    public static void marshal(Object object, Node node)

    I appreciate you response and I don’t think it is a MyEclipse problem either, I am just happy to get some feedback.

    #203690 Reply

    Riyad Kalla
    Member

    I think you might need to double check your build path libraries or even redownload the Castor-xml JAR… I have castor-0.9.5.2-xml.jar in my build path, and just added the following code and it is recognized correctly:

    
    try
    {
        Marshaller.marshal(null, (ContentHandler)new Object());
    }
    catch (MarshalException e1)
    {
        e1.printStackTrace();
    }
    catch (ValidationException e1)
    {
        e1.printStackTrace();
    }
    catch (IOException e1)
    {
        e1.printStackTrace();
    }
    

    You might want to uninstall the Castor plugin if you are using it, because IIRC it ships/uses castor 0.9.4 and I wonder if that is mucking up your build path.

    You might also want to close/reopen Eclipse and your project to see if Eclipse just needs to update its completion cache. It really sounds like it is getting a conflict somewhere… this is very strange.

    But remember, the longer something takes for you to fix, the smaller the fix is. So its probably something like a classpath conflict. You might want to click in your package explorer view (the down arrow at the top right) and go down to “filters” and make sure you aren’t inadvertantly filtering out “*.jar” or “references libraries” that might have tipped you off to the classpath problem before hand just because you would be able to see both libraries mounted.

    #203698 Reply

    blaplante
    Member

    I think you have a point there. I am at work now and the version is castor-0.9.4.1-xml.jar. This version is not giving me a problem. I may either have to check the digital signature of the version that I downloaded at home or just down grade back to the 0.9.4.1 version. I don’t want to take up any more valuable resources discussing my problem here, but I very much appreciate your time. I have alerted a lot of my fellow developers to go and buy MyEclipse workbench just because there are a lot of good knowledgeable people and a fair amount of useful information in these forums.

    #203706 Reply

    Riyad Kalla
    Member

    Thanks so much for the kind words and support, we are glad we were able to help (and I hope you find out whats going on).

    #204083 Reply

    blaplante
    Member

    I figured it out. If your project has j2ee.jar in the class path you have to go to the build path page of the project and change the order of the jars on the last tab. Make sure that the castor jar is above the j2ee.jar and all is fixed.

    #204086 Reply

    Riyad Kalla
    Member

    Ohhh… geez that was a doozey, I’m glad you got everything figured out!

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: castor method not recognized [Closed]

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