Plugin and Beans with Java 6 update 19

Hi everybody,

I’m trying to use signtester.jar to sign my jars. But it doesn’t seem to work.
It seems to detect the unsigned jars but when I try to sign them using the keystore I have just created it doesn’t seem to be able to sign them.

Here is an example (it’s doing this for every jars):

//signtester without parameter

...
Verifiying dir: .\plugins\it2be-outlook
C:\Program Files (x86)\Servoy\application_server\.\plugins\it2be-outlook.jar didnt verify
C:\Program Files (x86)\Servoy\application_server\.\plugins\it2be-splash.jar didnt verify
C:\Program Files (x86)\Servoy\application_server\.\plugins\it2be-tools.jar didnt verify
...


//signtester with keystore in parameter

...
Verifiying dir: .\plugins\it2be-outlook
C:\Program Files (x86)\Servoy\application_server\.\plugins\it2be-outlook.jar didnt verify
C:\Program Files (x86)\Servoy\application_server\.\plugins\it2be-outlook.jar still not signed, is it double signed?
C:\Program Files (x86)\Servoy\application_server\.\plugins\it2be-splash.jar didnt verify
C:\Program Files (x86)\Servoy\application_server\.\plugins\it2be-splash.jar still not signed, is it double signed?
C:\Program Files (x86)\Servoy\application_server\.\plugins\it2be-tools.jar didnt verify
C:\Program Files (x86)\Servoy\application_server\.\plugins\it2be-tools.jar still not signed, is it double signed?
...

Did I forget something?

it could be that those are double signed or something now.

For those you have to remove the signing out of the jar file your self
This means deleting the 2 files in \META-INF\ that ends with .rsa and .sf
and then update the manifest.mf deleting all the lines with:

Name: xxx.class name (or other resource)
SHA1-Digest: XXXXXX

with plugins this mostly means from the first line that that is starting you can delete everything from there to the end
With beans you have to be more careful because there you can have a Name: xxx entry that also has a line:
Java-Bean: True

then the name:xxx must be kept including the java-bean and only the SHA1 can be removed.

But maybe the easiest thing to do is to wait for it2be to give you its updated plugins
I think that is pretty much done.

I run into that too, and it has nothing to do with double signing (althought it could):
You need to do that WHEN SERVOY IS NOT running, I don’t think this is obvious for people, if you do it while the server/developer is running the jars are locked (at least on windows)!

ptalbot was right. When I tried I still had the server running.
Now it seems to have signed everything and when I run a check again no jar is highlighted as “not signed”.

However, after clearing my cache, when I try to connected I still have the error message with the swingbeans.jar bean. And when I look on the server under the beans folder I see that swingbeans.jar has not been changed (last modification date didn’t change). :|

But swing beans cant really be signed at least there is not really something to sign (there are no classes)
But Servoy 5.1.2 will not serve out the swingbeans.jar (or any jar like that like it2be calendar bean) to the client
So your smart client shouldnt get that one at all.

