BAM小工具工具

时间:2013-09-30 20:14:55

标签: wso2 wso2bam

我创建了一个小工具,小工具工具连接到我的本地postgresql数据库...一切都很完美但是当我将小工具添加到我的小工具仪表板时,它什么都没有显示。
这是我的小工具路线:

/registry/resource/_system/config/repository/components/org.wso2.carbon.bam.gadgetgen/gadgetgen/tabla.xml 

这是控制台错误:

    Caused by: org.jaggeryjs.scriptengine.exceptions.ScriptException: Error connecting to the database : jdbc:postgresql://127.0.0.1:5432/wso2bam_postgresql

btw, i have read all the related documentation without success 

Log

    Mapred Local Task Succeeded . Convert the Join into MapJoin
OK
OK
OK
[2013-10-07 16:56:09,420]  INFO {org.apache.cassandra.service.GCInspector} -  GC for PS Scavenge: 375 ms for 1 collections, 95658024 used; max is 954466304
[2013-10-07 16:56:09,516]  WARN {org.jaggeryjs.hostobjects.db.DatabaseHostObject} -  Error connecting to the database : jdbc:postgresql://127.0.0.1:5432/wso2bam_postgresql
java.sql.SQLException
    at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:254)
    at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:702)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:634)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
    at org.jaggeryjs.hostobjects.db.DatabaseHostObject.jsConstructor(DatabaseHostObject.java:144)
    at sun.reflect.GeneratedMethodAccessor295.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:160)
    at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:417)
    at org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:328)
    at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2266)
    at org.jaggeryjs.rhino.gadgetgen.c0._c0(/gadgetgen//tabla.jag:4)
    at org.jaggeryjs.rhino.gadgetgen.c0.call(/gadgetgen//tabla.jag)
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003)
    at org.jaggeryjs.rhino.gadgetgen.c0.call(/gadgetgen//tabla.jag)
    at org.jaggeryjs.rhino.gadgetgen.c0.exec(/gadgetgen//tabla.jag)
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:441)
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:191)
    at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:269)
    at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:177)
    at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:161)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
    at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.NullPointerException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:266)
    at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:246)
    ... 44 more
[2013-10-07 16:56:09,577] ERROR {org.jaggeryjs.scriptengine.engine.RhinoEngine} -  org.mozilla.javascript.WrappedException: Wrapped org.jaggeryjs.scriptengine.exceptions.ScriptException: Error connecting to the database : jdbc:postgresql://127.0.0.1:5432/wso2bam_postgresql (/gadgetgen//tabla.jag#4)
[2013-10-07 16:56:09,605] ERROR {org.jaggeryjs.jaggery.core.manager.WebAppManager} -  org.mozilla.javascript.WrappedException: Wrapped org.jaggeryjs.scriptengine.exceptions.ScriptException: Error connecting to the database : jdbc:postgresql://127.0.0.1:5432/wso2bam_postgresql (/gadgetgen//tabla.jag#4)
org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.WrappedException: Wrapped org.jaggeryjs.scriptengine.exceptions.ScriptException: Error connecting to the database : jdbc:postgresql://127.0.0.1:5432/wso2bam_postgresql (/gadgetgen//tabla.jag#4)
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:446)
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:191)
    at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:269)
    at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:177)
    at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:161)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
    at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
Caused by: org.mozilla.javascript.WrappedException: Wrapped org.jaggeryjs.scriptengine.exceptions.ScriptException: Error connecting to the database : jdbc:postgresql://127.0.0.1:5432/wso2bam_postgresql (/gadgetgen//tabla.jag#4)
    at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1654)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:175)
    at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:417)
    at org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:328)
    at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2266)
    at org.jaggeryjs.rhino.gadgetgen.c0._c0(/gadgetgen//tabla.jag:4)
    at org.jaggeryjs.rhino.gadgetgen.c0.call(/gadgetgen//tabla.jag)
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003)
    at org.jaggeryjs.rhino.gadgetgen.c0.call(/gadgetgen//tabla.jag)
    at org.jaggeryjs.rhino.gadgetgen.c0.exec(/gadgetgen//tabla.jag)
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:441)
    ... 24 more
Caused by: org.jaggeryjs.scriptengine.exceptions.ScriptException: Error connecting to the database : jdbc:postgresql://127.0.0.1:5432/wso2bam_postgresql
    at org.jaggeryjs.hostobjects.db.DatabaseHostObject.jsConstructor(DatabaseHostObject.java:150)
    at sun.reflect.GeneratedMethodAccessor295.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:160)
    ... 34 more
Caused by: java.sql.SQLException
    at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:254)
    at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:702)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:634)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
    at org.jaggeryjs.hostobjects.db.DatabaseHostObject.jsConstructor(DatabaseHostObject.java:144)
    ... 38 more
Caused by: java.lang.NullPointerException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:266)
    at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:246)
    ... 44 more
Total MapReduce jobs = 1
Launching Job 1 out of 1
Number of reduce tasks not specified. Estimated from input data size: 1
In order to change the average load for a reducer (in bytes):
  set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
  set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
  set mapred.reduce.tasks=<number>
Job running in-process (local Hadoop)
Hadoop job information for null: number of mappers: 0; number of reducers: 0
2013-10-07 16:56:12,979 null map = 0%,  reduce = 0%
2013-10-07 16:56:18,996 null map = 100%,  reduce = 0%

2 个答案:

答案 0 :(得分:0)

您是否将驱动程序.jar包含在$ BAM_HOME / repository / components / lib目录中?当您在gadget-gen向导中创建小工具时,您是否能够在预览中看到数据?

请确保以上两项,并提供整个堆栈跟踪而不是错误消息。

答案 1 :(得分:0)

在为// repository / deployment / server / jaggeryapps / gadgetgen中的小工具创建的jag文件中,将有一个带有空{}的变量'config'。将其更改为

var config = {"driverClassName":"org.postgresql.Driver"};