Results 1 to 18 of 18
  1. #1
    Join Date
    Aug 2009
    Posts
    21
    Rep Power
    0

    Default how toi make Java Bean DataSource connection in ireport

    HI ,

    I am trying to make a new Java Bean Data Source Connection in ireport .I Place bean class in it.businesslogic.ireport.connection folder of Ireport but when I am trying to test that connection I face class not found error and say check you class path . please give me solution.

    Thank in Advance
    Prashant

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    Which class was not found? Did you try adding the missing class to the classpath on the classpath tab?

  3. #3
    Join Date
    Aug 2009
    Posts
    21
    Rep Power
    0

    Default

    The Java Bean Class which I have created I also add in the class Tab Bar but Still dont working

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    What class Tab Bar?
    Go to Options->Classpath and add the missing class to it and save the classpath changes.

  5. #5
    Join Date
    Aug 2009
    Posts
    21
    Rep Power
    0

    Default

    Yaa I made .jar file of that class file and add in classpath and save the changes but Still dont work

  6. #6
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    On Connections/Datasources, what do you have as the Factory class? Is that the exact same name that is reported by the exception or are the packages different?

  7. #7
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    804
    Rep Power
    6

    Default

    Hi,
    Just check whether the below artcle helps you.

    http://www.javaworld.com/javaworld/j...es/figure1.gif
    Ramya:cool:

  8. #8
    Join Date
    Aug 2009
    Posts
    21
    Rep Power
    0

    Default

    Actually I made two class files one is java bean file and other is Simple java class then made jar of that jar files and add those jar files in the lib folder of Ireport then go to the Options-classpath and then add jar file and save class path . but Still I got Class Not Found Error ..
    plz help me

  9. #9
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    804
    Rep Power
    6

    Default

    Have you tried to restart after placing the jar?
    Ramya:cool:

  10. #10
    Join Date
    Aug 2009
    Posts
    21
    Rep Power
    0

    Default

    Yaa, DO have any Article which details graphical explination abt how to make Java Bean DataSource Connection in Ireport

  11. #11
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    Quote Originally Posted by Prashant.surwade View Post
    Yaa, DO have any Article which details graphical explination abt how to make Java Bean DataSource Connection in Ireport
    It also helps if you answer the questions I asked in reply #6.

  12. #12
    Join Date
    Aug 2009
    Posts
    21
    Rep Power
    0

    Default

    Actually I made TestFactory.java class and place in it.businesslogic.ireport.connection this Package compile this class , made jar file and place in lib folder of Ireport after that go to -- ClassPath folder and add this jar file and restart the Ireport tool . when I am going to test the connection


    ClassNotFound
    Msg:it.businesslogic.ireport.connection.TestFactor y
    This class may not have been found: it.businesslogic.ireport.connection.TestFactory
    Check your classpath


    I face this error

  13. #13
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    Do not add any classes to it.businesslogic.ireport.connection!
    Just compile your files, jar them into a jar file and add that jar file to the class path. Then put the FQN of your class as the Factory class on the Connections tab.

  14. #14
    Join Date
    Aug 2009
    Posts
    21
    Rep Power
    0

    Default

    Do not add any classes to it.businesslogic.ireport.connection!
    Just compile your files, jar them into a jar file and add that jar file to the class path. Then put the FQN of your class as the Factory class on the Connections tab

  15. #15
    Join Date
    Aug 2009
    Posts
    21
    Rep Power
    0

    Default

    Quote Originally Posted by Prashant.surwade View Post
    Do not add any classes to it.businesslogic.ireport.connection!
    Just compile your files, jar them into a jar file and add that jar file to the class path. Then put the FQN of your class as the Factory class on the Connections tab
    Stilll I face the Same Problem

  16. #16
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    You have to specify exactly what you have done up to this point and answer the questions I asked in reply #6.

  17. #17
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    160
    Rep Power
    5

    Default

    Hi all,
    I had gone these replays question etc i got a vague answer for my problem i think,
    I will explain my problem

    I want to get the data from a table in which the data are entering with date also there,if a date for eg:2009-12-06 and 2009-12-13 are sundays so that day tere will be no datas will enter to the data base.If i take the report i wont give me the missing date ie will get the data 2009-12-05 then go to 2009-12-07 same as in 12,14 .
    I think this is due to the while loop in the query execution ok then i am thinking of the javabeans datasource so that i will create an action,persistence and bsinnes model

    May i write my query
    select shiftdate,user,logintime,logouttime,hour from logins where user=asdf and month(shiftdate)=12
    the aove query also will not give the missing dates
    so i created a small pgm to get all dates of month 12 and changed the query like
    select shiftdate,user,logintime,logouttime,hour from logins where user=asdf and shiftdate=2009-12-01
    this query will call 31 time means this month full
    and a if loop
    if(rs.next()){
    busin.setDate(rs.getDate(1));
    busin.setName(rs.getString(2));
    ...............
    ........
    }
    else{
    busin.setDate(the date from the for llop of the date taking);
    busin.setName(" ");
    ...........

    }

    by this i got the out put in jsp page

    but this is not the case in jasper report
    query is writing only once we cant't give the date dynalically ,idon't know much about ireport so
    can i use the above action class ,peristece class and business class as for the javabeans datasource and how please explain in detail

    please
    thanks for replay in advance

  18. #18
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    160
    Rep Power
    5

    Default javabeans emptydatasource

    Hi all,
    I had gone these replays question etc i got a vague answer for my problem i think,
    I will explain my problem

    I want to get the data from a table in which the data are entering with date also there,if a date for eg:2009-12-06 and 2009-12-13 are sundays so that day tere will be no datas will enter to the data base.If i take the report i wont give me the missing date ie will get the data 2009-12-05 then go to 2009-12-07 same as in 12,14 .
    I think this is due to the while loop in the query execution ok then i am thinking of the javabeans datasource so that i will create an action,persistence and bsinnes model

    May i write my query
    select shiftdate,user,logintime,logouttime,hour from logins where user=asdf and month(shiftdate)=12
    the aove query also will not give the missing dates
    so i created a small pgm to get all dates of month 12 and changed the query like
    select shiftdate,user,logintime,logouttime,hour from logins where user=asdf and shiftdate=2009-12-01
    this query will call 31 time means this month full
    and a if loop
    if(rs.next()){
    busin.setDate(rs.getDate(1));
    busin.setName(rs.getString(2));
    ...............
    ........
    }
    else{
    busin.setDate(the date from the for llop of the date taking);
    busin.setName(" ");
    ...........

    }

    by this i got the out put in jsp page

    but this is not the case in jasper report
    query is writing only once we cant't give the date dynalically ,idon't know much about ireport so
    can i use the above action class ,peristece class and business class as for the javabeans datasource and how please explain in detail

    please
    thanks for replay in advance

Similar Threads

  1. Unable to get connection, DataSource invalid:
    By kwesiaryee in forum New To Java
    Replies: 0
    Last Post: 09-17-2008, 01:36 PM
  2. Replies: 0
    Last Post: 05-24-2008, 08:51 AM
  3. Replies: 0
    Last Post: 05-24-2008, 08:50 AM
  4. How To Make Socket Connection
    By madhumurundi in forum Networking
    Replies: 5
    Last Post: 04-21-2008, 06:05 PM
  5. How to make a HTTP connection to a website
    By Alayna in forum Networking
    Replies: 1
    Last Post: 05-20-2007, 11:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •