Error when trying to install sonarqube on SQL Server 2008 - sql-server

When I try to install sonarqube database I get some errors and database is not created
ActiveRecord::JDBCError: The driver encountered an unknown error: unable to choose type for timestamp from:
["datetime2", "datetime"]
initialize at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/connection.rb:66
initialize at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb:31
jdbc_connection at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/connection_methods.rb:6
send at org/jruby/RubyKernel.java:2227
new_connection at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:223
checkout_new_connection at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:245
checkout at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:188
loop at org/jruby/RubyKernel.java:1519
checkout at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:184
mon_synchronize at jar:file:/C:/sonarqube/web/WEB-INF/lib/jruby-complete-1.7.9.jar!/META-INF/jruby.home/lib/ruby/1.8/monitor.rb:191
checkout at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:183
connection at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:98
retrieve_connection at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:326
retrieve_connection at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_specification.rb:123
connection at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_specification.rb:115
initialize at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:440
up at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:401
migrate at C:/sonarqube/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/migration.rb:383
upgrade_and_start at C:/sonarqube/web/WEB-INF/config/../lib/database_version.rb:62
automatic_setup at C:/sonarqube/web/WEB-INF/config/../lib/database_version.rb:74
(root) at C:/sonarqube/web/WEB-INF/config/environment.rb:239
load at org/jruby/RubyKernel.java:1094
(root) at file:/C:/sonarqube/web/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:1
load_environment at file:/C:/sonarqube/web/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails/environment2.rb:25
load_environment at file:/C:/sonarqube/web/WEB-INF/lib/jruby-rack-1.1.13.2.jar!/jruby/rack/rails_booter.rb:79
i was reading about and looks like database driver is not working alright
Any clues about how can i get this working on SQL Server?

There might be a problem with the locale settings of the database. In my case it helped to set the language for the sonarqube database user to "English". See here.

After a few tries, I changed the SQL driver (sqljdbc4.jar) to one directly from Microsoft, it looks like my previous driver was third party modified.
http://www.microsoft.com/en-us/download/confirmation.aspx?id=21599 this is the original mssql driver form jdbc.
http://www.sezok.de/sonar/sonar.html this guide was helpful too.
after changing driver, everything works OK

Related

SSIS to Oracle "Could not create a managed connection manager."

I'm trying to use SSIS to load some data from Oracle database to MSSQL database.
I created the project and used the ADO.Net source and was able to create a connection to Oracle and run queries and view results.
However when I actually run the package I get the following error:
Error: 0xC0208449 at Data Flow Task, ADO NET Source 2: ADO NET Source has failed to acquire the connection {EECB236A-59EA-475E-AE82-52871D15952D} with the following error message: "Could not create a managed connection manager.".
It seems similar to the issue here
And I did find that I have two oracle clients version installed "11.1" and "12.2".
One is used by PL/SQL and the other by other entity framework project.
If this is the issue I just wanted a way to tell the SSIS to pick-up the correct one.
I tried adding Entry in machine.config for "oracle.manageddataaccess.client" section with the desired version.
I also tried using other types of data sources but couldn't even create a successful connection
I tried changing the Run64bitRuntime property in the project to False
Note: I don't have SSIS installed on my machine.
Eventually, I just had to remove the entries related to 11.1 in path variable then restarted my machine.
Also I switched to "dotConnectForOracle" for connection and now it seems to be working fine.
I'm expecting issues related to other applications that might still be using the 11.1 version, but that will be a problem for another day.
Always make sure to write the user (oracle schema) in uppercase and some special characters [in my case it was $] in the password needs escape character even if you're using the wizard not the cmd
I still don't understand the whole issue but I hope this helps someone some day.

Connecting to sql database

(I am a sql noob and I just can not figure this out on my own)
For some time now I have been trying to establish a connection to a SQL database in codename one but to no avail. First I tried connecting to a MariaDB database from one.com. All that's needed for the connection is
Database db = Display.getInstance().openOrCreate("databaseName");
if I am not mistaken, but I am guessing this implies that I have somehow already established a connection to the database. This is not the case however so it creates a new .sql file, right? I can recall that you can connect to a database in the services tab in Netbeans. I chose the MySQL(Connector/ J Driver) which should work with MariaDB, or should it? I entered all my data and i says that it can not establish connection to the database.
the error i get
So I thought I might as well try using localhost. I used XAMPP to host a database and connected in the netbeans services tab.
connected?
Now testing was needed to see if this works. I started the SQL journey with this https://www.codenameone.com/manual/files-storage-networking.html#_sql and integrated the part after "You can probably integrate this code into your app as a debugging tool". I changed database name to "mybase" (it's existance can be confirmed in picture 2). Ran the app, opened the dialog, entered "select ID from customers" and got: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (no such table: customers) It does not get past the first call to "executeQuery". The customers table definitely exists so what am I missing to establish connection?
I really need instructions to connect to the localhost database and ideally also to the one hosted by my webhost provider.
Thanks,
Jona
The Database class is to access the SQLite DB on the mobile device. To connect to external databases, you'd have to do something different, such as a ConnectionRequest or Socket I think.

