Re: [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record

2015-09-17 Thread Madusanka Premaratne
Hi Bimali,
Did you try removing true as Harsha suggested in other
thread?

Thanks,
Madusanka

On Thu, Sep 17, 2015 at 11:20 AM, Bimali Dayananda <bim...@wso2.com> wrote:

> Hi Madusanka,
>
> I restarted the setup with -DSetup after deleting h2 dbs. But still the
> problem is there.
>
>
> Thanks.
>
> On Thu, Sep 17, 2015 at 10:51 AM, Madusanka Premaratne <
> madusan...@wso2.com> wrote:
>
>> Hi Bimali,
>> H2 databases corrupt sometimes since it stores as a file. Please refer to
>> the mail thread[1] for more details.
>>
>> [1] - [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading
>> record excception is throwing APIM GIT build while adding a new API.
>>
>> Thanks,
>> Madusanka
>>
>> On Thu, Sep 17, 2015 at 10:38 AM, Bimali Dayananda <bim...@wso2.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I get the following error message when I run a setup locally. It says a
>>> file is corrupted but couldn't find the corrupted file.
>>>
>>> org.h2.jdbc.JdbcSQLException: File corrupted while reading record: "234
>>> of 233". Possible solution: use the recovery tool [90030-140]
>>> at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
>>> at org.h2.message.DbException.get(DbException.java:167)
>>> at org.h2.message.DbException.get(DbException.java:144)
>>> at org.h2.store.PageStore.readPage(PageStore.java:1094)
>>> at org.h2.store.PageStore.getPage(PageStore.java:561)
>>> at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:218)
>>> at org.h2.index.PageDataNode.getLastKey(PageDataNode.java:221)
>>> at org.h2.index.PageDataIndex.(PageDataIndex.java:74)
>>> at org.h2.table.RegularTable.(RegularTable.java:75)
>>> at org.h2.store.PageStore.addMeta(PageStore.java:1443)
>>> at org.h2.store.PageStore.readMetaData(PageStore.java:1380)
>>> at org.h2.store.PageStore.recover(PageStore.java:1178)
>>> at org.h2.store.PageStore.openExisting(PageStore.java:317)
>>> at org.h2.store.PageStore.open(PageStore.java:271)
>>> at org.h2.engine.Database.getPageStore(Database.java:2059)
>>> at org.h2.engine.Database.open(Database.java:534)
>>> at org.h2.engine.Database.openDatabase(Database.java:207)
>>> at org.h2.engine.Database.(Database.java:202)
>>> at org.h2.engine.Engine.openSession(Engine.java:56)
>>> at org.h2.engine.Engine.openSession(Engine.java:146)
>>> at org.h2.engine.Engine.getSession(Engine.java:125)
>>> at org.h2.engine.Session.createSession(Session.java:122)
>>> at
>>> org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
>>> at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
>>> at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:111)
>>> at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:95)
>>> at org.h2.Driver.connect(Driver.java:73)
>>> at
>>> org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
>>> at
>>> org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
>>> at
>>> org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
>>> at
>>> org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
>>> at
>>> org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
>>> at
>>> org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
>>> at
>>> org.wso2.carbon.registry.core.config.RegistryConfigurationProcessor.populateRegistryConfig(RegistryConfigurationProcessor.java:149)
>>> at
>>> org.wso2.carbon.registry.core.config.RegistryContext.(RegistryContext.java:461)
>>> at
>>> org.wso2.carbon.registry.core.config.RegistryContext.(RegistryContext.java:442)
>>> at
>>> org.wso2.carbon.registry.core.config.RegistryContext.getBaseInstance(RegistryContext.java:321)
>>> at
>>> org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.getEmbeddedRegistryService(RegistryCoreServiceComponent.java:627)
>>> at
>>> org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.buildRegistryService(RegistryCoreServiceComponent.java:563)
>>> at
>>> org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.activate(RegistryCoreServiceComponent.java:117)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorIm

Re: [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record

2015-09-16 Thread Madusanka Premaratne
Hi Bimali,
H2 databases corrupt sometimes since it stores as a file. Please refer to
the mail thread[1] for more details.

[1] - [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading
record excception is throwing APIM GIT build while adding a new API.

Thanks,
Madusanka

On Thu, Sep 17, 2015 at 10:38 AM, Bimali Dayananda <bim...@wso2.com> wrote:

> Hi,
>
> I get the following error message when I run a setup locally. It says a
> file is corrupted but couldn't find the corrupted file.
>
> org.h2.jdbc.JdbcSQLException: File corrupted while reading record: "234 of
> 233". Possible solution: use the recovery tool [90030-140]
> at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
> at org.h2.message.DbException.get(DbException.java:167)
> at org.h2.message.DbException.get(DbException.java:144)
> at org.h2.store.PageStore.readPage(PageStore.java:1094)
> at org.h2.store.PageStore.getPage(PageStore.java:561)
> at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:218)
> at org.h2.index.PageDataNode.getLastKey(PageDataNode.java:221)
> at org.h2.index.PageDataIndex.(PageDataIndex.java:74)
> at org.h2.table.RegularTable.(RegularTable.java:75)
> at org.h2.store.PageStore.addMeta(PageStore.java:1443)
> at org.h2.store.PageStore.readMetaData(PageStore.java:1380)
> at org.h2.store.PageStore.recover(PageStore.java:1178)
> at org.h2.store.PageStore.openExisting(PageStore.java:317)
> at org.h2.store.PageStore.open(PageStore.java:271)
> at org.h2.engine.Database.getPageStore(Database.java:2059)
> at org.h2.engine.Database.open(Database.java:534)
> at org.h2.engine.Database.openDatabase(Database.java:207)
> at org.h2.engine.Database.(Database.java:202)
> at org.h2.engine.Engine.openSession(Engine.java:56)
> at org.h2.engine.Engine.openSession(Engine.java:146)
> at org.h2.engine.Engine.getSession(Engine.java:125)
> at org.h2.engine.Session.createSession(Session.java:122)
> at
> org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
> at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
> at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:111)
> at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:95)
> at org.h2.Driver.connect(Driver.java:73)
> at
> org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
> at
> org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
> at
> org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
> at
> org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
> at
> org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
> at
> org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
> at
> org.wso2.carbon.registry.core.config.RegistryConfigurationProcessor.populateRegistryConfig(RegistryConfigurationProcessor.java:149)
> at
> org.wso2.carbon.registry.core.config.RegistryContext.(RegistryContext.java:461)
> at
> org.wso2.carbon.registry.core.config.RegistryContext.(RegistryContext.java:442)
> at
> org.wso2.carbon.registry.core.config.RegistryContext.getBaseInstance(RegistryContext.java:321)
> at
> org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.getEmbeddedRegistryService(RegistryCoreServiceComponent.java:627)
> at
> org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.buildRegistryService(RegistryCoreServiceComponent.java:563)
> at
> org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.activate(RegistryCoreServiceComponent.java:117)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
> at
> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
> at
> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:347)
> at
> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
> at
> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
> at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
> at
> org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
> at
> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
> at
> org.eclipse.osgi.framework.int

[Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record

2015-09-16 Thread Bimali Dayananda
Hi,

I get the following error message when I run a setup locally. It says a
file is corrupted but couldn't find the corrupted file.

org.h2.jdbc.JdbcSQLException: File corrupted while reading record: "234 of
233". Possible solution: use the recovery tool [90030-140]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.message.DbException.get(DbException.java:144)
at org.h2.store.PageStore.readPage(PageStore.java:1094)
at org.h2.store.PageStore.getPage(PageStore.java:561)
at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:218)
at org.h2.index.PageDataNode.getLastKey(PageDataNode.java:221)
at org.h2.index.PageDataIndex.(PageDataIndex.java:74)
at org.h2.table.RegularTable.(RegularTable.java:75)
at org.h2.store.PageStore.addMeta(PageStore.java:1443)
at org.h2.store.PageStore.readMetaData(PageStore.java:1380)
at org.h2.store.PageStore.recover(PageStore.java:1178)
at org.h2.store.PageStore.openExisting(PageStore.java:317)
at org.h2.store.PageStore.open(PageStore.java:271)
at org.h2.engine.Database.getPageStore(Database.java:2059)
at org.h2.engine.Database.open(Database.java:534)
at org.h2.engine.Database.openDatabase(Database.java:207)
at org.h2.engine.Database.(Database.java:202)
at org.h2.engine.Engine.openSession(Engine.java:56)
at org.h2.engine.Engine.openSession(Engine.java:146)
at org.h2.engine.Engine.getSession(Engine.java:125)
at org.h2.engine.Session.createSession(Session.java:122)
at
org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:111)
at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:95)
at org.h2.Driver.connect(Driver.java:73)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
at
org.wso2.carbon.registry.core.config.RegistryConfigurationProcessor.populateRegistryConfig(RegistryConfigurationProcessor.java:149)
at
org.wso2.carbon.registry.core.config.RegistryContext.(RegistryContext.java:461)
at
org.wso2.carbon.registry.core.config.RegistryContext.(RegistryContext.java:442)
at
org.wso2.carbon.registry.core.config.RegistryContext.getBaseInstance(RegistryContext.java:321)
at
org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.getEmbeddedRegistryService(RegistryCoreServiceComponent.java:627)
at
org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.buildRegistryService(RegistryCoreServiceComponent.java:563)
at
org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.activate(RegistryCoreServiceComponent.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:347)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343)
at
org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222)
at
org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at

Re: [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record excception is throwing APIM GIT build while adding a new API.

2014-11-03 Thread Supun Sethunga
Hi,

Is this resolved? We are getting the same error when trying to integrate a
product specific H2 database to the ML product (WSO2ML_DB). However,
inbuilt carbon H2 DB works fine. Error is thrown when the product (from UI)
tries to access the WSO2ML_DB.

Follow are the configurations did when adding the new database.

*module/distribution/pom.xml :*

   execution
idCreate-ML-Database/id
phasepackage/phase
goals
goalrun/goal
/goals
configuration
tasks
path id=h2.classpath
path refid=maven.compile.classpath/
/path
echo
message=### Creating
Machine Learner Database ##/
sql
driver=org.h2.Driver

url=jdbc:h2:${basedir}/target/database/WSO2ML_DB
userid=wso2carbon
password=wso2carbon autocommit=true
onerror=continue
classpath
path refid=h2.classpath/
/classpath
fileset
file=${basedir}/src/main/resources/dbscripts/h2.sql/
/sql
echo
message=# END
/
/tasks
/configuration
/execution


and copy the created database by
module/distribution/src/mainassembly/bin.xml using the following segment.
file
sourcetarget/database/WSO2ML_DB.h2.db/source

outputDirectorywso2ml-${pom.version}/repository/database/outputDirectory
filteredtrue/filtered
fileMode666/fileMode
/file

The database was exposed as JNDI and is added to the master-datasources.xml.

Thanks,
Supun

On Tue, Sep 2, 2014 at 11:34 AM, Ajith Vitharana aji...@wso2.com wrote:




 On Tue, Sep 2, 2014 at 6:54 AM, Amalka Subasinghe ama...@wso2.com wrote:

 Hi Friszan,

 Here I got this error, when I try to start the APIM, just unzipping the
 pack under module/distribution. Not while executing tests.


 Please go and talk to AM team :) . Anyway this error can be due to few
 reasons.

 1. This AM database create and package to the AM product while building
 the product. So you can look at the build log to find any errors.
 2. Enable the H2 configurations in carbon.xml and access through the
  browser.
 3. Did we  upgrade the H2 version in GIT ?
 4. Check whether the AM source is properly updated in GIT.

 Thanks
 Ajith.



 Thanks
 Amalka



 On Mon, Sep 1, 2014 at 11:10 PM, Firzhan Naqash firz...@wso2.com wrote:

 Hi Amalka,

 Since you are trying to set up for automation test, have you turned on
 the filtering of maven-resources-plugin?

 If so that might be trying to modify the H2 database while APIM
 modifying it, thus leads to corruption.

 Can you check on it ?


 Regards,
 Firzhan


 On Mon, Sep 1, 2014 at 3:34 PM, Amalka Subasinghe ama...@wso2.com
 wrote:

 ERROR - ApiMgtDAO Error while adding the API:
 org.wso2.carbon.apimgt.api.model.APIIdentifier@60ba6803 to the database
 org.h2.jdbc.JdbcSQLException: File corrupted while reading record:
 /home/amalka/amalkas/apim-packs/Untitled
 Folder/wso2am-1.7.0-SNAPSHOT/repository/database/WSO2AM_DB.h2.db. Possible
 solution: use the recovery tool [90030-140]

 at
 org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
 at org.h2.message.DbException.get(DbException.java:167)
 at org.h2.message.DbException.get(DbException.java:144)
 at org.h2.store.PageStore.readVariableHeader(PageStore.java:699)
 at org.h2.store.PageStore.openExisting(PageStore.java:314)
 at org.h2.store.PageStore.open(PageStore.java:271)
 at org.h2.engine.Database.getPageStore(Database.java:2059)
 at org.h2.engine.Database.open(Database.java:534)
 at org.h2.engine.Database.openDatabase(Database.java:207)
 at org.h2.engine.Database.init(Database.java:202)
 at org.h2.engine.Engine.openSession(Engine.java:56)
 at org.h2.engine.Engine.openSession(Engine.java:146)
 at org.h2.engine.Engine.getSession(Engine.java:125)
 at org.h2.engine.Session.createSession(Session.java:122)
 at
 org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
 at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
 at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:111)
 at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:95)
 at org.h2.Driver.connect(Driver.java:73)
 at
 

