Java fix for servoy 3.5?

I have read the thread regarding the java issues. I am running servoy 3.5.12.

I have used the removed the swingbeans.jar from /srvoy/beans, then ran the signtester.jar,
then made the keystore and re-ran signtester.jar

This what I get as a result:

Verifiying dir: ./beans
Exception in thread “main” java.lang.NoClassDefFoundError: sun/security/tools/KeyStoreUtil
at sun.security.tools.JarSigner.parseArgs(Unknown Source)
at sun.security.tools.JarSigner.run(Unknown Source)
at com.servoy.jarsigner.SignerTest.verify(SignerTest.java:168)
at com.servoy.jarsigner.SignerTest.dir(SignerTest.java:99)
at com.servoy.jarsigner.SignerTest.main(SignerTest.java:77)

What next? I do not think it worked correctly.

BTW, I am running servoy 3.5.12 on a dell poweredge 2850 server with 8 gig ram, plenty of HD. OS is Centos 5.3
and JDK 1.5.0_14

Some of our staff have to clear the java cache weekly even though they are all on java jre 6.17 / 18.

ISome have updated to java .19, and I have backed them down to ver .15 and now they intermittently have issues.

So any assistance would really be appreciated!

i think the problem is that signtester is made for java 6 instead of 5
It seems to miss something if you run it against 5.

Can you upgrade your server to 6? (5 is already EOL)

Hi there,

I have following command

C:\Servoy\beans>"C:\Program Files (x86)\Java\jre6\bin\java" -jar c:\Pilot\ServoyUtil\signtester.jar c:\Pilot\ServoyUtil\jxl-keystroke.ks mykeystroke JXL
Verifiying dir: .\beans
Exception in thread "main" java.lang.NullPointerException
        at com.servoy.jarsigner.SignerTest.dir(SignerTest.java:95)
        at com.servoy.jarsigner.SignerTest.main(SignerTest.java:77)

Any ideas why I am getting this.

Thanks,
Hameed

I guess your problem is that you are launching the signtester tool from inside the /Servoy/beans subfolder and the tool is looking for ./beans/.

You should always launch it from the place where your servoy_server.bat (or servoy_server.sh) is located.

Hope this helps,

For Servoy >= 4.x the place to execute the signtester tool is in your ServoyInstallDir/application_server/

For Servoy < 4.x I believe that this is all at the level of your ServoyInstallDir (by default c:/Program Files/Servoy on Windows, /Applications/Servoy on Mac OS X)

Basically, if you are inside the “beans” subfolder, you should cd…

Hi Patrick,

Thanks for your reply. I just wanted to sign just one bean in the …/beans directory. So I have run it from there but not sure why the error is.

I have run it from the C:/Servoy folder as well but still go errors as below:

