Error executing integration tab samples provided

Post Reply
sbright
Posts: 3
Joined: 09 Dec 2010, 21:56

Hello, apologies in advance for the newcomer question. I am trying out the integration tab. The installation seemed to go fine, however when I try the sample XML/XSL provided, I get the following error on the tab:

javax.xml.transform.TransformerConfigurationException: Failed to compile stylesheet. 1 error detected.

and in the protege.exe log:
Error
java.net.MalformedURLException: unknown protocol: c

Any hints? I tried re-downloading the XSL from this link, still the same error. My environment is a local install using Tomcat 6, JVM 1.6, Protege 3.4.4, Windows 7.

Many thanks
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Hi,

I think the first thing to do is to check which XSL and which XML files you are using.

This looks like the Integration Tab is tripping up with loading the transform XSL file.

First a bit of background. The XSL transforms the source XML file into a Python script that uses a library of import functions that we provide. Defining new transforms is what I would consider an advanced topic.

We supply a very simple example that imports the supplied file 'reportXML.xml' using the 'importEssentialInstances.xsl' transform. This adds two new Business Processes to your target repository.

If you're still having trouble with this transform, it may be worth downloading the latest version, especially if you are using an alternative source XML file.

Let me know the specifics of each file (XSL, XML, etc.) that you're using and also what you have entered in each of the parameters on the Integration Tab - only the Source Repository Description is optional.

Jonathan
Essential Project Team
dpurcell
Posts: 6
Joined: 09 Dec 2011, 11:31

Hi,
Apologies for new user question.
I am having a similar problem trying to use the sample integration files.
I have downloaded the latest version from here and I am still getting the error
javax.xml.transform.TransformerConfigurationException: Failed to compile stylesheet. 1 error detected.
Error: An error or exception occurred during the execution of the integration script. See output for more information.
I have set all the parameters in the Integration Tab exactly as the help instructions defined, although you say that the Source Repository is optional the "Execute Integration" button is not enabled until something is filled in there, so I used "Integration_Test_Repository".
I am using Protege 3.4.7 and Windows XP.

Thanks in advance for any assistance.
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Thanks for your post.

The integration tab will need the Source Repository name, which it uses to keep a track of what has been imported and to help with on-going synchronisation. The Source Repository Description is indeed optional but is usually worth including so that we have some more details about the source of the content we want to import - even if that's originally a spreadsheet.

If you can check the Protege console (the little command prompt window if you are running on Windows) or the terminal window / console log on Unix or Mac platforms) for more information about the error that the Transformer encountered, that would help us to narrow things down a bit.

Are you using the example transform, 'importEssentialInstances.xsl'?
You should not encounter any transform errors using this transform but it can depend on your source content format.

I think it's worth mentioning that the integration tab is really designed to manage XML source data and we have other solutions for spreadsheets that handle those in a more reliable way.

Each content source XML file requires it's own transform and as the tutorial describes, we have to define the semantic mapping between the source content and the Essential Meta Model. For some XML schemas, e.g. the Essential Reporting XML schema, we can map directly from the source to the relevant Essential classes, however, often we need to create additional instances that are derived from the source content during the import, where the source does not map directly to the Essential Meta Model.

The 'importEssentialInstances.xsl' transform understands how to import source content that takes the form of the Essential Viewer repository snapshot (reportXML.xml) and if your source conforms to that schema you can use this transform. However, if your source content is in any other format, this transform will not work and you will need to define your own transform. Currently (and one of the things we are working on is improving the usability of the import process), this can be quite a technical process and we are more than happy to help you with defining these transforms. Of course, once the transform has been defined, you can use and re-use it for on-going imports.

Hope this background helps. To your specific error message:
Let me know which transform you are using and what the source content XML file is that you are using.
Are you using the example content to explore how the tab works (the demo content source and the importEssentialInstances.xsl transform)? Or are you importing your own source data?

