Using jackBe Migration tool

Manish
Manish's picture
User offline. Last seen 21 weeks 3 days ago. Offline
Joined: 01/20/2010
Points: 21

Hi,

I am Migrating jackBe 2.5 to 2.7. My next step is to export all the mashups to JackBe 2.7

I have read that we need to convert the mashups and jackbe is providing a tool for the same.

I have tried exporting mashups with this tool but i am getting following error

C:\Documents and Settings\Munish_chopra01\My Documents\Downloads\wires-migrator-2_7_0>java -jar wires-migrator.jar config.properties
[Fatal Error] :1:1: Premature end of file.
org.xml.sax.SAXParseException: Premature end of file.
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:239)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
        at com.jackbe.wires.migrator.TransformXML.parseXML(Unknown Source)
        at com.jackbe.wires.migrator.Main.<init>(Unknown Source)
        at com.jackbe.wires.migrator.Main.main(Unknown Source)
Exception in thread "main" java.lang.NullPointerException
        at com.jackbe.wires.migrator.Main.<init>(Unknown Source)
        at com.jackbe.wires.migrator.Main.main(Unknown Source)

 

Please help as I have no clue about fixing this issue.

0
Your rating: None
smitchell
smitchell's picture
User offline. Last seen 2 weeks 5 days ago. Offline
Joined: 08/29/2008
Points: 34

Can you attach your configuration file to this post? It would help to figure out potentially what the problem is.

<!--Session data-->

 

Sara, technical writer/jackbe

 

israel.trujillo
israel.trujillo's picture
User offline. Last seen 1 week 2 days ago. Offline
Joined: 09/26/2008
Points: 2

 Manish,

1) Could you first try migrating from 2.5 to 2.6.1 and then to 2.7.1?

I think that will put us in a better position to help you.

Also, besides the configuration file that Sara requested you, in the migration from 2.5 to 2.6.1 you will generate a export file for your mashups and servces, so:

2) is it possible for you to attach the export file here??

with that I can have the same environment and help you more effectively 

and 3) What is the OS and JRE/JDK version you are using?

 

Thanks

Israel Trujillo @ JackBe

Manish
Manish's picture
User offline. Last seen 21 weeks 3 days ago. Offline
Joined: 01/20/2010
Points: 21

Hi Sara,

Below is my properties file. I guess i havent done anything wrong here :)

------------------------------

output.file=export.xml
src.url=http://localhost:8080/presto/edge/api
src.user=admin
src.password=adminadmin

xslt.file=xslt/migrationW1-W2.xsl
export.xslt.file=xslt/migrationExportFormat.xsl
---------------------------------------

Israel Trujillo,

1. I am not able to export feeds from 2.5 with this tool.

http://www.jackbe.com/downloads/presto/2.7.0/utilities/wires-migrator-2_7_0.zip

2. Export file is empty. I am not able to export it all. The command which I can giving at dos prompt is

java -jar wires-migrator.jar config.properties

I have attacted my configuartion file.

3. My OS is Windows XP SP3 and JDK version is 1.6.0_04

I am not behind any proxy servers.

Regards,

Manish

israel.trujillo
israel.trujillo's picture
User offline. Last seen 1 week 2 days ago. Offline
Joined: 09/26/2008
Points: 2

 Manish,

Now we need you to export all the services in your Presto repository to a file and attach it here.

To do it you will need to use the padmin tool which is usually located in <your presto installation>/prestocli/bin/padmin.bat if you execute it as "padmin help" it will give instructions on how to use it but something like ">padmin -q all -f exportedservices.xml -u admin -w adminadmin" should work, please use that tool to export your services to a file and you might want to zip the file before attaching it here as it can be quite heavy.

Regards,

Israel

harpreet
User offline. Last seen 2 years 7 weeks ago. Offline
Joined: 04/01/2010
Points: 0

Hi Israel,

I am a



colleague of Munish working on the same issue.

We tried using the padmin tool of Presto 2.7.0 to export the mashups created in Presto 2.5.1.

We are getting the following exception