What is the contents of the generated file (so the source of http://localhost:8080/servoy-client/servoy_client.jnlp)?
in that you shouldnt see swingbeans.jar

So yes my tool skips over those with the same logic as the app server does for generating the jnlp files.

To make it clear, we are currently running on Servoy 5.1.1 and need to fix it with this version or earlier as we have customers still running on 4.1.4.
So if your tool skips jars like swingbeans.jar, yes it’s normal that we still have a problem it.

Here is the content of the launch file:

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://ag-dev:8080" href="/servoy-client/servoy_client/EPiC.jnlp">
   <information> 
      <title>Servoy Client - EPiC</title>
      <vendor>
Elite Control Systems Limited</vendor>      <homepage href="http://www.servoy.com/"/>
      <description>Database client</description>
      <icon href="/lib/images/AssetGuardian.png"/>
      <icon kind="splash" href="//lib/AssetGuardian.png" width="64" height="64"/>
   </information>
   <resources>
      <j2se version="1.5+" initial-heap-size="128m" max-heap-size="512m" java-vm-args="-XX:SoftRefLRUPolicyMSPerMB=3600000" />
      <j2se version="1.6+" initial-heap-size="128m" max-heap-size="512m" java-vm-args="-XX:SoftRefLRUPolicyMSPerMB=3600000" />
      <property name="apple.laf.useScreenMenuBar" value="true"/>
      <jar href="/lib/j2db.jar" main="true" version="1269425007271" download="eager"/>
      <jar href="/lib/js.jar" version="1269425007271" download="eager"/>
      <jar href="/lib/jabsorb.jar" version="1269425007271" download="eager"/>
      <jar href="/lib/BrowserLauncher2.jar" version="1269425007271" download="eager"/>
      <jar href="/lib/commons-logging.jar" version="1269425007271" download="eager"/>
      <jar href="/lib/MRJAdapter.jar" version="1269425007271" download="eager"/>
      <extension name="LAFS_and_BEANS" href="/servoy-client/unsigned.jnlp" version="1271161582293"/>
      <extension name="excelxport.jar" href="/servoy-client/plugins/excelxport.jar.jnlp" version="1271161563710"/>
      <extension name="it2be-tools.jar" href="/servoy-client/plugins/it2be-tools.jar.jnlp" version="1271161565602"/>
      <extension name="udp.jar" href="/servoy-client/plugins/udp.jar.jnlp" version="1271161581828"/>
      <extension name="default_validators.jar" href="/servoy-client/plugins/default_validators.jar.jnlp" version="1271161563636"/>
      <extension name="tabxport.jar" href="/servoy-client/plugins/tabxport.jar.jnlp" version="1271161581798"/>
      <extension name="amortization.jar" href="/servoy-client/plugins/amortization.jar.jnlp" version="1271161563572"/>
      <extension name="servoyguy_spellcheck_pro.jar" href="/servoy-client/plugins/servoyguy_spellcheck_pro.jar.jnlp" version="1271161573047"/>
      <extension name="spellcheck.jar" href="/servoy-client/plugins/spellcheck.jar.jnlp" version="1271161581758"/>
      <extension name="dialog.jar" href="/servoy-client/plugins/dialog.jar.jnlp" version="1271161563664"/>
      <extension name="it2be-splash.jar" href="/servoy-client/plugins/it2be-splash.jar.jnlp" version="1271161565558"/>
      <extension name="scheduler.jar" href="/servoy-client/plugins/scheduler.jar.jnlp" version="1271161572962"/>
      <extension name="it2be-outlook.jar" href="/servoy-client/plugins/it2be-outlook.jar.jnlp" version="1271161565500"/>
      <extension name="it2be-datastream.jar" href="/servoy-client/plugins/it2be-datastream.jar.jnlp" version="1271161565274"/>
      <extension name="images.jar" href="/servoy-client/plugins/images.jar.jnlp" version="1271161564826"/>
      <extension name="file.jar" href="/servoy-client/plugins/file.jar.jnlp" version="1271161563759"/>
      <extension name="servoy_jasperreports.jar" href="/servoy-client/plugins/servoy_jasperreports.jar.jnlp" version="1271161581626"/>
      <extension name="maintenance.jar" href="/servoy-client/plugins/maintenance.jar.jnlp" version="1271161571713"/>
      <extension name="serialize.jar" href="/servoy-client/plugins/serialize.jar.jnlp" version="1271161572994"/>
      <extension name="agent.jar" href="/servoy-client/plugins/agent.jar.jnlp" version="1271161563521"/>
      <extension name="http.jar" href="/servoy-client/plugins/http.jar.jnlp" version="1271161563840"/>
      <extension name="window.jar" href="/servoy-client/plugins/window.jar.jnlp" version="1271161581946"/>
      <extension name="converters.jar" href="/servoy-client/plugins/converters.jar.jnlp" version="1271161563606"/>
      <extension name="rawSQL.jar" href="/servoy-client/plugins/rawSQL.jar.jnlp" version="1271161572684"/>
      <extension name="it2be-word.jar" href="/servoy-client/plugins/it2be-word.jar.jnlp" version="1271161566102"/>
      <extension name="pdf_output.jar" href="/servoy-client/plugins/pdf_output.jar.jnlp" version="1271161572654"/>
      <extension name="mail.jar" href="/servoy-client/plugins/mail.jar.jnlp" version="1271161571684"/>
      <extension name="xmlreader.jar" href="/servoy-client/plugins/xmlreader.jar.jnlp" version="1271161582001"/>
      <extension name="headlessclient.jar" href="/servoy-client/plugins/headlessclient.jar.jnlp" version="1271161563800"/>
   </resources>
   <application-desc main-class="com.servoy.j2db.J2DBClient">
		<argument>CI:83664CC2-EE7B-455A-9174-8DA1205A039F</argument>
		<argument>s:EPiC</argument>
		<argument>solution:EPiC</argument>
	</application-desc>
	<security>
   	<all-permissions/>
	</security>
</jnlp>

The tool works only in conjunction with Servoy 5.1.2 and 4.1.6 (and upcomming 3.5.11)

Jan Blok:
The tool works only in conjunction with Servoy 5.1.2 and 4.1.6 (and upcomming 3.5.11)

So the best solution for people who cannot upgrade Servoy quickly and have Java 6 Update 19 or more on their machine, is to downgrade to update 18 and wait for the update of Servoy to be done?

If you cannot upgrade Servoy to the latest version, yes you have to install a Java lower then Java 6u19.

I don’t get your comment:

Foobrother:
and wait for the update of Servoy to be done?

We released 5.1.2 and 4.1.6 already, last week…as a response to Sun’s unannounced security level change.

Jan Blok:
If you cannot upgrade Servoy to the latest version, yes you have to install a Java lower then Java 6u19.

I don’t get your comment:

Foobrother:
and wait for the update of Servoy to be done?

We released 5.1.2 and 4.1.6 already, last week…as a response to Sun’s unannounced security level change.

I was just asking if the best solution was to stay on/downgrade to update 18 until an admin installs the Servoy update.
I know you guys have quickly released a new version to fix this issue and I thank you for that. But I was just wondering If there was a solution for people who cannot install Servoy update quickly (we have customers who need 2 months to run security tests procedures to allow an update on their production servers)

the other solution is if you are upgrading to u19 (if that is automatic or something)
then with a older servoy release it will still work. Only 2 things need to be done:

delete the swingbeans.jar from the beans dir (and also the it2be calendar bean and so on) on the server
And for clients with u19 you have to go to the java control panel and under the advanced tab → security → mixed mode
select the 2nd (hide warning but run with protections) or last checkbox (disable verify completely)

Then it will work on an u19 release also.

Thanks, I’ll test it :D

for a customer of us, who hosting his solution on our server, we have upgraded the servoy application_server from 5.1.1 to 5.1.2 by using the servoy_updater.bat
no third party plugins, or what so ever.

but now, if we start the solution, (rather on Mac, with a lower version of Java 1.6 or on Windows) we get this error:

com.sun.deploy.net.JARSigningException: Niet-ondertekend onderdeel gevonden in resource: (http://87.249.xxx.xxx:8089/lib/commons-httpclient.jar, 3.0)
at com.sun.javaws.security.SigningInfo.getCommonCodeSignersForJar(SigningInfo.java:382)
at com.sun.javaws.security.SigningInfo.check(SigningInfo.java:256)
at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(LaunchDownload.java:1384)
at com.sun.javaws.LaunchDownload.checkSignedResources(LaunchDownload.java:1170)
at com.sun.javaws.Launcher.prepareLaunchFile(Launcher.java:1033)
at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:309)
at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:186)
at com.sun.javaws.Launcher.launch(Launcher.java:107)
at com.sun.javaws.Main.launchApp(Main.java:405)
at com.sun.javaws.Main.continueInSecureThread(Main.java:252)
at com.sun.javaws.Main$1.run(Main.java:111)
at java.lang.Thread.run(Thread.java:637)

