ClassFormatException

4 views
Skip to first unread message

Pascal

unread,
Mar 3, 2009, 9:57:05 AM3/3/09
to pyx4me-users
Hi

My application loads and then starts on the mobile phone but there is
ClassFormatException that is thrown.

Have you seen this error already ? What could the origin(s) of this
error ? Preverification ? compilation ?

Regards,
Pascal

Vlad Skarzhevskyy

unread,
Mar 3, 2009, 10:41:09 AM3/3/09
to pyx4me...@googlegroups.com
First verify
      <artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.3</source>
<target>1.1</target>
......


Then try to run it on WTK and see what is wrong with details.
--
Vlad

Pascal

unread,
Mar 4, 2009, 4:20:59 AM3/4/09
to pyx4me-users
Thanks for your answer.

Actually I've got the correct settings.

To be honest I feel a bit lost with all the dependency blocks.

In my project I've got this dependencies block:

<dependencies>

[...]

<dependency>
<groupId>com.sun</groupId>
<artifactId>LWUIT</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/LWUIT.jar</systemPath>
</dependency>

<dependency>
<groupId>org.kxml2</groupId>
<artifactId>kxml2</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/kxml2-min-2.3.0.jar</
systemPath>
</dependency>

<dependency>
<groupId>com.sun</groupId>
<artifactId>jsr75</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${wtk.home}/lib/jsr75.jar</systemPath>
</dependency>

</dependencies>

The compiler plugin configuration:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.3</source>
<target>1.1</target>
<compilerArguments>
<bootclasspath>${wtk.home}/lib/cldcapi11.jar${path.separator}$
{wtk.home}/lib/midpapi20.jar</bootclasspath>
</compilerArguments>
</configuration>
<dependencies>

<dependency>
<groupId>com.sun</groupId>
<artifactId>jsr75</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${wtk.home}/lib/jsr75.jar</systemPath>
</dependency>

</dependencies>
</plugin>

And finally the j2me-maven plugin configuration block:

<plugin>
<groupId>com.pyx4me</groupId>
<artifactId>j2me-maven-plugin</artifactId>
<useWtkLibs>false</useWtkLibs>
<libs>
<lib>${wtk.home}/lib/cldcapi11.jar</lib>
<lib>${wtk.home}/lib/midpapi20.jar</lib>
</libs>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>LWUIT</artifactId>
</dependency>
<dependency>
<groupId>org.kxml2</groupId>
<artifactId>kxml2</artifactId>
</dependency>
<dependency>
<groupId>net.genaker</groupId>
<artifactId>midletUtils</artifactId>
</dependency>
</dependencies>

In my device I still have this ClassFormatException (it is complaining
about a Thread class run method).

WTK emulator complains about a different thing:

Error verifying method org/kxml2/io/KXmlParser exception(Ljava/lang/
String;)V

Regards
Pascal


On Mar 3, 4:41 pm, Vlad Skarzhevskyy <skarzhevs...@gmail.com> wrote:
> First verify
>
>       <artifactId>maven-compiler-plugin</artifactId>
>                 <configuration>
>                     <source>1.3</source>
>                     <target>1.1</target>
> ......
>
> Then try to run it on WTK and see what is wrong with details.
>
Reply all
Reply to author
Forward
0 new messages