Let me know some more about any error messages and the source and transform you are using and we will get to the bottom of this.

Jonathan
Essential Project Team
dpurcell
Posts: 6
Joined: 09 Dec 2011, 11:31

Hi Jonathon,

Thanks for you response.

I am using exactly what was proposed in the tutorial - the files supplied as samples to try out the functionality.

Source FIle : reportXML.xml
Transform File : importEssentialInstances.xsl
Include File : ....\Integration Test Files\Include

I am not sure what the Source Repository should be, but when I click the arrow on the field it offers me Demo_Repository. I have the essential_ecp_7_v1 loaded for the test.

In the Protege console is almost the same error as sbright quoted above -
Error
java.net.MalformedURLException: unknown protocol: d
except the letter at the end is 'd' not 'c', which I guess is because I have Protege and Essential on my D: drive not the C: drive.

Thanks
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Thanks for posting back.

That particular error is from the XSL engine where it cannot find the path to the specified file, and we've had a similar thing with the Essential Viewer where there were some 'unusual' characters in the path to the XML or XSL document.
We've actually made some changes to the Essential Viewer Engine in version 3 that handle file paths (in particular on Windows) better and it may be that we need to apply the same approach in the Integration Tab.

In the meantime, there are some things to try that will help get to the bottom of the cause of the error.

Firstly, check that there are no 'unusual' characters in the file path, e.g. folders with '[' characters in their name or the like.

Assuming that your folder names (and file names) are not using any unusual characters, we should eliminate any issues caused by the Windows folder separator, '\'

What happens if you replace the '\' characters in the path to the Source XML file, the Transform XSL and the Include folder with the Unix (and Java) '/' character?

The underlying Java system should handle these but it's worth eliminating these from investigation.

In terms of the Source Repository parameter and the description, you just need to define a new name for your data source. You can just type in any relevant name. The integration engine uses this to keep a track of where any imported content has come from, and if/when we come to import more or updated content from the same source, then we pick that repository name from the drop-down list.

Let me know whether swapping the '\' for '/' (I appreciate it's a pain) gets you past the TransformerConfiguration Exception and we'll take it from there.

Jonathan
Essential Project Team
dpurcell
Posts: 6
Joined: 09 Dec 2011, 11:31

Hello Jonathan,
Thanks for your persistence with this problem.
I tried your suggestions and they did not work. I was just about to post that when I decided to try removing the 'D:' from the path names. It worked.
How does it know where to begin my quoted filepath if I do not tell it the drive letter ?
I now have a working Integration Tab.
However, I really wanted to use it for importing from Excel, but you remarked previously that it was not really intended for this and you are pursuing a separate Excel import.

Anyway thanks again for all your efforts in providing this worthwhile open source resource and in particular helping with this problem.
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Hi.

Glad you got it working. Sounds like Java is pretty much doing the right thing with cross-platform files but that there's something getting tripped up by the 'D:'. This is something that I recently worked on improving for the Essential Viewer engine, and I think the transformer that we're using doesn't seem to handle these sorts of file paths properly.

As to how does it know to look on the D: drive, I think what is going on is that it is taking the full path from the current drive context - I think you mentioned that you have Protege installed on the D: drive. I suspect that this may fail if you had to pull some source files from the C: drive, for example, which obviously is something that needs looking at.

As for importing from Excel sources, that can be rather complex with this Tab as it assumes XML sources (the transforms are written as XSL files) and the XML that Excel produces is a bit unpredictable.

For these reasons, and to significantly improve useability, we have developed a new web application to run along side Essential Viewer that handles Excel sources in a very much easier-to-use environment. Look out for Sarah's next blog article, which will talk about what's coming very soon. We've been using this import tool for a while to field test it and this will be included in the forthcoming new release of the Essential Project tools.

We'd be happy to discuss your Excel import needs in meantime.

Jonathan
Essential Project Team
Post Reply