Menu
Sites
Language
Signing failed when creating app package (cannot load main class)

Hi All,

I got the following failure when creating Tizen app package:

C: && cd C:\tizen-sdk\tools\smart-build-interface\..\ide\bin && cmd.exe /C native-signing.bat "Z:\CPP\MiniFC_CPP\MiniFC.Proj\MiniFC.Tizen\GameEngineDemo\Debug-Tizen-Emulator\.tpk" "C:\tizen-sdk\tools\certificate-generator\certificates\developer\tizen-developer-ca.cer" "Z:\CPP\MiniFC_CPP\Tools_Docs_Notes\Bada & Tizen\Tizen Signing\OmniGSoftTizen.p12" "****" "C:\tizen-sdk\tools\certificate-generator\certificates\distributor\tizen-distributor-signer.p12" "****" "C:\tizen-sdk\tools\certificate-generator\certificates\distributor\tizen-distributor-ca.cer" "" "****" "" ""
Error: Could not find or load main class org.tizen.common.sign.signer.TizenSigner
Signing failed!

 

I am using SDK 2.2 with Windows 7 x64. This problem has been reported in earlier post and the suggestion is simply "trying to re-install SDK".

Obviously re-install sdk is not a solution (I've done for many times), hope somebody in Tizen can take a review on this issue and give a meaningful advice instead of "just re-install SDK".

Thanks

Hongkun

 

 

Edited on 18 03, 2014

Responses

8 Replies
Hongkun Wang
Seeing that no suggestions posted so far, I decided help myself and, it turned out to be a simple fix. First, error "Could not find or load main class xxx" tells the main class is not on the Java classpath and we need to add it in. Second, I need to find out which Jar file contains class "org.tizen.common.sign.signer.TizenSigner". Fortunately, both are not too difficult, and I got the following solution: Open and edit bat file "C:\tizen-sdk\tools\ide\bin\native-signing.bat", add the following new line: FOR %%i IN ("C:\tizen-sdk\ide\plugins\org.tizen.*.jar") DO ( call:CONCAT %%i ) after the existing line: FOR %%i IN ("%CLI_HOME%\lib\*.jar") DO ( call:CONCAT %%i ) so the commands who setting up the Java classpath looks like: FOR %%i IN ("%CLI_HOME%\lib\*.jar") DO ( call:CONCAT %%i ) FOR %%i IN ("C:\tizen-sdk\ide\plugins\org.tizen.*.jar") DO ( call:CONCAT %%i ) The main class "org.tizen.common.sign.signer.TizenSigner" is in one of the "org.tizen.*.jar" but is not added on the java classpath (by -cp) when "native-signing.bat" is executed, that is why we need to add a new line to add the jar file on the classpath. I'm highly curious how the signing succeeds on the system of whom does not report this problem, because the main class is indeed missing on the java classpath. Hope someone can give me an answer.
Pushpa G
Hi, The org.tizen.* jar files are added in the %CLI_HOME%\lib*.jar. Aren't there org.tizen.common.sign*.jar file in the /tools/ide/lib directory? For clarifying the classpath, please add the echo statement in the native-signing.bat: set EXEC=java -cp %CLI_HOME%\conf;%classpath% %OPT% %MAIN% %* echo %EXEC%
Hongkun Wang
Hi, There is no org.tizen.common.sign*.jar in the folder " /tools/ide/lib", that's why I have to add it manually. Every time my SDK installation succeeded with no issue. I think Tizen team need to take care of the SDK installer.
tizendevteam T
Dear Mr.Wang, This issue will be fixed in the future version, Thank you,
Zsolt Szatmari
Hongkun Wang: Thanks! I had to do the same on the Mac. (obviously, with the bash script instead of a windows batch file) Additionally, it still did not sign because a log4j exception that was thrown about some wrong xml in a jar... I had to replace log4j.xml inside org.tizen.common_2.0.0.201307161731.jar with the dummy xml below. Not it works!
Zsolt Szatmari
Well, it didn't go through. So I meant the dummy xml found at http://stackoverflow.com/questions/6358836/log4j-how-to-configure-simplest-possible-file-logging , with one appender.
Victor Malov
No need to do this stuff. Looks like bug in Tizen SDK - https://bugs.tizen.org/jira/browse/TSDK-132. Just reinstall (as the most simple and correct solution) Tizen SDK with "Web App Development" enabled. For me works fine.
Zsolt Szatmari
Wow, thanks! :) Seems cleaner than my hackery, indeed.