Wednesday, September 7, 2011

Signer information Does not Match ... in the same package

In this post we will figure the solution for a very common and important issue when you trying to implement some javabeans. ( htmlbutton ,clientinfos,......)
the problem is when you trying to use some javabeans like "clientinfos" that used to get client machine information like " Mac address" , and you are also already using some javabeans that have the same class names . ( the problem will be arisen when your class exist in the same package as the other class in another java bean )

the solution is simply " recreate your java class in your own package or another package"

for oracle developers the target is to recreate the jar file through the following steps :
1- if you have the .java files for you class so you can go to the next step , but if you don't have . java files so you have to download any software to decompile .class files (Dj java decompiler 3.12 software used in this demo and working successfully)
2-open the Jdevloper and create new project
3-inside your project add new java class and name it as the original class exactly ( case sensitive) and make the package name unique name "htmlpackage"
4-paste the source code from .java file to Jdeveloper and edit the first line "package oracle.forms.demos " fore example to your package name
5- after that compile if there are any errors related to missing libraries , go to your project and select properties and then add the required libraries to your project
6-add deployment profile to your project as jar file and name it as you want and select the main class for it
7-go to the jarfile .deploy and select deploy to jar ( your jar file create in deploy path in your project folder)
8- just signing your jar before using
under the JDK \ bin use the following command
jarsigner -storepass ........ -keypass ....... yourjarfile mykey
9- the only change that you will make after that if your jar file name is the same it to change the implementation class property used in your form to your new package fore example instead of oracle.forms.fd.HtmlButton use yourpackagename.HtmlButton