6 Replies Latest reply on Jun 14, 2007 11:03 PM by cf_dev2

    JDBC Connect Issues

    ironyx
      So, I have the same project, but thought I would start a new string for this new issue.

      I don't have an Oracle client on my server, and I am trying to do a connect though a cfscript/createObject to pull Jasper Reports into Coldfusion.
      I guess I was wondering, could I pull all of the Oracle client drivers, .jar files into my already set up path and access them or am I missing how that works. Quite often I am... so if this is the case can you explain it a little?
      I am getting a [Macromedia][Oracle JDBC Driver] Error establishing socket. Connection Refused: connect
      and I see that it is a driver issue, so if someone could point me in a direction and maybe help educate me a bit?

      Appreciate everything!
      Va.
        • 1. Re: JDBC Connect Issues
          JohnEric Level 1
          set the classpath in the administrator to look where your jar files are and then restart the server. You should then be able to access the classes.
          • 2. Re: JDBC Connect Issues
            cf_dev2 Level 1
            >> [Macromedia][Oracle JDBC Driver] Error establishing socket. Connection Refused: connect
            I can't help with the Oracle connection but from the error CF is obviously finding "a" driver. Otherwise you'd be getting a class not found exception.
            • 3. Re: JDBC Connect Issues
              ironyx Level 1
              Sorry JohnEric, this was kind of a continuation of another post, so I left info out...

              cf_dev2 Yeah, it was finding I think the macromedia driver... so I had to set the classpath in the java script (not javascript) and that is all good now.

              Well, except now I get... a blank page... and when I look at the source it stops at the <td> where my <cfscript> starts.

              So... classpath good, now off to the logs I suppose. Any suggestions are good, but with no error, well... the mystery begins.

              I will keep you posted!

              Thanks,
              Va :-)
              • 4. Re: JDBC Connect Issues
                cf_dev2 Level 1
                Logs? We don't need no stinkin' logs! ;-)

                Does it capture anything if you put everything in a try/catch block?

                <cftry>
                <cfscript> .....

                <cfcatch>
                <cfdump var="#cfcatch#">
                </cfcatch>
                </cftry>
                • 5. Re: JDBC Connect Issues
                  ironyx Level 1
                  Sorry I went MIA, I was writing the tech part of a feasibility study of integrating coldfusion and java... in the middle of trying to learn how some of this works, but why do things in order right? :-)

                  So, the cftry cfcatch caught nothing. I will be checking logs now. I have no idea where it is falling out. I might post the code later if I get in the mood to retype it.

                  I also wrote this little class to test weblogic, which works for about 15 min then shuts the weblocig server down with an UnsupportedClassVersion Error... ???

                  Thanks and take care,
                  Va.



                  • 6. Re: JDBC Connect Issues
                    cf_dev2 Level 1
                    Yes, the logs are probably your best bet. If not, try debugging a few lines of code at a time. If it runs at least one line, add some debugging lines to see where it breaks.

                    >> I also wrote this little class to test weblogic, which works for about 15 min then
                    >> shuts the weblocig server down with an UnsupportedClassVersion Error... ???

                    Was the class compiled with the correct java version? You can have problems if you compiled for 1.5 and are trying to use the class on a lower jvm like 1.4.