Using nvarchar cfsqltype in coldfusion with jtds jdbc

Firstly, my cconfig is:
Language: ColdFusion 10(and installed update 11)
DB is MS SQL Server 2012
Using the jtds jdbc(tried versions 1.2.6, 1.2.8 and 1.3.0)
I'm currently having a problem running queries where I use cfqueryparam with a cfsqltype of cf_sql_nvarchar. The problem is the page just hangs. If I look at the application log of ColdFusion, I see the error of:
"net.sourceforge.jtds.jdbc.JtdsPreparedStatement.setNString(ILjava/lang/String;)V The specific sequence of files included or processed is:" followed by the test filename.
I'm running a very basic select query on a nvarchar column, but the page doesn't load and that error is logged.
I know it's gotta be something to do with the jtds jdbc as if I connect through the regular sql driver it'll work perfectly.
So did anybody experience this before? If so, what was your resolution?
Thanks
I did a quick search and the results suggest jtds does not support setNString(). I checked the driver source for 1.3.1, and as mentioned in the comments here the method is not implemented:
"..while getNString is implemented the code just consists of // TODO
Auto-generated method stub and throw new AbstractMethodError();.."
So it sounds like you may need to use cf_sql_varchar, combined with the "String Format" setting, like in previous versions. Obviously, the other option is to use a different driver (one that does support setNString(), such as Adobe's driver or the MS SQL Server driver).
Try using cf_sql_varchar. cf_sql_nvarchar is not a valid option according to the Documentation and you should use cf_sql_varchar

How do I add a driver to the list of those recognized by CayenneModeler?

I'm new to Apache Cayenne, and I'm trying out my first project. I'm attempting to use the Tools > Reengineer Database Schema feature of CayenneModeler to reverse engineer a SQL Server database.
I attempted to create a new "Saved DataSource". I selected "org.apache.cayenne.dba.sqlserver.SQLServerAdapter" from its list of Adapters, and CayenneModeler automatically filled in the JDBC Driver field and added an example DB URL. I modified the DB URL, provided the username/password, clicked "Continue", and then I get the following error:
Driver load error: com.microsoft.sqlserver.jdbc.SQLServerDriver
I assume this means that CayenneModeler does have a driver for sqlserver by default(?) But I don't see a way to point CayenneModeler to any other drivers...
Any Cayenne experts out there know what I might be doing wrong? Is there a way to give CayenneModeler the driver it needs, assuming that is the problem? Or if a missing driver isn't the problem, does anyone know what is?
The location for adding additional drivers is under Tools > Preferences > ClassPath (Windows) or CayenneModeler > Preferences... > Classpath (OSX).

How to configure ODBC Data Source Administrator (DSA) for MS Access db?

I ultimately want to query an existing MS-Access database (say, contacts.mdb) from a Lazarus program I will write.
It appears that configuring a User DSN is the first step.
In the ODBC DSA, I am stuck at Adding a driver for MS-Access databases. What do I need to download for this?
OK, I'm starting over from scratch. Please bear with me.
I'm now trying to use the Lazarus example given at wiki.lazarus.freepascal.org/MS_Access.
Following the Instruction given as "Goto your [Data sources (ODBC)] at the control panel administrative tools..." I run /usr/bin/ODBCConfig and get an error which says "Invalid window handle." Clicking OK closes without anything.
Does this mean I've gotten everything so FUBAR that's it's hopeless?
If your program is written in PHP you can use php5-odbc for access any odbc source, like mssql server or access databases.
This post http://phplens.com/phpeverywhere/node/view/9 illustrate you all the necessary step.
Thsi might be the thing you need
http://www.easysoft.com/products/data_access/odbc-access-driver/
I think it should be enough to put something like the following in ~/.odbc.ini:
[Contacts]
Description = The Contacts Database
Driver = /usr/lib/libmdbodbc.so
Database = /home/dkjmusic/data/contacts.mdb
Of course you need an MDB ODBC driver (e.g. libmdbodbc Install libmdbodbc http://bit.ly/software-small) to be installed

Resources