Re: [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record excception is throwing APIM GIT build while adding a new API.

2014-11-03 Thread Harsha Kumara
Hi Supun,

Remove the filteredtrue/filtered and try again which sometime cause
to corrupt files.

Thanks,
Harsha

On Mon, Nov 3, 2014 at 6:13 PM, Supun Sethunga sup...@wso2.com wrote:

 Hi,

 Is this resolved? We are getting the same error when trying to integrate a
 product specific H2 database to the ML product (WSO2ML_DB). However,
 inbuilt carbon H2 DB works fine. Error is thrown when the product (from UI)
 tries to access the WSO2ML_DB.

 Follow are the configurations did when adding the new database.

 *module/distribution/pom.xml :*

execution
 idCreate-ML-Database/id
 phasepackage/phase
 goals
 goalrun/goal
 /goals
 configuration
 tasks
 path id=h2.classpath
 path refid=maven.compile.classpath/
 /path
 echo
 message=### Creating
 Machine Learner Database ##/
 sql
 driver=org.h2.Driver

 url=jdbc:h2:${basedir}/target/database/WSO2ML_DB
 userid=wso2carbon
 password=wso2carbon autocommit=true
 onerror=continue
 classpath
 path refid=h2.classpath/
 /classpath
 fileset
 file=${basedir}/src/main/resources/dbscripts/h2.sql/
 /sql
 echo
 message=# END
 /
 /tasks
 /configuration
 /execution


 and copy the created database by
 module/distribution/src/mainassembly/bin.xml using the following segment.
 file
 sourcetarget/database/WSO2ML_DB.h2.db/source

 outputDirectorywso2ml-${pom.version}/repository/database/outputDirectory
 filteredtrue/filtered
 fileMode666/fileMode
 /file

 The database was exposed as JNDI and is added to the
 master-datasources.xml.

 Thanks,
 Supun

 On Tue, Sep 2, 2014 at 11:34 AM, Ajith Vitharana aji...@wso2.com wrote:




 On Tue, Sep 2, 2014 at 6:54 AM, Amalka Subasinghe ama...@wso2.com
 wrote:

 Hi Friszan,

 Here I got this error, when I try to start the APIM, just unzipping the
 pack under module/distribution. Not while executing tests.


 Please go and talk to AM team :) . Anyway this error can be due to few
 reasons.

 1. This AM database create and package to the AM product while building
 the product. So you can look at the build log to find any errors.
 2. Enable the H2 configurations in carbon.xml and access through the
  browser.
 3. Did we  upgrade the H2 version in GIT ?
 4. Check whether the AM source is properly updated in GIT.

 Thanks
 Ajith.



 Thanks
 Amalka



 On Mon, Sep 1, 2014 at 11:10 PM, Firzhan Naqash firz...@wso2.com
 wrote:

 Hi Amalka,

 Since you are trying to set up for automation test, have you turned on
 the filtering of maven-resources-plugin?

 If so that might be trying to modify the H2 database while APIM
 modifying it, thus leads to corruption.

 Can you check on it ?


 Regards,
 Firzhan


 On Mon, Sep 1, 2014 at 3:34 PM, Amalka Subasinghe ama...@wso2.com
 wrote:

 ERROR - ApiMgtDAO Error while adding the API:
 org.wso2.carbon.apimgt.api.model.APIIdentifier@60ba6803 to the
 database
 org.h2.jdbc.JdbcSQLException: File corrupted while reading record:
 /home/amalka/amalkas/apim-packs/Untitled
 Folder/wso2am-1.7.0-SNAPSHOT/repository/database/WSO2AM_DB.h2.db. 
 Possible
 solution: use the recovery tool [90030-140]

 at
 org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
 at org.h2.message.DbException.get(DbException.java:167)
 at org.h2.message.DbException.get(DbException.java:144)
 at org.h2.store.PageStore.readVariableHeader(PageStore.java:699)
 at org.h2.store.PageStore.openExisting(PageStore.java:314)
 at org.h2.store.PageStore.open(PageStore.java:271)
 at org.h2.engine.Database.getPageStore(Database.java:2059)
 at org.h2.engine.Database.open(Database.java:534)
 at org.h2.engine.Database.openDatabase(Database.java:207)
 at org.h2.engine.Database.init(Database.java:202)
 at org.h2.engine.Engine.openSession(Engine.java:56)
 at org.h2.engine.Engine.openSession(Engine.java:146)
 at org.h2.engine.Engine.getSession(Engine.java:125)
 at org.h2.engine.Session.createSession(Session.java:122)
 at
 org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
 at
 

Re: [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record excception is throwing APIM GIT build while adding a new API.

2014-11-03 Thread Supun Sethunga
Hi Harsha,

Yeah it did the trick. Thanks! :)

Regards,
Supun

On Mon, Nov 3, 2014 at 6:30 PM, Harsha Kumara hars...@wso2.com wrote:

 Hi Supun,

 Remove the filteredtrue/filtered and try again which sometime cause
 to corrupt files.

 Thanks,
 Harsha

 On Mon, Nov 3, 2014 at 6:13 PM, Supun Sethunga sup...@wso2.com wrote:

 Hi,

 Is this resolved? We are getting the same error when trying to integrate
 a product specific H2 database to the ML product (WSO2ML_DB). However,
 inbuilt carbon H2 DB works fine. Error is thrown when the product (from UI)
 tries to access the WSO2ML_DB.

 Follow are the configurations did when adding the new database.

 *module/distribution/pom.xml :*

execution
 idCreate-ML-Database/id
 phasepackage/phase
 goals
 goalrun/goal
 /goals
 configuration
 tasks
 path id=h2.classpath
 path
 refid=maven.compile.classpath/
 /path
 echo
 message=### Creating
 Machine Learner Database ##/
 sql
 driver=org.h2.Driver

 url=jdbc:h2:${basedir}/target/database/WSO2ML_DB
 userid=wso2carbon
 password=wso2carbon autocommit=true
 onerror=continue
 classpath
 path refid=h2.classpath/
 /classpath
 fileset
 file=${basedir}/src/main/resources/dbscripts/h2.sql/
 /sql
 echo
 message=#
 END /
 /tasks
 /configuration
 /execution


 and copy the created database by
 module/distribution/src/mainassembly/bin.xml using the following segment.
 file
 sourcetarget/database/WSO2ML_DB.h2.db/source

 outputDirectorywso2ml-${pom.version}/repository/database/outputDirectory
 filteredtrue/filtered
 fileMode666/fileMode
 /file

 The database was exposed as JNDI and is added to the
 master-datasources.xml.

 Thanks,
 Supun

 On Tue, Sep 2, 2014 at 11:34 AM, Ajith Vitharana aji...@wso2.com wrote:




 On Tue, Sep 2, 2014 at 6:54 AM, Amalka Subasinghe ama...@wso2.com
 wrote:

 Hi Friszan,

 Here I got this error, when I try to start the APIM, just unzipping the
 pack under module/distribution. Not while executing tests.


 Please go and talk to AM team :) . Anyway this error can be due to few
 reasons.

 1. This AM database create and package to the AM product while building
 the product. So you can look at the build log to find any errors.
 2. Enable the H2 configurations in carbon.xml and access through the
  browser.
 3. Did we  upgrade the H2 version in GIT ?
 4. Check whether the AM source is properly updated in GIT.

 Thanks
 Ajith.



 Thanks
 Amalka



 On Mon, Sep 1, 2014 at 11:10 PM, Firzhan Naqash firz...@wso2.com
 wrote:

 Hi Amalka,

 Since you are trying to set up for automation test, have you turned on
 the filtering of maven-resources-plugin?

 If so that might be trying to modify the H2 database while APIM
 modifying it, thus leads to corruption.

 Can you check on it ?


 Regards,
 Firzhan


 On Mon, Sep 1, 2014 at 3:34 PM, Amalka Subasinghe ama...@wso2.com
 wrote:

 ERROR - ApiMgtDAO Error while adding the API:
 org.wso2.carbon.apimgt.api.model.APIIdentifier@60ba6803 to the
 database
 org.h2.jdbc.JdbcSQLException: File corrupted while reading record:
 /home/amalka/amalkas/apim-packs/Untitled
 Folder/wso2am-1.7.0-SNAPSHOT/repository/database/WSO2AM_DB.h2.db. 
 Possible
 solution: use the recovery tool [90030-140]

 at
 org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
 at org.h2.message.DbException.get(DbException.java:167)
 at org.h2.message.DbException.get(DbException.java:144)
 at org.h2.store.PageStore.readVariableHeader(PageStore.java:699)
 at org.h2.store.PageStore.openExisting(PageStore.java:314)
 at org.h2.store.PageStore.open(PageStore.java:271)
 at org.h2.engine.Database.getPageStore(Database.java:2059)
 at org.h2.engine.Database.open(Database.java:534)
 at org.h2.engine.Database.openDatabase(Database.java:207)
 at org.h2.engine.Database.init(Database.java:202)
 at org.h2.engine.Engine.openSession(Engine.java:56)
 at org.h2.engine.Engine.openSession(Engine.java:146)
 at org.h2.engine.Engine.getSession(Engine.java:125)
 at org.h2.engine.Session.createSession(Session.java:122)
 at
 

