Skip to main content

Which servlet container works with phoneme_advanced

6 replies [Last post]
tellmemore
Offline
Joined: 2008-03-05
Points: 0

I am trying to use winstone with cvm but get this.

java.lang.NoClassDefFoundError: java.net.ServerSocket
at java.lang.Class.getMethod0(Native Method)
at java.lang.Class.getMethod(Unknown Source)
at sun.misc.CVM.runMain(Unknown Source)

If i try jetty 6.1.8 i get

java.lang.NoClassDefFoundError: java.net.ConnectException
at java.lang.Class.getMethod0(Native Method)
at java.lang.Class.getMethod(Unknown Source)
at sun.misc.CVM.runMain(Unknown Source)

Will anybody tell me which servlet container works gr8 with phoneme advanced ??
And any pointers as to how to use it. Sample apps etc.

I am using latest phoneMe_advanced release on x86 box .

--Rohit

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
billp
Offline
Joined: 2006-09-19
Points: 0

You need to build with J2ME_CLASSLIB=foundation in order to pull in those classes.

bill

tellmemore
Offline
Joined: 2008-03-05
Points: 0

oops i missed that ..
Ok I compiled using make J2ME_CLASSLIB=foundation now and tried ,

bin/cvm -jar /path/to/winstone/winstone-0.9.10.jar --webroot=/tmp/

But now i get this:
java.lang.NoClassDefFoundError: org.w3c.dom.Node
at winstone.HostGroup.initHost(Unknown Source)
at winstone.HostGroup.(Unknown Source)
at winstone.Launcher.(Unknown Source)
at winstone.Launcher.main(Unknown Source)
at sun.misc.CVM.runMain(Unknown Source)

If i do
bin/cvm -jar lib/foundation.jar:/path/to/winstone/winstone-0.9.10.jar --webroot=/tmp/
i get this :

java.util.zip.ZipException: No such file or directory
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(Unknown Source)
at java.util.jar.JarFile.(Unknown Source)
at java.util.jar.JarFile.(Unknown Source)
at sun.misc.CVM.parseCommandLineOptions(Unknown Source)
Valid -Xopt options include:
stackChunkSize=<32..65536> - Java stack chunk size
stackMinSize=<32..65536> - Java stack minimum size
stackMaxSize=<1024..1048576> - Java stack maximum size
Cannot start VM ()
Could not create JVM.

adding -cp . did not have any effect ..

Will sombody post all the build flags they use so that cvm works with winstone .??
Or is it just some runtime parameter to be passed which i am missing ?

-- Rohit

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> oops i missed that ..
> Ok I compiled using make J2ME_CLASSLIB=foundation now and tried ,
>
> bin/cvm -jar /path/to/winstone/winstone-0.9.10.jar --webroot=/tmp/
>
> But now i get this:
> java.lang.NoClassDefFoundError: org.w3c.dom.Node
> at winstone.HostGroup.initHost(Unknown Source)
> at winstone.HostGroup.(Unknown Source)
> at winstone.Launcher.(Unknown Source)
> at winstone.Launcher.main(Unknown Source)
> at sun.misc.CVM.runMain(Unknown Source)
>
> If i do
> bin/cvm -jar lib/foundation.jar:/path/to/winstone/winstone-0.9.10.jar --webroot=/tmp/
> i get this :
>
> java.util.zip.ZipException: No such file or directory
> at java.util.zip.ZipFile.open(Native Method)
> at java.util.zip.ZipFile.(Unknown Source)
> at java.util.jar.JarFile.(Unknown Source)
> at java.util.jar.JarFile.(Unknown Source)
> at sun.misc.CVM.parseCommandLineOptions(Unknown Source)
> Valid -Xopt options include:
> stackChunkSize=<32..65536> - Java stack chunk size
> stackMinSize=<32..65536> - Java stack minimum size
> stackMaxSize=<1024..1048576> - Java stack maximum size
> Cannot start VM ()
> Could not create JVM.
>
> adding -cp . did not have any effect ..
>
> Will sombody post all the build flags they use so that cvm works with winstone .??
> Or is it just some runtime parameter to be passed which i am missing ?
>

Hi Rohit,

The "-jar" parameter is not used for adding system library JAR files.
You need to use "-Xbootclasspath/a=" to do that.

For example:

bin/cvm -Xbootclasspath/a=/path/to/winstone/winstone-0.9.10.jar -jar /path/to/winstone/winstone-0.9.10.jar
--webroot=/tmp/

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

Gary Adams

Did you build the foundation profile?
cdc/src/share/foundation/classes/java/net/ServerSocket.java
cdc/src/share/foundation/classes/java/net/ConnectException.java

What build flags did you use?

phonemeadvanced@mobileandembedded.org wrote:
> I am trying to use winstone with cvm but get this.
>
> java.lang.NoClassDefFoundError: java.net.ServerSocket
> at java.lang.Class.getMethod0(Native Method)
> at java.lang.Class.getMethod(Unknown Source)
> at sun.misc.CVM.runMain(Unknown Source)
>
> If i try jetty 6.1.8 i get
>
> java.lang.NoClassDefFoundError: java.net.ConnectException
> at java.lang.Class.getMethod0(Native Method)
> at java.lang.Class.getMethod(Unknown Source)
> at sun.misc.CVM.runMain(Unknown Source)
>
> Will anybody tell me which servlet container works gr8 with phoneme advanced ??
> And any pointers as to how to use it. Sample apps etc.
>
> I am using latest phoneMe_advanced release on x86 box .
>
> --Rohit
> [Message sent by forum member 'tellmemore' (tellmemore)]
>
> http://forums.java.net/jive/thread.jspa?messageID=265908
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

Hinkmond Wong

Gary Adams wrote:
> Did you build the foundation profile?
> cdc/src/share/foundation/classes/java/net/ServerSocket.java
> cdc/src/share/foundation/classes/java/net/ConnectException.java
>
> What build flags did you use?

Hi Rohit,

You may also be missing your lib/ directory when you run a non-ROMized
build. It needs to be located on the same directory as bin/ and it
needs to contain the foundation.jar file. When you run a non-ROMized
build, the cvm will automatically look for the relative path to the file
../lib/foundation.jar, and in that JAR file, the
java/net/ServerSocket.class file is picked up.

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

tellmemore
Offline
Joined: 2008-03-05
Points: 0

For jetty one after compiling with foundation profile i get this.

bin/cvm -jar /path/to/jetty/start.jar /path/to/jetty/jetty/xml

java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at org.mortbay.start.Version.parse(Unknown Source)
at org.mortbay.start.Version.(Unknown Source)
at org.mortbay.start.Main.configure(Unknown Source)
at org.mortbay.start.Main.start(Unknown Source)
at org.mortbay.start.Main.main(Unknown Source)
at sun.misc.CVM.runMain(Unknown Source)

Again if i add :lib/foundation.jar i get

java.util.zip.ZipException: No such file or directory
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(Unknown Source)
at java.util.jar.JarFile.(Unknown Source)
at java.util.jar.JarFile.(Unknown Source)
at sun.misc.CVM.parseCommandLineOptions(Unknown Source)
Valid -Xopt options include:
stackChunkSize=<32..65536> - Java stack chunk size
stackMinSize=<32..65536> - Java stack minimum size
stackMaxSize=<1024..1048576> - Java stack maximum size
Cannot start VM ()
Could not create JVM.

Any idea what i am doing wrong here ??

Rohit