Plugin and Beans with Java 6 update 19

Questions and answers on developing, deploying and using plugins and JavaBeans

Re: Plugin and Beans with Java 6 update 19

Postby dpearce » Mon Apr 12, 2010 10:08 am

for 3.5 are you suggesting that a new build is needed. If so when will this be available?

Sorry, 80% of this is going above my head, as servoy 3.5 has always worked out of the box just by installing the plugins from whichever developer i have purchased them from. The whole situation is slightly worrying.


David
dpearce
 
Posts: 469
Joined: Sun Dec 03, 2006 11:53 am

Re: Plugin and Beans with Java 6 update 19

Postby jcompagner » Mon Apr 12, 2010 2:29 pm

ptalbot wrote:How will you know if they are? Will you check the jar and have 2 different classloaders?
I'm curious.


thats something i need to figure out...
on the server i could try to read out the file and see if it is signed. And if it is generate X and if it isnt generate Y
(this is only important for plugins without a jnlp and beans)

Plugins with a jnlp it simple, they generate there own jnlp and should if they sign use the all permissions entry else if they dont sign
then dont use that entry. So the problem is what to do with plugins (and beans) where we generate the jnlp for....
If they are signed then we need to use <all permissions> if they are not we cant generate that..

all plugins and beans are loaded through Class.forName() kind of syntax, we just need to give a right classloader with it (and i dont think this matters of it is signed or unsiged)

ptalbot wrote:Anyway, nice little tool you did, thanks.
I see that you have shipped a lot of java tools - including javac/javadoc/applet etc. - with it, why is that?


Its just the tools.jar of a java 6 install, added with 1 class and a manifest with a main attribute so it is very easy for people to use.
Didnt want to extract exactly what i needed because that is quite hard to find..
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Plugin and Beans with Java 6 update 19

Postby ptalbot » Mon Apr 12, 2010 2:51 pm

I see! Thanks for your answers.
What about beans that have dependencies? Right now, for the SVGBean for example, I add a dummy plugin with a jnlp to be able to load the batik jars, but of course these need to be signed, so I guess the safest approach is to sign the bean jar as well, isn't it?

I put a link to your post/tool on my FAQ for people who wants to sign the jars themselves.

Suggestion to Paul:
I think that you should put a permanent download link to this tool with the explanations somewhere (on the wiki perhaps?), because it will happen to people in the future and they will not know where to find the information buried in the forum.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Plugin and Beans with Java 6 update 19

Postby jcompagner » Mon Apr 12, 2010 3:20 pm

if you have a bean that needs some external jars.
You dont need to also create a dummy plugin.

Just do it the bean way with adding the classpath manifest attribute and point to your 2 other jars there in the manifest of your bean.jar
Those external jars also need to be signed yes (with the same certificate!)

And in servoy 5.1.2 you will see that we generate a jnlp file for that bean that has 1 jar reference to your bean.jar and 1 or more jar references to the jar the bean jar depends on.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Plugin and Beans with Java 6 update 19

Postby ptalbot » Mon Apr 12, 2010 3:31 pm

jcompagner wrote:if you have a bean that needs some external jars.
You dont need to also create a dummy plugin.

Just do it the bean way with adding the classpath manifest attribute and point to your 2 other jars there in the manifest of your bean.jar
Those external jars also need to be signed yes (with the same certificate!)

And in servoy 5.1.2 you will see that we generate a jnlp file for that bean that has 1 jar reference to your bean.jar and 1 or more jar references to the jar the bean jar depends on.


If I add the external dependencies in a subfolder, with a classpath pointing on it, will it work?

For the SVGBean, the Batik framework is subdivised in 17 little jars (and I don't have them all), so if I put all this directly in /beans its going to be a big mess!
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Plugin and Beans with Java 6 update 19

Postby Foobrother » Tue Apr 13, 2010 12:37 pm

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):
Code: Select all
//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?
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: Plugin and Beans with Java 6 update 19

Postby jcompagner » Tue Apr 13, 2010 1:42 pm

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.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Plugin and Beans with Java 6 update 19

Postby ptalbot » Tue Apr 13, 2010 2:01 pm

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)!
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Plugin and Beans with Java 6 update 19

Postby Foobrother » Tue Apr 13, 2010 2:41 pm

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). :|
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: Plugin and Beans with Java 6 update 19

Postby jcompagner » Tue Apr 13, 2010 2:47 pm

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.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8828
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Plugin and Beans with Java 6 update 19

Postby Foobrother » Tue Apr 13, 2010 2:59 pm

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:
Code: Select all
<?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>
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: Plugin and Beans with Java 6 update 19

Postby Jan Blok » Tue Apr 13, 2010 3:14 pm

The tool works only in conjunction with Servoy 5.1.2 and 4.1.6 (and upcomming 3.5.11)
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Re: Plugin and Beans with Java 6 update 19

Postby Foobrother » Tue Apr 13, 2010 3:31 pm

Jan Blok wrote: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?
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: Plugin and Beans with Java 6 update 19

Postby Jan Blok » Tue Apr 13, 2010 3:39 pm

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 wrote: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
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Re: Plugin and Beans with Java 6 update 19

Postby Foobrother » Tue Apr 13, 2010 3:55 pm

Jan Blok wrote: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 wrote: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)
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

PreviousNext

Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 12 guests