I thought this should be fixed by now, right?

go to your plugin directory open the http.jar.jnlp

there you have this:

      <jar href="/lib/commons-httpclient.jar" download="%%loadmethod%%" part="httpclient" version="3.0"/>
      <jar href="/lib/commons-codec.jar" download="%%loadmethod%%" part="codec" version="1.3"/>

change that to:

      <jar href="/lib/commons-httpclient.jar" download="%%loadmethod%%" part="httpclient" version="%%version%%"/>
      <jar href="/lib/commons-codec.jar" download="%%loadmethod%%" part="codec" version="%%version%%"/>

or change the value of 3.0 to 3.0a and 1.3 to 1.3a
just make sure that the version tags are different then before.

i will change it in our code also.

oke, I have changed that,

now getting this one:

com.sun.deploy.net.JARSigningException: Niet-ondertekend onderdeel gevonden in resource: (http://87.249.xxx.xxx:8089/plugins/jaka … ta-poi.jar, 3.0-rc4-20070503)

:-( :evil:

exactly the same kind of problem but then with another plugin.
Problem is that to get it right you have to go over all plugin.jar.jnlp files and up the version=xxx if it has a number or fixed value in there.

but is this not the whole reason, why there is Servoy 5.1.2 ???

did anyone test this within Servoy?
sorry, I’m bit frustrated…

remember, this was a fresh 5.1.1 installation with no 3th party plugins/beans and upgraded to 5.1.2

The jar change is most of the time noticed by Java webstart AND tests takes place in a clean env. to prevent contamination (which means there is no problem to begin with)
In other words clearing the webstart cache also works.

When you follow this thread and use IT2BE Components please read our announcement here: http://www.it2be.com/index.php/componen … rvoy-4-a-5

jcompagner:
the other solution is if you are upgrading to u19 (if that is automatic or something)
then with a older servoy release it will still work. Only 2 things need to be done:

delete the swingbeans.jar from the beans dir (and also the it2be calendar bean and so on) on the server
And for clients with u19 you have to go to the java control panel and under the advanced tab → security → mixed mode
select the 2nd (hide warning but run with protections) or last checkbox (disable verify completely)

Then it will work on an u19 release also.

It works indeed. Thanks again :D