Re: [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record excception is throwing APIM GIT build while adding a new API.

2014-09-02 Thread Ajith Vitharana
On Tue, Sep 2, 2014 at 6:54 AM, Amalka Subasinghe ama...@wso2.com wrote:

 Hi Friszan,

 Here I got this error, when I try to start the APIM, just unzipping the
 pack under module/distribution. Not while executing tests.


Please go and talk to AM team :) . Anyway this error can be due to few
reasons.

1. This AM database create and package to the AM product while building the
product. So you can look at the build log to find any errors.
2. Enable the H2 configurations in carbon.xml and access through the
 browser.
3. Did we  upgrade the H2 version in GIT ?
4. Check whether the AM source is properly updated in GIT.

Thanks
Ajith.



 Thanks
 Amalka



 On Mon, Sep 1, 2014 at 11:10 PM, Firzhan Naqash firz...@wso2.com wrote:

 Hi Amalka,

 Since you are trying to set up for automation test, have you turned on
 the filtering of maven-resources-plugin?

 If so that might be trying to modify the H2 database while APIM modifying
 it, thus leads to corruption.

 Can you check on it ?


 Regards,
 Firzhan


 On Mon, Sep 1, 2014 at 3:34 PM, Amalka Subasinghe ama...@wso2.com
 wrote:

 ERROR - ApiMgtDAO Error while adding the API:
 org.wso2.carbon.apimgt.api.model.APIIdentifier@60ba6803 to the database
 org.h2.jdbc.JdbcSQLException: File corrupted while reading record:
 /home/amalka/amalkas/apim-packs/Untitled
 Folder/wso2am-1.7.0-SNAPSHOT/repository/database/WSO2AM_DB.h2.db. Possible
 solution: use the recovery tool [90030-140]

 at
 org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
 at org.h2.message.DbException.get(DbException.java:167)
 at org.h2.message.DbException.get(DbException.java:144)
 at org.h2.store.PageStore.readVariableHeader(PageStore.java:699)
 at org.h2.store.PageStore.openExisting(PageStore.java:314)
 at org.h2.store.PageStore.open(PageStore.java:271)
 at org.h2.engine.Database.getPageStore(Database.java:2059)
 at org.h2.engine.Database.open(Database.java:534)
 at org.h2.engine.Database.openDatabase(Database.java:207)
 at org.h2.engine.Database.init(Database.java:202)
 at org.h2.engine.Engine.openSession(Engine.java:56)
 at org.h2.engine.Engine.openSession(Engine.java:146)
 at org.h2.engine.Engine.getSession(Engine.java:125)
 at org.h2.engine.Session.createSession(Session.java:122)
 at
 org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
 at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
 at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:111)
 at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:95)
 at org.h2.Driver.connect(Driver.java:73)
 at
 org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
 at
 org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
 at
 org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
 at
 org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil.getConnection(APIMgtDBUtil.java:138)
 at
 org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.addAPI(ApiMgtDAO.java:4847)
 at
 org.wso2.carbon.apimgt.impl.APIProviderImpl.addAPI(APIProviderImpl.java:383)
 at
 org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.addAPI(UserAwareAPIProvider.java:45)
 at
 org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject.jsFunction_addAPI(APIProviderHostObject.java:1200)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
 at
 org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
 at
 org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
 at
 org.jaggeryjs.rhino.publisher.modules.api.c2._c_anonymous_7(/publisher/modules/api/add.jag:144)
 at
 org.jaggeryjs.rhino.publisher.modules.api.c2.call(/publisher/modules/api/add.jag)
 at
 org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
 at
 org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
 at
 org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
 at
 org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
 at
 org.jaggeryjs.rhino.publisher.modules.api.c0._c_anonymous_1(/publisher/modules/api/module.jag:5)
 at
 org.jaggeryjs.rhino.publisher.modules.api.c0.call(/publisher/modules/api/module.jag)
 at
 org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
   

