jQuery in Action, 2nd edition*
The moose likes Spring and the fly likes Spring batch 2.1.8 jobRepository creation problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring batch 2.1.8 jobRepository creation problem" Watch "Spring batch 2.1.8 jobRepository creation problem" New topic
Author

Spring batch 2.1.8 jobRepository creation problem

Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Hi all,

I am developing batch job using spring batch. The application server is Glassfish 3.1.1 and the database is sybase ASE 15.2 . The JDBC driver file is jconn4.jar. The application context contains the following codes


The JNDI datasource is working file. while deploying the application following error is received.




do not have any idea about getClientInfo() method and why it require to initiate jobRepository.

Please give the solution.

Thanks



Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Are the Spring Batch tables created on your database?

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950

Dear Mark,

Yes, actually the application is running fine , if I change the JDBC drivers to type 3 level. For this I have to use jconn3.jar provided with sybase. My JPA is using the Jdbc type 4 (jconn4.jar). The Sybase version I am using is 15.5 and not 15.2.
Somewhere I found that the getClientInfo() method is related to JDBC type 4. Please suggest , is it feasible to downgrade the JDBC level for whole application. I am getting time precision related warning by JPA provider (hibernate) if I use jconn3.jar.

I am not considering jTds open source drivers as the high availability and DTM modes are not working with it.

Please suggest.

Thanks
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Not sure. You could try to run your application with the Jdbc 3 driver and see what happens.

Mark
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Hi Mark,

The application run correctly if I use the jdbc 3 drivers. The problem is , we are going to use Sybase ASE 15.7 in production. For this the jconnect drivers 3 are not supplied by default. Only jconn4.jar is available with distribution. My question is, if the particular method is not supported with the sybase drivers, how it was used in the spring batch implementation. The sybase documentation stated that if, the method is unimplemented, do not use the method.

Thanks
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

I haven't looked at any exact code in the depth of Spring Batch internal code, but it is open source and you can download it and try to find where that method is called. But I don't think just commenting out that line will make it work. Just because Sybase doesn't provide the driver by default, why can't you still use the one that you do have?

It just sounds like you have a compatibility issue where Batch doesn't support Jdbc4 drivers and would have to wait for an update of Batch in the future that might support it. I recommend posting on the Spring Batch forum at www.springframework.org. There you will probably get a reply from the Batch developers themselves.

Good Luck

Mark
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Hi Mark

Instead of using the batch namespec I have defined the bean for jobRepository and now it is working fine. The additional property is the databaseType



Thanks

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Spring batch 2.1.8 jobRepository creation problem