Hi Isuru,

Thanks for looking into this!
I'm also unable to reproduce this issue.

In DAS 3.0.1 we don't have identity db scripts[1] hence this identity
related issue during -Dsetup.

[1] [DAS][3.0.1] -Dsetup startup error

On Fri, Mar 4, 2016 at 5:59 AM, Isuru Perera <[email protected]> wrote:

> Hi Udara,
>
> I did following steps and I'm not seeing any issue with Metrics data.
>
>
>    - Extract wso2das-3.0.1.zip
>    - Delete all files in wso2das-3.0.1/repository/database/
>    - Run ./wso2server.sh -Dsetup
>
> The Metrics UI is also working (Monitor > Metrics > JVM Metrics).
>
> However I saw an error related to identity component when -Dsetup is used.
>
> [2016-03-04 15:20:51,547] ERROR
> {org.wso2.carbon.identity.core.internal.IdentityCoreServiceComponent} -
> Error occurred while populating identity configuration properties
> org.wso2.carbon.identity.base.IdentityRuntimeException: Error occurred
> while executing SQL script for creating identity database
>     at
> org.wso2.carbon.identity.base.IdentityRuntimeException.error(IdentityRuntimeException.java:162)
>     at
> org.wso2.carbon.identity.core.persistence.IdentityDBInitializer.executeSQLScript(IdentityDBInitializer.java:273)
>     at
> org.wso2.carbon.identity.core.persistence.IdentityDBInitializer.createIdentityDatabase(IdentityDBInitializer.java:141)
>     at
> org.wso2.carbon.identity.core.persistence.JDBCPersistenceManager.initializeDatabase(JDBCPersistenceManager.java:112)
>     at
> org.wso2.carbon.identity.core.internal.IdentityCoreServiceComponent.activate(IdentityCoreServiceComponent.java:101)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     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:345)
>     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
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
>     at
> org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:514)
>     at
> org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java:219)
>     at
> org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:94)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     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:345)
>     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
> org.eclipse.equinox.http.servlet.internal.Activator.registerHttpService(Activator.java:81)
>     at
> org.eclipse.equinox.http.servlet.internal.Activator.addProxyServlet(Activator.java:60)
>     at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.init(ProxyServlet.java:40)
>     at
> org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.init(DelegationServlet.java:38)
>     at
> org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
>     at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
>     at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
>     at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5262)
>     at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5550)
>     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>     at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
>     at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>     at java.lang.Thread.run(Thread.java:745)
> Caused by: java.io.FileNotFoundException:
> /home/isuru/temp/metrics-test/wso2das-3.0.1/dbscripts/identity/h2.sql (No
> such file or directory)
>     at java.io.FileInputStream.open0(Native Method)
>     at java.io.FileInputStream.open(FileInputStream.java:195)
>     at java.io.FileInputStream.<init>(FileInputStream.java:138)
>     at java.io.FileInputStream.<init>(FileInputStream.java:93)
>     at
> org.wso2.carbon.identity.core.persistence.IdentityDBInitializer.executeSQLScript(IdentityDBInitializer.java:235)
>     ... 63 more
>
>
>
>
> On Fri, Mar 4, 2016 at 2:21 AM, Udara Rathnayake <[email protected]> wrote:
>
>> Hi,
>>
>> Noticed following[1](DAS-3.0.1 with default H2 DB). As I noticed same
>> getting printed time to time even without any user interaction with DAS. Is
>> this something to do with the -Dsetup start after removing
>> wso2das-3.0.1/repository/database/*.
>>
>> WSO2METRICS_DB.h2.db exists within the database directory, but I don't
>> see any tables inside, when I browse it using H2 console.
>>
>> I have manually executed metrics h2 db script to get rid of this.
>> Any idea?
>>
>> [1]
>> [2016-03-03 14:40:45,058] ERROR
>> {org.wso2.carbon.metrics.jdbc.reporter.JDBCRepor
>> ter} -  Error when reporting gauges
>> org.h2.jdbc.JdbcSQLException: Table "METRIC_GAUGE" not found; SQL
>> statement:
>> INSERT INTO METRIC_GAUGE (SOURCE, TIMESTAMP, NAME, VALUE) VALUES
>> (?,?,?,?) [4210
>> 2-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.command.Parser.readTableOrView(Parser.java:4498)
>>         at org.h2.command.Parser.readTableOrView(Parser.java:4478)
>>         at org.h2.command.Parser.parseInsert(Parser.java:910)
>>         at org.h2.command.Parser.parsePrepared(Parser.java:362)
>>         at org.h2.command.Parser.parse(Parser.java:275)
>>         at org.h2.command.Parser.parse(Parser.java:247)
>>         at org.h2.command.Parser.prepare(Parser.java:201)
>>         at org.h2.command.Parser.prepareCommand(Parser.java:214)
>>         at org.h2.engine.Session.prepareLocal(Session.java:434)
>>         at org.h2.engine.Session.prepareCommand(Session.java:384)
>>         at
>> org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1071)
>>         at
>> org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:7
>> 1)
>>         at
>> org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:234)
>>         at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> sorImpl.java:43)
>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>         at
>> org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.ja
>> va:126)
>>         at
>> org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.ja
>> va:109)
>>         at
>> org.wso2.carbon.ndatasource.rdbms.ConnectionRollbackOnReturnIntercept
>> or.invoke(ConnectionRollbackOnReturnInterceptor.java:51)
>>         at
>> org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.ja
>> va:109)
>>         at
>> org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterc
>> eptor.invoke(AbstractCreateStatementInterceptor.java:67)
>>         at
>> org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.ja
>> va:109)
>>         at
>> org.apache.tomcat.jdbc.pool.interceptor.ConnectionState.invoke(Connec
>> tionState.java:153)
>>         at
>> org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.ja
>> va:109)
>>         at
>> org.apache.tomcat.jdbc.pool.TrapException.invoke(TrapException.java:4
>> 1)
>>         at
>> org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.ja
>> va:109)
>>         at
>> org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(Disposa
>> bleConnectionFacade.java:80)
>>         at com.sun.proxy.$Proxy16.prepareStatement(Unknown Source)
>>         at
>> org.wso2.carbon.metrics.jdbc.reporter.JDBCReporter.reportGauges(JDBCR
>> eporter.java:212)
>>         at
>> org.wso2.carbon.metrics.jdbc.reporter.JDBCReporter.report(JDBCReporte
>> r.java:188)
>>         at
>> com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:
>> 162)
>>         at
>> com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:1
>> 17)
>>         at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:47
>> 1)
>>         at
>> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
>>         at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
>> access$301(ScheduledThreadPoolExecutor.java:178)
>>         at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
>> run(ScheduledThreadPoolExecutor.java:293)
>>         at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
>> java:1145)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
>> .java:615)
>>         at java.lang.Thread.run(Thread.java:745)
>>
>>
>> --
>> Regards,
>> UdaraR
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 <https://www.google.com/+IsuruPereraWSO2/about>
>



-- 
Regards,
UdaraR
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to