I’m trying to add new connection profile to Eclipses Hibernate tolls. But in configuration window I can specify only SID, but my database uses Service name. What can I do in this situation?
Oracle Thin Driver takes only SID in a New Connection Profile.
You need to select Other Driver instead of Oracle Thin Driver in New Driver Definition.
That will give you an option to give whole url in which you can give service name instead of sid.
eg) URL : jdbc:oracle:thin:#192.168.72.11:1521/serviceName
Related
I have K2 blackpearl application which have 2 databases: 1 is k2 database i.e. product database and another is the application database for keeping application data. I am not aware how the application database was configured, but I want to change the application database location to some different serer.
I have already checked smartobject tester and hostserver configuration.
Any idea where i can make connection string changes for this?
If your "Application Data" contains LOB data and is used in your custom solution, you need to perform the following to change it to different server:
Backup that database
Restore it to different server
Edit configuration of Service Instance (SQL Service Instance) corresponding for that database according to that different server
configuration. Usually, it is required to change "Server Name", "Use
Native SQL Execution" and "On Different Server" properties on that
service instance. You can perform these changes using K2 Management site or
SmartObject Service Tester Tool
If your K2 application uses SQL Server as a data source then it most likely uses SQL Server Service broker for this type of integration. If you are new to K2 you have the following logical hierarchy:
Service Type
Service Broker
Service Instance
SmartObjects
Service Broker it is something that allows you to connect to external system (SQL Server in your case) and Service Instance represents instance of this system accessible to K2 (SQL Server database) based on which you can create SmartObjects - representations of objects within external system with which K2 can interact (SQL tables, stored procedures etc. in your case).
I hope from description above it is clear that your app DB connection string lives at Service Instance level. To adjust it you have to do the following:
1) Run SmartObjects Services Tester (default location: "C:\Program Files (x86)\K2 blackpearl\Bin\SmartObject Service Tester.exe")
2) Expand SQL Server Service category and select service instance corresponding to your app database. It should be clear from name (if naming conventions were followed when it was created), but if not just edit its properties - there you will see Database and Server properties corresponding to SQL database name and SQL Server name respectively.
3) Once you located right service instance just edit its properties adjusting server and database name. Here how it looks like:
If necessary refer to #Dragan Panjkov answer or documentation I mentioned above for information about additional settings you may need to adjust.
To do this you need to run the K2 setup tool - you can access it from the start menu. You just need to run through the wizard (which will be pre-populated with your existing settings), and update the K2 database settings when you get to it.
Is it possible to use the ldap syntax similar to
jdbc:oracle:thin:#ldap://oid-uat:389/uatdb,cn=OracleContext,dc=abc,dc=xyz,dc=com
when defining driver properties for a connection using JPA in Eclipse ( I am trying with OpenJPA, but I don't suppose that matters ) ?
If I use
SID = /uatdb,cn=OracleContext,dc=abc,dc=xyz,dc=com
host = #ldap://oid-uat
Port = 389
it attaches a : after the port and that is invalid and doesn't work
The url becomes
jdbc:oracle:thin:#ldap://oid-uat:389:/uatdb,cn=OracleContext,dc=abc,dc=xyz,dc=com
which generates an error as exected.
I want to be able to set it up using ldap, so that I don't have to keep track of actual servers for different databases that I want to use for the JPA projects.
How can I set up the driver properties in Eclipse wizard ( or any file that I should change without using the wizards ) that will allow me to do this?
I am trying to create a jdbc connection to a postgresql database. I would like to use a datasource. In the documentation of postgresql is stated that one should not use their own implementations of the datasource, but use the implementations of org.apache.commons.dbcp instead. The SharedPoolDatasource looks perfect to me.
The jdbc driver must be postgresql. Glassfish v3.1 offers the opportunity to create a jdbc connection pool. I would like to use that one, but do not know how to make the connection between the commons datasource implementation and the jdbc driver. When I fill in the document on the glassfish server that particular field blanks out forcing me to use the postgresql datasource implementation.
Is this impossible to achieve or do I have to enter data manually in config files? So far I did not have any luck nor feedback. Exceptions should appear in the server.log, but the server.log currently does not show anything (it did show exceptions deploying jsf and ejb applications).
Should be possible....
1. Create a new JDBC Connection Pool:
2. Choose your desired Datasource Implementation Class:
You'll have to setup the details for databasename, user and password in the additional properties tab.
3. Create a new JDBC Resource:
I want to create an entity class from database. My database would be HSQL and i use file to store the data.
I have no problem to config the connection pool to connect to this database # glassfish The name of the resource which uses the connection pool (HSQL-file) is HSQLJdbcResource:
And no problem to reach this resource from a JSP file, this code works perfectly:
But i do have a problem, when i want to create the entity class from database with the netbeans wizard, because somehow the neatbeans can't find the driver for this :
I have the driver and attached to the project and also i can manage to create the entity class trough std datasource but i want trought glassfish resource, because if dont do the way like this --- the file will be locked because of my JPA which use glassfish resource and connection pool... Vicious Circle, is there any solution for this?
Please check to see if the driver path is correct.
Add the hsql driver in your system class path.
Also, this might be helpful: http://hsqldb.org/doc/guide/ch04.html
I am using SQL Server CE 4.0 with WebApi on Windows Azure Websites. I have been successfully able to deploy SQL Server CE. The weird problem I am facing is that my site is able to log me in using the same DB but I am not able to use any of the controllers to fetch the data.
I am using same connection string for both. The only difference is that for logging in I am using WebSecurity as I have enabled OAuth on the site.
Can someone throw some light on how to debug and fix this issue? The error I am getting for the calls is
Format of the initialization string does not conform to specification
starting at index 0.
However the same string works for authentication, change password, adding OAuth connections etc.
Thanks in advance
I connected to the site using FTP. I was not giving the site name as domain name and it was denying me access earlier. On connecting, I got hold of the Web.config file and I found something interesting. While publishing the site, the web.config was modified to add another connectionstring with the name of context_DatabasePublish.
This string had following details connectionString="ContextName_DatabasePublish.ConnetionString" providerName="System.Data.SqlClient"
Also there was a new section called context added to the entityframework section of the config file with all the details for the context to use but again pointing to same connection string. The provider it is using is sql and not sqlce. I believe that is the reason it was failing.
I uploaded my normal config file and the site started working. I need to explore more on to why and how the new connection string got added. I will post the details in comments.