Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CF8 - GDSFactory class error when connecting to Firebird DB

New Here ,
Oct 12, 2009 Oct 12, 2009

Hello,

    I am trying to get started in learning CF but I can't seem to get past the starting gate.  The problem is in connecting to the Firebird DB.

   I followed the instructions from many blogs and forums (including this one which is most helpful: http://pabloj.blogspot.com/2008/07/setting-up-coldfusion-and-firebird.html). I downloaded the Jaybird 2.1.6 driver from the www.firebirdsql.org site and placed jaybird-full-2.1.6.jar in c:\coldfusion8\lib folder.  I also tried putting it in the c:\coldfusion\runtime\lib, c:\coldfusion\wwwroot\WEB-INF\lib -- all to no avail.

    The error I'm getting (from the exception.log file) is:

"Error","web-0","10/12/09","10:18:03","cfadmin","Could not initialize class org.firebirdsql.gds.impl.GDSFactory The specific sequence of files included or processed is: C:\ColdFusion8\wwwroot\CFIDE\administrator\logging\index.cfm, line: 142 "
java.lang.NoClassDefFoundError: Could not initialize class org.firebirdsql.gds.impl.GDSFactory

    at org.firebirdsql.jdbc.FBDriver.acceptsURL(FBDriver.java:190)
    at java.sql.DriverManager.getDriver(DriverManager.java:253)
    at coldfusion.sql.JdbcImpl.getConnection(JdbcImpl.java:79)
    at coldfusion.sql.JdbcImpl.getConnection(JdbcImpl.java:59)
    at coldfusion.sql.SqlImpl.execute(SqlImpl.java:297)
    at coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:831)
    at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:521)

    Any suggestions on where to go next would be most appreciated.  I've been trying different things for almost 2 weeks now and have reached a dead end.  Thanks in advance,

         vince

         pittsburgh, pa

TOPICS
Database access
2.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Oct 12, 2009 Oct 12, 2009

What exact flavor of ColdFusion did you choose to install?  I.E. Standalone, multi-home, J2EE?  Each of these install CF in slightly different ways and the relationship to the JVM will differ.  The example you posted a link to shows a Standalone installation.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 12, 2009 Oct 12, 2009

Ian,

   Thanks for the reply.  I believe I am running CF standalone.  I do not have IIS installed on my local machine.  Would it be worthwhile for me to install IIS and see if that changes anything?

        vince

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Oct 12, 2009 Oct 12, 2009

I can't imagine how IIS would have anything to do with this.  It is not going to change your JVM or where the JVM lives.

Open your ColdFusion administrator and click on the blue circle with an "I" in it at the upper right corner.

What does this page tell you.  It should list what version of CF you are running, where and what JVM you have it connected to and if the JAR you are trying to install has been installed.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 12, 2009 Oct 12, 2009

Ian,

  It says I am running CF version 8,0,1,195765.

  The Java version is 1.6.0_04 .

  The jar I am using shows up both in the Java Class Path - CF Classpath and the Java Class Path - Server Classpath, so I am assuming this means it is installed, correct?

CF Classpath
;C:/ColdFusion8/runtime/../lib/ant-launcher.jar;   C:/ColdFusion8/runtime/../lib/ant.jar;  C:/ColdFusion8/runtime/../lib/asn1.jar;

...

C:/ColdFusion8/runtime/../lib/jaxrpc.jar;  C:/ColdFusion8/runtime/../lib/jaybird-full-2.1.6.jar;   C:/ColdFusion8/runtime/../lib/jdom-1.0.jar;   C:/ColdFusion8/runtime/../lib/jeb.jar;   C:/ColdFusion8/runtime/../lib/jintegra.jar;   C:/ColdFusion8/runtime/../lib/jnbcore.jar;