n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\it2be-lib\it2be-utilities.jar didnt verify
C:\Servoy\.\plugins\it2be-lib\it2be-utilities.jar still not signed, is it double
 signed? (verify output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\it2be-lib\j2ssh-core.jar didnt verify
C:\Servoy\.\plugins\it2be-lib\j2ssh-core.jar still not signed, is it double sign
ed? (verify output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\it2be-lib\jakarta-oro.jar didnt verify
C:\Servoy\.\plugins\it2be-lib\jakarta-oro.jar still not signed, is it double sig
ned? (verify output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\it2be-lib\jide-common.jar didnt verify
C:\Servoy\.\plugins\it2be-lib\jide-common.jar still not signed, is it double sig
ned? (verify output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\it2be-lib\servletapi-2.3.jar didnt verify
C:\Servoy\.\plugins\it2be-lib\servletapi-2.3.jar still not signed, is it double
signed? (verify output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\it2be-menubar.jar didnt verify
C:\Servoy\.\plugins\it2be-menubar.jar still not signed, is it double signed? (ve
rify output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
Verifiying dir: .\plugins\it2be-runtime
C:\Servoy\.\plugins\it2be-runtime\ftp-runtime.jar didnt verify
C:\Servoy\.\plugins\it2be-runtime\ftp-runtime.jar still not signed, is it double
 signed? (verify output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\it2be-runtime\menubar-runtime.jar didnt verify
C:\Servoy\.\plugins\it2be-runtime\menubar-runtime.jar still not signed, is it do
uble signed? (verify output: jar is unsigned. (signatures missing or not parsabl
e)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\it2be-runtime\server-runtime.jar didnt verify
C:\Servoy\.\plugins\it2be-runtime\server-runtime.jar still not signed, is it dou
ble signed? (verify output: jar is unsigned. (signatures missing or not parsable
)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\it2be-runtime\splash-runtime.jar didnt verify
C:\Servoy\.\plugins\it2be-runtime\splash-runtime.jar still not signed, is it dou
ble signed? (verify output: jar is unsigned. (signatures missing or not parsable
)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\it2be-runtime\tools-runtime.jar didnt verify
C:\Servoy\.\plugins\it2be-runtime\tools-runtime.jar still not signed, is it doub
le signed? (verify output: jar is unsigned. (signatures missing or not parsable)

jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\it2be-server.jar didnt verify
C:\Servoy\.\plugins\it2be-server.jar still not signed, is it double signed? (ver
ify output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\it2be-splash.jar didnt verify
C:\Servoy\.\plugins\it2be-splash.jar still not signed, is it double signed? (ver
ify output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\it2be-tools.jar didnt verify
C:\Servoy\.\plugins\it2be-tools.jar still not signed, is it double signed? (veri
fy output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\it2be-updatemanager.jar didnt verify
C:\Servoy\.\plugins\it2be-updatemanager.jar still not signed, is it double signe
d? (verify output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
Verifiying dir: .\plugins\jakarta-poi
Verifiying dir: .\plugins\jasperPluginRMI
C:\Servoy\.\plugins\jasperPluginRMI\commons-beanutils.jar didnt verify
C:\Servoy\.\plugins\jasperPluginRMI\commons-beanutils.jar still not signed, is i
t double signed? (verify output: jar is unsigned. (signatures missing or not par
sable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\jasperPluginRMI\commons-collections.jar didnt verify
C:\Servoy\.\plugins\jasperPluginRMI\commons-collections.jar still not signed, is
 it double signed? (verify output: jar is unsigned. (signatures missing or not p
arsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\jasperPluginRMI\commons-digester.jar didnt verify
C:\Servoy\.\plugins\jasperPluginRMI\commons-digester.jar still not signed, is it
 double signed? (verify output: jar is unsigned. (signatures missing or not pars
able)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\jasperPluginRMI\commons-javaflow.jar didnt verify
C:\Servoy\.\plugins\jasperPluginRMI\commons-javaflow.jar still not signed, is it
 double signed? (verify output: jar is unsigned. (signatures missing or not pars
able)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\jasperPluginRMI\commons-logging-adapters.jar didnt verify
C:\Servoy\.\plugins\jasperPluginRMI\commons-logging-adapters.jar still not signe
d, is it double signed? (verify output: jar is unsigned. (signatures missing or
not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\jasperPluginRMI\commons-logging-api.jar didnt verify
C:\Servoy\.\plugins\jasperPluginRMI\commons-logging-api.jar still not signed, is
 it double signed? (verify output: jar is unsigned. (signatures missing or not p
arsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\jasperPluginRMI\commons-logging.jar didnt verify
C:\Servoy\.\plugins\jasperPluginRMI\commons-logging.jar still not signed, is it
double signed? (verify output: jar is unsigned. (signatures missing or not parsa
ble)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\jasperPluginRMI\CommonScriplet.jar didnt verify
C:\Servoy\.\plugins\jasperPluginRMI\CommonScriplet.jar still not signed, is it d
ouble signed? (verify output: jar is unsigned. (signatures missing or not parsab
le)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\jasperPluginRMI\HKICSScriptlet.jar didnt verify
C:\Servoy\.\plugins\jasperPluginRMI\HKICSScriptlet.jar still not signed, is it d
ouble signed? (verify output: jar is unsigned. (signatures missing or not parsab
le)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\jasperPluginRMI\itext.jar didnt verify
C:\Servoy\.\plugins\jasperPluginRMI\itext.jar still not signed, is it double sig
ned? (verify output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\jasperPluginRMI\jasperreports.jar didnt verify
C:\Servoy\.\plugins\jasperPluginRMI\jasperreports.jar still not signed, is it do
uble signed? (verify output: jar is unsigned. (signatures missing or not parsabl
e)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\jasperPluginRMI\jdt-compiler.jar didnt verify
C:\Servoy\.\plugins\jasperPluginRMI\jdt-compiler.jar still not signed, is it dou
ble signed? (verify output: jar is unsigned. (signatures missing or not parsable
)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
C:\Servoy\.\plugins\jasperPluginRMI.jar didnt verify
C:\Servoy\.\plugins\jasperPluginRMI.jar still not signed, is it double signed? (
verify output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
Verifiying dir: .\plugins\pdf_output
C:\Servoy\.\plugins\runtime_builder.jar didnt verify
C:\Servoy\.\plugins\runtime_builder.jar still not signed, is it double signed? (
verify output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
Verifiying dir: .\plugins\scheduler
Verifiying dir: .\plugins\serialize
Verifiying dir: .\plugins\spellcheck
C:\Servoy\.\plugins\uss_http.jar didnt verify
C:\Servoy\.\plugins\uss_http.jar still not signed, is it double signed? (verify
output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid offset
)
Verifiying dir: .\lafs
Verifiying dir: .\lib
Verifiying dir: .\lib\client
Verifiying dir: .\lib\images

Thanks,
Hameed

Are you sure you have a valid keystore along with the signtester.jar? It must contain your certificate (either self-signed or certified by a CA).
Please check, then to sign only one bean jar, you can create a new folder, somewhere, with a similar structure:

/
/beans
/beans/the_bean_you_want_to_sign.jar
/yourkeystore.ks
/signtester.jar

then you launch the signtester.jar tool from inside this new folder.

Hi Patrick,

I followed your instructions and still got the same issue. FYI, I have recreated the self-signed keystroke file as well.

c:\Pilot\BeanSigning>"C:\Program Files (x86)\Java\jre6\bin\java" -jar c:\Pilot\BeanSigning\signtester.jar c:\Pilot\BeanSigning\pilot-keystroke.ks pass Pilot
Verifiying dir: .\beans
Verifiying dir: .\plugins
Exception in thread "main" java.lang.NullPointerException
        at com.servoy.jarsigner.SignerTest.dir(SignerTest.java:95)
        at com.servoy.jarsigner.SignerTest.main(SignerTest.java:78)

c:\Pilot\BeanSigning>

Please help.

Thanks a lot.

Update…

Earlier I did not copy the bean in to the bean folder. After copying the bean I have got the following issue:

c:\Pilot\BeanSigning>"C:\Program Files (x86)\Java\jre6\bin\java" -jar c:\Pilot\B
eanSigning\signtester.jar c:\Pilot\BeanSigning\pilot-keystroke.ks pass Pilot
Verifiying dir: .\beans
c:\Pilot\BeanSigning\.\beans\jxl.jar didnt verify
c:\Pilot\BeanSigning\.\beans\jxl.jar still not signed, is it double signed? (ver
ify output: jar is unsigned. (signatures missing or not parsable)
jarsigner: java.lang.RuntimeException: exit not allowed
jarsigner error: java.lang.RuntimeException: exit not allowed
,
signing output:jarsigner error: java.lang.RuntimeException: certificate exceptio
n: java.io.IOException: Parse Generalized time, invalid format
)
Verifiying dir: .\plugins
Exception in thread "main" java.lang.NullPointerException
        at com.servoy.jarsigner.SignerTest.dir(SignerTest.java:95)
        at com.servoy.jarsigner.SignerTest.main(SignerTest.java:78)

Thanks,

Apparently the java jarsigner lib cannot parse your certificate:
“certificate exception: java.io.IOException: Parse Generalized time, invalid format”

This exception is not specific to the jarsigner tool, it comes from your certificate and the fact that java cannot read it.
Please check the certificate and your keystore.

Thanks for the info.

I am not sure how to check the certificate is valid or not. This is a self signed certificate based on the instruction from the following link:

http://wiki.servoy.com/display/tutorial … ertificate

I used this link to do the jar signing.

http://wiki.servoy.com/display/tutorials/JAR+signing

I used the following command to generate the keystore file.

"c:\Program Files (x86)\Java\jre6\bin\keytool.exe" -genkey -alias Pilot -keyalg RSA -keystore c:\Pilot\BeanSigning\pilot-keystore.ks -validity 10000000 

By certificate you mean the file generated using the above command? Please let me know the above command is correct.

Thanks.

I am no expert in java signing, but what I can see is that the jarsigner (which is the java tool to sign jars, used by the signtester.jar internally), is returning an error which indicates a problem parsing your certificate.

To verify your certificate, have a look at the keytool options JDK 23 Documentation - Home
Optionally, you can try using the java jarsigner directly on your jar, maybe you will have more info in the error returned there JDK 23 Documentation - Home

Hope this helps,