You Are Here:

Community: Developer Discussion Boards

#1 Old integrate external jar in j2mepolish(especially Perst Lite!) - 2008-01-29, 12:57

Join Date: Sep 2007
Posts: 8
haamoon
Offline
Registered User
hi, i am using j2mepolish to build project i have try to integrate external jar "perst-rms.jar" in my project i have put it in bulid paht and import it in j2mepolish using <libraries>
element of the <build> section in build.xml script. somthing like this:

<libraries>
<library file="perst-rms.jar"/>
</libraries>

j2mepolish find the jar file but got these error reports:

[j2mepolish] compiling for device [Generic/midp1].
[j2mepolish-javac-Generic/midp1] Compiling 180 source files to C:\WTK22\workSpace\metroGUI\build\Generic\midp1\fa_IR\classes
[j2mepolish] obfuscating for device [Generic/midp1].
[j2mepolish] proguard: ProGuard, version 3.5
[j2mepolish] proguard: Warning: org.garret.perst.impl.RndBtree$BtreePageOfBoolean: can't find referenced field 'java.lang.Boolean TRUE' in class java.lang.Boolean
[j2mepolish] proguard: Warning: org.garret.perst.impl.RndBtree$BtreePageOfBoolean: can't find referenced field 'java.lang.Boolean FALSE' in class java.lang.Boolean
[j2mepolish] proguard: Warning: org.garret.perst.RectangleR2: can't find referenced method 'java.lang.StringBuffer append(double)' in class java.lang.StringBuffer
[j2mepolish] proguard: Warning: org.garret.perst.impl.StorageImpl: can't find referenced method 'boolean equalsIgnoreCase(java.lang.String)' in class java.lang.String
[j2mepolish] proguard: Warning: org.garret.perst.impl.AltBtree$BtreePageOfBoolean: can't find referenced field 'java.lang.Boolean TRUE' in class java.lang.Boolean
[j2mepolish] proguard: Warning: org.garret.perst.impl.AltBtree$BtreePageOfBoolean: can't find referenced field 'java.lang.Boolean FALSE' in class java.lang.Boolean
[j2mepolish] proguard: Warning: org.garret.perst.impl.BtreeCompoundIndex: can't find referenced field 'java.lang.Boolean TRUE' in class java.lang.Boolean
[j2mepolish] proguard: Warning: org.garret.perst.impl.BtreeCompoundIndex: can't find referenced field 'java.lang.Boolean FALSE' in class java.lang.Boolean
[j2mepolish] proguard: Warning: org.garret.perst.impl.Btree: can't find referenced field 'java.lang.Boolean TRUE' in class java.lang.Boolean
[j2mepolish] proguard: Warning: org.garret.perst.impl.Btree: can't find referenced field 'java.lang.Boolean FALSE' in class java.lang.Boolean
[j2mepolish] proguard: Warning: there were 10 unresolved references to program class members.
[j2mepolish] proguard: Your input class files appear to be inconsistent.
[j2mepolish] proguard: You may need to recompile them and try again.
[j2mepolish] proguard: If you are sure the mentioned classes are not used anyway,
[j2mepolish] proguard: you could try your luck using the '-ignorewarnings' option.
[j2mepolish] proguard: Error: Please correct the above warnings first.
[j2mepolish] ProGuard arguments: [java, -jar, C:\Program Files\J2ME-Polish\lib\proguard.jar, -injars, C:\WTK22\workSpace\metroGUI\build\source.jar, -outjars, C:\WTK22\workSpace\metroGUI\build\dest.jar, -libraryjars, "'C:\Program Files\J2ME-Polish\import\midp-1.0.jar'";"'C:\Program Files\J2ME-Polish\import\cldc-1.0.jar'", -keep, class MetroGUI, -dontoptimize, -applymapping, C:\WTK22\workSpace\metroGUI\build\Generic\midp1\fa_IR\input-obfuscation-map.txt, -printmapping, C:\WTK22\workSpace\metroGUI\build\Generic\midp1\fa_IR\obfuscation-map.txt, -allowaccessmodification, -overloadaggressively, -defaultpackage, , -dontusemixedcaseclassnames]

