junhanqiao / oryx-editor

Automatically exported from code.google.com/p/oryx-editor
Other
0 stars 0 forks source link

EPML Import/Export does not work #244

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an EPC model
2. Export it to EPML
3. Load empty EPC editor
4. Import EPC model

What is the expected output?
I can see the model

What do you see instead?
Import fails.

As you can see in the attached file, all ids in that exported model have
the value "NaN"!!!

Original issue reported on code.google.com by NicoPete...@gmail.com on 6 Oct 2008 at 3:52

Attachments:

GoogleCodeExporter commented 9 years ago
hi stefan,

du hast doch bestimmt ganz viel freizeit down under, oder ;) ? könntest du dir 
bitte
mal den EPML import/export anschauen? der funktioniert nicht mehr. den export 
hab ich
glaub ich schon wieder repariert: du hattest vorausgesetzt, dass die ids mit
#resource beginnen, aber das hat sich geändert. die exportierte datei sieht
eigentlich ganz gut aus, aber der import schlägt trotzdem fehl. wäre nett, 
wenn du
mal reinschauen könntest. du findest den fehler bestimmt schneller als ich.

gruss,

nico

Original comment by NicoPete...@gmail.com on 13 Oct 2008 at 12:09

GoogleCodeExporter commented 9 years ago
OK, I committed a new version of the import xslt:

changes: 

- somehow an iteration over a sorted XPath result set did not work anymore - 
did you
changed the used XSLT transformation engine?
- someone introduced targets instead of outgoings node for arcs ... 

I think, if those changes are done, it should be obvious that importers, 
serializers,
etc. will not work anymore and therefore these should be adapted, too!

Anyway, could you test it again and than, hopefully, close this issue? ;-)

Original comment by stefan.k...@gmail.com on 16 Oct 2008 at 10:11

GoogleCodeExporter commented 9 years ago
the exported file looks better. at least the ids does not have the value 'NaN'
anymore. but the import this fails. I used a very simple example with 2 events 
and
one function (see attached file).

Original comment by NicoPete...@gmail.com on 16 Oct 2008 at 2:01

Attachments:

GoogleCodeExporter commented 9 years ago
As already written via email: I did not change the export it already worked 
after
your changes. Importing is working fine in my Oryx, now both with files I have
exported or your file.

I attached a screenshot showing the Oryx after I imported your last file.
Perhaps the EPCUpload servlet is not invoked correctly at your side?

Original comment by stefan.k...@gmail.com on 17 Oct 2008 at 1:05

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
After another test, I think this is fixed. Please check again!

Original comment by stefan.k...@hpi-alumni.de on 17 Oct 2008 at 1:23

GoogleCodeExporter commented 9 years ago
For me EPML-Export is still not working. The export produces epml with NaN 
values as
Ids. And the import fails with the message: Could not compile stylesheet. This
happens even if I manually insert correct Ids in the epml.

Original comment by Prof_N...@hotmail.com on 3 Nov 2008 at 11:12

GoogleCodeExporter commented 9 years ago
I did another test with SVN's head code and it is running!

What environment do you use?

I'm starting Oryx (editor and backend) within the Kubuntu image provided on 
this 
side..

Original comment by stefan.k...@hpi-alumni.de on 4 Nov 2008 at 2:11

GoogleCodeExporter commented 9 years ago
I use this version
http://oryx-editor.org/backend/poem/repository

When will this site be updated then?

Rgds,
Kai

Original comment by Prof_N...@hotmail.com on 4 Nov 2008 at 7:59

GoogleCodeExporter commented 9 years ago
I don't know when the productive system will be updated the next time. Since 
there 
where some major changes in the last weeks, I think there will be an update 
soon but 
only the team in Potsdam (like Nico) can answer this question..

Original comment by stefan.k...@hpi-alumni.de on 4 Nov 2008 at 10:09

GoogleCodeExporter commented 9 years ago
Hmm.. ok the problem remained after the upgrade..

