Driver class 'net.sourceforge.jtds.jdbc.Driver is not available

4 posts, 0 answers
  1. Ben Shipper
    Ben Shipper avatar
    2 posts
    Member since:
    Dec 2009

    Posted 16 Dec 2009 Link to this post

    Hello,

    I'm currently evaluating the telerik open access orm (2009_3_1104), and i'm having issues with establishing an Object Scope from my database, receiving an error stating "Driver class 'net.sourceforge.jtds.jdbc.Driver is not available"

    I am attempting to reverse map a few simple tables, and the wizard generates all the persistent objects as expected, however, i get an InvalidOperationException while trying to create an object scope from the database.

    My code is as follows, and fails on creating the scope object.

    Database db = Database.Get("DatabaseConnection1"); 
    IObjectScope scope = db.GetObjectScope(); 
    scope.Transaction.Begin(); 
     

    The database is an old MSSQL 2000 instance and the connection string uses integrated security.

    Full Stack trace of exception:
    at Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e)
    at Telerik.OpenAccess.RT.ExceptionWrapper.Throw()
    at OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL()
    at OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createStorageManagerFactory()
    at OpenAccessRuntime.DataObjects.PersistenceManagerFactoryImp.createStorageManagerFactory()
    at OpenAccessRuntime.DataObjects.PersistenceManagerFactoryBase.init()
    at OpenAccessRuntime.DataObjects.PersistenceManagerFactoryImp.init()
    at OpenAccessRuntime.DataObjects.PersistenceManagerFactoryImp..ctor(IDictionary properties, Object classloader)
    at OpenAccessRuntime.DataObjects.PersistenceManagerFactoryImp.getPersistenceManagerFactory(IDictionary props)
    at OpenAccessRuntime.DataObjects.BootstrapPMF.getPersistenceManagerFactory(IDictionary props)
    at Telerik.OpenAccess.RT.Helper.getPersistenceManagerFactory(IDictionary props)
    at Telerik.OpenAccess.RT.DatabaseAdapter.AssertPersistenceManagerFactory(String usr, String password, Boolean open)
    at Telerik.OpenAccess.RT.DatabaseAdapter.GetObjectScope(TransactionProvider provider)
    at Telerik.OpenAccess.RT.DatabaseAdapter.Telerik.OpenAccess.SPI.IDatabaseAdapter.GetObjectScope()
    at Telerik.OpenAccess.Database.GetObjectScope()
    at open_access_test.Program.Main(String[] args) in C:\\directory_removed\\Program.cs:line 15
    at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()"

    Thankyou for your time,

    Kind Regards,
    Ben



  2. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 19 Dec 2009 Link to this post

    Hello Ben Shipper,

    It seems that the Telerik.OpenAccess.NTDS.dll is not found. Could you please check whether it is properly installed in the GAC under "C:\Windows\assembly"?

    Regards,
    Damyan Bogoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. Ben Shipper
    Ben Shipper avatar
    2 posts
    Member since:
    Dec 2009

    Posted 20 Dec 2009 Link to this post

    Thankyou for your reply Damyan,

    The Telerik.OpenAccess.NTDS dll is available in the GAC and seems to be installed correctly.

    If I reference this library directly in my project, it does as you suggested fix the issue and i can successfully persist objects. Just wondering if this is the normal procedure, as I was under the impression that the reference would automatically be made?

    I very much appreciate your help with this, and thankyou for your fast response.

    This issue may be marked as resolved.

    Regards,
    Ben
  5. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 23 Dec 2009 Link to this post

    Hi Ben Shipper,

    This is definitely not the expected behavior. It should not be necessary to reference the NTDS dll manually or have such a reference in your project at all. It is enough to have the Telerik.OpenAccess and Telerik.OpenAccess.Query references. However, we could not reproduce the problem, maybe it is related to you environment settings. Please let us know if you face any further problems.

    All the best,
    Alexander
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top