Professional Web Applications Themes

java Object Instantiation error - Coldfusion - Advanced Techniques

Hi ive just started integrating coldfusion with java. My java app is within a custom package. Within the java class that is being called directly from coldfusion, i have several import statements that are calling .jar files which contain libraries The error I get is an Object instantiation error and that it cant find the location when I try to create a new instance of a class within these .jar files. I have reference to the directory of these .jar files within my environment CLASSPATH. Does these .jar files need to be added in the classpath for cf administrator, or ...

  1. #1

    Default java Object Instantiation error

    Hi ive just started integrating coldfusion with java.

    My java app is within a custom package.
    Within the java class that is being called directly from coldfusion, i have
    several import
    statements that are calling .jar files which contain libraries

    The error I get is an Object instantiation error and that it cant find the
    location
    when I try to create a new instance of a class within these .jar files.

    I have reference to the directory of these .jar files within my environment
    CLASSPATH.

    Does these .jar files need to be added in the classpath for cf administrator,
    or does anyone know of a good reference to the process for using .jar files
    that are called
    from a java class, which is in turn called by coldfusion

    any advice would be muchly appreciated.

    geoff_123 Guest

  2. #2

    Default Re: java Object Instantiation error

    http://www.informit.com/articles/article.asp?p=31222&seqNum=8&rl=1

    this site seems to have got the app working, by just placing the jar files in
    {ColdFusion_Root}/wwwroot/WEB-INF/lib, is there any way around this.
    Where I can just leave my .jar files within my project and just reference them



    geoff_123 Guest

  3. #3

    Default Re: java Object Instantiation error

    You should only need to add the jar files to the java class path in the CF Administrator.
    mxstu Guest

  4. #4

    Default Re: java Object Instantiation error

    geoff_123 wrote: 

    if you can't or don't want to use cfadmin to ad your jar locations to cf
    classpath then:

    http://www.spike.org.uk/blog/index.cfm?data=20040603#EBB52433-D565-E33F-353D2664926C59B5
    PaulH Guest

  5. #5

    Default Re: java Object Instantiation error

    PaulH,

    Is that the right link? I didn't see anything about jars.
    mxstu Guest

  6. #6

    Default Re: java Object Instantiation error

    mxstu wrote: 

    used to be the right one ;-) been handing that one out for months. i
    guess this is better:

    http://www.spike.org.uk/blog/index.cfm?do=blog.entry&entry=B49509DF-D565-E33F-31C9E574EA1591EE
    PaulH Guest

  7. #7

    Default Re: java Object Instantiation error

    >i guess this is better:

    Yes, much ;-)
    mxstu Guest

  8. #8

    Default Re: java Object Instantiation error

    thanks for the timely response guys, and thanks for the link PaulH, it will make life
    a whole lot easier in the future.
    geoff_123 Guest

  9. #9

    Default Re: java Object Instantiation error

    Ditto about the link. Thanks PaulH
    mxstu Guest

  10. #10

    Default Re: java Object Instantiation error

    mxstu wrote: 

    well just keep in mind that not all java classes can be used that way
    and others will need some massaging.
    PaulH Guest

Similar Threads

  1. Dynamic Object Instantiation
    By Chip in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: September 15th, 02:01 AM
  2. Coldfsuion + Java Instantiation Exception
    By shailajaj in forum Coldfusion - Advanced Techniques
    Replies: 3
    Last Post: July 29th, 06:34 PM
  3. java class instantiation problem
    By JJBBDD in forum Coldfusion - Advanced Techniques
    Replies: 1
    Last Post: July 1st, 05:31 AM
  4. PHP dynamic class instantiation like Java
    By Roger Vandervort in forum PHP Development
    Replies: 2
    Last Post: September 30th, 01:07 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139