minhtu307 / alfresco-business-reporting

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

NameNotFoundException: alfrescoReporting not bound #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am trying to run this in JBOSS/RedHat system. Added the <Resource> tag as 
explained to Context.xml. On startup of Alfresco, it created Reporting node 
etc. But I get error on log saying this:

15:15:17,960 INFO  [AlfrescoSchedulerFactory] Quartz scheduler version: 1.8.3
15:15:17,961 INFO  [QuartzScheduler] JobFactory set to: 
org.alfresco.repo.scheduler.AlfrescoJobFactory@7adc1ca7
15:15:23,997 ERROR [STDERR] javax.naming.NameNotFoundException: 
alfrescoReporting not bound
....
...
15:15:24,007 INFO  [STDOUT] 15:15:24,007  WARN  
[reporting.db.DatabaseHelperBean] Reporting table information could not be 
retrieved!!

Can you please let me know, what is causing this?

Thanks,
SR

Original issue reported on code.google.com by shylasem...@gmail.com on 7 Nov 2013 at 8:21

GoogleCodeExporter commented 8 years ago
Your JNDI connection is not working. The connection should be named 
"alfrescoReporting". I am not sure how JBoss handles these defintions...

Did you check this: 
http://docs.jboss.org/jbossweb/2.1.x/jndi-datasource-examples-howto.html or 
similar?

Original comment by tjarda.p...@incentro.com on 7 Nov 2013 at 8:28

GoogleCodeExporter commented 8 years ago
Thank you!

 My Context.xml is attached. I added this to an existing Alfresco implementation, which has other JNDI references that are working. I wonder if I need to do anything special in JBOSS. I got this reporting working with local tomcat.

Original comment by shylasem...@gmail.com on 7 Nov 2013 at 9:02

Attachments:

GoogleCodeExporter commented 8 years ago
I also tried configuring as explained here: 
http://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/apbs03.html

The jboss log says jndi name is bound during startup or edits (log: Bound 
ConnectionManager 'jboss.jca:service=DataSourceBinding,name=alfrescoReporting' 
to JNDI name 'java:alfrescoReporting'
)

But when AlfrescoReporting is called, it says this:
" javax.naming.NameNotFoundException: alfrescoReporting not bound"

Original comment by shylasem...@gmail.com on 7 Nov 2013 at 10:50

GoogleCodeExporter commented 8 years ago
JNDI name call didn't work with JBOSS.
After checking ABR code, Bypassed this issue by adding few entries to our 
alfresco-global.properties as listed below. ABR code will read DB values from 
properties when reporting.db.jndiName is empty/null

#### Alfresco Business Reporting Value #####
# jndi NAME FOR REPORTING db "reporting.db.jndiName=alfrescoReporting" comes
# from ABR'S alfresco-global.properties. As JNDI WAS not working in JBOSS,
# we are overriding this to "" below, so that code will read reporting DB values
# below from alfresco-global.properties file, instead of using JNDI
reporting.db.jndiName=
reporting.db.url=jdbc:mysql://DBHost:port/alfbusreport
reporting.db.driver=org.gjt.mm.mysql.Driver
reporting.db.username=reportusername
reporting.db.password=password

Original comment by shyla...@gmail.com on 21 Nov 2013 at 4:34

GoogleCodeExporter commented 8 years ago
Hi SR,

I am into the heavy restructuring of the DB layer right now. I did check up, 
and  have the following (full) JNDI name configured:
java:comp/env/jdbc/alfrescoReporting

Can you please check with your install how this additional info works out? I 
like to update the documentation if there is a need to...

(You DO need to go JNDI if you want to execute reports from within Alfresco 
though... And the JNDI name is existing in each and every report. (It does 
bring portability of reports from your development computer to test, acceptance 
and production...))

Original comment by tjarda.p...@incentro.com on 24 Nov 2013 at 8:19