I have the following issue: Two instances of an application on two different systems. And, two h2db server A, B duplication.
two application first connection -> A -> if fail -> B connect.
In Oracle JDBC URL
jdbc:oracle:thin:#(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)
(HOST=db1ip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)
(HOST=db2ip)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=service_name)))
In h2db?? How?
Related
I have a jenkins job which publishes files to some servers.
I have created a extended choice parameter with server names.
Eg:
Basic Parameter Type -> Paramter Type [Multiselect] -> Values (server1,server2,server3,server) -> delimiter (,).
Which shows correctly on job and I am able to select multiple servers from the choice list.
And I have successfully configured these servers in "Publish over SSH" plugin.
When I select only one server from the list, It works fine,
But when I make multiple selections the job fails and doesn't send any files to selected servers.
Console Output :
20:01:28 SSH: Skipping [server1] - Label [server1] does not match expression [server1,server3]
20:01:28 SSH: Skipping [server2] - Label [server2] does not match expression [server1,server3]
20:01:28 SSH: Skipping [server3] - Label [server3] does not match expression [server1,server3]
Please help on how to select multiple options using the plugin.
The help page says
Parameterized publishing
Publish to servers by matching labels against a regular expression
provided by a parameter or an environment variable.
For each server the label will be matched against the expression, and
if matched, the publish will continue, otherwise that server will be
skipped. If a label is not set for a server it will default to the
empty string. Configured labels have whitespace removed from the start
and end of them, which means that an all whitespace label will be
evaluated as an empty string. The same label can be used multiple
times, e.g. UAT for a database server and again for the web server.
The regular expression syntax is the java syntax.
The labels can use the standard Jenkins environment variables e.g.
$NODE_NAME, or build variables such as a matrix axis.
Parameter name
The name of the parameter or environment variable that will contain
the expression for matching the labels.
This means you have to convert your comma-separated list into a Regular Expression.
You can try to use delimiter | in the Basic Parameter type, that means "or" in RegEx.
I am using Domain inheritance in grails App with
tablePerHierarchy false
So i get one big table with common properties and for each subclasses tables with specific columns to them only.
So let say relation is like below
A -> B
A -> C
A -> D -> E
A -> F -> G
where A is parent class. Now i need to find all B,D,E and need to have paged results on that. I was trying to write criteria query but as no discriminator support is there. Can anyone help me out on the same?
I have tried to use following criteria query and found one strange thing.
A.createCriteria().list(max:max,offset:offset) {
eq("isDeleted", false)
inList('class', [1,3])
}
It worked for me but one strange thing. How would i identify which class is referring to value 1 as discriminator and which to value 2?
I am on Grails 2.4.2
I installed "neo4j-community-1.9-windows" and "neoclipse-1.9.1-win32.win32.x86_64" on one Win2008 R2 server. The Neo4j graph database files are located at "E:\neo4j_home" directory
E:\neo4j_home\bin
E:\neo4j_home\config
E:\neo4j_home\data
......
E:\neo4j_home\system
The graph database are running fine. I can see the nodes and the relationships at http://localhose:7474/, for example, I can see node 100 with http://localhost:7474/webadmin/#/data/search/100/
In Neoclipse, I set the conncetion URI to E:\neo4j_home\data or E:/neo4j_home/data and click "start/connect database" menu. The connection shows green. But when I do Cypher query in Neoclipse, it cannot find any nodes except node(0). For example:start n=node(100) return n; will get error: org.neo4j.cypher.EntityNotFoundException:Node 100 not found
Did I set wrong conncetion URI?
AFAIK the data URL should be E:\neo4j_home\data\graph.db instead of E:\neo4j_home\data.
I am running a very basic test to check my understanding and evaluate neo4j REST server (neo4j-community-1.8.M07). I am using Neo4j Python REST Client.
Each test iteration starts with a random strings for the source node name and the destination node name. The names contain only letters a..z and numbers 0..9 (oddly enough, I never got it to fail if I use A..Z and 0..9). The name may be from one char to 36 chars long and there are no repeating chars. I create 36 nodes, where the 1-st node name is only one char long and the 36-th node name has 36 chars. Then I create relations between all nodes. The name of each relation is the concatenation of the source node name and the destination node name. The final graph has 37 nodes (1 reference node and 36 nodes with names from one char to 36 non-repeating chars) and 1260 relations. Before each test iteration I clear the graph, so that it has only one (the reference) node.
The problem is that after several successful iterations neo4j REST server crashes:
Error [500]: Internal Server Error. Server got itself in trouble.
Invalid data sent
The query that crashes the system can be different - here is an example of a query_string that caused a problem:
START n_from=node:index_faqts(node_name="h"),
n_to=node:index_faqts(node_name="hg2b8wpj04ms")CREATE UNIQUE
n_from-[r:`hhg2b8wpj04ms` ]->n_to RETURN r
self.cypher_extension.execute_query( query_string )
I spent a lot of time trying to find a trend, but in vain. If I did something wrong with the queries none of the tests would ever work. I have observed crashes for number of successful test cycles between 5 and 25 rounds.
What might be causing neo4j REST server to crash?
P.S. Some details...
The nodes are created like this:
...
self.index_faqts[ "node_name" ][ p_str_node_name ] =
self.gdb.nodes.create( **p_dict_node_attributes )
...
Just in case - before issuing the query to create a new relation I check the graph to make sure that the
source and the destination nodes exist. That check never failed.
You are using too many relationship-types, currently the limit is at 32k. Might be patched in Neo4j if you have a valid use-case.
I'm new to Delphi. I got two TSQLTables (say A and B) linked to two TClientDataSets (say cdsA and cdsB respectively) by two TDataSetProviders, two DataSources (dsA and dsB) complete the scenario.
Let A be the master one and let B be the detail one.
B.MasterSource is set to dsA value and B.MasterFields value refer to a field that does not exists in cdsA (but exists in the query). When I start the application I open cdsA first and then I open cdsB. Something goes wrong. The DBGrid that link to dsA datasource shows data, the DBGrid that link to dsB does not show anything. The SQLMonitor logfile shows that the query implemented in B is executed (a simple select a, b, c from tableB ). The stuff works fine if I change the query and show the field 'X' (select a, b, c, X from tableB) where 'X' is the field referred by B.IndexFieldNames property.
Why the DBGrid that link to dsB does not show the B's record related to cdsA's current record? Does it works only if I specify the IndexFieldNames in the query columns? What did I miss? TIA.
I'll explain the complete scenario using AdventureWorks database for SQL Server 2008 R2. I'll also assume that you've already placed the TSQLConnection component and properly set its parameters to established connection with your database. For this example, I'll also assume the name for it to be Conn1.
On a form, place 2 TSQLTable (named tableA and tableB), 2 TDataSetProvider (named dspA and dspB), 2 TClientDataSet (named cdsA and cdsB), 2 TDataSource (named dsA and dsB) and 2 TDBGrid (named gridA and gridB) components.
Set properties as follows:
tableA.SQLConnection = Conn1
tableA.SchemaName = Sales
tableA.TableName = Customer
tableA.Active = True
dspA.DataSet = tableA
cdsA.ProviderName = dspA
cdsA.Active = True
dsA.DataSet = cdsA
gridA.DataSource = dsA
tableB.SQLConnection = Conn1
tableB.SchemaName = Sales
tableB.TableName = SalesOrderHeader
tableB.Active = True
dspB.DataSet = tableB
cdsB.ProviderName = dspB
cdsB.MasterSource = cdsA
cdsB.MasterFields = CustomerID
cdsB.Active = True
dsB.DataSet = cdsB
gridB.DataSource = dsB
In gridA you should see all Customers, and in gridB you should see only Orders related to curently selected customer.
This is the basic example of establishing master/detail relationship between two TClientDataSet components in Delphi. However, there are other ways to do this.
The way that I link ClientDataSets is outlined in Cary Jensen's book "Delphi In Depth: Client DataSets". Setup the Master and Detail datasets as per normal, and ensure that they are linked via a TDataSource (you will have a parameter in the Detail SQL that links it to the Master). However, CJ suggests then having only one DataSetProvider which is attached to the Master. But the master (and therefore the DSP) will have a Nested DataSet reresenting the detail table. The detail / nested dataset can appear in the master table DBGrid or in its own DBGrid. Your gridB will get linked to the Nested Dataset.
The problem in linking gridB directly back to the TSQLQuery (as I understand) is that any updates to the master CDS are not reflected in gridB. If you want to see more then you can download the project NestedFromMasterDetail from Cary's web site.
If you really want to know more, then buy a copy of Cary's book. I have found it invaluable in understanding Client Data Sets. They are setup somewhat different and Cary does a good job of explaining their architecture.