I've just upgraded from Vanatec OpenAccess 4.3.21.866 (VOA) to Telerik OpenAccess 2008.3.1105.1 (TOA). I removed all references to VOA libraries, and added libraries for TOA. I changed all imports to Telerik.OpenAccess.[Whatever]. I changed the "openaccess" line in App.config to:
" <section name="openaccess" type="Telerik.OpenAccess.Config.ConfigSectionHandler, Telerik.OpenAccess.Config, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342" />" (added "Telerik.")
The project I'm working on will no longer update my database (or even connect to it). I can compile the project if I disable the option UpdateDatabase. When I try to run the project or compile it with UpdateDatabase set to true, I get the following error:
"Error 102 OpenAccess Error: Telerik.OpenAccess: Updating SQL schema failed. System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e)
at Telerik.OpenAccess.RT.ExceptionWrapper.Throw()
at OpenAccessRuntime.metadata.ClassMetaData.addError(ExceptionWrapper e, Boolean quiet)
at OpenAccessRuntime.metadata.MetaDataBuilder.buildMetaData(JdoRoot[] roots, Boolean ignoreNoClasses)
at OpenAccessRuntime.jdbc.JdbcMetaDataBuilder.buildMetaData(JdoRoot[] roots, Boolean ignoreNoClasses)
at OpenAccessRuntime.jdbc.JdbcStorageManagerFactory..ctor(StorageManagerFactoryBuilder b)
at OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL() Elementlager "
At the same time the Debug output window emits the following lines when running the project in the debugger:
A first chance exception of type 'Telerik.OpenAccess.OpenAccessException' occurred in Telerik.OpenAccess.Runtime.dll
A first chance exception of type 'Telerik.OpenAccess.OpenAccessException' occurred in Elementlager.exe
Obviously, my project compiled and ran fine before the update...
Any ideas as to where to look???
Thank you!
Sverre Hårstadstrand.
12 Answers, 1 is accepted
Need help too.
I have exactly the same problem. After update to Telerik version I get always the same exceptions. Sample projects run without problems.
Thanks,
Markus
this looks like a regression which we would like to know more about. Could you please turn off the database update and open the database from the application within the debugger? Set it up in a way that all exceptions are caught and give us the stack trace for the NullReferenceException (which is just wrapped in the call stack already posted here). That would help us big time!
Regards,
Thomas
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
The following is the first message I get when I run the program. I opened the Exceptions dialog on the Debug menu and put a check in all the checkboxes under "Break when an exception is: thrown". If this is not what you need, please specify the steps i need to take...
A first chance exception of type 'Telerik.OpenAccess.OpenAccessException' occurred in Telerik.OpenAccess.Runtime.dll
Additional information: System.NullReferenceException: Objektreferanse er ikke satt til en objektforekomst.
ved Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e)
ved Telerik.OpenAccess.RT.ExceptionWrapper.Throw()
ved OpenAccessRuntime.metadata.ClassMetaData.addError(ExceptionWrapper e, Boolean quiet)
ved OpenAccessRuntime.metadata.MetaDataBuilder.buildMetaData(JdoRoot[] roots, Boolean ignoreNoClasses)
ved OpenAccessRuntime.jdbc.JdbcMetaDataBuilder.buildMetaData(JdoRoot[] roots, Boolean ignoreNoClasses)
ved OpenAccessRuntime.jdbc.JdbcStorageManagerFactory..ctor(StorageManagerFactoryBuilder b)
ved OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL()
BTW: I'm running VS 2008 Professional.
Sverre.
The following copied from the "Locals" window have more detail:
StackTrace "
ved Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e)\r\n
ved Telerik.OpenAccess.RT.ExceptionWrapper.Throw()\r\n
ved OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL()\r\n
ved OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createStorageManagerFactory()\r\n
ved OpenAccessRuntime.jdo.PersistenceManagerFactoryImp.createStorageManagerFactory()\r\n
ved OpenAccessRuntime.jdo.PersistenceManagerFactoryBase.init()\r\n
ved OpenAccessRuntime.jdo.PersistenceManagerFactoryImp.init()\r\n
ved OpenAccessRuntime.jdo.PersistenceManagerFactoryImp..ctor(IDictionary properties, Object classloader)\r\n
ved OpenAccessRuntime.jdo.PersistenceManagerFactoryImp.getPersistenceManagerFactory(IDictionary props)\r\n
ved OpenAccessRuntime.jdo.BootstrapPMF.getPersistenceManagerFactory(IDictionary props)\r\n
ved Telerik.OpenAccess.RT.Helper.getPersistenceManagerFactory(IDictionary props)\r\n
ved Telerik.OpenAccess.RT.DatabaseAdapter.AssertPersistenceManagerFactory(String usr, String password, Boolean open)\r\n
ved Telerik.OpenAccess.RT.DatabaseAdapter.GetObjectScope(TransactionProvider provider)\r\n
ved Telerik.OpenAccess.RT.DatabaseAdapter.GetObjectScope()\r\n
ved Telerik.OpenAccess.Database.GetObjectScope()\r\n
ved Elementlager.ObjectScopeProvider1.GetNewObjectScope() i C:\\Programmering\\Loe Elementlager\\Elementlager\\Elementlager\\ObjectScopeProvider1.cs:linje 163\r\n
ved Elementlager.ObjectScopeProvider1.ObjectScope() i C:\\Programmering\\Loe Elementlager\\Elementlager\\Elementlager\\ObjectScopeProvider1.cs:linje 139\r\n
ved LoeElem.BusinessRules.ApplicationServices.InitializeOpenAccess() i C:\\Programmering\\Loe Elementlager\\Elementlager\\Elementlager\\BusinessRules\\ApplicationServices.cs:linje 67\r\n
ved Elementlager.Mainform.Mainform_Load(Object sender, EventArgs e) i C:\\Programmering\\Loe Elementlager\\Elementlager\\Elementlager\\Mainform.cs:linje 96
" string
Sverre
Telerik.OpenAccess.OpenAccessException occurred
Message="System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.\r\n bei Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e)\r\n bei Telerik.OpenAccess.RT.ExceptionWrapper.Throw()\r\n bei OpenAccessRuntime.metadata.ClassMetaData.addError(ExceptionWrapper e, Boolean quiet)\r\n bei OpenAccessRuntime.metadata.MetaDataBuilder.buildMetaData(JdoRoot[] roots, Boolean ignoreNoClasses)\r\n bei OpenAccessRuntime.jdbc.JdbcMetaDataBuilder.buildMetaData(JdoRoot[] roots, Boolean ignoreNoClasses)\r\n bei OpenAccessRuntime.jdbc.JdbcStorageManagerFactory..ctor(StorageManagerFactoryBuilder b)\r\n bei OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL()"
Source="Telerik.OpenAccess"
CanRetry=false
StackTrace:
bei Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e)
bei Telerik.OpenAccess.RT.ExceptionWrapper.Throw()
bei OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL()
bei OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createStorageManagerFactory()
bei OpenAccessRuntime.jdo.PersistenceManagerFactoryImp.createStorageManagerFactory()
bei OpenAccessRuntime.jdo.PersistenceManagerFactoryBase.init()
bei OpenAccessRuntime.jdo.PersistenceManagerFactoryImp.init()
bei OpenAccessRuntime.jdo.PersistenceManagerFactoryImp..ctor(IDictionary properties, Object classloader)
bei OpenAccessRuntime.jdo.PersistenceManagerFactoryImp.getPersistenceManagerFactory(IDictionary props)
bei OpenAccessRuntime.jdo.BootstrapPMF.getPersistenceManagerFactory(IDictionary props)
bei Telerik.OpenAccess.RT.Helper.getPersistenceManagerFactory(IDictionary props)
bei Telerik.OpenAccess.RT.DatabaseAdapter.AssertPersistenceManagerFactory(String usr, String password, Boolean open)
bei Telerik.OpenAccess.RT.DatabaseAdapter.GetObjectScope(TransactionProvider provider)
bei Telerik.OpenAccess.RT.DatabaseAdapter.GetObjectScope()
bei Telerik.OpenAccess.Database.GetObjectScope()
bei WindowsApplication3.ObjectScopeProvider1.GetNewObjectScope() in D:\Projekte\Test\WindowsApplication3\WindowsApplication3\ObjectScopeProvider1.cs:Zeile 118.
unfortunately the original place is still hidden for me. You would need to break on the very first exception. To enable that please go Debug->Exceptions and check on 'Thrown'. Then the debugger will stop at the first exception. Please send us this stack trace.
Many thanks,
Thomas
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
here is the stack trace you requested:
StackTrace " bei OpenAccessRuntime.jdo.query.QueryParser.parseOrdering(ClassMetaData candidateClass, String s)" string
only one entry.
Hope this helps,
Markus
ok, this finally gave me a clue: you must have specified an ordering in the app.config file for a persistent class. This causes this effect; I will fix this.
All the best,
Thomas
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Hi, sorry for the late answer. My stack-trace is the same as Markus: StackTrace " ved OpenAccessRuntime.jdo.query.QueryParser.parseOrdering(ClassMetaData candidateClass, String s)" string
BTW: You are right: I have 3 "ordering" statements in the app.config.
Looking forward to a fix...
Sverre
this issue has been fixed. A patch is expected to be available end of next week.
The only workaround until then is to not use the ordering extension, if that is possible in your application.
Thanks for reporting this,
Thomas
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Hi!
When will this patch be available? It is now 3 weeks since I last was able to compile and run a new version of the app, and one customer is starting to be impatient... I'm reluctant to downgrade to VOA, but may have to if the patch is not released soon...
Sverre.
I hope that we can get the patch out of the door tomorrow.
Sincerely yours,
Jan Blessenohl
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.