BUILD FAILED

i have just remove Obfuscating section but got these errors in preverify section:

[j2mepolish] compiling for device [Generic/midp1].
[j2mepolish-javac-Generic/midp1] Compiling 180 source files to C:\WTK22\workSpace\metroGUI\build\Generic\midp1\fa_IR\classes
[j2mepolish] preverifying for device [Generic/midp1].
[j2mepolish] preverify:Error preverifying class org.garret.perst.IInputStream
[j2mepolish] preverify: java/lang/VerifyError:
[j2mepolish] Preverify call failed: 1
[j2mepolish] C:\WTK22\bin\preverify.exe -classpath C:\Program Files\J2ME-Polish\import\midp-1.0.jar;C:\Program Files\J2ME-Polish\import\cldc-1.0.jar; -d C:\WTK22\workSpace\metroGUI\build\Generic\midp1\fa_IR\classes -nofp -nofinalize -nonative C:\WTK22\workSpace\metroGUI\build\Generic\midp1\fa_IR\classes

BUILD FAILED

could anybody help me about add external jar lib in j2mepolish projects? how about Perst Lite lib?

thanks for any help.
sorry for bad english!
Reply With Quote

#2 Old Re: integrate external jar in j2mepolish(especially Perst Lite!) - 2008-01-30, 03:40

Join Date: Aug 2006
Posts: 65
Location: Spain
ncerezo2
Offline
Regular Contributor
It seems that your application (perst lite) is using CLDC 1.1, since the Boolean static fields TRUE and FALSE are only available on CLDC 1.1 and not in CLDC 1.0, but you are trying to compile using CLDC 1.0.
There're might be other errors, but that's all I can say from your message.
You can try OpenBaseMovil instead of Perst Lite, it runs on CLDC 1.0 devices and is more powerful.


-----------------------
Narciso Cerezo
CTO Elondra

OpenBaseMovil
http://www.openbasemovil.org
The Framework for enterprise class J2ME applications with a pure J2ME relational database engine and much more.
Reply With Quote

#3 Old Re: integrate external jar in j2mepolish(especially Openbase Movil DB!) - 2008-02-11, 14:02

Join Date: Oct 2007
Posts: 21
sasikumar31
Offline
Registered User
Hi
i am trying to integrate j2me polish and openbasemovil DB ,i gave the below code in bulid.xml for adding external libraries.
but it doe
<libraries>
<library file="E:/J2ME-Polish/lib/openbasemovil-db-3.0.3.jar" />
<library file="E:/J2ME-Polish/lib/openbasemovil-storage-3.0.jar" />
<library file="E:/J2ME-Polish/lib/openbasemovil-db-3.0.3-debug.jar" />
<library file="E:/J2ME-Polish/lib/openbasemovil-storage-3.0-debug.jar" /> <library file="E:/J2ME-Polish/lib/openbasemovil-core-2.0.2.jar" />
<library file="E:/J2ME-Polish/lib/openbasemovil-core-2.0.2-debug.jar" />

</libraries>


but it gives the following one


java.lang.Throwable
[j2mepolish] at de.enough.bytecode.ASMClassLoader.loadClass(ASMClassLoader.java:123)
[j2mepolish] at de.enough.bytecode.ASMClassLoader.loadClass(ASMClassLoader.java:94)
[j2mepolish] at de.enough.bytecode.ASMClassLoader.inherits(ASMClassLoader.java:259)
[j2mepolish] at de.enough.bytecode.ASMClassLoader.inherits(ASMClassLoader.java:238)
[j2mepolish] at de.enough.polish.postcompile.io.SerializationPostCompiler.filterClassList(SerializationPostCompiler.java:128)
[j2mepolish] at de.enough.polish.postcompile.BytecodePostCompiler.postCompile(BytecodePostCompiler.java:44)
[j2mepolish] at de.enough.polish.postcompile.PostCompiler.execute(PostCompiler.java:99)
[j2mepolish] at de.enough.polish.ExtensionManager.executeExtensions(ExtensionManager.java:513)
[j2mepolish] at de.enough.polish.ExtensionManager.postCompile(ExtensionManager.java:506)
[j2mepolish] at de.enough.polish.ant.PolishTask.postCompile(PolishTask.java:2341)
[j2mepolish] at de.enough.polish.ant.PolishTask.execute(PolishTask.java:519)
[j2mepolish] at de.enough.polish.ant.PolishTask.execute(PolishTask.java:375)
[j2mepolish] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[j2mepolish] at org.apache.tools.ant.Task.perform(Task.java:364)
[j2mepolish] at org.apache.tools.ant.Target.execute(Target.java:341)
[j2mepolish] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[j2mepolish] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[j2mepolish] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[j2mepolish] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[j2mepolish] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[j2mepolish] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[j2mepolish] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[j2mepolish] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
[j2mepolish] org.eclipse.ant.internal.ui.antsupport.AntSecurityException
[j2mepolish] at org.eclipse.ant.internal.ui.antsupport.AntSecurityManager.checkExit(AntSecurityManager.java:54)
[j2mepolish] at java.lang.Runtime.exit(Unknown Source)
[j2mepolish] at java.lang.System.exit(Unknown Source)
[j2mepolish] at de.enough.bytecode.ASMClassLoader.loadClass(ASMClassLoader.java:124)
[j2mepolish] at de.enough.bytecode.ASMClassLoader.loadClass(ASMClassLoader.java:94)
[j2mepolish] at de.enough.bytecode.ASMClassLoader.inherits(ASMClassLoader.java:259)
[j2mepolish] at de.enough.bytecode.ASMClassLoader.inherits(ASMClassLoader.java:238)
[j2mepolish] at de.enough.polish.postcompile.io.SerializationPostCompiler.filterClassList(SerializationPostCompiler.java:128)
[j2mepolish] at de.enough.polish.postcompile.BytecodePostCompiler.postCompile(BytecodePostCompiler.java:44)
[j2mepolish] at de.enough.polish.postcompile.PostCompiler.execute(PostCompiler.java:99)
[j2mepolish] at de.enough.polish.ExtensionManager.executeExtensions(ExtensionManager.java:513)
[j2mepolish] at de.enough.polish.ExtensionManager.postCompile(ExtensionManager.java:506)
[j2mepolish] at de.enough.polish.ant.PolishTask.postCompile(PolishTask.java:2341)
[j2mepolish] at de.enough.polish.ant.PolishTask.execute(PolishTask.java:519)
[j2mepolish] at de.enough.polish.ant.PolishTask.execute(PolishTask.java:375)
[j2mepolish] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[j2mepolish] at org.apache.tools.ant.Task.perform(Task.java:364)
[j2mepolish] at org.apache.tools.ant.Target.execute(Target.java:341)
[j2mepolish] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[j2mepolish] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[j2mepolish] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[j2mepolish] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[j2mepolish] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[j2mepolish] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[j2mepolish] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[j2mepolish] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

BUILD FAILED
D:\mPowersalesframeWork\Data_j2mepolish\build.xml:109: Unable to execute J2ME Polish task: org.eclipse.ant.internal.ui.antsupport.AntSecurityException

pls help me to integrate with j2me polish

Sasi kumar.T
Reply With Quote

#4 Old Re: integrate external jar in j2mepolish(especially Perst Lite!) - 2008-02-11, 15:26

