Incompatible data type problem in the ADF
HelloI'm new to ADF. I'm writing a logic in the implementation of the entity class.
The logic contains below two lines.
Integer itemQty = row.getQuantity ();
Number Qty = (Number) (itemQty);
However when compiling, error comes which says 'incompatible data types' that is the integer and the number are not compatible.
Please let me how can know I convert an integer in Number type.
Thank you
Anuj
Integer itemQty = row.getQuantity();
oracle.jbo.domain.Number n= null;
try
{
n = new oracle.jbo.domain.Number(itemQty);
}
catch (SQLException e)
{
//handle the exception here.
}
But why do you need to cast to oracle.jbo.domain.Number?
Tags: Java
Similar Questions
-
incompatible data types: expected - got CHAR, variable connection see detail
Hello.
Here's my problem:
I have connected with a link master detail views. Variable binding that contain both have some session information views:
It is a menu on the database and I'm trying to hide certain values based on the permissions of the user.
When you run the application module, everything works fine. The problem occurs when I try to display the menu as a picture of the tree, or any other table, on a page.
The root view runs correctly, but then I get a
"java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent data types: expected - got TANK.
error in the method executeQueryForCollection of the detail view. (this method is overridden)
Bind Variables are:
-: menuRoot-> that contains the value of the root node. (In the Details view, it is just a dummy variable. It is explained later why I used it.)
-: listOfUserPermmission-> permissions of the user table.
My query looks like this:
1 Master View:
CHILD_IME_MODULA and PARENT_IME_MODULA are also names of permissions.SELECT MetVMenu.CHILD_ID, MetVMenu.CHILD_IME_MODULA, MetVMenu.PARENT_ID, MetVMenu.PARENT_IME_MODULA, MetVMenu.ZST, MetVMenu.NIVO, MetVMenu.CHILD_NAZIV_V_MENIJU, MetVMenu.CHILD_TIP_MODULA, MetVMenu.CHILD_OPIS_MODULA FROM MET_V_MENU MetVMenu WHERE MetVMenu.PARENT_IME_MODULA like :menuRoot and MetVMenu.CHILD_IME_MODULA in (SELECT * FROM TABLE(CAST(:listOfUserPermission AS STRARRAY)))
2. see link that connects the master. CHILD_ID and detail PARENT_ID
3 detail view, then linking to itself... to get the tree menu.
4 ViewLink, which connects CHILD_ID and PARENT_ID from this point of view 'detail '.SELECT MetVMenu.CHILD_ID, MetVMenu.CHILD_IME_MODULA, MetVMenu.PARENT_ID, MetVMenu.PARENT_IME_MODULA, MetVMenu.ZST, MetVMenu.NIVO, MetVMenu.CHILD_NAZIV_V_MENIJU, MetVMenu.CHILD_TIP_MODULA, MetVMenu.CHILD_OPIS_MODULA FROM MET_V_MENU MetVMenu WHERE :menuRoot like 'a' and MetVMenu.CHILD_IME_MODULA in (SELECT * FROM TABLE(CAST(:listOfUserPermission AS STRARRAY)))
Two views executeQuery methods are overridden to define Bind variables before execution.
I get an arrayList of strings (permissions) of session and then convert it to a table.
I also noticed that there are problems with how define bind variables (issues).ArrayList permmissionsArray = (ArrayList)MyUserSession.getSessionValue("permissions"); Array permissions = new Array(permissionsArray.toArray()); HashMap context = new HashMap(); context.put(DomainContext.ELEMENT_SQL_NAME, "STRARRAY"); context.put(DomainContext.ELEMENT_TYPE, String.class); if(permissions != null){ permissions.setContext(null, null, context); setlistOfUserPermission(permissions); } //Here I set menuRoot variable.
So when I did use the variable menuRoot in Details view I had the
' incompatible data types: expected - got TANK.
error in the module of the application.prepareRowSetForQuery() has solved the problem for me. The binding variable is null and that was the reason for the error incompatible data type.
Regarding the error of the tree-> it was a mistake in the definition of the cardinality. -
-Error function of incompatible data types
Hi all
I created a function that will take 3 IN parameters and return the result in type. Here's the code.
Created a table type:
{code}
CREATE OR REPLACE TYPE FEATURES_ROW_TYPE
AS AN OBJECT
(VARCHAR2 (100) OF THE ENVIRONMENT)
MNR VARCHAR2 (100),
GUID VARCHAR2 (100),
USER_ID VARCHAR2 (1000).
RGN VARCHAR2 (100),
RGN_NM VARCHAR2 (5000).
FEATURE_NAME VARCHAR2 (5000).
DATE OF LAST_SIGON_DATE
);
CREATE OR REPLACE TYPE FEATURES_TABLE_TYPE
AS THE FEATURES_ROW_TYPE TABLE;
{code}
Here's the function:
{code}
CREATE OR REPLACE FUNCTION FETCH_FEATURES_FN (P_ENVIRONMENT IN VARCHAR2,
P_FEATURE_ID NUMBER,
P_RGN IN VARCHAR2
)
RETURN FEATURES_TABLE_TYPE
IS
V_ROWS FEATURES_TABLE_TYPE: = FEATURES_TABLE_TYPE ();
V_CUR_ENV VARCHAR2 (100);
V_ENV VARCHAR2 (50);
V_WHERE VARCHAR2 (1000);
V_SQL VARCHAR2 (10000);
BEGIN
V_ENV: = '@DBL_ ' | P_ENVIRONMENT;
V_CUR_ENV: = P_ENVIRONMENT;
IF P_RGN = "ALL" THEN
V_WHERE: = ' WHERE FD. WPP_FTR_IK = ' | P_FEATURE_ID;
ON THE OTHER
V_WHERE: = ' WHERE FD. WPP_FTR_IK = ' | P_FEATURE_ID | "AND FD. RGN = ' | '''' || P_RGN | '''';
END IF;
V_SQL: =.
"WITH USER_DATA ' | ' ' ||
"ACE" | ' ' ||
' (SELECT DISTINCT EB. GUID, AD. USER_ID_ACCT_AFFECTED AS USER_ID, MAX (TRANSACTION_TS) AS LAST_SIGNON_DATE ' | ' ' ||
"TO WPP_EBIZ_ACCT" | V_ENV | ' EB' || ' ' ||
"INNER JOIN WPP_SECURITY_AUDIT_LOG | V_ENV | ' AD' || ' ' ||
' ON EB. GUID = AD. USER_UNIQUE_ID_ACCT_AFFECTED ' | ' ' ||
' WHERE AD. APP_NAME = "consumer" AND AD. TRANSACTION_TYPE_CD = "SIGN_ON" AND AD. FEATURE_NAME = "sign" AND AD. TRANSACTION_RESULT_CD = "S" ' | ' ' ||
' GROUP BY EB. GUID, AD. USER_ID_ACCT_AFFECTED ' | ' ' ||
'), ' || ' ' ||
"FEATURE_DATA" | ' ' ||
'AS ' || ' ' ||
"(MY SEPARATE SELECT." MNR, EB. GUID, MY. RGN, RGN. RGN_NM, FTR. WPP_FTR_IK, FTR. NM AS FEATURES_SUPPORTED ' | ' ' ||
"TO WPP_MBRSHP_ACCT" | V_ENV | "MY" | ' ' ||
"INNER JOIN WPP_EBIZ_ACCT | V_ENV | ' EB WE MY. WPP_EBIZ_ACCT_IK = EB. WPP_EBIZ_ACCT_IK' | ' ' ||
"INNER JOIN WPP_RGN | V_ENV | «RGN WE MY.» RGN = RGN. RGN_ID ' | ' ' ||
"INNER JOIN WPP_RGN_APLCTN_STS | V_ENV | ' RGN_ST ON RGN_ST. RGN_ID = RGN. RGN_ID ' | ' ' ||
"INNER JOIN WPP_FTR_APLCTN | V_ENV | ' FTR_APP ON FTR_APP. WPP_FTR_APLCTN_IK = FTR_APP. WPP_FTR_APLCTN_IK ' | ' '||
"INNER JOIN WPP_FTR | V_ENV | "FTR ON FTR. WPP_FTR_IK = RDFS. WPP_FTR_IK' | ' ' ||
') ' || ' ' ||
"SELECT DISTINCT"HINT1"LIKE ENVIRONMENT, | ' ' ||
"FD. MNR, FD. GUID, UD. USER_ID, FD. RGN, FD. RGN_NM, FD. FEATURES_SUPPORTED ACE FEATURE_NAME, TO_DATE (TRUNC (UD. LAST_SIGNON_DATE)) AS LAST_SIGNON_DATE' | ' ' ||
"FROM FEATURE_DATA INNER JOIN USER_DATA UD ON FD FD. GUID = UD. GUID ' | ' ' || V_WHERE;
-DBMS_OUTPUT. PUT_LINE (V_SQL);
RUN IMMEDIATELY V_SQL
BULK COLLECT INTO V_ROWS;
RETURN V_ROWS;
END FETCH_FEATURES_FN;
{code}
When I tried to run as below.
SELECT * FROM TABLE (FETCH_FEATURES_FN ('HINT1', 2, 'ALL'));
but I get the error message
ORA-00932: inconsistent data types: expected - was -.
ORA-06512: at "KPGCPY. FETCH_FEATURES_FN', line 57
00932 00000 - ' incompatible data types: wait %s %s got. "
* Cause:
* Action:
Please guide to solve this problem.
Thank you
So after running actual query:
-DBMS_OUTPUT. PUT_LINE (V_SQL);
You said the line that will do.
Firstly - I suggest replace this long, complex query with a VERY SIMPLE one until your code actually works.
When you do this, you will see that the TYPE that you defined (FEATURES_ROW_TYPE) is NOT mentioned anywhere in your code.
You need create instances of this TYPE, then a collection of these instances.
Some EXAMPLES of code that shows what I mean by VERY SIMPLE and shows how interrogate instances of a TYPE in a collection
-type to match record emp
create or replace type emp_scalar_type as an object
(EMPNO NUMBER 4,
ENAME VARCHAR2 (10),
USE VARCHAR2 (9).
MGR NUMBER 4,
HIREDATE DATE,
NUMBER OF SAL (7, 2)
NUMBER OF COMM (7, 2)
DEPTNO NUMBER (2)
)
/
-records of the emp table
create or replace type emp_table_type to table of emp_scalar_type
/
declare
TB emp_table_type;
sys deptnoList. OdciNumberList;
BEGIN
Select emp_scalar_type (empno, ename, job, mgr, hiredate, sal, comm, deptno)
bulk collect into tb emp;
Collect SELECT deptno in bulk
IN deptnoList
DEPARTMENT where deptno not in (select deptno table (tb));
I'm looping 1.deptnoList.count
dbms_output.put_Line (deptnoList (i));
end loop;
END;
40
Try this code and work with it until you understand what makes each piece.
Select emp_scalar_type (empno, ename, job, mgr, hiredate, sal, comm, deptno)
bulk collect into tb emp;
See how this SIMPLE query creates instances of the EMP_SCALAR_TYPE and then use COLLECT in BULK to put them in the collection?
Modify your code to use a SIMPLE QUERY like in my example, until you get the code to work.
-
incompatible data types: expected NUMBER got LONG
Version 3.2.20.09
Hello
I use SQL Developer and want to see trigger body using as a function but unfortunately its data type is long so that I get the error message, is there a way by which I can see the bodies of trigger...
Example query
TRIGGER_BODY
SELECT TRIGGER_BODY FROM user_triggers
WHERE TRIGGER_BODY LIKE '% HEAR. "
Error
ORA-00932: inconsistent data types: expected NUMBER got LONG
00932 00000 - ' incompatible data types: wait %s %s got. "
* Cause:
* Action:
Error on line: column 2: 7
This isn't a matter of SQL Developer. Access quick, but partial, the answer is that the display of a LONG column in SQL * more / developer SQL can be done by issuing just one
1000 long - value (or some other, more)
You are referencing a LONG in a WHERE clause, however, is absolutely forbidden as I know. Maybe something new (System invisible columns generated in LONG columns in the data mirrored dictionary?) are available in 12 c, but disapproval of LONG was announced in Oracle 8 in favour of the LOBs.
Anyway, if you do not want to ask this question in the forum of PL/SQL, see solution code of Laurent Schneider in this old debate...
-
Hi iam new on oracle plsql,.
I have small precision please help me in this.
CREATE or REPLACE TYPE emp_type2 AS OBJECT
(empno NUMBER (4));
CREATE OR REPLACE TYPE T_EMP_TYPE AS TABLE EMP_TYPE2;
CREATE OR REPLACE PROCEDURE test12 (pout on t_emp_type)
AS
BEGIN
-Emp_type2 (e.empno) SELECT COLLECT LOOSE pout OF emp e; - updated successfully
Emp_type2 (e.EMPNO) SELECT INTO emp e pout; - getting error below
END;
=====================================================================================
- Error (6.1): PL/SQL: statement ignored
- Error (6,8): PL/SQL: ORA-00932: inconsistent data types: waiting for the TEST. EMP_TYPE2's TEST. T_EMP_TYPE
=====================================================================================
Please explain to me why this statement error SELECT emp_type2 (e.EMPNO) INTO pout of emp e;
Thank you
RAMU.
-Emp_type2 (e.empno) SELECT COLLECT LOOSE pout OF emp e; - updated successfully
Emp_type2 (e.EMPNO) SELECT INTO emp e pout; - getting error below
The TYPE is the data type that can contain multiple lines.
So by the way of multiple lines between two TYPES of needs COLLECT LOOSE (here IN won't work, INTO used to Exchange simple rows)
That's why your 1st statement is t is successful. and the statement with INTO is a failure.
-
Causing problems of custom data type to deploy the shared target RT variable
I seem to have some difficulty in using a shared variable published network created from a customized data type when it is deployed as an executable on a target of cRIO RT. I'll start by describing why I think that this is the rub. I created my RT VI in the LabVIEW (LV 2012) development environment and everything works fine. This VI is quite simple, because these were quickly devolved into an exercise in debugging. The RT VI begins by simply flashing the LED to a couple of times and then starts a loop simple acquisition to read some values out of the material using the analytical engine (while still flashing the LED of the user). After reading the material, the values are grouped in a cluster and written in a shared variable published to the network defined by a custom control type def. The custom control contains five floats double precision. If it's important, the RT cRIO system hosts the shared variable in this case.
So I have that deploy in the development environment, and everything works fine. The LED flashes merrily along, telling me that the program runs correctly. Running a VI host who reads the shared network has published variable gives the desired result. Everything is good.
Now, I want the cRIO system to run this simple program by itself at startup. I build, set it as start VI, deploy it, and then restart the cRIO target. The LED never flashing... the VI doesn't seem to work. I'll spare you the major part of the work of debugging and access to the end. I basically "diagram Disabled" various sections of the code up to the VI began to run correctly in an executable file. I kept reducing the size of the disabled code until something has been disabled: the writing in the shared variable for the custom data type.
So, I guess my question is this: are custom data types defined by type def would be personalized orders authorized executables to RT? I read through the cRIO Developers Guide, my book of development in real time course of NOR and the white paper using shared Variables and I see nothing that forbids it. I know that there are things not allowed in the executable files that are allowed in the development environment (property nodes façade, dialogue live, operating system specific calls, etc.), but no mention of the shared variable type custom data. Any ideas as to why my VI is running in the development environment, but does not update unless I have delete the entry on the published network variable shared?
Thank you in advance for your help!
You must disconnect the data types of variables and then recompile. You can find it useful to keep on disk, a copy of the original lvlib.
Don't know if this is a bug or not. It was suggested by someone in the forum that putting the ctl files in the right position (the disk? in the draft?) would allow the rtexe start; I did a quick check and it didn't work then I dropped the tests more far.
-
Excution of function in the problem of the adf?
My problem description:ADF: Add this JSF error message: the number of parameter names does not match that of the registered
am code public String checkthis(String p_us, String p_pwd) { CallableStatement cs=null; try{ cs=getDBTransaction().createCallableStatement("begin ? := FUNC_GET_SH(?,?); end;",0); cs.registerOutParameter(1, Types.VARCHAR); cs.setInt(p_us, 2); cs.setInt(p_pwd,3 ); cs.executeUpdate(); return cs.getString(1); }catch(SQLException e){ throw new JboException(e); } }
above method am exposed as a button in the user interface. while hitting the error recoveryora db 10g code CREATE OR REPLACE FUNCTION "FUNC_GT_SH"("P_USERNAME" IN VARCHAR2, "P_PASSWORD" IN VARCHAR2) RETURN VARCHAR2 IS BEGIN RETURN DBMS_OBFUSCATION_TOOLKIT.MD5( input_string => UPPER(p_username) || '/' || UPPER(p_password)); END; /
jdev11.1.1.5.0 - BC.<Utils> <buildFacesMessage> ADF: Adding the following JSF error message: The number of parameter names does not match the number of registered praremeters java.sql.SQLException: The number of parameter names does not match the number of registered praremeters at oracle.jdbc.driver.OracleSql.setNamedParameters(OracleSql.java:216) at oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:9319) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1508) at com.rits.suplr.model.servicesAM.SupplierAMImpl.checkLogin(SupplierAMImpl.java:1294) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:648) at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:2142) at oracle.adf.model.bc4j.DCJboDataControl.invokeMethod(DCJboDataControl.java:3063) at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:261) at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1635) at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2149) at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740) at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:402) at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252) at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210) at com.rits.suplr.view.backing.login.OnDialogAction(login.java:59) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(Unknown Source) at com.sun.el.MethodExpressionImpl.invoke(Unknown Source) at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1300) at oracle.adf.view.rich.component.UIXDialog.broadcast(UIXDialog.java:97) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:902) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:313) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177) at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413) at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
How can solve this problem.Nothing to do with the ADF, but with proper use of JDBC
public String checkthis(String p_us, String p_pwd) { CallableStatement cs=null; try{ cs=getDBTransaction().createCallableStatement("begin ? := FUNC_GET_SH(?,?); end;",0); cs.registerOutParameter(1, Types.VARCHAR); cs.setString(2, p_us); cs.setString(3, p_pwd); cs.executeUpdate(); return cs.getString(1); }catch(SQLException e){ throw new JboException(e); } }
-
Unicode problem in the ADF faces
Dear all,
I have a problem with Unicode. I use JDeveloper 11.1.1.4.0.
When I enter the Unicode text in an ADF Web Pages with mysql database and then recover (refresh page) of database, Web page (component) shows data?.
I have configured the preferences/encoding, model and display settings of compiler controller in UTF - 8.
But when I entered the data directly to the database of MySQL IDE, it was OK. (Show Me well).
Thank you
AngeliqueI'm sure you get utf-8 codes of the user interface. So the problem is maybe the driver that you use to store the string in the db or db (or array) itself. It's for you to discover.
You can generate a java class for the OS allows you to store the string and set a breakpoint in the method settter of the attribute in question. You check the data before commit you it to the db. After validation, look you at Pb and see what is stored. As long as you do not see the correct data there are a problem with the jdbc driver that you are using, or the db does not accept utf - 8.Timo
-
JSF tutorial, EJB, JPA, the sample of the problems with the ADF runtime
Hello
I'm new to jDeveloper.
I downloaded the version 11.1.1.2.0 and tried to make my first tutorials with the product.
I started with the sample "create Applications with EJB, JPA and JSF" and run to the following problems:
-1st part: step 10 expose the EJb as a data control
Click here FODFacadeBean.java and choose Create a Data control.
This option "create data Control ' is not at all to the top. There is no option
-Part 2: Step 1 Add tag libraries in a project
The ability to select "the ADF Faces Components 11'
does not come either. I can't see any ADF Associates options...
Is there something missing in my installation, because I can't access these components of the ADF?
Should I include the components of the ADF sometime during the installation to have access to these
or is it a license option?
I downloaded the product yesterday from the public site, filename jdevstudio11112install.exe
Jan-ErikGo to tool-> preferences-> roles
and pass the default role, then you should have all the ADF their stuff available. -
Gets the data type variant for the selection of cases
I don't ' know much about alternative, so I'll ask as many questions as possible on this subject. If I have a table of varying, and each of these variations has been converted to a different data type. This table will be the clue to a for loop and each item will be handled in a case inside the loop structure for.
The issue is that I would like to take the variant data type, convert enum and use it to select the box on the structure of the case. How do I do that? Or what is the best way to do it?
Yik
VI 'Get TDEnum of data' of the data tools package.
There is also the "GetTypeInfo" VI which is located in the
\vi.lib\Utility\VariantDataType folder. -
table (cast - invalid data type problem
Hi all
Baseline scenario:
--------------------------
PACKAGE
--------------------------
create or replace
PACKAGE C2_PAYMENT_DOC IS
Bin_array TYPE TABLE IS NUMBER
INDEX OF DIRECTORY;
FUNCTION test_fun (l_doc_id IN integer) RETURN bin_array;
--------------------------
PACKAGE_BODY
--------------------------
create or replace
package C2_PAYMENT_DOC as body
Bin_array test_fun (l_doc_id-IN integer) FUNCTION RETURNS IS
l_gross bin_array;
Start
c2_purchase_invoice.get_inv_gross_amount (l_doc_id, l_gross (1));
Return l_gross;
end;
END;
--------------------------
QUERY
--------------------------
Select * from Table (Cast (c2_payment_doc.test_fun (1) as bin_array));
The query result is ORA-00902: invalid data type
How can I make the valid select statement?
Thanks in advance,
BartekYou cannot use local collection types in SQL. You must create a bin_array of type like nested SQL table type. In addition, depending on the version you will not cast:
SQL> CREATE OR REPLACE 2 TYPE bin_array 3 AS TABLE OF NUMBER 4 / Type created. SQL> create or replace 2 PACKAGE C2_PAYMENT_DOC IS 3 FUNCTION test_fun(l_doc_id IN integer) RETURN bin_array; 4 end; 5 / Package created. SQL> create or replace 2 package body C2_PAYMENT_DOC as 3 4 FUNCTION test_fun (l_doc_id IN integer) RETURN bin_array IS 5 l_gross bin_array := bin_array(); 6 begin 7 l_gross.extend; 8 l_gross(1) := l_doc_id; 9 return l_gross; 10 end; 11 END; 12 / Package body created. SQL> select * from Table(Cast(c2_payment_doc.test_fun(1) As bin_array)); COLUMN_VALUE ------------ 1 SQL> select * from Table(c2_payment_doc.test_fun(1)) 2 / COLUMN_VALUE ------------ 1 SQL>
SY.
-
data type number indicating the exponential value...
Hello
I HAV a column phone_no (data type of number) in a database. Why show the phone not in this format
PHONE_NO
---------
9.873E + 09
Please give me the solution.Hello
It seems that the default width for the number of columns on your system is 9.
You use SQL * more?
If so, you can change the default to 10 (or more) for your session:SET NUMWIDTH 10
or you can format specifically this column:
COLUMN phone_no 9999999999
-
Problem in the ADF Css cannot apply styleClass to Commandbutton
I want to add CSS to my request, I've done a few classes to add to the buttons, but it did not work.
I've done two classes like
And when I want to apply this style to my CommandButton control it is replaced by the style by default ADF.button_normal_blue { width: 120px; height: 30px; font-size: 14px; font-weight: bold; color: #fff; background: url(../img/button_blue.png) no-repeat; border: 0; } .button_normal_red { width: 120px; height: 30px; font-size: 14px; font-weight: bold; color: #fff; background: url(../img/button_red.png) no-repeat; border: 0; }
Like this
only the size of the button is changed<af:commandButton actionListener="#{bindings.CreateInsert.execute}" text="CreateInsert" disabled="#{!bindings.CreateInsert.enabled}" id="cb4" partialTriggers="t1" styleClass="button_normal_red"/>
and when I use Firebug to see the CSS, I find that my class is overridden by the default class of the ADF and the generated Css Firebug
You'll notice that these two classes *. x7j.p_AFTextOnly. x7k.p_AFTextOnly* replace my class * .button_normal_red.x7j.p_AFTextOnly, .x7k.p_AFTextOnly { background-color:#FDDDFA; background-image:url("/ViewController-context-root/afr/button_bg_n.png"); background-position:center bottom; background-repeat:repeat-x; padding:1px 8px 8px; text-decoration:none; white-space:nowrap; } myskin...cmp.css (line 292) .button_normal_red, .x1gn { background:url("/ViewController-context-root/img/button_red.png") no-repeat scroll 0 0 transparent; border:0 none; font-size:9px; font-weight:bold; height:30px; width:120px; }
I want to know how to apply StyleClass to commandButtonHello
Use the count with the following switches:
af|commandButton.button_normal_blue, af|commandButton:text-only.button_normal_blue { width: 120px; height: 30px; font-size: 14px; font-weight: bold; color: #fff; background: url(../img/button_blue.png) no-repeat; border: 0; }
Kind regards
~ Simon
-
Problem with the incompatible data type
Hi all
I wrote this query and trying to run it and got the following error.
I got this error when I add column.if description I do not add the description column query works fine. _
Attempted to solve by other means but did not work.
Please help on this.
SELECT the description, product, /*Defect.Product*/
TO_CHAR (BG_DETECTION_DATE, 'yyyy') year,
TO_CHAR (BG_DETECTION_DATE, 'Q'). ' Q'Quarter
BUG
where service_type as "Incident".
and produced in ("Siebel", "Intg_Mgmt", "SOA", "NICE", "Genesys", "DW Analytics")
AND DETECTION_DATE
BETWEEN TO_DATE('01-01-2009','MM-DD-YYYY')
AND TO_DATE (OCTOBER 30, 2010 ","DD-MM-YYYY")
Group of to_char(bg_detection_date,'yyyy'), to_char(bg_detection_date,'Q'),
product, description
order by product, year desc, asc quarter
error: ORA-00932: given inconsistent type.expected get clob_Try to replace every occurrence of "description" by 'dbms_lob.substr (description, 100, 1)' in your query, for example.
It of OK if you want to show how only and group using the first 100 characters of the column "description".
-
Performance problem for the ADF calendar
Hello
We intend to apply the calendar adf for one of our customers. They will use the calendar as a planner. There will be at least 350-500 activities for a provider and a month.
We are filtering of calendar data by selecting provider from the drop-down list box. However, execution of the view object takes about 4-5 seconds and activities appear 15 seconds. Total waiting time may be 20 seconds.
How can I improve performance? Customer will use the calendar as a scheduler of tasks online. Therefore, it must be very fast.
JDeveloper Version: 11.1.1.6.0
Please note that all the components are bind to the backup of the attributes of bean whose calendar itself jsff layout.
Steps for filtering:
1 combo box action in backing bean:
public void onResourceChange(ValueChangeEvent valueChangeEvent) { valueChangeEvent.getComponent().processUpdates(FacesContext.getCurrentInstance()); if (valueChangeEvent.getNewValue() != null) { if(valueChangeEvent.getNewValue() != valueChangeEvent.getOldValue()) { applyFilter(); } } else { removeFilter(); } RequestContext context = RequestContext.getCurrentInstance(); context.addPartialTarget(getC1()); }
2 ApplyFilter and removeFilter in backing bean methods:
private void applyFilter() { DCBindingContainer dcbindings = (DCBindingContainer)ADFUtils.getBindingContainer(); XxntcCalendarAMImpl am = (XxntcCalendarAMImpl)dcbindings.getDataControl().getApplicationModule(); DCIteratorBinding garageIterator = ADFUtils.findIterator("XxntcGarageInfoVO1Iterator"); Row currentGarageRow = garageIterator.getCurrentRow(); Number resourceId = (Number)currentGarageRow.getAttribute("ResourceId"); am.applyCalendarFilter(resourceId); } private void removeFilter() { DCBindingContainer dcbindings = (DCBindingContainer)ADFUtils.getBindingContainer(); XxntcCalendarAMImpl am = (XxntcCalendarAMImpl)dcbindings.getDataControl().getApplicationModule(); am.removeFilter(); }
3. the application model Impl applyCalendarFilter removeFilter methods and
public void applyCalendarFilter(Number resourceId) { XxntcServiceCalendarEOVOImpl calendarVo = (XxntcServiceCalendarEOVOImpl)getXxntcServiceCalendarEOVO1(); System.out.println(new java.util.Date()); ViewCriteria vc = calendarVo.createViewCriteria(); vc.setName("fiterCalendar"); ViewCriteriaRow vcRow = vc.createViewCriteriaRow(); vcRow.setAttribute("ResourceId", "= " + resourceId); vc.insertRow(vcRow); calendarVo.appendViewCriteria(vc); calendarVo.executeQuery(); /*calendarVo.setWhereClause(null); calendarVo.setWhereClause("RESOURCE_ID = :pResourceId"); calendarVo.defineNamedWhereClauseParam("pResourceId", null, null); calendarVo.setNamedWhereClauseParam("pResourceId",resourceId); calendarVo.executeQuery();*/ System.out.println(new java.util.Date()); } public void removeFilter() { XxntcServiceCalendarEOVOImpl calendarVo = (XxntcServiceCalendarEOVOImpl)getXxntcServiceCalendarEOVO1(); calendarVo.removeApplyViewCriteriaName("fiterCalendar"); //calendarVo.removeNamedWhereClauseParam("pResourceId"); calendarVo.executeQuery(); }
Kind regards
Anil
Hi all
Problem is solved.
There are three important points for the solution.
1 oracle has proposed to use a separate iterator for suppliers. Here is the explanation of SR Oracle:
@ The iterator binding of the calendar and the iterator binding of the
@ suppliers are the same, there is no point at all. Normally, the
@ the iterator binding calendar is for the events calendar and the provider
@ the iterator is on another iterator which gives information about the provider, the
@ provider in the timing of the event is the foreign key to the iterator of provider.
@You need to create a table for the vendor and then set object entity / view
@ the object on the table, an iterator will be generated. The provider_id in the
@ event table should be the foreign key to the table of the provider and the
@ providerDefinition must point to the iterator of the vo provider.
@ You cannot use the same table to set the calendar events and providers,
@ This just doesn't make sense.
2. I am able to set the iterator range size if I use a separate iterator for suppliers. Otherwise, ADF throws it npe: ' java.lang.NullPointerException: ADFv: calendar activity Id and Vendor Id cannot be null. "
3. I forgot to use parameters of connection (StartDayTime, EndDayTime and time zones) in my query where clause. Creation of a criteria like this where clause "((HrCalendarEvents.START_TIME > =: StartDayTime) AND (HrCalendarEvents.END_TIME)"<= :enddaytime="" )="" )="" "="" solves="" fetching="" all="" rows="" problem.="" now="" it="" fetches="" just="" current="" time="">=>
Kind regards
Anil
Maybe you are looking for
-
Just refreshed and now have the format 'tab' implementation... but I don't like! I get the concept of any 'tiles', but can I please go back to opening a NewTab directly to about: Home? I'm a shortcut junkie, and have to open a new tab, and then selec
-
I have a lot of slides / photos and prefer to adjust the speed of each of them at the same speed of s 3.0 at a time without going through each one. When I do, it does not apply. How can I do this?
-
Hello Restore on my new iphone 6s a backup of an iphone 5s, it's not mine and I find myself with iCloud account that I don't have the password When I check the status of activation lock I find OUT Help me please I really want to use my own icloud acc
-
Gauss made ignores or even lose weight?
Dear users, I'm confused with the tip Gauss Fit function and weight of entry. My goal is to eliminate the pic in the input data (white). Now I see that the overall trend is a form of Gauss. My first attempt was to introduce a weighting which prefers