D:\JackBe 2.7.0\Presto2.7.0\prestocli\bin>padmin.bat exportServices -l http://localhost:8080/presto/edge/api -u admin -w adminadmin -f D:\export2.xml -q type=all
Exception in thread "main" net.sf.json.JSONException: A JSONObject text must begin with '{' at character 0 of
        at net.sf.json.util.JSONTokener.syntaxError(JSONTokener.java:512)
        at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:901)
        at net.sf.json.JSONObject._fromString(JSONObject.java:1122)
        at net.sf.json.JSONObject.fromObject(JSONObject.java:174)
        at net.sf.json.JSONObject.fromObject(JSONObject.java:148)
        at com.jackbe.jbp.sas.cli.rdsremoting.ProxyBase.sendRequest(ProxyBase.java:84)
        at com.jackbe.jbp.sas.cli.rdsremoting.ProxyBase.doOperationInvocation(ProxyBase.java:62)
        at com.jackbe.jbp.sas.cli.rdsremoting.ExportServiceProxy.exportByQuery(ExportServiceProxy.java:65)
         at com.jackbe.jbp.sas.cli.export.ExportServiceCmd.execute(ExportServiceCmd.java:137)
         at com.jackbe.jbp.sas.cli.CliAdmin.run(CliAdmin.java:175)
         at com.jackbe.jbp.sas.cli.CliAdmin.main(CliAdmin.java:84)

 

 

Also we have a export file in JSON format containing all the data which need to be transfered to Presto 2.7.0. This file is created from Presto 2.5.1 data.

israel.trujillo
israel.trujillo's picture
User offline. Last seen 1 week 2 days ago. Offline
Joined: 09/26/2008
Points: 2

 Hi Harpreet,

I see, my guess here is that you might be using the wrong version of  padmin,

please go to your Presto 2.5.x installation and search for prestocli/bin use the padmin tool in there, use the 

prestoUrl of your Presto 2.5 server.

 

Also, How did you generate the .json file?

OK, meanwhile I'm installing a Presto 2.5 to be in a better shape to help you out.

Regards,

Israel

 

 

 

harpreet07
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 04/06/2010
Points: 0

Hi Israel,

I tried using padmin tool of  Prsto 2.5. But still it is giving me the same exceptions

D:\JackBe\prestocli\bin>padmin.bat exportServices -l http://localhost:8080/presto/edge/api -u admin -w adminadmin -f D:\exporttest5.xml -q type=all
Exception in thread "main" net.sf.json.JSONException: A JSONObject text must begin with '{' at character 0 of
        at net.sf.json.util.JSONTokener.syntaxError(JSONTokener.java:512)
        at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:901)
        at net.sf.json.JSONObject._fromString(JSONObject.java:1122)
        at net.sf.json.JSONObject.fromObject(JSONObject.java:174)
        at net.sf.json.JSONObject.fromObject(JSONObject.java:148)
        at com.jackbe.jbp.sas.cli.rdsremoting.ProxyBase.sendRequest(ProxyBase.java:83)
        at com.jackbe.jbp.sas.cli.rdsremoting.ProxyBase.doOperationInvocation(ProxyBase.java:61)
        at com.jackbe.jbp.sas.cli.rdsremoting.ExportServiceProxy.exportByQuery(ExportServiceProxy.java:65)
        at com.jackbe.jbp.sas.cli.export.ExportServiceCmd.execute(ExportServiceCmd.java:137)
        at com.jackbe.jbp.sas.cli.CliAdmin.run(CliAdmin.java:175)
        at com.jackbe.jbp.sas.cli.CliAdmin.main(CliAdmin.java:84)

 

Kindly guide me through this issue.

Also regarding teh Json file. We are using an internal tool to create this Json file. This tool is used to imnport and export the mashups.

israel.trujillo
israel.trujillo's picture
User offline. Last seen 1 week 2 days ago. Offline
Joined: 09/26/2008
Points: 2

 Harpreet,

Ok , I see, well it seems you are having problem with that library (net.sf.json) , ok, well I'm installing a Presto 2.5.1 it is taking me a while because it is a pretty old version and just got the files and now I'm waiting for a license  to test, so I'll keep posted on my findings with the 2.5.1 -> 2.7.1 migration.

Don't worry, we will figure it out.

israel.trujillo
israel.trujillo's picture
User offline. Last seen 1 week 2 days ago. Offline
Joined: 09/26/2008
Points: 2

Harpreet,

I now have a Presto 2.5.1 running I created a couple of Mashups with Wires and well it runs successfully, so in this moment I have two ideas the first one is that you might have a classpath problem and the second is that something might be wrong with the migration tool you have.

To discard the classpath problem please run the tool using java -cp < the files in wires-migrator/lib and wires-migrator.jar>  com.jackbe.wires.migrator.Main config.properties, the idea is to narrow the classpath to use only the libraries provided in the wires migration tool and avoid possible conflicts with other libraries in your enviroment.

