db-fit- Could not invoke constructor for Connect[4] - oracle

Here is my code:
!***< Hidden
!define TEST_SYSTEM {fit}
!path C:\Users\c008854\workspace\MQValidator\build\libs\*.jar
!path C:\Progra~1\dbfit-complete-3.2.0\lib\*
|import |
|com.connect|
*!
|Divisionp |
|numerator|denominator|quotient?|
|10 |2 |6.0 |
|12.6 |3 |4.2 |
|22 |7 |~=3.14 |
|9 |3 |<5 |
|11 |2 |4<_<6 |
|100 |4 |33 |
!|dbfit.OracleTest|
!|Connect|xxx.xxx.xxx.xxx.com:1522|xxxuser|xxxpass|xxxname|
However I get the following error
Connect Could not invoke constructor for Connect[4]
I looked at the following, but it didn't solve my problem.
DBFit - Could not invoke constructor for Connect[4]
Instead I got another error saying:
Connect Could not invoke constructor for DatabaseEnvironment
What is the reason for the error that is in the title?

It means the Connect initialisation (constructor) failed, either due to invalid credentials or other problems.
You should look at the Java logs to see what was the exact reason.

Put the line !|dbfit.OracleTest| as the first line on the page. This lets the DB Fit fixture control the entire page, and recognize commands like !|Connect|...

Related

Is there any trigger run before dynamic sql (as execute immediate or dbms_sql.execute)?

I'm creating a feature to allow user create proceduce, function, package and run they with some permissions (grant by this program, not database permission) save in a table.
I want create a trigger run before any dynamic SQL and analyse it to prevent dangerous SQL statements from bad users? Like following
+------------+
| PROGRAM |------------------------------+
+------------+ |
| |
v |
+------------+ +------------+ +---------------+
| USER'S SQL | | PERMISSION | | SESSION INFO |
+------------+ +------------+ +---------------+
|___________________|________________|
v
+-----------------+
| TRIGGER |-------------+
+-----------------+ |
| Allow | Not allow
v v
+-----------------------+ +-------------+
| EXECUTE IMMEDIATE | | ERROR |
+-----------------------+ +-------------+
Can I create anythings like this?

How to create cross-tab with multiple sum at ireport

im trying to create table with multiple sum using cross-tab in ireport, but i think cross-tab don't support multiple sum. my query is look like
|no|info |city |M |F |Total |
|1 |info1 |bandung |10 |5 |15 |
|2 |info1 |jakarta |13 |7 |20 |
and im looking for something like
|no|info |bandung |jakarta |total |
|__|_________|M |F |T |M |F |T |M |F |T |
|1 |info1 |10|5 |15|13|7 |20|23|12|35|
thanks before, sorry for my poor english.
i have resolved my problem, just drag item from pallet panel to add another variable.

constant similar "VM_RESERVED" and nopage method in 3.9.6

Cannot find VM_RESERVED constant and nopage method(in vm_operations_struct) in 3.9.6. What is their replacement in 3.9.6 ?
In the patch removing VM_RESERVED, the author had this advice:
A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA,
currently it lost original meaning but still has some effects:
| effect | alternative flags
-+------------------------+---------------------------------------------
1| account as reserved_vm | VM_IO
2| skip in core dump | VM_IO, VM_DONTDUMP
3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
4| do not mlock | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND |
VM_DONTDUMP.
vm_ops->nopage was replaced with vm_ops->fault in this patch.

How to repeat query in Oracle Forms upon dynamically changing ORDER_BY clause?

I have an Oracle Forms 6i form with a data block that consists of several columns.
------------------------------------------------------------------------------
| FIRST_NAME | LAST_NAME | DEPARTMENT | BIRTH_DATE | JOIN_DATE | RETIRE_DATE |
------------------------------------------------------------------------------
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
------------------------------------------------------------------------------
The user can press F7 (to Enter in Query Mode, for example, he/she types JOH% in the first_name and H% in the DEPARTMENT field) , then F8 to execute the query and see the results. In this example, a list of all employees with their last name starting with JOH and working in any department starting with H will be listed. Here is a sample output of that query
------------------------------------------------------------------------------
| FIRST_NAME | LAST_NAME | DEPARTMENT | BIRTH_DATE | JOIN_DATE | RETIRE_DATE |
------------------------------------------------------------------------------
| MIKE | JOHN | HUMAN RES. | 05-MAY-82 | 02-FEB-95 | |
| BEN | JOHNATHAN | HOUSING | 23-APR-76 | 16-AUG-98 | |
| SMITH | JOHN | HOUSING | 11-DEC-78 | 30-JUL-91 | |
| | | | | | |
------------------------------------------------------------------------------
I then added a small button on top of each column to allow the user to sort the data by the desired column, by executing WHEN-BUTTON-PRESSED trigger:
set_block_property('dept', order_by, 'first_name desc');
The good news is that the ORDER_BY does change. The bad news is that the user never notice the change because he/she will need to do another query and execute to see the output ordered by the column they selected. In other words, user will only notice the change in the next query he/she will execute.
I tried to automatically execute the query upon changing the ORDER_BY clause like this:
set_block_property('dept', order_by, 'first_name desc');
go_block('EMPLOYEE');
do_key('EXECUTE_QUERY');
/* EXECUTE_QUERY -- same thing */
but what happens is that all data from the table is selected, ignoring the criteria that the user has initially set during the query mode entry.
I also searched for a solution to this problem and most of them deal with SYSTEM.LAST_QUERY and default_where. The problem is, last_query can refer to a different block from a different form, that is not valid on the currently displayed data bloc.
How can do the following in just one button press:
1- Change the ORDER_BY clause of the currently active datablock
and: 2- Execute the last query that the user has executed, using the same criteria that was set?
Any help will be highly appreciated.
You can get the last query of the block with get_block_property built-in function:
GET_BLOCK_PROPERTY('EMPLOYEE', LAST_QUERY);
Another option is to provide separate search field(s) on the form, instead of using the QBE functionality.

Cucumber: Multiline arguments using "step" method inside a step definition

The factory_girl Cucumber helpers are cool. I love that this works:
Given the following users exist:
| Name | Email |
| Alan | alan#example.com |
| Bob | bob#example.com |
But I can't work out how to invoke them inside a step definition. For instance:
Given /the usual users exist/ do
step "the following users exist:
| Name | Email |
| Alan | alan#example.com |
| Bob | bob#example.com |"
end
... throws Your block takes 1 argument, but the Regexp matched 0 arguments. (Cucumber::ArityMismatchError).
What's the correct way to pass a multiline argument to another step using step inside a step definition?
Edit:
Source code's always handy. I found that the signature for step is def step(name, multiline_argument=nil). Suggestive. Sadly, however,
step "the following users exist", "
| Name | Email |
| Alan | alan#example.com |
| Bob | bob#example.com |"
also fails with undefined method 'hashes' for #<Cucumber::Ast::DocString:0xa9bf6f4> (NoMethodError). I'd still love to know how that's supposed to work.
However, there's a silver lining. I found another function steps, which is def steps(steps_text), and that works. See answer.
It's not quite what I was looking for, but reading the source code reveals that the following works:
Given /the usual users exist/ do
steps "Given the following users exist:
| Name | Email |
| Alan | alan#example.com |
| Bob | bob#example.com |"
end

Resources