facebook

Problems with config.xml on myclipse

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

    efratb
    Member

    Hi,

    I’m working with eclipse and I have the following xml file:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
        <service name="DeviceListenerService" targetNamespace="http://com.imagine.GWListener" typeNamespace="http://com.imagine.GWListener/types" packageName="com.imagine.GWListener">
            <interface name="com.imagine.GWListener.Devicelistener" />
        </service>
    </configuration>

    And I get the following error:
    “Cannot find the declaration of element ‘configuration'”.
    I know that the page is ok, because it works. And on other IDEs I don’t get this error.
    Can you please help me?

    Thanks a lot,
    Efrat

    #244753 Reply

    Riyad Kalla
    Member

    Efrat,
    The reason this is showing you an error is because the Schema that normally goes with this file, jax-rpc-ri-config_1_1.xsd, is not registered in our XML catalog by default. So when the XML editor goes to lookup the resource using the namespace “http://java.sun.com/xml/ns/jax-rpc/ri/config&#8221; there is no DTD or Schema registered so it cannot provide autocomplete or validation.

    What you want to do is find this file, then create an new XML Catalog entry pointing at it using the namespace given above.

    #244774 Reply

    Douglas Lee
    Member

    @support-rkalla wrote:

    Efrat,
    The reason this is showing you an error is because the Schema that normally goes with this file, jax-rpc-ri-config_1_1.xsd, is not registered in our XML catalog by default. So when the XML editor goes to lookup the resource using the namespace “http://java.sun.com/xml/ns/jax-rpc/ri/config&#8221; there is no DTD or Schema registered so it cannot provide autocomplete or validation.

    What you want to do is find this file, then create an new XML Catalog entry pointing at it using the namespace given above.

    I have the same problem with an error showing in the IDE but wscompile works just fine. It’s annoying. The solution above sounds good, I just can’t seem to find the DTD. So I disabled schema validation for now on the specific project. If anyone knows where the DTD for wscompile’s config.xml is, please post it here.

    If you want to disable the schema validation on your project until then, then know that I had to do the following sequence to get the red marks to go away.
    1) Right Click on your project which contains your wscompile config.xml file
    2) Go to “MyEclipse-Validation”
    3) Check “Override validation preferences”
    4) Uncheck “Run validation when you manually build <project-name-goes-here>”
    5) Uncheck “XML Schema Validator”
    6) Hit “Apply” and notice that the red mark is still there
    7) Uncheck “XML Validator”
    8) Hit “Apply” and notice that the red mark goes away
    9) For fun check “XML Validator”
    10) Hit “Apply” and notice that the red mark does not come back

    At least, this is the sequence that worked for me.

    -Douglas

    #244804 Reply

    efratb
    Member

    Hi,

    I’m new with my myeclipse, so I need a little help: Where do I find the DTD and how do I create a new XML catalog entry pointing at it?

    And about the second solution: When I right click my project I don’t have MyEclipse-validation, only MyEclipse–>run validation. (My project is a web project).
    So how can I still solve this problem?

    Thanks a lot,
    Efrat

    #244805 Reply

    Riyad Kalla
    Member

    Efrat,
    What is your MyEclipse Build ID from the MyEclipse > About menu?

    Also what is your Eclipse Build ID from the Help > About menu?

    #244806 Reply

    efratb
    Member

    Eclipse:
    Version: 3.1.1
    Build id: M20050929-0840

    MyEclipse:
    Version: 4.0.3
    Build id: 20051025-4.0.3-GA

    Thanks,
    Efrat

    #244808 Reply

    Riyad Kalla
    Member

    Do me a favor and create a new web project: File > New > Project > MyEclipse > J2EE > Web Project. Now open proeprties fromt he root of the project, do you see MyEclipse-Validation?

    #244809 Reply

    efratb
    Member

    No,
    In the properties I have MyEclipse-Web, MyEclipse-XDoclet and Validation.
    But not MyEclipse-Validation.

    #244810 Reply

    efratb
    Member

    When I open Window–>Preferences–>MyEclipse I have the validation option, but not in the project’s properties.

    Thanks,
    Efrat

    #244812 Reply

    Riyad Kalla
    Member

    Efrat,
    I think there is a problem with your install, when MyEclipse is installed you should see MyEclipse-Validation on every project, even Java Projects. The fact that you aren’t seeing this makes me wonder if something fundamentally is installed wrong.

    I will double check with one of the developers.

    #244816 Reply

    Douglas Lee
    Member

    @efratb wrote:

    Hi,

    I’m new with my myeclipse, so I need a little help: Where do I find the DTD and how do I create a new XML catalog entry pointing at it?

    And about the second solution: When I right click my project I don’t have MyEclipse-validation, only MyEclipse–>run validation. (My project is a web project).
    So how can I still solve this problem?

    Thanks a lot,
    Efrat

    Efrat,

    After searching yesterday I found an implementation of the dtd and xsd from netbeans.

    For the first solution, creating a new XML catalog, I did this yesterday with the xsd. I found a cvs update mail from netbeans that contained both a dtd and xsd version of the xml schema. http://websvc.netbeans.org/servlets/ReadMsg?list=cvs&msgNo=121

    You can see a cvs path above the cvs mail message that indicates they keep this in their source tree at: core/src/org/netbeans/modules/websvc/wsdl/resources which you can access online and browse through at: http://www.netbeans.org/download/source_browse.html

    I however had problems accessing it due to security restrictions at my current client. So I just copied the text from the cvs message and pasted it into two different files, the first part of the message is for the jax-rpc-ri-config_1_1.dtd, and the second part is for jax-rpc-ri-config_1_1.xsd. I ultimately just used the xsd not the dtd.

    Warning: When I copied from the cvs mail message and made my own xsd from it, I had problems with it initially. It was due to spaces being before the <?xml element. I removed the leading 2 spaces from that first line and for every other line. I think it was just the first line that parsers have a problem with if there is anything before the <?xml tag. For reference, the error that it created was”

    “The processing instruction target matching “[xX][mM][lL]” is not allowed.”

    Once you have the file adding the catalogue entry is easy.
    I use eclipse 3.1.1 and myeclipse 4.0.3, this is what I did.

    1) from the main menu select “Window->Preferences”
    2) expand “MyEcliipse->Editors->XML”
    3) select “XML Catalog”
    4) click “New” under “XML Catalog Entries”
    5) click “Browse…”
    6) select any directory i don’t think it matters and click “Import Files…”
    7) click “Browse…” and find the directory where your jax-rpc-ri-config_1_1.xsd file is
    8) you should see the jax-rpc-ri-config_1_1.xsd listed perhaps with other files
    9) check the box for jax-rpc-ri-config_1_1.xsd
    10) click “Finish”
    11) click “OK”
    12) click “OK”
    13) click “OK”

    That should work for you, it worked for me. I turned my validation checking completely back on, and I no longer get the error:

    “cvc-elt.1: Cannot find the declaration of element ‘configuration’.”

    Hope that helped.

    -Douglas

    #245589 Reply

    efratb
    Member

    Hi,

    I did as you explained and imported the xsd file to the root of the project.
    It still doesn’t help me, and I still have the error message.

    Maybe I’m importing it to the wrong directory?

    And what should I do with the dtd file??

    By the way, I checked with other guy in my company that works with myeclipse, and he doesn’t have the MyEclipse-Validation option either.

    Any idea??

    Thanks a lot for your help,
    Efrat

    #245776 Reply

    Douglas Lee
    Member

    @efratb wrote:

    Hi,

    I did as you explained and imported the xsd file to the root of the project.
    It still doesn’t help me, and I still have the error message.

    Maybe I’m importing it to the wrong directory?

    And what should I do with the dtd file??

    By the way, I checked with other guy in my company that works with myeclipse, and he doesn’t have the MyEclipse-Validation option either.

    Any idea??

    Thanks a lot for your help,
    Efrat

    Hello Efrat,

    1) Are you running eclipse/myeclipse with any other plug-ins, like the jboss-ide or something. I had conflicts with jboss-ide and myeclipse. I didn’t notice if validatio was one of them, but I think jboss-ide comes with a validation option (i might not be remembering right) which may conflict with myeclipse. The conflict I had with jboss-ide was xdoclet. I eventually backed down from jboss-ide since the only thing it gave me that eclipse didn’t was ability to do custom packaging to build my own jars (which I can easily do with ant scripts if I need).

    2) If you aren’t using any other plug-ins that you are aware of, have you tried just downloading eclipse and myeclipse and installing both in a new location (so you don’t overwrite your current install)? Then you could see if you have the validation option when you right click on an xml file.

    3) As for the dtd file. Ignore it as I stated above. You are using the xsd file like me, that is enough. I only mentioned the details of the dtd file so anyone reading my posts could know where to get the dtd from and have the option to use it if they wanted.

    I don’t have any concrete ideas for you, since I’ve not experienced the issue of the validation option not showing up when I right click on an xml file. But I’m willing to bounce ideas back and forth with you if you’re willing to try these things.

    -Douglas Lee

    #246107 Reply

    efratb
    Member

    Hi Douglas,

    Yes, I am using the JBoss & subclipse plug-ins.
    Do you believe that this might cause the problem?

    Thanks,
    Efrat

    #246329 Reply

    Douglas Lee
    Member

    @efratb wrote:

    Hi Douglas,

    Yes, I am using the JBoss & subclipse plug-ins.
    Do you believe that this might cause the problem?

    Thanks,
    Efrat

    Hello Efrat,

    Like I said in my last post. I don’t know if it would cause your problem (validation menu item not showing up). I had different problems when I had both jbosside and myeclipse running together. The problems related to xdoclet. There is really no need to run jbosside with myeclipse. Myeclipse ide gives you the functionality you need and allows you to deploy to jboss. The subclipse plugin is for subversion (your source control) which is fine. The first thing I would do if I were you, is install myeclipse to a new location. Just to see if you get the menu option for validation. I believe you will see it then and want to go forward with your new install, and not ever use jbosside with myeclipse.

    -Douglas

Viewing 15 posts - 1 through 15 (of 15 total)
Reply To: Problems with config.xml on myclipse

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