minhtu307 / alfresco-business-reporting

Automatically exported from code.google.com/p/alfresco-business-reporting
0 stars 0 forks source link

Add-on Not working #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I can't able to get this add-on working. After deploying all the files as per 
the instructions, I get the below error after starting the alfresco instance. 
Could you please advise why this would be.

Thanks
Karthick 

11:10:01,484 User:System ERROR [alfresco.reporting.AlfrescoReporting] com.mysql.
jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'alfrescoreporting.folder
' doesn't exist
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'alfrescoreport
ing.folder' doesn't exist
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.Util.getInstance(Util.java:381)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548)
        at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1605)
        at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1524)
        at org.alfresco.reporting.DatabaseHelperBean.extendTable(Unknown Source)

        at org.alfresco.reporting.AlfrescoReporting.processRepositoryUpdate(Unkn
own Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
        at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:24
3)
        at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)

        at org.mozilla.javascript.gen.c45._c10(alfresco/extension/scripts/fillRe
portingDatabase.js:369)
        at org.mozilla.javascript.gen.c45.call(alfresco/extension/scripts/fillRe
portingDatabase.js)
        at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java
:108)
        at org.mozilla.javascript.gen.c45._c0(alfresco/extension/scripts/fillRep
ortingDatabase.js:459)
        at org.mozilla.javascript.gen.c45.call(alfresco/extension/scripts/fillRe
portingDatabase.js)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:3
93)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:283
4)
        at org.mozilla.javascript.gen.c45.call(alfresco/extension/scripts/fillRe
portingDatabase.js)
        at org.mozilla.javascript.gen.c45.exec(alfresco/extension/scripts/fillRe
portingDatabase.js)
        at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(Rhin
oScriptProcessor.java:472)
        at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptPro
cessor.java:190)
        at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptSer
viceImpl.java:254)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
on(AopUtils.java:307)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
inpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:150)
        at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterc
eptor.invoke(AlwaysProceedMethodInterceptor.java:34)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethod
Interceptor.invoke(ExceptionTranslatorMethodInterceptor.java:44)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.audit.AuditMethodInterceptor.proceedWithAudit(Audit
MethodInterceptor.java:225)
        at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInt
erceptor.java:192)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInte
rceptor.java:145)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.transaction.interceptor.TransactionInterceptor.in
voke(TransactionInterceptor.java:107)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:202)
        at $Proxy128.executeScript(Unknown Source)
        at org.alfresco.repo.jscript.ExecuteScriptJob.execute(ExecuteScriptJob.j
ava:80)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j
ava:549)

Original issue reported on code.google.com by bsabat...@gmail.com on 31 Jul 2012 at 11:46

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Good news and Bad news. 

The good news is that you seem to have a database (alfrescoreporting) and 
connection.
The bad news seems that you have no tables. What do you see when you open an 
mysql connection to the database and ask: 
show tables;

My bet is that there are no tables (yet). The solution is you need to manually 
create the tables by a script. In the Data Dictionary/Scripts/reporting space 
is a script createTables.js. If you select a details page, select Run Action, 
select Execute Script, select createTables.js, you create the tables needed for 
the tool to actually run.  It creates the tables as defined in 
alfresco-business-reporting.lib.js  If your tables/queries are different than 
mine: feel free to do so.

I hope this helps you further...

Tjarda

Original comment by tpee...@gmail.com on 25 Sep 2012 at 1:12

GoogleCodeExporter commented 8 years ago
For issue completeness...

You sent me the following log of Alfresco starting up (failing):

----
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'alfrescoReportingDatabaseHelper' defined in URL 
[jar:file:/C:/apache-tomcat-6.0.35/webapps/alfresco/WEB-INF/lib/alfresco-busines
s-reporting-0.6.5.jar!/alfresco/extension/reporting-beans-context.xml]: 
Invocation of init method failed; nested exception is 
java.lang.NullPointerException
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.NullPointerException
    at org.alfresco.reporting.DatabaseHelperBean.replaceAllKeysInValue(Unknown Source)
    at org.alfresco.reporting.DatabaseHelperBean.getConnection(Unknown Source)
    at org.alfresco.reporting.DatabaseHelperBean.init(Unknown Source)
    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.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
    ... 37 more
-----

It complains about the method replaceAllKeysInValue in the DatabaseHelperBean. 
This method resolves any placeholders (like ${db.name} in the values of the 
key-value pairs in alfresco-global.properties

I think you don't have all your properties in the alfresco-global.properties: 
http://code.google.com/p/alfresco-business-reporting/wiki/HowToInstall 
(reporting.db.url, reporting.db.driver, reporting.db.username, 
reporting.db.password)

It is not uncommon to have the same driver for Alfresco's database as well as 
the reporting database. (However, it makes sense to have a different 
company-wide reporting solution on a different database platform too...)

Let me know if this helps you further

Original comment by tpee...@gmail.com on 29 Sep 2012 at 7:55

GoogleCodeExporter commented 8 years ago
Closing comment

Original comment by tjarda.p...@incentro.com on 13 Mar 2013 at 9:56