again question at nico: which OS is used on the server? which OS did you use 
for 
your tests? 
I got the feeling that this problems relates to the implementation of the XSLT 
processor used.

I double checked it in another Oryx istance here in the office: within the 
kubuntu 
image export and import are working...

Original comment by stefan.k...@hpi-alumni.de on 17 Nov 2008 at 1:52

GoogleCodeExporter commented 9 years ago
but it works for a very simple model (event->function->event) on the public 
server.

Original comment by NicoPete...@gmail.com on 17 Nov 2008 at 8:12

GoogleCodeExporter commented 9 years ago
This problem is starting to get confusing :p

I just tested it under 
http://oryx-editor.org/backend/poem/repository/new?
stencilset=/stencilsets/epc/epc.json
and got the "Could not compile stylesheet" error when importing...

Original comment by stefan.k...@hpi-alumni.de on 17 Nov 2008 at 8:26

GoogleCodeExporter commented 9 years ago
The export seems to work for a simple model (event -> func -> event). There are 
IDs
now. But import is still not working. "Could not compile stylesheet"

Kai

Original comment by Prof_N...@hotmail.com on 17 Nov 2008 at 8:34

GoogleCodeExporter commented 9 years ago
yes, you are right!

Original comment by NicoPete...@gmail.com on 17 Nov 2008 at 10:42

GoogleCodeExporter commented 9 years ago
> again question at nico: which OS is used on the server? which OS did you use 
for 
> your tests? 
> I got the feeling that this problems relates to the implementation of the 
XSLT 
> processor used.

...

Original comment by stefan.k...@hpi-alumni.de on 18 Nov 2008 at 11:38

GoogleCodeExporter commented 9 years ago
we are using a debian system. I will tell daniel to send you a detailed 
description
of the system.

Original comment by NicoPete...@gmail.com on 19 Nov 2008 at 7:13

GoogleCodeExporter commented 9 years ago
is there a way to find out which line in the XSLT style sheet causes the 
compilation 
error?
maybe you could look into the tomcat logs or debug it on the test-server since 
I 
don't have access to these systems?

Original comment by stefan.k...@hpi-alumni.de on 1 Dec 2008 at 4:27

GoogleCodeExporter commented 9 years ago
made an additional test under Windows Vista: export and import are working 
there... 

so, this is really strange (under kubuntu(!) and vista it's working, under 
debian 
it's not???) :-/

Original comment by stefan.k...@hpi-alumni.de on 2 Dec 2008 at 7:00

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi,

this might be helpful:
http://java.sun.com/javase/6/docs/api/javax/xml/transform/TransformerFactory.htm
l#newInstance%28%29

It describes how the transformer implementation that is doing the import
(XSLT-Transformation from EPML to eRDF which is then displayed by Oryx?) is 
being
looked up by the TransformerFactory. This seems to be system dependent. Maybe 
the
problem is, that the public server has no XSLT processor installed.

Hope that helps.

Btw, the Servlet responsible for the import is the following:
http://oryx-editor.googlecode.com/svn/trunk/editor/server/src/org/oryxeditor/ser
ver/EPCUpload.java

Original comment by Prof_N...@hotmail.com on 2 Dec 2008 at 3:15

GoogleCodeExporter commented 9 years ago
there are no log entries on the productive server adressing that issue. maybe
"System.getProperty("catalina.home")" in line 99 of EPCUpload does not work on 
debian. 

Original comment by NicoPete...@gmail.com on 2 Dec 2008 at 4:24

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yes, this would cause trouble when the webapps folder is not in catalina.home.

Wouldn't something like this be better?
final String xsltFilename = 
this.getServletContext().getRealPath("xslt/EPML2eRDF.xslt")

Original comment by Prof_N...@hotmail.com on 2 Dec 2008 at 9:21

GoogleCodeExporter commented 9 years ago
we should give it a try (or use a test sysout for figuring out 
whether "catalina.home" is really not set under debian) ..

Original comment by stefan.k...@hpi-alumni.de on 3 Dec 2008 at 1:34