Join Date: Aug 2006
Posts: 65
Location: Spain
ncerezo2
Offline
Regular Contributor
Hi sasikumar31,
I'm afraid but I can't help you with J2MEPolish, since I've not used it myself.
I'm the main author of the OpenBaseMovil project, the project has it's own integrated ui engine, targeted for business more than games of course. So we do not use J2MEPolish, and we will not use it.
I would suggest to try the OpenBaseMovil ui, using the framework as a whole. I feel this is not the place or way to provide you with support about how to use it, since the kind of content posted here is regulated by Nokia and I'm not sure if they will find it appropriate.
The project has it's own forums and support trackers hosted at SourceForge, that might be the better place.

Regards


-----------------------
Narciso Cerezo
CTO Elondra

OpenBaseMovil
http://www.openbasemovil.org
The Framework for enterprise class J2ME applications with a pure J2ME relational database engine and much more.
Reply With Quote

#5 Old Exclamation Re: integrate external jar in j2mepolish(especially Perst Lite!) - 2008-02-12, 05:00

Join Date: Oct 2007
Posts: 21
sasikumar31
Offline
Registered User
Hi Narciso Cerezo

i post some query about openbasemovil DB in the openbasemovil forum there is no response for my query ,so only i post it here.

Sasi kumar.T
Student, Dept of Comp Sci.
Bharathidasan University
India.
Reply With Quote

#6 Old Re: integrate external jar in j2mepolish(especially Perst Lite!) - 2008-02-13, 11:35

Join Date: Aug 2006
Posts: 65
Location: Spain
ncerezo2
Offline
Regular Contributor
Hi Sasi Kumar,
Forgive us for taking so long, but the 3GSM Mobile World Congress has kept us a little more busy than usual.
Your questions have been answered.
I might add that we talked with J2MEPolish CEO, and we believe that there's a path for collaboration between both projects.


-----------------------
Narciso Cerezo
CTO Elondra

OpenBaseMovil
http://www.openbasemovil.org
The Framework for enterprise class J2ME applications with a pure J2ME relational database engine and much more.
Reply With Quote

#7 Old Re: integrate external jar in j2mepolish(especially Perst Lite!) - 2008-06-17, 08:51

Join Date: Nov 2007
Posts: 22
markusSV
Offline
Registered User
Hello haamoon,

I've been dealing with this issue also.

I figured out how to use J2MEPolish and other 3rd party jars.

The most important thing, is that you are required to use the same target as the 3rd party jar.

If your jar is obtained using javac -target 1.4 -source 1.4 then your javacTarget must be 1.4 to prevent any errors.

Just make sure you know what javac was used for your 3rd-party jars.


You have two options to include jars in j2mepolish:

Add the binaryLibraries option to the j2mepolish <build> element like in the example above,

Code:
<build fullscreen="menu"
       usePolishGui="${release.polish.enabled}"
       workDir="${dir.work}"
       sourceDir="${dirname.make}/temp"
       destDir="${path.make.release}/${polish.identifier}"
       compilerDestDir="${path.make.verify}"
       imageLoadStrategy="foreground"
       javacTarget="1.4"
       binaryLibraries="${dirname.import}/${api.jarfile}/>
OR

Inside the j2mepolish <build></build> add the <libraries> element like in my example.

Code:
       <!-- Merge import libraries  -->
       <libraries>
           <library file="${dirname.import}/${api.jarfile}"/>
       </libraries>
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
error LNK2001: Please Help sourish_khan General Symbian C++ 9 2006-04-19 12:16
S80 Platform SDK and Visual Studio .NET Linking Error jayantjain Mobile Java Tools & SDKs 1 2005-10-07 23:14
CEikDialog Question AdamBeck General Symbian C++ 2 2004-09-30 20:40
Dialogs within Symbian 6.0 based SDK georgica1979 Symbian User Interface 14 2003-04-07 16:29
Unresolved external symbols problem georgica1979 Symbian User Interface 1 2003-04-06 14:26

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia