Archived

This forum has been archived. Please start a new discussion on GitHub.

Still intermittent "Content is not allowed in prolog" errors from eclipse plugin

I've updated to the patched version of slice2java, which I thought would fix this issue, but it still happens sometimes and it's very annoying.

I have a central Eclipse project with all of my .ice files, and I set up my other projects with a special linked folder in the workspace pointing to the "slice" folder from the central project. I then point the slice2java builder at this slice file as the source of .ice files.

This usually works, but sometimes I get an "internal error" when running the builder. Looking at the output of the slice2java builder, it looks like instead of printing and XML list of .java files, it's instead printing this:
slice2java: JavaUtil.cpp:379: std::string Slice::JavaGenerator::getPackagePrefix(const Slice::ContainedPtr&) const: Assertion `!file.empty()' failed.

This naturally isn't parseable xml, so I then get the "content not allowed in prolog" error and my .java files don't get generated.

The best solution for me would actually be being able to select a folder outside of the current project as the source of .ice files -- I've played a tiny bit with the plugin, but I don't know enough about Eclipse plugin development to make this happen. So it would be nice if using a linked folder worked reliably instead.

MEF

Comments

  • dwayne
    dwayne St. John's, Newfoundland
    Hi Mary,

    What are the patches that you are currently using for Ice and/or mcpp?
  • I'm using Ice 3.3.1 with the following three patches:
    - slice2html creates bad links
    - slice compilers abort on symlinks and double backslashes
    - random endpoint selection in .Net

    As far as I can tell, the mcpp version is 2.7.2 (the latest upstream), with no patches.
  • dwayne
    dwayne St. John's, Newfoundland
    Hi Mary,

    Here are a couple of things to try. First, I have uploaded an updated patch for the Slice compilers here which fixes a possible issue with dependency generation. You should also try applying the mcpp 2.7.2 patch found here.

    If that does not solve it we will have to try to get more infomation about your setup/slice to see if we can reproduce.
  • dwayne wrote: »
    Here are a couple of things to try. First, I have uploaded an updated patch for the Slice compilers here which fixes a possible issue with dependency generation. You should also try applying the mcpp 2.7.2 patch found here.

    I've tried rebuilding mcpp and ice with those two patches, and the issue seems to be gone. Was it both patches that fixed it in combination, I wonder, or is it just one or the other? Anyway, it's working well on my own computer now -- just need to work out a way to get the new stuff onto my colleagues' Macs so they can also build everything without workarounds. :)

    I'll try to get updated Fedora packages with these patches sent out soon.