To discard the problem with the tool, use the migrator tool I just attached to this discussion.

israel.trujillo
israel.trujillo's picture
User offline. Last seen 1 week 2 days ago. Offline
Joined: 09/26/2008
Points: 2

Another question: What database are you using as your presto repository?, in my case I'm using C:\Presto2.5.1\prestorepository\hsqldb, and you?? 

Manish
Manish's picture
User offline. Last seen 21 weeks 3 days ago. Offline
Joined: 01/20/2010
Points: 21

Hi Israel,

Here are the updates.

We have resolved couple of issues. The exceptions that we were facing was may be due to our CAS server. I have found a way a to bypass the CAS server and have successfully exported services and mashups with wires-migrator tool.

Now the next task is to export services to 2.7

While doing this with padmin I am typing this command

padmin importServices -l http://localhost:8080/presto/edge/api/ -u admin -f d:/export.xml -w adminadmin

 

and I am getting following exception

ERROR: Invalid byte 1 of 1-byte UTF-8 sequence. Nested exception: Invalid byte 1 of 1-byte UTF-8 sequence.
DONE

 

Please help me to solve this issue. It seems like I am near to end this project.

 

Regards,

Manish

israel.trujillo
israel.trujillo's picture
User offline. Last seen 1 week 2 days ago. Offline
Joined: 09/26/2008
Points: 2

 Hi Manish,

Ok lets try a couple of things before asking Sara for help, 

- Please open your export.xml file with an xml editor, maybe eclipse has one that allows you to check the problems with the document

-If you don't find anything unsual , please attach your xml file to see what it could be.

Regards,

Israel

Manish
Manish's picture
User offline. Last seen 21 weeks 3 days ago. Offline
Joined: 01/20/2010
Points: 21

Hi Israel,

I did't found anything unusual in my xml file. I have attached the xml. please have a look at this file.

Regards,

Manish

Manish
Manish's picture
User offline. Last seen 21 weeks 3 days ago. Offline
Joined: 01/20/2010
Points: 21

Hi,

I have found the issue with XML file. The registred sign was the culprit.

I have removed all those symbols and it get imported successfully. Now, I am facing issue with mashups.

In the mashups, The place where I have used "Merge" action now it is showing "undefined" at that place.

Please suggest me a way.

Regards,

Manish

israel.trujillo
israel.trujillo's picture
User offline. Last seen 1 week 2 days ago. Offline
Joined: 09/26/2008
Points: 2

 Ok, in mashups you mean the mashups created by Wires, right?

Lets do this so I can easily reproduce the situation you have:

With Presto 2.5.1 version use padmin (2.5.1) export your services and mashlets and post the file here, with that I can import them in another Presto 2.5.1 and run the complete migration process to Presto 2.7.1.

(If there is a problem with posting here your exported repository , please send it to me in a private message or contact me in a private message.) 

Thanks

Israel

Manish
Manish's picture
User offline. Last seen 21 weeks 3 days ago. Offline
Joined: 01/20/2010
Points: 21

Hi,

I have uploaded two files. Jackbe.jpg contains the screeshot of a mashup which contains of one of the mashup. Output.zip file contains the imported services from padmin tool.

Export.zip contains output from wires_migrator_tool. Please tell me if you need anything.

Thanks for your help.

Regards,

Manish

israel.trujillo
israel.trujillo's picture
User offline. Last seen 1 week 2 days ago. Offline
Joined: 09/26/2008
Points: 2

Manish, 

I have found what the problem is and I'm working in a solution.

I'll provide you an xslt file that you'll have to use in config.properties.

Meanwhile a non so high tech solution would be running a replace &lt;union  with &lt;merge in your export.xml file.

The issue is that union and merge are equivalent tags( under certain usage), in 2.5.1 union was used and in 2.6.1/2.7 merge was used, but as they are equivalent and the emml was valid the migrator didn't catch that change up.

 

Anyway I'll be providing the xslt file in the following days.

Regards

israel.trujillo
israel.trujillo's picture
User offline. Last seen 1 week 2 days ago. Offline
Joined: 09/26/2008
Points: 2

 Hi,

Sorry for the long response time but it's been a crazy month.

Well unzip the attached file, copy the file to the xslt directory of the wires-migrator path and change your config.properties file:

xslt.file=xslt/migrationW1-W2.xsl  to xslt.file=xslt/migration251-W2.xsl

that's it, please keep me posted!!

-Israel