Jump to content
Changes to the Jaspersoft community edition download ×

JasperServer and JNDI datasource


Recommended Posts

By: Damian Sobieralski - dsobiera

JasperServer and JNDI datasource

2006-07-07 12:47

Hi,

 

I'm not sure if this is the correct forum to post this in. If not, if someone could politely redirect me I'd be very appreciative.

 

I'm fairly new to the whole Jasper suite although I find it very very cool so far. I'll go over the procedure that I am using and hope someone can assist me in where I am going wrong.

 

I am using Ireport 1.2.4 to create my report. I am using a Hibernate resource. I have a jar file in the lib/ directory with the mappings and POJOs and I have a hibernate.hbm.xml in the ireport directory. All goes well and iReport runs my HQL and returns results - sweet!

 

Then I have a JasperServer install via JBoss. I setup a JNDI Hibernate datasource for my Jboss installation via a .har file (same eclipse project I used to generate the jar file for iReport jsut a different packaging scheme). When I write a servlet that uses this datasource all works well so I know the datasource (.har file and accompanying mysql-ds.xml) is set up correctly.

 

So then I am trying to have my report I created in IReport work with JapserServer. Me thinks I am just doing something silly here. Please educate me! I admit ignorance.

 

I create a new folder in JapserServer. I then create a new datasource from the JasperServer administration page. I select JNDI datasouce and press next. I give it a name. I assume both the name and label are arbitrary? So I call both datawarehouseDS. Now here is where is gets tricky. On the service name I try to enter the JNDI that I set up via the Jboss .har. So I try to type java:/DataWarehouseStudentDS (which is what Jboss has it bound to and says so in the stdout.log file). When I click "Save" I get an error that says "JNDI Name contains invalid characters". If I remove the "/" between the java: and the DataWarehouseStudentDS it seems to accept it.

 

Then I add a new Report Unit and upload my .jrxml file that was created and worked in Ireport. There are no resources listed on the next page so I hit the next button. On the "Report wizard - Locate Datasource" page I select my datasource that I just set up from the respository drop down list. The next page states that my report was successfully validated. I click "Save".

 

Now when i try to run the report I get:

Error Message:

org.springframework.webflow.ActionExecutionException: Exception thrown executing [AnnotatedAction@1e27074 targetAction = com.jaspersoft.jasperserver.war.action.ViewReportAction@1450701, attributes = map[[empty]]] in state 'verifyData' of flow 'viewReportFlow'; nested exception is com.jaspersoft.jasperserver.api.JSExceptionWrapper: javax.naming.NameNotFoundException: java:DataWarehouseStudentDS not bound

 

Any idea on what I am doing wrong here? BTW I am running JasperServer 0.9.2. Thank you in advance! This suite seems almost too good to be true (JasperReports, JasperServer and IReport). The fact that something this robust is 100% free I still have to remind myself. :)

 

 

 

 

 

 

 

By: Damian Sobieralski - dsobiera

RE: JasperServer and JNDI datasource

2006-07-11 11:08

Is nobody using JNDI and a JBoss Hibernate datasource?

 

 

By: Sherman Wood - sgwood

RE: JasperServer and JNDI datasource

2006-07-11 19:21

 

You should post this sort of issue on the JasperIntelligence forums.

 

We are not currently handling Hibernate data sources for reports in JasperIntelligence. In the 1.0.1 release, there is a framework for adding custom data sources, which could be used in your case for now.

 

 

 

Sherman

JasperSoft

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...