Re: [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record excception is throwing APIM GIT build while adding a new API.

2014-09-01 Thread Amalka Subasinghe
Hi,

I'm also getting the same issue, any update on this?
we want to up the basic APIM setup with H2 database for test automation

Thanks
Amalka



On Mon, Aug 25, 2014 at 6:48 PM, Roshan Wijesena ros...@wso2.com wrote:

 Hi Danushka, Abimaran

 Thanks for your responses..

 I am trying to start up basic APIM setup  with built in  H2 database first
 because we ship H2 database by default. I can understand the fact that DB
 is corrupted, just curious why is getting corrupted every time that I am
 going to start up the set up.

 Regards
 Roshan


 On Mon, Aug 25, 2014 at 6:28 PM, Danushka Fernando danush...@wso2.com
 wrote:

 Hi Roshan

 H2 dbs get corrupted some times. We are not recommending H2 in production
 deployments. So if you want to store some data please use mysql. And you
 can delete h2 dbs (under $CARBON_HOME/repository/database/) and start the
 server with -Dsetup option.

 Thanks  Regards
 Danushka Fernando
 Software Engineer
 WSO2 inc. http://wso2.com/
 Mobile : +94716332729


 On Mon, Aug 25, 2014 at 5:20 PM, Abimaran Kugathasan abima...@wso2.com
 wrote:

 Hi Roshan,

 Seems that DB file was correpted. Can you check WSO2AM_DB.trace.db file
 and attached it here?


 On Mon, Aug 25, 2014 at 4:15 PM, Roshan Wijesena ros...@wso2.com
 wrote:

 Hi Devs,

 I am keep getting below exception when I am trying to add a new API via
 publisher

 Caused by: org.h2.jdbc.JdbcSQLException: File corrupted while reading
 record:
 /home/roshan/workspace/MIT/wso2am-1.7.0-SNAPSHOT/repository/database/WSO2AM_DB.h2.db.
 Possible solution: use the recovery tool [90030-140]
  at
 org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
 at org.h2.message.DbException.get(DbException.java:167)
  at org.h2.message.DbException.get(DbException.java:144)
 at org.h2.store.PageStore.readVariableHeader(PageStore.java:699)
  at org.h2.store.PageStore.openExisting(PageStore.java:314)
 at org.h2.store.PageStore.open(PageStore.java:271)
  at org.h2.engine.Database.getPageStore(Database.java:2059)
 at org.h2.engine.Database.open(Database.java:534)
  at org.h2.engine.Database.openDatabase(Database.java:207)
 at org.h2.engine.Database.init(Database.java:202)
  at org.h2.engine.Engine.openSession(Engine.java:56)
 at org.h2.engine.Engine.openSession(Engine.java:146)
  at org.h2.engine.Engine.getSession(Engine.java:125)
 at org.h2.engine.Session.createSession(Session.java:122)
  at
 org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
 at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
  at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:111)
 at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:95)
  at org.h2.Driver.connect(Driver.java:73)
 at
 org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
  at
 org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
  at
 org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
  at
 org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:128)
 at
 org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil.getConnection(APIMgtDBUtil.java:138)
  at
 org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.addAPI(ApiMgtDAO.java:4833)
 ... 66 more

 any one has idea why is this?

 Regards
 Roshan


 --
 Roshan Wijesena.
 Senior Software Engineer-WSO2 Inc.
 Mobile: *+94752126789*
 Email: ros...@wso2.com
 *WSO2, Inc. :** wso2.com http://wso2.com/*
 lean.enterprise.middleware.

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Thanks
 Abimaran Kugathasan

 Software Engineer | WSO2 Inc
 Data  APIs Technologies Team
 Mobile : +94 77 1708229

 http://stackoverflow.com/users/515034
 http://lk.linkedin.com/in/abimaran
 http://www.lkabimaran.blogspot.com/  https://github.com/abimaran
 https://twitter.com/abimaran


 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev





 --
 Roshan Wijesena.
 Senior Software Engineer-WSO2 Inc.
 Mobile: *+94752126789*
 Email: ros...@wso2.com
 *WSO2, Inc. :** wso2.com http://wso2.com/*
 lean.enterprise.middleware.

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




-- 

Amalka Subasinghe

Senior Software Engineer
WSO2 Inc.
Mobile: +94 77 9401267
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record excception is throwing APIM GIT build while adding a new API.

2014-09-01 Thread Ajith Vitharana
Please attach the complete error log.

-Ajith


On Mon, Sep 1, 2014 at 2:59 PM, Amalka Subasinghe ama...@wso2.com wrote:

 Hi,

 I'm also getting the same issue, any update on this?
 we want to up the basic APIM setup with H2 database for test automation

 Thanks
 Amalka



 On Mon, Aug 25, 2014 at 6:48 PM, Roshan Wijesena ros...@wso2.com wrote:

 Hi Danushka, Abimaran

 Thanks for your responses..

 I am trying to start up basic APIM setup  with built in  H2 database
 first because we ship H2 database by default. I can understand the fact
 that DB is corrupted, just curious why is getting corrupted every time that
 I am going to start up the set up.

 Regards
 Roshan


 On Mon, Aug 25, 2014 at 6:28 PM, Danushka Fernando danush...@wso2.com
 wrote:

 Hi Roshan

 H2 dbs get corrupted some times. We are not recommending H2 in
 production deployments. So if you want to store some data please use mysql.
 And you can delete h2 dbs (under $CARBON_HOME/repository/database/) and
 start the server with -Dsetup option.

 Thanks  Regards
 Danushka Fernando
 Software Engineer
 WSO2 inc. http://wso2.com/
 Mobile : +94716332729


 On Mon, Aug 25, 2014 at 5:20 PM, Abimaran Kugathasan abima...@wso2.com
 wrote:

 Hi Roshan,

 Seems that DB file was correpted. Can you check WSO2AM_DB.trace.db
 file and attached it here?


 On Mon, Aug 25, 2014 at 4:15 PM, Roshan Wijesena ros...@wso2.com
 wrote:

 Hi Devs,

 I am keep getting below exception when I am trying to add a new API
 via publisher

 Caused by: org.h2.jdbc.JdbcSQLException: File corrupted while reading
 record:
 /home/roshan/workspace/MIT/wso2am-1.7.0-SNAPSHOT/repository/database/WSO2AM_DB.h2.db.
 Possible solution: use the recovery tool [90030-140]
  at
 org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
 at org.h2.message.DbException.get(DbException.java:167)
  at org.h2.message.DbException.get(DbException.java:144)
 at org.h2.store.PageStore.readVariableHeader(PageStore.java:699)
  at org.h2.store.PageStore.openExisting(PageStore.java:314)
 at org.h2.store.PageStore.open(PageStore.java:271)
  at org.h2.engine.Database.getPageStore(Database.java:2059)
 at org.h2.engine.Database.open(Database.java:534)
  at org.h2.engine.Database.openDatabase(Database.java:207)
 at org.h2.engine.Database.init(Database.java:202)
  at org.h2.engine.Engine.openSession(Engine.java:56)
 at org.h2.engine.Engine.openSession(Engine.java:146)
  at org.h2.engine.Engine.getSession(Engine.java:125)
 at org.h2.engine.Session.createSession(Session.java:122)
  at
 org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
 at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
  at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:111)
 at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:95)
  at org.h2.Driver.connect(Driver.java:73)
 at
 org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
  at
 org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
  at
 org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
  at
 org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:128)
 at
 org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil.getConnection(APIMgtDBUtil.java:138)
  at
 org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.addAPI(ApiMgtDAO.java:4833)
 ... 66 more

 any one has idea why is this?

 Regards
 Roshan


 --
 Roshan Wijesena.
 Senior Software Engineer-WSO2 Inc.
 Mobile: *+94752126789*
 Email: ros...@wso2.com
 *WSO2, Inc. :** wso2.com http://wso2.com/*
 lean.enterprise.middleware.

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Thanks
 Abimaran Kugathasan

 Software Engineer | WSO2 Inc
 Data  APIs Technologies Team
 Mobile : +94 77 1708229

 http://stackoverflow.com/users/515034
 http://lk.linkedin.com/in/abimaran
 http://www.lkabimaran.blogspot.com/  https://github.com/abimaran
 https://twitter.com/abimaran


 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev





 --
 Roshan Wijesena.
 Senior Software Engineer-WSO2 Inc.
 Mobile: *+94752126789*
 Email: ros...@wso2.com
 *WSO2, Inc. :** wso2.com http://wso2.com/*
 lean.enterprise.middleware.

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --

 Amalka Subasinghe

 Senior Software Engineer
 WSO2 Inc.
 Mobile: +94 77 9401267

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




-- 
Ajith Vitharana.
WSO2 Inc. - http://wso2.org
Email  :  aji...@wso2.com
Mobile : +94772217350