Server Classpath
C:\ColdFusion8\runtime\servers\lib; 
C:\ColdFusion8\runtime\servers\lib\jrun-patch.jar; 
C:\ColdFusion8\runtime\..\lib\macromedia_drivers.jar; 
C:\ColdFusion8\runtime\lib\cfmx_mbean.jar;
C:\ColdFusion8\runtime\lib; 
C:\ColdFusion8\runtime\lib\cfmx_mbean.jar; 
C:\ColdFusion8\runtime\lib\instutil.jar; 
C:\ColdFusion8\runtime\lib\java2wsdl.jar; 
C:\ColdFusion8\runtime\lib\jaybird-full-2.1.6.jar
C:\ColdFusion8\runtime\lib\jrun-ant-tasks.jar; 
C:\ColdFusion8\runtime\lib\jrun-xdoclet.jar; 
C:\ColdFusion8\runtime\lib\jrun.jar;

However, I still get an error when I try to connect to the DB using the following recommended specifications (which works for other people):

JDBC URL: jdbc:firebirdsql:servername/3050:dbname

Driver Class: org.firebirdsql.jdbc.FBDriver

Driver Name : JayBird

User Name : SYSDBA

Password : xxxxx

The error from the exception log file is:

"Error","web-1","10/12/09","14:19:55","cfadmin","Could not initialize class org.firebirdsql.gds.impl.GDSFactory The specific sequence of files included or processed is: C:\ColdFusion8\wwwroot\CFIDE\administrator\logging\index.cfm, line: 142 "
java.lang.NoClassDefFoundError: Could not initialize class org.firebirdsql.gds.impl.GDSFactory
    at org.firebirdsql.jdbc.FBDriver.acceptsURL(FBDriver.java:190)
    at java.sql.DriverManager.getDriver(DriverManager.java:253)
    at coldfusion.sql.JdbcImpl.getConnection(JdbcImpl.java:79)
    at coldfusion.sql.JdbcImpl.getConnection(JdbcImpl.java:59)
    at coldfusion.sql.SqlImpl.execute(SqlImpl.java:297)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Oct 12, 2009 Oct 12, 2009

Having no experience with your jaybird/firebird tools I'm only throwing sugestions at the wall to see what sticks.

The next two would be firewalls/anti-virus tools.  Your JDBC URL shows a port number, make sure this port is not being blocked.  Also your JDBC URL is showing generic place holders "servername" and "dbname".  I presume in your real JDBC URL you use your actual server name and database name, and that you have just santized these values for this posting?  If not, that would probably need to be corrected unless you happen to have a server named "severname" and a database on that server named "dbname".  Finally, you have a slash [/] infront of the port where that us usally a colon [:].  But I do concede that is the way the JDBC URL looks in the previous posted link.

FInally, your message speaks to the "cfadmin" not being able to read these jar files.  Is the "cfadmin" a user on your system?  Is it the user that the ColdFusion service|dameon is running as?  If so, make sure that this user also has the required permissions to the jar files it apparently needs to access.


As a final thought.  When and if you get this to work sucessfully you are going to be connecting to the database as the master database administrator user.  The is considered a very bad pratice and a prime vectory for hackers to ruin your world if this is true on a production server.  You want to always create a database user that has just enough permissions on just enough database objects to do the desired job and nothing more.  This is true, no matter what database management system one chooses to utilize.

P.P.S

If none of this helps, you may want to look up some other JDBC connections used to connect to other database products and see if what they do rings any bells for your issues.  I have occasionally used the JDBC Other database driver to connect to Oracle databases through the Oracle thin client.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 12, 2009 Oct 12, 2009
LATEST

I was troubleshooting someone else's Firebird issues the other week, and had to set up a FB datasource (I had never previously used Firebird, indeed only having heard of the thing the previous week).  It was just a matter of sticking the JAR file in the WEB-INF/lib dir and I was up and running.

From your error, it looks to me like it could be an incompatibility between the JVM version and the driver you're using.  CF is finding the driver OK, but the driver ain't working.

Have you investigated this from a Java/JDBC POV rather than a CF one?  Have you googled the error to see if anyone else has offered any advice?

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources