[jitsi-dev] Exception from JdbcConfigService


#1

Hello, (Ingo)

Emil observed the exception at the end of the email the other day. I
don't know why getProperty() would return an empty string (or something
which returns an empty string from toString()) -- the property editor
shows no value for the property. ConfigurationServiceImpl handles that
case by checking the length of the string, so that's a possible fix, but
I don't know if it's a good one.

Regards,
Boris

java.lang.NumberFormatException: For input string: ""
    at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:470)
    at java.lang.Integer.parseInt(Integer.java:499)
    at
net.java.sip.communicator.impl.configuration.JdbcConfigService.getInt(JdbcConfigService.java:556)
    at
org.jitsi.impl.neomedia.codec.audio.opus.JNIEncoder.doOpen(JNIEncoder.java:275)
    at
org.jitsi.impl.neomedia.codec.AbstractCodec2.open(AbstractCodec2.java:322)
    at
net.sf.fmj.media.BasicFilterModule.doRealize(BasicFilterModule.java:83)
    at
net.sf.fmj.media.PlaybackEngine.buildTrackFromGraph(PlaybackEngine.java:579)
    at
net.sf.fmj.media.ProcessEngine$ProcGraphBuilder.buildTrackFromGraph(ProcessEngine.java:262)
    at
net.sf.fmj.media.ProcessEngine$ProcGraphBuilder.buildCustomGraph(ProcessEngine.java:238)
    at
net.sf.fmj.media.ProcessEngine$ProcGraphBuilder.buildGraph(ProcessEngine.java:252)
    at
net.sf.fmj.media.ProcessEngine$ProcTControl.buildTrack(ProcessEngine.java:688)
    at net.sf.fmj.media.PlaybackEngine.doRealize1(PlaybackEngine.java:1135)
    at net.sf.fmj.media.ProcessEngine.doRealize(ProcessEngine.java:1197)
    at net.sf.fmj.media.RealizeWorkThread.process(BasicController.java:1157)
    at
net.sf.fmj.media.StateTransitionWorkThread.run(BasicController.java:1237)


#2

Emil observed the exception at the end of the email the other day. I
don't know why getProperty() would return an empty string (or something
which returns an empty string from toString())

Well, an empty property shouldn't end up in the database at all. Don't know
how this happened. Could originate from the migration of existing
properties.

-- the property editor
shows no value for the property. ConfigurationServiceImpl handles that
case by checking the length of the string, so that's a possible fix, but
I don't know if it's a good one.

Sounds good and fail-proof.

Regards,
Boris

Ingo


#3

That's actually very strange. My sip-communicator.properties contains
the following line:

net.java.sip.communicator.impl.neomedia.codec.audio.opus.encoder.BITRATE=<EOL>

This got translated to:
INSERT INTO PROPS
VALUES('net.java.sip.communicator.impl.neomedia.codec.audio.opus.encoder.BITRATE','')

Seems like we'd just need to make sure that such values are returned
as null like you have been suggesting.

Emil

···

On Mon, Feb 10, 2014 at 11:51 AM, Ingo Bauersachs <ingo@jitsi.org> wrote:

Emil observed the exception at the end of the email the other day. I
don't know why getProperty() would return an empty string (or something
which returns an empty string from toString())

Well, an empty property shouldn't end up in the database at all. Don't know
how this happened. Could originate from the migration of existing
properties.

-- the property editor
shows no value for the property. ConfigurationServiceImpl handles that
case by checking the length of the string, so that's a possible fix, but
I don't know if it's a good one.

Sounds good and fail-proof.

Regards,
Boris

Ingo

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
https://jitsi.org FAX: +33.1.77.62.47.31


#4

Fixed. Now returns the default value for int/long properties if something
invalid is in the database. (Same behavior as with the properties
ConfigService).

Ingo

From: dev-bounces@jitsi.org [mailto:dev-bounces@jitsi.org] On Behalf Of

Emil

Ivov
Sent: Montag, 10. Februar 2014 12:14
To: Jitsi Developers
Subject: Re: [jitsi-dev] Exception from JdbcConfigService
That's actually very strange. My sip-communicator.properties contains
the following line:

net.java.sip.communicator.impl.neomedia.codec.audio.opus.encoder.BITRATE=<EO
L

This got translated to: INSERT INTO PROPS
VALUES('net.java.sip.communicator.impl.neomedia.codec.audio.opus.encoder.
BITR ATE','')

Seems like we'd just need to make sure that such values are returned
as null like you have been suggesting.

Emil

Emil observed the exception at the end of the email the other day. I
don't know why getProperty() would return an empty string (or something
which returns an empty string from toString())

Well, an empty property shouldn't end up in the database at all. Don't

know

···

-----Original Message-----
On Mon, Feb 10, 2014 at 11:51 AM, Ingo Bauersachs <ingo@jitsi.org> wrote:

how this happened. Could originate from the migration of existing
properties.

-- the property editor
shows no value for the property. ConfigurationServiceImpl handles that
case by checking the length of the string, so that's a possible fix, but
I don't know if it's a good one.

Sounds good and fail-proof.

Regards,
Boris

Ingo

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#5

Thanks!

···

On Tue, Feb 18, 2014 at 6:57 PM, Ingo Bauersachs <ingo@jitsi.org> wrote:

Fixed. Now returns the default value for int/long properties if something
invalid is in the database. (Same behavior as with the properties
ConfigService).

Ingo

-----Original Message-----
From: dev-bounces@jitsi.org [mailto:dev-bounces@jitsi.org] On Behalf Of

Emil

Ivov
Sent: Montag, 10. Februar 2014 12:14
To: Jitsi Developers
Subject: Re: [jitsi-dev] Exception from JdbcConfigService
That's actually very strange. My sip-communicator.properties contains
the following line:

net.java.sip.communicator.impl.neomedia.codec.audio.opus.encoder.BITRATE=<EO
L

This got translated to: INSERT INTO PROPS
VALUES('net.java.sip.communicator.impl.neomedia.codec.audio.opus.encoder.
BITR ATE','')

Seems like we'd just need to make sure that such values are returned
as null like you have been suggesting.

Emil

On Mon, Feb 10, 2014 at 11:51 AM, Ingo Bauersachs <ingo@jitsi.org> wrote:

Emil observed the exception at the end of the email the other day. I
don't know why getProperty() would return an empty string (or something
which returns an empty string from toString())

Well, an empty property shouldn't end up in the database at all. Don't

know

how this happened. Could originate from the migration of existing
properties.

-- the property editor
shows no value for the property. ConfigurationServiceImpl handles that
case by checking the length of the string, so that's a possible fix, but
I don't know if it's a good one.

Sounds good and fail-proof.

Regards,
Boris

Ingo

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
https://jitsi.org