Re: [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record excception is throwing APIM GIT build while adding a new API.

2014-09-01 Thread Amalka Subasinghe
ERROR - ApiMgtDAO Error while adding the API:
org.wso2.carbon.apimgt.api.model.APIIdentifier@60ba6803 to the database
org.h2.jdbc.JdbcSQLException: File corrupted while reading record:
/home/amalka/amalkas/apim-packs/Untitled
Folder/wso2am-1.7.0-SNAPSHOT/repository/database/WSO2AM_DB.h2.db. Possible
solution: use the recovery tool [90030-140]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.message.DbException.get(DbException.java:144)
at org.h2.store.PageStore.readVariableHeader(PageStore.java:699)
at org.h2.store.PageStore.openExisting(PageStore.java:314)
at org.h2.store.PageStore.open(PageStore.java:271)
at org.h2.engine.Database.getPageStore(Database.java:2059)
at org.h2.engine.Database.open(Database.java:534)
at org.h2.engine.Database.openDatabase(Database.java:207)
at org.h2.engine.Database.init(Database.java:202)
at org.h2.engine.Engine.openSession(Engine.java:56)
at org.h2.engine.Engine.openSession(Engine.java:146)
at org.h2.engine.Engine.getSession(Engine.java:125)
at org.h2.engine.Session.createSession(Session.java:122)
at
org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:111)
at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:95)
at org.h2.Driver.connect(Driver.java:73)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
at
org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil.getConnection(APIMgtDBUtil.java:138)
at org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.addAPI(ApiMgtDAO.java:4847)
at
org.wso2.carbon.apimgt.impl.APIProviderImpl.addAPI(APIProviderImpl.java:383)
at
org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.addAPI(UserAwareAPIProvider.java:45)
at
org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject.jsFunction_addAPI(APIProviderHostObject.java:1200)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
at
org.jaggeryjs.rhino.publisher.modules.api.c2._c_anonymous_7(/publisher/modules/api/add.jag:144)
at
org.jaggeryjs.rhino.publisher.modules.api.c2.call(/publisher/modules/api/add.jag)
at
org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
at
org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
at
org.jaggeryjs.rhino.publisher.modules.api.c0._c_anonymous_1(/publisher/modules/api/module.jag:5)
at
org.jaggeryjs.rhino.publisher.modules.api.c0.call(/publisher/modules/api/module.jag)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
at
org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0._c_anonymous_1(/publisher/site/blocks/item-add/ajax/add.jag:117)
at
org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0.call(/publisher/site/blocks/item-add/ajax/add.jag)
at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
at
org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0._c_script_0(/publisher/site/blocks/item-add/ajax/add.jag:4)
at
org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0.call(/publisher/site/blocks/item-add/ajax/add.jag)
at
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at
org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0.call(/publisher/site/blocks/item-add/ajax/add.jag)
at
org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0.exec(/publisher/site/blocks/item-add/ajax/add.jag)
at
org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)
at
org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
at

Re: [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record excception is throwing APIM GIT build while adding a new API.

2014-09-01 Thread Firzhan Naqash
Hi Amalka,

Since you are trying to set up for automation test, have you turned on the
filtering of maven-resources-plugin?

If so that might be trying to modify the H2 database while APIM modifying
it, thus leads to corruption.

Can you check on it ?


Regards,
Firzhan


On Mon, Sep 1, 2014 at 3:34 PM, Amalka Subasinghe ama...@wso2.com wrote:

 ERROR - ApiMgtDAO Error while adding the API:
 org.wso2.carbon.apimgt.api.model.APIIdentifier@60ba6803 to the database
 org.h2.jdbc.JdbcSQLException: File corrupted while reading record:
 /home/amalka/amalkas/apim-packs/Untitled
 Folder/wso2am-1.7.0-SNAPSHOT/repository/database/WSO2AM_DB.h2.db. Possible
 solution: use the recovery tool [90030-140]

 at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
 at org.h2.message.DbException.get(DbException.java:167)
 at org.h2.message.DbException.get(DbException.java:144)
 at org.h2.store.PageStore.readVariableHeader(PageStore.java:699)
 at org.h2.store.PageStore.openExisting(PageStore.java:314)
 at org.h2.store.PageStore.open(PageStore.java:271)
 at org.h2.engine.Database.getPageStore(Database.java:2059)
 at org.h2.engine.Database.open(Database.java:534)
 at org.h2.engine.Database.openDatabase(Database.java:207)
 at org.h2.engine.Database.init(Database.java:202)
 at org.h2.engine.Engine.openSession(Engine.java:56)
 at org.h2.engine.Engine.openSession(Engine.java:146)
 at org.h2.engine.Engine.getSession(Engine.java:125)
 at org.h2.engine.Session.createSession(Session.java:122)
 at
 org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
 at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
 at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:111)
 at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:95)
 at org.h2.Driver.connect(Driver.java:73)
 at
 org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
 at
 org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
 at
 org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
 at
 org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil.getConnection(APIMgtDBUtil.java:138)
 at
 org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.addAPI(ApiMgtDAO.java:4847)
 at
 org.wso2.carbon.apimgt.impl.APIProviderImpl.addAPI(APIProviderImpl.java:383)
 at
 org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.addAPI(UserAwareAPIProvider.java:45)
 at
 org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject.jsFunction_addAPI(APIProviderHostObject.java:1200)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
 at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
 at
 org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
 at
 org.jaggeryjs.rhino.publisher.modules.api.c2._c_anonymous_7(/publisher/modules/api/add.jag:144)
 at
 org.jaggeryjs.rhino.publisher.modules.api.c2.call(/publisher/modules/api/add.jag)
 at
 org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
 at
 org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
 at
 org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
 at
 org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
 at
 org.jaggeryjs.rhino.publisher.modules.api.c0._c_anonymous_1(/publisher/modules/api/module.jag:5)
 at
 org.jaggeryjs.rhino.publisher.modules.api.c0.call(/publisher/modules/api/module.jag)
 at
 org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
 at
 org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0._c_anonymous_1(/publisher/site/blocks/item-add/ajax/add.jag:117)
 at
 org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0.call(/publisher/site/blocks/item-add/ajax/add.jag)
 at
 org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
 at
 org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0._c_script_0(/publisher/site/blocks/item-add/ajax/add.jag:4)
 at
 org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0.call(/publisher/site/blocks/item-add/ajax/add.jag)
 at
 org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
 at
 org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
 at

Re: [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record excception is throwing APIM GIT build while adding a new API.

2014-09-01 Thread Amalka Subasinghe
Hi Friszan,

Here I got this error, when I try to start the APIM, just unzipping the
pack under module/distribution. Not while executing tests.

Thanks
Amalka



On Mon, Sep 1, 2014 at 11:10 PM, Firzhan Naqash firz...@wso2.com wrote:

 Hi Amalka,

 Since you are trying to set up for automation test, have you turned on the
 filtering of maven-resources-plugin?

 If so that might be trying to modify the H2 database while APIM modifying
 it, thus leads to corruption.

 Can you check on it ?


 Regards,
 Firzhan


 On Mon, Sep 1, 2014 at 3:34 PM, Amalka Subasinghe ama...@wso2.com wrote:

 ERROR - ApiMgtDAO Error while adding the API:
 org.wso2.carbon.apimgt.api.model.APIIdentifier@60ba6803 to the database
 org.h2.jdbc.JdbcSQLException: File corrupted while reading record:
 /home/amalka/amalkas/apim-packs/Untitled
 Folder/wso2am-1.7.0-SNAPSHOT/repository/database/WSO2AM_DB.h2.db. Possible
 solution: use the recovery tool [90030-140]

 at
 org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
 at org.h2.message.DbException.get(DbException.java:167)
 at org.h2.message.DbException.get(DbException.java:144)
 at org.h2.store.PageStore.readVariableHeader(PageStore.java:699)
 at org.h2.store.PageStore.openExisting(PageStore.java:314)
 at org.h2.store.PageStore.open(PageStore.java:271)
 at org.h2.engine.Database.getPageStore(Database.java:2059)
 at org.h2.engine.Database.open(Database.java:534)
 at org.h2.engine.Database.openDatabase(Database.java:207)
 at org.h2.engine.Database.init(Database.java:202)
 at org.h2.engine.Engine.openSession(Engine.java:56)
 at org.h2.engine.Engine.openSession(Engine.java:146)
 at org.h2.engine.Engine.getSession(Engine.java:125)
 at org.h2.engine.Session.createSession(Session.java:122)
 at
 org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
 at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
 at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:111)
 at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:95)
 at org.h2.Driver.connect(Driver.java:73)
 at
 org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
 at
 org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
 at
 org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
 at
 org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil.getConnection(APIMgtDBUtil.java:138)
 at
 org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.addAPI(ApiMgtDAO.java:4847)
 at
 org.wso2.carbon.apimgt.impl.APIProviderImpl.addAPI(APIProviderImpl.java:383)
 at
 org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.addAPI(UserAwareAPIProvider.java:45)
 at
 org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject.jsFunction_addAPI(APIProviderHostObject.java:1200)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
 at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
 at
 org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
 at
 org.jaggeryjs.rhino.publisher.modules.api.c2._c_anonymous_7(/publisher/modules/api/add.jag:144)
 at
 org.jaggeryjs.rhino.publisher.modules.api.c2.call(/publisher/modules/api/add.jag)
 at
 org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
 at
 org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
 at
 org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
 at
 org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
 at
 org.jaggeryjs.rhino.publisher.modules.api.c0._c_anonymous_1(/publisher/modules/api/module.jag:5)
 at
 org.jaggeryjs.rhino.publisher.modules.api.c0.call(/publisher/modules/api/module.jag)
 at
 org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
 at
 org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0._c_anonymous_1(/publisher/site/blocks/item-add/ajax/add.jag:117)
 at
 org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0.call(/publisher/site/blocks/item-add/ajax/add.jag)
 at
 org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
 at
 org.jaggeryjs.rhino.publisher.site.blocks.item_add.ajax.c0._c_script_0(/publisher/site/blocks/item-add/ajax/add.jag:4)
 at
 

[Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record excception is throwing APIM GIT build while adding a new API.

2014-08-25 Thread Roshan Wijesena
Hi Devs,

I am keep getting below exception when I am trying to add a new API via
publisher

Caused by: org.h2.jdbc.JdbcSQLException: File corrupted while reading
record:
/home/roshan/workspace/MIT/wso2am-1.7.0-SNAPSHOT/repository/database/WSO2AM_DB.h2.db.
Possible solution: use the recovery tool [90030-140]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.message.DbException.get(DbException.java:144)
at org.h2.store.PageStore.readVariableHeader(PageStore.java:699)
at org.h2.store.PageStore.openExisting(PageStore.java:314)
at org.h2.store.PageStore.open(PageStore.java:271)
at org.h2.engine.Database.getPageStore(Database.java:2059)
at org.h2.engine.Database.open(Database.java:534)
at org.h2.engine.Database.openDatabase(Database.java:207)
at org.h2.engine.Database.init(Database.java:202)
at org.h2.engine.Engine.openSession(Engine.java:56)
at org.h2.engine.Engine.openSession(Engine.java:146)
at org.h2.engine.Engine.getSession(Engine.java:125)
at org.h2.engine.Session.createSession(Session.java:122)
at
org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:111)
at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:95)
at org.h2.Driver.connect(Driver.java:73)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:128)
at
org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil.getConnection(APIMgtDBUtil.java:138)
at org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.addAPI(ApiMgtDAO.java:4833)
... 66 more

any one has idea why is this?

Regards
Roshan


-- 
Roshan Wijesena.
Senior Software Engineer-WSO2 Inc.
Mobile: *+94752126789*
Email: ros...@wso2.com
*WSO2, Inc. :** wso2.com http://wso2.com/*
lean.enterprise.middleware.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record excception is throwing APIM GIT build while adding a new API.

2014-08-25 Thread Abimaran Kugathasan
Hi Roshan,

Seems that DB file was correpted. Can you check WSO2AM_DB.trace.db file and
attached it here?


On Mon, Aug 25, 2014 at 4:15 PM, Roshan Wijesena ros...@wso2.com wrote:

 Hi Devs,

 I am keep getting below exception when I am trying to add a new API via
 publisher

 Caused by: org.h2.jdbc.JdbcSQLException: File corrupted while reading
 record:
 /home/roshan/workspace/MIT/wso2am-1.7.0-SNAPSHOT/repository/database/WSO2AM_DB.h2.db.
 Possible solution: use the recovery tool [90030-140]
  at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
 at org.h2.message.DbException.get(DbException.java:167)
  at org.h2.message.DbException.get(DbException.java:144)
 at org.h2.store.PageStore.readVariableHeader(PageStore.java:699)
  at org.h2.store.PageStore.openExisting(PageStore.java:314)
 at org.h2.store.PageStore.open(PageStore.java:271)
  at org.h2.engine.Database.getPageStore(Database.java:2059)
 at org.h2.engine.Database.open(Database.java:534)
  at org.h2.engine.Database.openDatabase(Database.java:207)
 at org.h2.engine.Database.init(Database.java:202)
  at org.h2.engine.Engine.openSession(Engine.java:56)
 at org.h2.engine.Engine.openSession(Engine.java:146)
  at org.h2.engine.Engine.getSession(Engine.java:125)
 at org.h2.engine.Session.createSession(Session.java:122)
  at
 org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
 at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
  at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:111)
 at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:95)
  at org.h2.Driver.connect(Driver.java:73)
 at
 org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
  at
 org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
  at
 org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
  at
 org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:128)
 at
 org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil.getConnection(APIMgtDBUtil.java:138)
  at org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.addAPI(ApiMgtDAO.java:4833)
 ... 66 more

 any one has idea why is this?

 Regards
 Roshan


 --
 Roshan Wijesena.
 Senior Software Engineer-WSO2 Inc.
 Mobile: *+94752126789*
 Email: ros...@wso2.com
 *WSO2, Inc. :** wso2.com http://wso2.com/*
 lean.enterprise.middleware.

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




-- 
Thanks
Abimaran Kugathasan

Software Engineer | WSO2 Inc
Data  APIs Technologies Team
Mobile : +94 77 1708229

http://stackoverflow.com/users/515034
http://lk.linkedin.com/in/abimaran  http://www.lkabimaran.blogspot.com/
https://github.com/abimaran  https://twitter.com/abimaran
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record excception is throwing APIM GIT build while adding a new API.

2014-08-25 Thread Roshan Wijesena
Hi Danushka, Abimaran

Thanks for your responses..

I am trying to start up basic APIM setup  with built in  H2 database first
because we ship H2 database by default. I can understand the fact that DB
is corrupted, just curious why is getting corrupted every time that I am
going to start up the set up.

Regards
Roshan


On Mon, Aug 25, 2014 at 6:28 PM, Danushka Fernando danush...@wso2.com
wrote:

 Hi Roshan

 H2 dbs get corrupted some times. We are not recommending H2 in production
 deployments. So if you want to store some data please use mysql. And you
 can delete h2 dbs (under $CARBON_HOME/repository/database/) and start the
 server with -Dsetup option.

 Thanks  Regards
 Danushka Fernando
 Software Engineer
 WSO2 inc. http://wso2.com/
 Mobile : +94716332729


 On Mon, Aug 25, 2014 at 5:20 PM, Abimaran Kugathasan abima...@wso2.com
 wrote:

 Hi Roshan,

 Seems that DB file was correpted. Can you check WSO2AM_DB.trace.db file
 and attached it here?


 On Mon, Aug 25, 2014 at 4:15 PM, Roshan Wijesena ros...@wso2.com wrote:

 Hi Devs,

 I am keep getting below exception when I am trying to add a new API via
 publisher

 Caused by: org.h2.jdbc.JdbcSQLException: File corrupted while reading
 record:
 /home/roshan/workspace/MIT/wso2am-1.7.0-SNAPSHOT/repository/database/WSO2AM_DB.h2.db.
 Possible solution: use the recovery tool [90030-140]
  at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
 at org.h2.message.DbException.get(DbException.java:167)
  at org.h2.message.DbException.get(DbException.java:144)
 at org.h2.store.PageStore.readVariableHeader(PageStore.java:699)
  at org.h2.store.PageStore.openExisting(PageStore.java:314)
 at org.h2.store.PageStore.open(PageStore.java:271)
  at org.h2.engine.Database.getPageStore(Database.java:2059)
 at org.h2.engine.Database.open(Database.java:534)
  at org.h2.engine.Database.openDatabase(Database.java:207)
 at org.h2.engine.Database.init(Database.java:202)
  at org.h2.engine.Engine.openSession(Engine.java:56)
 at org.h2.engine.Engine.openSession(Engine.java:146)
  at org.h2.engine.Engine.getSession(Engine.java:125)
 at org.h2.engine.Session.createSession(Session.java:122)
  at
 org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
 at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
  at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:111)
 at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:95)
  at org.h2.Driver.connect(Driver.java:73)
 at
 org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
  at
 org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
  at
 org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
  at
 org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:128)
 at
 org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil.getConnection(APIMgtDBUtil.java:138)
  at
 org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.addAPI(ApiMgtDAO.java:4833)
 ... 66 more

 any one has idea why is this?

 Regards
 Roshan


 --
 Roshan Wijesena.
 Senior Software Engineer-WSO2 Inc.
 Mobile: *+94752126789*
 Email: ros...@wso2.com
 *WSO2, Inc. :** wso2.com http://wso2.com/*
 lean.enterprise.middleware.

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Thanks
 Abimaran Kugathasan

 Software Engineer | WSO2 Inc
 Data  APIs Technologies Team
 Mobile : +94 77 1708229

 http://stackoverflow.com/users/515034
 http://lk.linkedin.com/in/abimaran
 http://www.lkabimaran.blogspot.com/  https://github.com/abimaran
 https://twitter.com/abimaran


 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev





-- 
Roshan Wijesena.
Senior Software Engineer-WSO2 Inc.
Mobile: *+94752126789*
Email: ros...@wso2.com
*WSO2, Inc. :** wso2.com http://wso2.com/*
lean.enterprise.middleware.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record excception is throwing APIM GIT build while adding a new API.

2014-08-25 Thread Danushka Fernando
Hi Roshan

H2 dbs get corrupted some times. We are not recommending H2 in production
deployments. So if you want to store some data please use mysql. And you
can delete h2 dbs (under $CARBON_HOME/repository/database/) and start the
server with -Dsetup option.

Thanks  Regards
Danushka Fernando
Software Engineer
WSO2 inc. http://wso2.com/
Mobile : +94716332729


On Mon, Aug 25, 2014 at 5:20 PM, Abimaran Kugathasan abima...@wso2.com
wrote:

 Hi Roshan,

 Seems that DB file was correpted. Can you check WSO2AM_DB.trace.db file
 and attached it here?


 On Mon, Aug 25, 2014 at 4:15 PM, Roshan Wijesena ros...@wso2.com wrote:

 Hi Devs,

 I am keep getting below exception when I am trying to add a new API via
 publisher

 Caused by: org.h2.jdbc.JdbcSQLException: File corrupted while reading
 record:
 /home/roshan/workspace/MIT/wso2am-1.7.0-SNAPSHOT/repository/database/WSO2AM_DB.h2.db.
 Possible solution: use the recovery tool [90030-140]
  at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
 at org.h2.message.DbException.get(DbException.java:167)
  at org.h2.message.DbException.get(DbException.java:144)
 at org.h2.store.PageStore.readVariableHeader(PageStore.java:699)
  at org.h2.store.PageStore.openExisting(PageStore.java:314)
 at org.h2.store.PageStore.open(PageStore.java:271)
  at org.h2.engine.Database.getPageStore(Database.java:2059)
 at org.h2.engine.Database.open(Database.java:534)
  at org.h2.engine.Database.openDatabase(Database.java:207)
 at org.h2.engine.Database.init(Database.java:202)
  at org.h2.engine.Engine.openSession(Engine.java:56)
 at org.h2.engine.Engine.openSession(Engine.java:146)
  at org.h2.engine.Engine.getSession(Engine.java:125)
 at org.h2.engine.Session.createSession(Session.java:122)
  at
 org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:241)
 at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
  at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:111)
 at org.h2.jdbc.JdbcConnection.init(JdbcConnection.java:95)
  at org.h2.Driver.connect(Driver.java:73)
 at
 org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
  at
 org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
  at
 org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
 at
 org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
  at
 org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:128)
 at
 org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil.getConnection(APIMgtDBUtil.java:138)
  at org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.addAPI(ApiMgtDAO.java:4833)
 ... 66 more

 any one has idea why is this?

 Regards
 Roshan


 --
 Roshan Wijesena.
 Senior Software Engineer-WSO2 Inc.
 Mobile: *+94752126789*
 Email: ros...@wso2.com
 *WSO2, Inc. :** wso2.com http://wso2.com/*
 lean.enterprise.middleware.

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Thanks
 Abimaran Kugathasan

 Software Engineer | WSO2 Inc
 Data  APIs Technologies Team
 Mobile : +94 77 1708229

 http://stackoverflow.com/users/515034
 http://lk.linkedin.com/in/abimaran
 http://www.lkabimaran.blogspot.com/  https://github.com/abimaran
 https://twitter.com/abimaran


 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev