java.lang.NumberFormatException in Tomcat

198 views
Skip to first unread message

Don Marti

unread,
Feb 26, 2014, 1:08:04 AM2/26/14
to Osv Dev
Hi all,

I have Apache Tomcat set up on OSv following the
"make image=tomcat" method here:
https://github.com/cloudius-systems/osv/wiki/Running-apache-tomcat

I deployed an application WAR, GitBucket 1.10, from
here:
https://github.com/takezoe/gitbucket/releases

It deployed fine, but on attempting to log in as root,
I get this..

java.lang.NumberFormatException: For input string: "0s1"
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
java.lang.Integer.parseInt(Integer.java:492)
java.lang.Integer.parseInt(Integer.java:527)
org.h2.store.PageStore.addMeta(PageStore.java:1678)
org.h2.store.PageStore.readMetaData(PageStore.java:1594)
org.h2.store.PageStore.recover(PageStore.java:1370)
org.h2.store.PageStore.openExisting(PageStore.java:361)
org.h2.store.PageStore.open(PageStore.java:285)
org.h2.engine.Database.getPageStore(Database.java:2210)
org.h2.engine.Database.open(Database.java:603)
org.h2.engine.Database.openDatabase(Database.java:226)
org.h2.engine.Database.<init>(Database.java:221)
org.h2.engine.Engine.openSession(Engine.java:56)
org.h2.engine.Engine.openSession(Engine.java:160)
org.h2.engine.Engine.createSessionAndValidate(Engine.java:139)
org.h2.engine.Engine.createSession(Engine.java:122)
org.h2.engine.Engine.createSession(Engine.java:28)
org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:313)
org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:105)
org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:90)
org.h2.Driver.connect(Driver.java:73)
java.sql.DriverManager.getConnection(DriverManager.java:571)
java.sql.DriverManager.getConnection(DriverManager.java:187)
scala.slick.session.Database$$anon$2.createConnection(Database.scala:105)
scala.slick.session.BaseSession.conn$lzycompute(Session.scala:207)
scala.slick.session.BaseSession.conn(Session.scala:207)
scala.slick.session.BaseSession.close(Session.scala:221)
scala.slick.session.Database.withSession(Database.scala:38)
scala.slick.session.Database.withSession(Database.scala:46)
scala.slick.session.Database.withTransaction(Database.scala:58)
servlet.TransactionFilter.doFilter(TransactionFilter.scala:23)

I'm not seeing this error with the same WAR on Tomcat
7.0.47 running on the host (Fedora 20).

--
Don Marti
http://zgp.org/~dmarti/
dma...@zgp.org

Pekka Enberg

unread,
Feb 28, 2014, 2:18:01 PM2/28/14
to Don Marti, Osv Dev, Tomasz Grabiec, Nadav Har'El
Hey,

On Wed, Feb 26, 2014 at 8:08 AM, Don Marti <dma...@zgp.org> wrote:
> I have Apache Tomcat set up on OSv following the
> "make image=tomcat" method here:
> https://github.com/cloudius-systems/osv/wiki/Running-apache-tomcat
>
> I deployed an application WAR, GitBucket 1.10, from
> here:
> https://github.com/takezoe/gitbucket/releases
>
> It deployed fine, but on attempting to log in as root,
> I get this..
>
> java.lang.NumberFormatException: For input string: "0s1"
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> java.lang.Integer.parseInt(Integer.java:492)
> java.lang.Integer.parseInt(Integer.java:527)

[snip]

> I'm not seeing this error with the same WAR on Tomcat
> 7.0.47 running on the host (Fedora 20).

Nadav, Tomek, can this issue be related to?

https://github.com/cloudius-systems/osv/issues/222

Pekka

Nadav Har'El

unread,
Mar 2, 2014, 2:42:36 AM3/2/14
to Pekka Enberg, Don Marti, Osv Dev, Tomasz Grabiec
Well, I still don't know what causes 222 (I'll try to debug it today and see if I can reproduce it...). Issue 222 was always about "\s" (space), and here is a different thing apparently - the letter "s", but it might be a more general regexp problem that isn't at all specific to \s. I guess we'll need to look at tomcat, and understand where this "0s1" string comes from, and what Tomcat tried to do with it (Don's message had the full stack trace, but I am not familiar with Tomcat's code), and if it tried to use some regexp to split it and failed.

--

Tomasz Grabiec

unread,
Mar 2, 2014, 2:59:57 AM3/2/14
to Nadav Har'El, Pekka Enberg, Don Marti, Osv Dev
I'm investigating this "0s1" issue - it's not really in tomcat but in H2 database which gitbucket uses. I doubt it is related to #222 but it's hard to say for sure.

I reproduced issue #222 on virtualbox. I also created #223, which was reported on the list by Alexey and I believe has the same underlying cause as #222. I started setting up the investigation environment but If you want to jump in, feel free. Otherwise I will do it on Monday.
 

Nadav Har'El

unread,
Mar 2, 2014, 3:15:06 AM3/2/14
to Tomasz Grabiec, Pekka Enberg, Don Marti, Osv Dev
On Sun, Mar 2, 2014 at 9:59 AM, Tomasz Grabiec <tgra...@cloudius-systems.com> wrote:

I reproduced issue #222 on virtualbox.

This is really interesting, because we got these reports long before we were running on virtualbox, so supposedly it's not a virtualbox-specific bug - but maybe easier to reproduce there.

I also want to try OSv on virtualbox, so it will be a good excuse :-)

Tomasz Grabiec

unread,
Mar 2, 2014, 3:28:13 AM3/2/14
to Nadav Har'El, Pekka Enberg, Don Marti, Osv Dev
On Sun, Mar 2, 2014 at 10:15 AM, Nadav Har'El <n...@cloudius-systems.com> wrote:
On Sun, Mar 2, 2014 at 9:59 AM, Tomasz Grabiec <tgra...@cloudius-systems.com> wrote:

I reproduced issue #222 on virtualbox.

This is really interesting, because we got these reports long before we were running on virtualbox, so supposedly it's not a virtualbox-specific bug - but maybe easier to reproduce there.

Just to clarify, I started OSv from ubuntu guest running inside virtualbox using just scripts/run.py. That's the setup which was mentioned in #155.

Nadav Har'El

unread,
Mar 2, 2014, 4:21:09 AM3/2/14
to Tomasz Grabiec, Pekka Enberg, Don Marti, Osv Dev
On Sun, Mar 2, 2014 at 10:28 AM, Tomasz Grabiec <tgra...@cloudius-systems.com> wrote:


Just to clarify, I started OSv from ubuntu guest running inside virtualbox using just scripts/run.py. That's the setup which was mentioned in #155.


Oh....

So since VirtualBox doesn't have nested VMX as far as I know, this means this run.py was using qemu without KVM, right? So maybe the same problem can be replicated on just qemu without KVM? I'll try.

Tomasz Grabiec

unread,
Mar 2, 2014, 4:40:00 AM3/2/14
to Nadav Har'El, Pekka Enberg, Don Marti, Osv Dev
I tried starting OSv with -p none but it didn't trigger the problem.
 

Tomasz Grabiec

unread,
Mar 2, 2014, 4:42:53 AM3/2/14
to Nadav Har'El, Pekka Enberg, Don Marti, Osv Dev
I also used --no-kvm 
 

Nadav Har'El

unread,
Mar 2, 2014, 4:45:32 AM3/2/14
to Tomasz Grabiec, Pekka Enberg, Don Marti, Osv Dev
Is your regular host also uses Ubuntu?
If not, maybe the Ubuntu host is what causes this problem?...

By the way, I wanted to ask you, how do I create a new Java test case?

I see we have java/tests/src/main/java/io/osv - do I add a file there? Do I also need to update AllTests.java?

Tomasz Grabiec

unread,
Mar 2, 2014, 4:49:01 AM3/2/14
to Nadav Har'El, Pekka Enberg, Don Marti, Osv Dev
On Sun, Mar 2, 2014 at 11:45 AM, Nadav Har'El <n...@cloudius-systems.com> wrote:
Is your regular host also uses Ubuntu?
If not, maybe the Ubuntu host is what causes this problem?...

I use Ubuntu 13.04 on both host and guest side.
 

By the way, I wanted to ask you, how do I create a new Java test case?

I see we have java/tests/src/main/java/io/osv - do I add a file there? Do I also need to update AllTests.java?

You need to add the class to AllTests.java, otherwise it will not be executed.

To run just java tests do:

make image=java-tests && scripts/run.py

But if you try to run it under virtualbox the test runner will probably fail inside cglib before your test case even runs.


 


On Sun, Mar 2, 2014 at 11:42 AM, Tomasz Grabiec <tgra...@cloudius-systems.com> wrote:



On Sun, Mar 2, 2014 at 11:40 AM, Tomasz Grabiec <tgra...@cloudius-systems.com> wrote:



On Sun, Mar 2, 2014 at 11:21 AM, Nadav Har'El <n...@cloudius-systems.com> wrote:
On Sun, Mar 2, 2014 at 10:28 AM, Tomasz Grabiec <tgra...@cloudius-systems.com> wrote:


Just to clarify, I started OSv from ubuntu guest running inside virtualbox using just scripts/run.py. That's the setup which was mentioned in #155.


Oh....

So since VirtualBox doesn't have nested VMX as far as I know, this means this run.py was using qemu without KVM, right? So maybe the same problem can be replicated on just qemu without KVM? I'll try.

I tried starting OSv with -p none but it didn't trigger the problem.

I also used --no-kvm 
 




--
You received this message because you are subscribed to the Google Groups "OSv Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages