Notices


Reply
Thread Tools
travla's Avatar
Posts: 397 | Thanked: 241 times | Joined on Mar 2010 @ Melbourne, Australia
#161
Okay, I tried using the command line arg you provided earlier (modifed to indicate path to source and output XML files):

Code:
java.exe -cp xalan.jar org.apache.xalan.xslt.Process -in c:\temp\keepass.xml -xsl c:\temp\convert.xsl -out c:\temp\wallet.xml
And got this output:

Code:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xalan/xslt
/Process
Caused by: java.lang.ClassNotFoundException: org.apache.xalan.xslt.Process
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.apache.xalan.xslt.Process.  Program will exit.
Could it be because I am behind a corporate firewall, and can't access the xalan file? If you are able to provide it to me, and let me know what to change in the command line, it would be most appreciated.
 
nowhereman's Avatar
Posts: 152 | Thanked: 91 times | Joined on Dec 2009 @ Spain
#162
Originally Posted by travla View Post
Okay, I tried using the command line arg you provided earlier (modifed to indicate path to source and output XML files):

Code:
java.exe -cp xalan.jar org.apache.xalan.xslt.Process -in c:\temp\keepass.xml -xsl c:\temp\convert.xsl -out c:\temp\wallet.xml
And got this output:

Code:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xalan/xslt
/Process
Caused by: java.lang.ClassNotFoundException: org.apache.xalan.xslt.Process
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.apache.xalan.xslt.Process.  Program will exit.
Could it be because I am behind a corporate firewall, and can't access the xalan file? If you are able to provide it to me, and let me know what to change in the command line, it would be most appreciated.
You need to download xalan from http://www.apache.org/dyn/closer.cgi/xml/xalan-j
unzip in a folder, and you will find a file called xalan.jar.
Copy this file on same folder where you are executing the previous command.
__________________
-----------------------------------------------------------------------------

Protect your confidential information by installing Wallet for N9 and N900.
Visit: http://www.nowhereman.eu
 

The Following User Says Thank You to nowhereman For This Useful Post:
travla's Avatar
Posts: 397 | Thanked: 241 times | Joined on Mar 2010 @ Melbourne, Australia
#163
Originally Posted by nowhereman View Post
You need to download xalan from http://www.apache.org/dyn/closer.cgi/xml/xalan-j
unzip in a folder, and you will find a file called xalan.jar.
Copy this file on same folder where you are executing the previous command.
Downloading now, there are several archives at that location, I have gone for:

Code:
xalan-j_2_7_1-bin.zip
Is this correct? It is running at 32 Kb/s, which will take about 1.5 hours for a 17Mb file!

Thanks for hanging in there with me.
 
nowhereman's Avatar
Posts: 152 | Thanked: 91 times | Joined on Dec 2009 @ Spain
#164
Originally Posted by travla View Post
Downloading now, there are several archives at that location, I have gone for:

Code:
xalan-j_2_7_1-bin.zip
Is this correct? It is running at 32 Kb/s, which will take about 1.5 hours for a 17Mb file!

