How to connect Guidewire to Oracle database? - guidewire

I have installed Oracle in my system and wanted to change my local database to Oracle, but making changes in the database-config.xml I am unable to get my server started and getting the following error:
java.lang.RuntimeException : No Appropriate database found in
configuration: env = 'local'

Just add to your configuration file (database-config.xml) the parameter env="local".
Example:
<database
autoupgrade="full"
name="BillingCenterDatabase"
dbtype="oracle"
env="local">

Related

django.db.utils.DatabaseError: Error while trying to retrieve text for error ORA-01804

Q1. What versions are we using?
Ans.
Python 3.6.12
OS : CentOS 7 64-bit
DB : Oracle 18c
Django 2.2
cx_Oracle : 8.1.0
Q2. Describe the problem
Ans. While running server with "python3 manage.py runserver"
application is able to contact Oracle DB and show the Django Administration page and login also works.
But when we access the application using the Apache (HTTPD) based URL over secure SSL port, we do see the Django page and the admin page as well but Login to Admin page with Internal server error.
In the logs, we see
"django.db.utils.DatabaseError: Error while trying to retrieve text for error ORA-01804"
cx_oracle is otherwise able to connect to the database properly, another application is also using the same database behind the same httpd proxy and works fine
Q3. Show the directory listing where your Oracle Client libraries are installed (e.g. the Instant Client directory). Is it 64-bit or 32-bit?
Ans. 64-bit
Q4. Show what the PATH environment variable (on Windows) or LD_LIBRARY_PATH (on Linux) is set to?
LD_LIBRARY_PATH=/srv/vol/db/oracle/product/18.0.0/dbhome_1/lib:/lib:/usr/lib
PATH=$ORACLE_HOME/bin:/srv/vol/db/oracle/product/18.0.0/dbhome_1/lib:$PATH
Q5. Show any Oracle environment variables set (e.g. ORACLE_HOME, ORACLE_BASE).
ORACLE_HOME=/srv/vol/db/oracle/product/18.0.0/dbhome_1
TNS_ADMIN=$ORACLE_HOME/network/admin
NLS_LANG=AMERICAN_AMERICA.AL32UTF8
ORACLE_BASE=/srv/vol/db/oracle
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/lib
Any suggestions/help is highly appreciated.
Thank you
I found the problem
So I just removed all the variable declarations from /etc/sysconfig/httpd and checked, the application was still able to access the lib files, so these were now redundant.
Then undid all variable declarations done earlier in .localsh and .localrc files for the os users. To start from scratch, and go step by step to see where it breaks.
So now, cx_Oracle was looking for the lib files in wrong directory
$ORACLE_HOME/client_1/lib
instead of
$ORACLE_HOME/lib
DPI-1047: Cannot locate a 64-bit Oracle Client library: "$ORACLE_HOME/client_1/lib/libclntsh.so: cannot open shared object file: No such file or directory". See https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html for help
I did not have any subfolder named "client_1" inside dbhome_1
so I just created a symlink client_1 that points to dbhome_1 (still unsure on this, but at least it works :) )
So, now, this error was gone but now again ORA-01804 was coming. ๐Ÿ˜‘
I had read somewhere that this error can be fixed by adding "libociei.so" but I did not have one on my instance, so I generated it using these commands:-
mkdir -p $ORACLE_HOME/rdbms/install/instantclient/light
cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk igenliboci
Then I just moved this libociei.so file from
$ORACLE_HOME/instantclient to $ORACLE_HOME/lib
Now there was a new error (so.. progress ๐Ÿ˜‰ ):
ORA-12546 - TNS Permission Denied.
This was easy to solve ๐Ÿ˜€
I used this command to address this :-
setsebool -P httpd_can_network_connect on
And...... That was all! It worked.

Source class "\Magento\Framework\DB\Adapter\Pdo\Mysql" for "Magento\Framework\DB\Adapter\Pdo\MysqlFactory" generation does not exist

i'm trying to install Magento 2 in localhost, and get an error when i want to connect the database.
The error is:
Source class "\Magento\Framework\DB\Adapter\Pdo\Mysql" for "Magento\Framework\DB\Adapter\Pdo\MysqlFactory" generation does not exist.
OS: linux mint 19.1 x64.
DB: MySQL.
I create a database (magento) and a user (magento), asigning all privileges.
When run:
mysql -u magento -p
And then put his password can access, so all is fine here.
The path dir is: /var/www/html/magento2
i'm follow this tutorial: https://tecadmin.net/install-magento-on-ubuntu-16-04/
what should I do to solve this?
Solved.
Change the Full Release with Sample Data of Magento for the Full Release with NO Sample Data, and solved.

Gitlab stubbornly uses default configuration values for Postgresql database

context: Gitlab 8 with external nginx and postgresql on Ubuntu 15.04. It all worked with Gitlab 7.10 and I started with a fresh install to avoid upgrade-problems.
In the gitlab.rb there is:
gitlab_rails['db_adapter'] = "postgresql"
gitlab_rails['db_encoding'] = "unicode"
gitlab_rails['db_database'] = "gitlabdb"
gitlab_rails['db_pool'] = 10
gitlab_rails['db_username'] = "gitlab"
When doing a reconfigure and "gitlab-rake gitlab:setup" there is no problem, and the database gets recreated. So far looking good. Unfortunately the page doesn't load and I get a 500 - the logfile tells me that it cannot login with the given password. I made the database accept all (without password) and then got to the weird error:
ActiveRecord::NoDatabaseError (FATAL: database "gitlabhq_production" does not exist
Nowhere in the config-files a database gitlabhq_production is mentioned, so I'm clueless here. Can you help out?
It was an old instance of Gitlab bugging. A reboot helped.

Flyway connecting to a Database Cluster on Linux

I'm trying to connect to an Oracle Cluster using Flyway-Commandline. It works fine from DOS using:
# Ommitting the other params for brevity: jarDir, locations, user, password, driver etc
flyway clean -url="jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST = my_host_1)(PORT=8020))(ADDRESS=(PROTOCOL=TCP)(HOST = my_host_2)(PORT=8020))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MY_SERVICE_NAME)))"
But when I do the same on linux I get an error:
ERROR: FlywayException: Unable to obtain Jdbc connection from DataSource
ERROR: Occured in com.googlecode.flyway.core.util.jdbc.JdbcUtils.openConnection() at line 56
ERROR: Caused by oracle.net.ns.NetException: NL Exception was generated
ERROR: Occured in oracle.net.resolver.AddrResolution.resolveAddrTree() at line 626
It works fine on both platforms if I connect directly to one of the hosts directly using:
flyway clean -url=jdbc:oracle:thin:#my_host_1:8020/MY_SERVICE_NAME
The problem is that when one host in the cluster goes down, which happens regularly, this stops working.
This sounds like a problem with your Linux environment and not with Flyway itself.

Unable to query mongolab mongodb

I'm using the Nodejitsu and their packaged Mongolab MongoDB database. I ran the command jitsu databases get myDB and I got instructions on how to connect via mongo CLI. The out put of that command has a line that says the following:
help: Connect with the `mongo` cli client:
help:
$ mongo ds039267.mongolab.com:39267/nodejitsu_xxxxxx_nodejitsudb8577296358 -u nodejitsu_xxxxxx -p mypassword
NOTE: This is the first time I am connecting to this instance via the CLI. I only created the database name through jitsu databases createโ€ฆ
I am using Mongo Shell version 1.8.3. I connected to my instance of MongoDB. I tried running the command: show dbs and I got:
uncaught exception: listDatabases failed:{ "ok" : 0, "errmsg" : "unauthorized" }
I am using Mongoose and I have a model called Post. I tried to run: db.post.find() in the CLI, I got:
error: { "$err" : "not authorized for query on hotel.post", "code" : 16550 }
What does this mean? Am I not authorized; I thought I connected successfully?
Updated
I upgraded my mongo shell to the latest, 2.4.x version and still I'm getting this problem. Anyone have any experience with nodejitsu & mongolab?
MongoLab creates databases that require an authenticated user to access. When you connect with the Shell, you will need to provide the UserName and Password to the shell command. Docs are here.
mongo --username Mark --password something
You will need that Username/Password combination to be configured within mongoose as well. The Mongoose docs have details on the possible ways to do this.
Note that you are using a very old shell. 1.8.3 is about 4 versions back from the current 2.4.* line. This is not directly related to your problem, but it's definitely something you should rectify going forward.
Inside the mongo shell try to authenticate once again:
db.auth('yourUsername','yourPassword');
One possible error could be like me : Using special chars in the password breaks the URI!
The generated password was
X/apm~nq5JaJ,5
So OBVIOUSLY, the / broke the request and I got :
MongoError: not authorized for query on apm~nq5JaJ.system.indexes
You can try to include at the end of your URI: ?authMode=scram-sha1

Resources