Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

can we resign the already signed jars in java?

user8769643Jul 27 2017 — edited Jul 28 2017

Hi -

I have a production jar which is signed and as part of a fix i have to change a class file in that jar and redeploy it. so to achieve this i  first unsign the old signature, make changes to the file and resign it.

So far i have tried  the following steps below

1) unzip the jar in secure Zip

2) delete .SF and .DSA files under META-INF

3) Delete signing checksums from META-INF/MANIFEST.MF: each "Name" and "SHA1-Digest and save the jar

4) updated a class file

5) sign the jar using jarsigner tool

But even after unsigning and once i make any changes to the jar it doesn't seem to work and throws an error "cannot load the jar file "

Can someone please help me how to troubleshoot the signed jar issue and include my change in the jar?

Appreciate your help in advance!

Comments

The biggest change from 3.2 to 4.0 is the jdbc driver got upgrade to 11.2.0.3 from like 11.2.0.1.

Your SQL Dev 3.2.2 on XP with 11.2.x.x Full client - what are the last 2 digits - they can be important.

Also, I don't want your rollout to be delayed, I would advise opening an SR with MOS for better response time/help here.

Ok, because I was curious, and because I hadn't set this up before in 12c Multitenant...

SQL Developer 4.0.1

11.2.0.4 Instant Client

Windows 7

Oracle Enterprise Linux, 12c PDB

ops$jdsmith - connects as an os authenticated account, just fine

So it's working, for me at least.

SamBach

Thanks for the reply Jeff, sorry for not getting back to you earlier, weekend starts a bit earlier for us.

The client version was 11.2.0.3. in at least one of the cases where it was not working (invalid username/password).

I'm concerned there is something in my companies SOE that is causing this issue. I'm also confused as to why this problem seems to only affect my organization...

Is there a way for us to debug/diagnose this? Perhaps some low level tracing?

I'm happy to discuss this here unless you think an SR is required.

thatJeffSmith-Oracle

For the machine where 'it works on some machines' - have you also tried it with SQL*Plus?

That is, can you connect using OS Authentication from SQL*Plus on all of these machines and it's just SQL Developer that is surfacing the issue?

Also, we don't need an Oracle client to do the OS Authenticated connections, try connecting w/o turning on the OCI/Thick setting in the Advanced preferences dialog.

SamBach

Jeff Smith SQLDev PM wrote:

1.For the machine where 'it works on some machines' - have you also tried it with SQL*Plus?

That is, can you connect using OS Authentication from SQL*Plus on all of these machines and it's just SQL Developer that is surfacing the issue?

2. Also, we don't need an Oracle client to do the OS Authenticated connections, try connecting w/o turning on the OCI/Thick setting in the Advanced preferences dialog.

1. Yes. Always checked with SQL*Plus

2. I did not know that. Here are the results without using the Oracle client (i.e. OCI/Thick not ticked) on my machine (x86, Windows XP):

SQL Developer 3.2.20.09 - Works with OS Auth connections

SQL Developer 4.0.1.14 - Does not work with OS Auth: Status : Failure -Test failed: ORA-01017: invalid username/password; logon denied

I'm very surprised that even 3.2.2 worked without using the Oracle client as this has not been the case for us in the past. Is there a way for us to see what "connect command" is being sent by SQL Developer. I'm thinking we can perhaps compare the non-working versions to the working versions?

Regards

SamBach

I'd be curious to know if anyone else is experiencing this issue. From my search on the web it doesn't seem to be a widespread problem.

1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 25 2017
Added on Jul 27 2017
3 comments
2,137 views