Thanks for hanging in there with me.
yes this version. :-(
__________________
-----------------------------------------------------------------------------

Protect your confidential information by installing Wallet for N9 and N900.
Visit: http://www.nowhereman.eu
 

The Following User Says Thank You to nowhereman For This Useful Post:
travla's Avatar
Posts: 397 | Thanked: 241 times | Joined on Mar 2010 @ Melbourne, Australia
#165
Sorry, I hope I'm not frustrating you. I have downloaded the archive, moved xalan.jar to the same directory as the XML files, and modified the command line as follows:

Code:
C:\Program Files (x86)\Java\jre6\bin>java.exe -cp c:\temp\xalan.jar org.apache.xalan.xslt.Process -in c:\temp\keepass.xml -xsl c:\t
emp\convert.xsl -out c:\temp\wallet.xml
And now I get:

Code:
(Location of error unknown)XSLT Error (java.lang.NoClassDefFoundError): org/apache/xml/serializer/ExtendedContentHandler
Exception in thread "main" java.lang.RuntimeException: org/apache/xml/serializer/ExtendedContentHandler
        at org.apache.xalan.xslt.Process.doExit(Process.java:1155)
        at org.apache.xalan.xslt.Process.main(Process.java:1128)
Any idea what the error means?
 
nowhereman's Avatar
Posts: 152 | Thanked: 91 times | Joined on Dec 2009 @ Spain
#166
Originally Posted by travla View Post
Sorry, I hope I'm not frustrating you. I have downloaded the archive, moved xalan.jar to the same directory as the XML files, and modified the command line as follows:

Code:
C:\Program Files (x86)\Java\jre6\bin>java.exe -cp c:\temp\xalan.jar org.apache.xalan.xslt.Process -in c:\temp\keepass.xml -xsl c:\t
emp\convert.xsl -out c:\temp\wallet.xml
And now I get:

Code:
(Location of error unknown)XSLT Error (java.lang.NoClassDefFoundError): org/apache/xml/serializer/ExtendedContentHandler
Exception in thread "main" java.lang.RuntimeException: org/apache/xml/serializer/ExtendedContentHandler
        at org.apache.xalan.xslt.Process.doExit(Process.java:1155)
        at org.apache.xalan.xslt.Process.main(Process.java:1128)
Any idea what the error means?
try to put the other files like this

Code:
C:\Program Files (x86)\Java\jre6\bin>java.exe -cp c:\temp\xalan.jar;c:\temp\serializer.jar org.apache.xalan.xslt.Process -in c:\temp\keepass.xml -xsl c:\t
emp\convert.xsl -out c:\temp\wallet.xml
__________________
-----------------------------------------------------------------------------

Protect your confidential information by installing Wallet for N9 and N900.
Visit: http://www.nowhereman.eu
 

The Following User Says Thank You to nowhereman For This Useful Post:
travla's Avatar
Posts: 397 | Thanked: 241 times | Joined on Mar 2010 @ Melbourne, Australia
#167
Originally Posted by nowhereman View Post
try to put the other files like this

Code:
C:\Program Files (x86)\Java\jre6\bin>java.exe -cp c:\temp\xalan.jar;c:\temp\serializer.jar org.apache.xalan.xslt.Process -in c:\temp\keepass.xml -xsl c:\t
emp\convert.xsl -out c:\temp\wallet.xml
I did what you said, and it did indeed produce an output, but not what I expected (the file did not look like an XML). I then created a new sample database, put 5 entries in there and tried again, and got a similar result (but obviously with different data).

I have attached the input and output files (I had to zip, too large for text files), if you have time and you can look at them and see what I may be missing that would be great.
Attached Files
File Type: zip keepass.zip (2.7 KB, 103 views)
File Type: zip wallet.zip (1.7 KB, 98 views)
 
nowhereman's Avatar
Posts: 152 | Thanked: 91 times | Joined on Dec 2009 @ Spain
#168
Originally Posted by travla View Post
I did what you said, and it did indeed produce an output, but not what I expected (the file did not look like an XML). I then created a new sample database, put 5 entries in there and tried again, and got a similar result (but obviously with different data).

I have attached the input and output files (I had to zip, too large for text files), if you have time and you can look at them and see what I may be missing that would be great.
It is complete another format :-(
but try with this convert.xsl
Attached Files
File Type: txt convert.xsl.txt (1.4 KB, 89 views)
__________________
-----------------------------------------------------------------------------

Protect your confidential information by installing Wallet for N9 and N900.
Visit: http://www.nowhereman.eu
 

The Following User Says Thank You to nowhereman For This Useful Post:
travla's Avatar
Posts: 397 | Thanked: 241 times | Joined on Mar 2010 @ Melbourne, Australia
#169
Originally Posted by nowhereman View Post
It is complete another format :-(
but try with this convert.xsl
nowhereman, you are indeed a gentleman. We now have imported entries in to wall from KeePass, you have no idea how much time this will save me.

Only one problem left, and I hope you can help me. The 2nd xsl you created for me is creating/generating duplicates of each password. I had a look at the xsl, but I've no idea what I'm looking for. I have attached the output XML, can you see why it may be creating duplicates?
Attached Files
File Type: zip wallet2.zip (812 Bytes, 106 views)
 
nowhereman's Avatar
Posts: 152 | Thanked: 91 times | Joined on Dec 2009 @ Spain
#170
Originally Posted by travla View Post
nowhereman, you are indeed a gentleman. We now have imported entries in to wall from KeePass, you have no idea how much time this will save me.

Only one problem left, and I hope you can help me. The 2nd xsl you created for me is creating/generating duplicates of each password. I had a look at the xsl, but I've no idea what I'm looking for. I have attached the output XML, can you see why it may be creating duplicates?
script is given duplicates, because it seems that they are several times in different groups. I need more time to avoid it.
otherwise cards in xml file are in alphabetic order, maybe you can delete duplicates
__________________
-----------------------------------------------------------------------------

Protect your confidential information by installing Wallet for N9 and N900.
Visit: http://www.nowhereman.eu
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:55.