Long time ago I described my problem with getLastPerformer() xpatch function. Content of this artice you can find here: http://my-java-planet.blogspot.com/2012/11/bpm-getlastperformer-issue-error-in.html
Yesterday I encountered this problem once again. And again, I forget cause of this issue. After some googling, I found my own blog post regarding getLastPerformer().
Fortunatelly, today I know, that you can't use bpm.getLastPerformer() outside of Human Taskflow task (the only place I've seen getLastPerformer() method invoked successfully is from inside the human task's assignment tab), so I can share this knowledge. And this is the whole mystery:)
Impressions and experiences from Java EE developer. If you are interested in java enterprise development, adf, java server faces, servlets, portlets and so on , this blog may be interesting for you.
Sunday, November 2, 2014
Friday, June 6, 2014
ADF how to: errors related to bind variables
I accidentally had found an old manual relating to errors related to "bind variables", so I decided share its fragments:
JBO-27122: SQL error during statement preparation
You need to ensure that the list of named bind variables that you reference in your SQL statement matches the list of named bind variables that you've defined on the Bind Variables page of the View Object Editor. Failure to have these two agree correctly can result in one of the following two errors at runtime.
If you use a named bind variable in your SQL statement but have not defined it, you'll receive an error like this:
Valid query returns no rows
If you do not supply a default value for your named bind variable, it defaults to the
Error ORA-00904 when adding a Named Bind Variable at Runtime
Assume following situation. Using
However, if you run this test program, you actually get a runtime error like this:
If you dynamically add an additional WHERE clause at runtime to a read-only view object, its query gets nested into an inline view before applying the additional WHERE clause. For example, suppose your query was defined as:
JBO-27122: SQL error during statement preparation
You need to ensure that the list of named bind variables that you reference in your SQL statement matches the list of named bind variables that you've defined on the Bind Variables page of the View Object Editor. Failure to have these two agree correctly can result in one of the following two errors at runtime.
If you use a named bind variable in your SQL statement but have not defined it, you'll receive an error like this:
(oracle.jbo.SQLStmtException) JBO-27122: SQL error during statement preparation. ## Detail 0 ## (java.sql.SQLException) Missing IN or OUT parameter at index:: 1On the other hand, if you have defined a named bind variable, but then forgotten to reference it or mistyped its name in the SQL, then you will see an error like this:
oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. ## Detail 0 ## java.sql.SQLException: Attempt to set a parameter name that does not occur in the SQL: LowUserId
Valid query returns no rows
If you do not supply a default value for your named bind variable, it defaults to the
NULL
value at runtime. This means that if you have a WHERE clause like:
USER_ID = :TheUserIdand you do not provide a default value for the
TheUserId
bind variable, it will default to having a NULL value and cause the
query to return no rows. Where it makes sense for your application, you
can leverage SQL functions like NVL(), CASE, DECODE(), or others to
handle the situation as you require. In fact, the UserList
view object uses a WHERE clause fragment like:upper(FIRST_NAME) like upper(:TheName)||'%'so that the query will match any name if the value of
:TheName
is null
.Error ORA-00904 when adding a Named Bind Variable at Runtime
Assume following situation. Using
setNamedWhereClauseParam()
method you created code:ViewObject vo = am.findViewObject("EmployeeList"); vo.setNamedWhereClauseParam("TheName","Jon%"); vo.setNamedWhereClauseParam("HighUserId", new Number(100)); vo.executeQuery();
However, if you run this test program, you actually get a runtime error like this:
oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (select USER_ID, EMAIL, FIRST_NAME, LAST_NAME from EMPLOYEES where (upper(FIRST_NAME) like upper(:TheName)||'%' or upper(LAST_NAME) like upper(:TheName)||'%') and USER_ID between :LowUserId and :HighUserId order by EMAIL) QRSLT WHERE (user_role = :TheUserRole) ## Detail 0 ## java.sql.SQLException: ORA-00904: "USER_ROLE": invalid identifierThe root cause of this error is the mechanism that ADF view objects use by default to apply additional runtime WHERE clauses on top of read-only queries.
If you dynamically add an additional WHERE clause at runtime to a read-only view object, its query gets nested into an inline view before applying the additional WHERE clause. For example, suppose your query was defined as:
select USER_ID, EMAIL, FIRST_NAME, LAST_NAME from EMPLOYEES where (upper(FIRST_NAME) like upper(:TheName)||'%' or upper(LAST_NAME) like upper(:TheName)||'%') and USER_ID between :LowUserId and :HighUserId order by EMAILAt runtime, when you set an additional WHERE clause like
user_role = :TheUserRole
, the framework nests the original query into an inline view like this:SELECT * FROM( select USER_ID, EMAIL, FIRST_NAME, LAST_NAME from EMPLOYEES where (upper(FIRST_NAME) like upper(:TheName)||'%' or upper(LAST_NAME) like upper(:TheName)||'%') and USER_ID between :LowUserId and :HighUserId order by EMAIL) QRSLTand then adds the dynamic WHERE clause predicate at the end, so that the final query the database sees is:
SELECT * FROM( select USER_ID, EMAIL, FIRST_NAME, LAST_NAME from EMPLOYEES where (upper(FIRST_NAME) like upper(:TheName)||'%' or upper(LAST_NAME) like upper(:TheName)||'%') and USER_ID between :LowUserId and :HighUserId order by EMAIL) QRSLT WHERE user_role = :TheUserRoleThis query "wrapping" is necessary in the general case since the original query could be arbitrarily complex. In those cases, simply "gluing" the additional runtime onto the end of the query text could produce unexpected results. By nesting the original query verbatim into an inline view, the view object guarantees that your additional WHERE clause is correctly used to filter the results of the original query, regardless of how complex it is. The downside that you're seeing here with the ORA-00904 error is that the dynamically added WHERE clause can refer only to columns that have been selected in the original query.
ADF how to: service methods
All, what do we find regarding "service methods" in ADF BC documentation can be summarized as follows:
"An application module can expose its data model of view objects to clients without requiring any custom Java code. This allows client code to use the
Whenever the programmatic code that manipulates view objects is a logical aspect of implementing your complete business service functionality, you should encapsulate the details by writing a custom method in your application module's Java class."
You can write your own code to configure view object properties to query the correct data to display, you can perform in custom code any kind of multistep procedural logic or finally you can perform aggregate calculations iterating over one or many view objects.
Adding a service method to an application module has many advantages. Some of them are:
"An application module can expose its data model of view objects to clients without requiring any custom Java code. This allows client code to use the
ApplicationModule
, ViewObject
, RowSet
, and Row
interfaces in the oracle.jbo
package to work directly with any view object in the data model. However, just because you can
programmatically manipulate view objects any way you want to in client
code doesn't mean that doing so is always a best practice.Whenever the programmatic code that manipulates view objects is a logical aspect of implementing your complete business service functionality, you should encapsulate the details by writing a custom method in your application module's Java class."
You can write your own code to configure view object properties to query the correct data to display, you can perform in custom code any kind of multistep procedural logic or finally you can perform aggregate calculations iterating over one or many view objects.
Adding a service method to an application module has many advantages. Some of them are:
- allowing multiple client pages to easily call the same code if needed
- code which can be more clear for the clients (client applications and thier developers)
- option open to improve your implementation without affecting clients
- simplifying of the regression-testing of your complete business service
- enabling declarative invocation of logical business functionality in your pages
- In the Application Navigator, double-click the application module.
-
In the overview editor, click the Java navigation tab.
-
On the Java Classes page, click Edit Java Options.
-
In the Select Java Options dialog, select Generate Application Module Class.
- Click OK.
Thursday, May 29, 2014
ADF how to: how to deal with base class that extends oracle.jbo.server.ApplicationModuleImpl
I have here one ADF exercise:
An application module is named MyAppModule. No Java component is defined for
the module but the application does define a base class that extends oracle.jbo.server.ApplicationModuleImpl.
Which two statements are true in this scenario?
A. Code In the base class will only be implemented if MyAppModuleAppl.java extends the base class.
B. Any code in the base class will be implemented by MyAppModule.
C. No code in the base class will be implemented because an application-specific Java component named MyAppModuleImpl.java does not exist.
D. Any code in the base class will be implemented by MyAppModuleDefimpl.java.
E. The MyAppModule. xml definition will include a reference to the base class.
The first issue here is, if is it possible to ADF Model objects to extend custom classes without defining Java "components". Short answer is: yes, it is.
Mpre info about extending ADF Bussiness Components functionality you can find in Oracle® Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework. The chapter 36.1 says:
"One of the powerful features of framework-based development is the ability to extend the base framework to change a built-in feature to behave differently or to add a new feature that can be used by all of your applications."
To create your own extension you should create custom Java class which extends selected ADF Business Components component class, by example oracle.jbo.server.ApplicationModuleImpl.
But Developer's Guide says:
"After creating a new framework extension class, it will not automatically be used by your application. You must decide which components in your project should make use of it."
What should be done is select extension class. Every ADF Business Components wizard and editor displays the same Class Extends button on the Java page. Here you can select class which you want extend.
Backing to our test, we have proposed answers from A to E, but which are correct?
A. Wrong, what is " MyAppModuleAppl.java"? Or there is an error in the proposed answer, cause if we will replace MyAppModuleAppl.java with MyAppModuleImpl.java, the answer will be correct.
B. Wrong answer.
C. Correct answer.
D.Also wrong answer, cause our base class extends oracle.jbo.server.ApplicationModuleImpl, and not oracle.jbo.server.ApplicationModuleDefImpl.
E. This is not true, wrong answer.
What do you think about my answers?
An application module is named MyAppModule. No Java component is defined for
the module but the application does define a base class that extends oracle.jbo.server.ApplicationModuleImpl.
Which two statements are true in this scenario?
A. Code In the base class will only be implemented if MyAppModuleAppl.java extends the base class.
B. Any code in the base class will be implemented by MyAppModule.
C. No code in the base class will be implemented because an application-specific Java component named MyAppModuleImpl.java does not exist.
D. Any code in the base class will be implemented by MyAppModuleDefimpl.java.
E. The MyAppModule. xml definition will include a reference to the base class.
The first issue here is, if is it possible to ADF Model objects to extend custom classes without defining Java "components". Short answer is: yes, it is.
Mpre info about extending ADF Bussiness Components functionality you can find in Oracle® Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework. The chapter 36.1 says:
"One of the powerful features of framework-based development is the ability to extend the base framework to change a built-in feature to behave differently or to add a new feature that can be used by all of your applications."
To create your own extension you should create custom Java class which extends selected ADF Business Components component class, by example oracle.jbo.server.ApplicationModuleImpl.
But Developer's Guide says:
"After creating a new framework extension class, it will not automatically be used by your application. You must decide which components in your project should make use of it."
What should be done is select extension class. Every ADF Business Components wizard and editor displays the same Class Extends button on the Java page. Here you can select class which you want extend.
Backing to our test, we have proposed answers from A to E, but which are correct?
A. Wrong, what is " MyAppModuleAppl.java"? Or there is an error in the proposed answer, cause if we will replace MyAppModuleAppl.java with MyAppModuleImpl.java, the answer will be correct.
B. Wrong answer.
C. Correct answer.
D.Also wrong answer, cause our base class extends oracle.jbo.server.ApplicationModuleImpl, and not oracle.jbo.server.ApplicationModuleDefImpl.
E. This is not true, wrong answer.
What do you think about my answers?
ADF how to: What effect does setting ChangeEventPolicy property to ppr
In this article I would like to solve one of the many issues regarding ADF: what effect does setting ChangeEventPolicy property to ppr.
In the Internet you can find following issue:
You select a binding in the page definition file and set the ChangeEventPolicy property to ppr.
What effect does this action have on the way the page is rendered?
A. It allows a component to partially refresh another component whose partialSubmit property is set to true.
B. When a user selects a new value In a field, the portion of the page where that component resides is redrawn.
C. It enables you to add a component as a partial target for an event, so that when that event is triggered, the partial target component is refreshed.
D. Components whose values change as a result of back-end logic are automatically repainted.
Cause I found many different solutions, I decided to provide my own:)
Ok. Let's start. In the Oracle® Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework (chapter 22.4.3) you can find following text:
"When you create a form, setting up PPR to work for all the components in the form can be time consuming and error prone. To alleviate this, you can set the changeEventPolicy attribute to ppr on value bindings. Doing so means that anytime the associated component's value changes as a result of backend business logic, the component will be automatically rerendered. You can also set an iterator binding's changeEventPolicy to ppr. When you do this, any action or value binding associated with the iterator will act as though its changeEventPolicy is set to PPR. This allows entire forms to use PPR without your having to configure each component separately."
I think there is not any surprise here. The changeEventPolicy=ppr denotes that when the associated component's value changes the component will be added to list of components provided to partial refresh.
But when partial refresh will happen? The answer we can find in the same tutorial. We can read in the same chapter:
"When you drop a form and elect to include navigation controls, JDeveloper automatically sets the changeEventPolicy attribute on the associated iterator to ppr. JDeveloper also sets each of the navigation buttons' partialSubmit attribute to true. This is how command components notify the framework that PPR should occur."
and next:
"When you set the navigation command components' partialSubmit attribute to true and you set the iterator's changeEventPolicy to ppr, each time a navigation button is clicked, all the components in the form that use the iterator binding are rerendered."
It seems that each partial submit forces also reload of components with changed values and ChangeEventPolicy set to ppr. In other words: to effective use of automatic PPR caused by ChangeEventPolicy we need also any action component with partialSubmit set to true.
OK. We can return to our issue:
A. Key here is the phrase: "refresh another component whose partialSubmit property is set to true". A Partial Submit is a method of form submit that does not require a page refresh and only updates components in the view that are referenced from the command component PartialTriggers property. PartialSubmit property should be set to true on the component, action on which should partially submit a form. Setting PartialSubmit property on component which should be refreshed does not make sense. So answer 'A' is wrong.
B. Answer B also does not make sense.
C. Hmm. I think also wrong, answer cause of phrase: "it enables you to add a component as a partial target for an event". As documentation says the component associated with the attribute (or iterator) "will be automatically rerendered", so if automatically, you shouldn't "add a component (manually) as a partial target".
D. My favourite answer is D. Especially because of this sentence in Developer's Guide: "you can set the changeEventPolicy attribute to ppr on value bindings. Doing so means that anytime the associated component's value changes as a result of backend business logic, the component will be automatically rerendered":)
In the Internet you can find following issue:
You select a binding in the page definition file and set the ChangeEventPolicy property to ppr.
What effect does this action have on the way the page is rendered?
A. It allows a component to partially refresh another component whose partialSubmit property is set to true.
B. When a user selects a new value In a field, the portion of the page where that component resides is redrawn.
C. It enables you to add a component as a partial target for an event, so that when that event is triggered, the partial target component is refreshed.
D. Components whose values change as a result of back-end logic are automatically repainted.
Cause I found many different solutions, I decided to provide my own:)
Ok. Let's start. In the Oracle® Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework (chapter 22.4.3) you can find following text:
"When you create a form, setting up PPR to work for all the components in the form can be time consuming and error prone. To alleviate this, you can set the changeEventPolicy attribute to ppr on value bindings. Doing so means that anytime the associated component's value changes as a result of backend business logic, the component will be automatically rerendered. You can also set an iterator binding's changeEventPolicy to ppr. When you do this, any action or value binding associated with the iterator will act as though its changeEventPolicy is set to PPR. This allows entire forms to use PPR without your having to configure each component separately."
I think there is not any surprise here. The changeEventPolicy=ppr denotes that when the associated component's value changes the component will be added to list of components provided to partial refresh.
But when partial refresh will happen? The answer we can find in the same tutorial. We can read in the same chapter:
"When you drop a form and elect to include navigation controls, JDeveloper automatically sets the changeEventPolicy attribute on the associated iterator to ppr. JDeveloper also sets each of the navigation buttons' partialSubmit attribute to true. This is how command components notify the framework that PPR should occur."
and next:
"When you set the navigation command components' partialSubmit attribute to true and you set the iterator's changeEventPolicy to ppr, each time a navigation button is clicked, all the components in the form that use the iterator binding are rerendered."
It seems that each partial submit forces also reload of components with changed values and ChangeEventPolicy set to ppr. In other words: to effective use of automatic PPR caused by ChangeEventPolicy we need also any action component with partialSubmit set to true.
OK. We can return to our issue:
A. Key here is the phrase: "refresh another component whose partialSubmit property is set to true". A Partial Submit is a method of form submit that does not require a page refresh and only updates components in the view that are referenced from the command component PartialTriggers property. PartialSubmit property should be set to true on the component, action on which should partially submit a form. Setting PartialSubmit property on component which should be refreshed does not make sense. So answer 'A' is wrong.
B. Answer B also does not make sense.
C. Hmm. I think also wrong, answer cause of phrase: "it enables you to add a component as a partial target for an event". As documentation says the component associated with the attribute (or iterator) "will be automatically rerendered", so if automatically, you shouldn't "add a component (manually) as a partial target".
D. My favourite answer is D. Especially because of this sentence in Developer's Guide: "you can set the changeEventPolicy attribute to ppr on value bindings. Doing so means that anytime the associated component's value changes as a result of backend business logic, the component will be automatically rerendered":)
Wednesday, April 30, 2014
Which WebLogic optimization allows one non-XA resource
I was asked about the solution of the following task:
Which WebLogic optimization allows one non-XA resource to participate in a distributed transaction? Select correct answer:
Answers 1 and 4 also looked like wrong, but I checked it out:
Generally, if you have to use global transactions in your applications, you should use an XA JDBC driver. If an XA driver is unavailable for your database, or you prefer not to use an XA driver, you should enable support for global transactions in the data source. And what more (as says Administering JDBC Data Sources for Oracle WebLogic Server12c (12.1.2)), when you select Supports Global Transactions, you must also select the protocol for WebLogic Server to use for the transaction branch when processing a global transaction. One of this is:
Which WebLogic optimization allows one non-XA resource to participate in a distributed transaction? Select correct answer:
- enabling Pinned to Thread
- enabling Logging Last Resource
- increasing the Statement cache size
- setting the statement cache type to LRU
- setting the initial and maximum capacity to the same number
Answers 1 and 4 also looked like wrong, but I checked it out:
- LRU = When you select LRU (Least Recently Used, the default) as the Statement Cache Type, WebLogic Server caches prepared and callable statements used on the connection until the statement cache size is reached.
- Pinned to Thread = About this documentation says: When Pinned To Thread is enabled, WebLogic Server pins a database connection from the data source to an execution thread the first time an application uses the thread to reserve a connection. When the application finishes using the connection and calls connection.close(), which otherwise returns the connection to the data
source, WebLogic Server keeps the connection with the execute thread and does not return it to the data source. When an application subsequently requests a connection using the same execute thread, WebLogic Server provides the connection already reserved by the thread.
Generally, if you have to use global transactions in your applications, you should use an XA JDBC driver. If an XA driver is unavailable for your database, or you prefer not to use an XA driver, you should enable support for global transactions in the data source. And what more (as says Administering JDBC Data Sources for Oracle WebLogic Server12c (12.1.2)), when you select Supports Global Transactions, you must also select the protocol for WebLogic Server to use for the transaction branch when processing a global transaction. One of this is:
- Logging Last Resource: With this option, the transaction branch in which the connection is used is processed as the last resource in the transaction and is processed as a local transaction. Commit records for two-phase commit (2PC) transactions are inserted in a table on the resource itself, and the result determines the success or failure of the prepare phase of the global transaction. This option offers some performance benefits and greater data safety than Emulate Two-Phase Commit, but it has some limitations.
Sunday, April 27, 2014
Weblogic AGL Transaction Affinity vs. Web Session Affinity
In the world of JEE Application servers the term of "sesssion affinity" denotes that within a cluster of servers,
requests from the same client always get routed back to the same server.
Web Session Affinity in Active Grid Link provides analogous functionality, eg. the session affinity policy is used to ensure that all the data base operations for a web session, including transactions, are directed to the same Oracle RAC instance of a RAC cluster. This mechanism is especially usefull because in some circumstances web applications (like shopping applications) have better performance when repeated operations against the same set of records are processed by the same RAC instance.
Applications typically use this type of affinity when:
Web Session Affinity is a kind of a Connection Affinity which was provided by Oracle RAC Database starting from version 11.1.0.6
Connection Affinity allows a connection pool to select connections that are directed at a specific database instance. The connection pool uses run-time connection load balancing (RCLB) to select an Oracle RAC instance to create the first connection and then subsequent connections are created with an affinity to the same instance.
WebLogic GridLink Data Sources supports:
The XA Affinity for global transactions ensures all the data base operations for a global transaction performed on an Oracle RAC cluster are directed to the same Oracle RAC instance. The affinity will be established based on the global transaction id, instead of by individual data source, to ensure that connections obtained from different data sources that are configured for the same RAC cluster are all associated with the same RAC instance.
This type of affinity should be used when:
Web Session Affinity in Active Grid Link provides analogous functionality, eg. the session affinity policy is used to ensure that all the data base operations for a web session, including transactions, are directed to the same Oracle RAC instance of a RAC cluster. This mechanism is especially usefull because in some circumstances web applications (like shopping applications) have better performance when repeated operations against the same set of records are processed by the same RAC instance.
Applications typically use this type of affinity when:
- short-lived affinity to an Oracle RAC instance is expected or
- if the cost (in terms of performance) of being redirected to a new Oracle RAC instance is minimal.
Web Session Affinity is a kind of a Connection Affinity which was provided by Oracle RAC Database starting from version 11.1.0.6
Connection Affinity allows a connection pool to select connections that are directed at a specific database instance. The connection pool uses run-time connection load balancing (RCLB) to select an Oracle RAC instance to create the first connection and then subsequent connections are created with an affinity to the same instance.
WebLogic GridLink Data Sources supports:
- Transaction-based Affinity,
- Web Session Affinity and
- Data Affinity
The XA Affinity for global transactions ensures all the data base operations for a global transaction performed on an Oracle RAC cluster are directed to the same Oracle RAC instance. The affinity will be established based on the global transaction id, instead of by individual data source, to ensure that connections obtained from different data sources that are configured for the same RAC cluster are all associated with the same RAC instance.
This type of affinity should be used when:
- the cost (in terms of performance) of being redirected to a new Oracle RAC instance is high (typically during the distributed transaction the cost of a connection redirection to a different Oracle RAC instance is significant) or
- long-lived affinity to Oracle RAC instance is desired
Friday, April 4, 2014
ADF XML Files
Oracle ADF documentation describes a lot of XML files used internally in each ADF application. As documentation says the files are used by applications to:
Model layer
ADF Model implements concepts that enable decoupling the user interface technology from the business service implementation: data controls and declarative bindings.
Data control layer
In the data controllayer we have the data control implementation files: entity and view object definitions, view links definitions, application module definition files. Generally speaking, it is a set of files visible in a typical ADF Model porject. These files, in conjunction with the
Data binding layer
In the each typical data aware view-controller project we can find a set of files responsible for "data binding" functionality:
- Specify the parameters, methods, and return values available to your application's Oracle ADF data control usages
- Create objects in the Oracle ADF binding context and define the runtime behavior of those objects
- Define configuration information about the UI components in JSF and ADF Faces
- Define application configuration information for the Java EE application server
Model layer
ADF Model implements concepts that enable decoupling the user interface technology from the business service implementation: data controls and declarative bindings.
Data control layer
In the data controllayer we have the data control implementation files: entity and view object definitions, view links definitions, application module definition files. Generally speaking, it is a set of files visible in a typical ADF Model porject. These files, in conjunction with the
bc4j.xcfg
file, provide the necessary information for the data control. Data binding layer
In the each typical data aware view-controller project we can find a set of files responsible for "data binding" functionality:
DataBindings.cpx
- one or more files. DataBinding.cpx defines the binding context for the entire application and provide the metadata from which the Oracle ADF binding objects are created at runtime. The file contains the page map, page definitions references and data control references, and thus maps individual pages to page definition files and declares which data controls are being used by the application.adfm.xml
: This file lists theDataBindings.cpx
files that are available in the current project.<pagename>PageDef.xml
: Page definition XML files. They associates web page UI components with data and data controls.
Thursday, April 3, 2014
Problem with ADF and IE11
A new browser version released by Microsoft is not supported by ADF and what is worse, ADF web pages are not rendered at all. When you run ADF webpage in IE11, you will see message box:
The problem is caused by ADF javascript layer, because in IE 11 the browser's User-Agent header has changed, and ADF no longer even recognizes the browser's product family. Additionally Oracle says, that "... internal testing has shown that there are many other changes in IE 11 that have an impact on ADF, and these all need to be evaluated before ADF can be certified for use with IE 11. Customers should bear in mind that, at this time, IE 11 has only recently been formally released, and the certification process takes some time."
To fix main part of problems with IE11 you should apply patch available on Oracle Support. The path is provided for JDeveloper/ADF 11.1.1.6.0, JDeveloper/ADF 11.1.1.7.0, JDeveloper/ADF 11.1.2.4.0 and JDeveloper/ADF 12.1.2.0.0.
Bellow I will show how to proceed with patch for ADF 11.1.1.7.0.
After you download zipped patch file run command line and go to unzipped path folder. By example:
Next you can start the first step of the path procedure:
The problem is caused by ADF javascript layer, because in IE 11 the browser's User-Agent header has changed, and ADF no longer even recognizes the browser's product family. Additionally Oracle says, that "... internal testing has shown that there are many other changes in IE 11 that have an impact on ADF, and these all need to be evaluated before ADF can be certified for use with IE 11. Customers should bear in mind that, at this time, IE 11 has only recently been formally released, and the certification process takes some time."
To fix main part of problems with IE11 you should apply patch available on Oracle Support. The path is provided for JDeveloper/ADF 11.1.1.6.0, JDeveloper/ADF 11.1.1.7.0, JDeveloper/ADF 11.1.2.4.0 and JDeveloper/ADF 12.1.2.0.0.
Bellow I will show how to proceed with patch for ADF 11.1.1.7.0.
After you download zipped patch file run command line and go to unzipped path folder. By example:
C:\Users\mariusz\Downloads\PATCH_TOP>cd 18277370
Next you can start the first step of the path procedure:
C:\Users\mariusz\Downloads\PATCH_TOP\18277370>cd ouiOK. Path succeded, and we can start the next step:
C:\Users\mariusz\Downloads\PATCH_TOP\18277370\oui>cd 18277370
C:\Users\mariusz\Downloads\PATCH_TOP\18277370\oui\18277370>C:\Oracle\Middleware7\oracle_common\OPatch\opatch apply -jdk c:\oracle\jdk
Invoking Standalone OPatch 11.1.0.0.0
Oracle Standalone Interim Patch Installer version 11.1.0.0.0
Copyright (c) 2007, Oracle Corporation. All rights reserved.
Oracle Home : C:\Oracle\Middleware7\oracle_common
Oracle Home Inventory : C:\Oracle\Middleware7\oracle_common\sainventory
OPatch version : 11.1.0.0.0
Product information : n/a
Log file location : C:\Oracle\Middleware7\oracle_common\cfgtoollogs\opatch\opatch2014-03-07_13-34-09PM.log
ApplySession applying interim patch '18277370' to OH 'C:\Oracle\Middleware7\oracle_common'
Running prerequisite checks...
OPatch finds no 'product.xml' in Oracle Home and will attempt to create 'product.xml' file.
Attempting to retrieve patch inventory's "product" and its "version" information...
Please enter your choice to enable OPatch to create 'product.xml' file or quit creation...
Choice Product Version
------ ------- -------
1 SA_JDEV 11.1.1.7.0
2. If you wish, quit 'product.xml' creation
Please enter [1-2]:
1
User Responded with: 1
OPatch will put the information of selected product 'SA_JDEV' and selected version '11.1.1.7.0'
in product.xml during inventory updation.
OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = 'C:\Oracle\Middleware7\oracle_common')
Is the local system ready for patching?
Do you want to proceed? [y|n]
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '18277370' for restore. This might take a while...
Backing up files affected by the patch '18277370' for rollback. This might take a while...
Patching component oracle.jrf.adfrt, 11.1.1.7.0...
Copying file to "C:\Oracle\Middleware7\oracle_common\modules\oracle.adf.view_11.1.1\adf-richclient-api-11.jar"
Copying file to "C:\Oracle\Middleware7\oracle_common\modules\oracle.adf.view_11.1.1\adf-richclient-automation-11.jar"
Copying file to "C:\Oracle\Middleware7\oracle_common\modules\oracle.adf.view_11.1.1\adf-richclient-impl-11.jar"
Copying file to "C:\Oracle\Middleware7\oracle_common\modules\oracle.adf.view_11.1.1\adf.oracle.domain.webapp.war"
Copying file to "C:\Oracle\Middleware7\oracle_common\modules\oracle.adf.view_11.1.1\dvt-faces.jar"
Copying file to "C:\Oracle\Middleware7\oracle_common\modules\oracle.adf.view_11.1.1\oracle-page-templates.jar"
Copying file to "C:\Oracle\Middleware7\oracle_common\modules\oracle.adf.view_11.1.1\trinidad-api.jar"
Copying file to "C:\Oracle\Middleware7\oracle_common\modules\oracle.adf.view_11.1.1\trinidad-impl.jar"
ApplySession adding interim patch '18277370' to inventory
Attempting to create/replace 'product.xml' as requested...
"C:\Oracle\Middleware7\oracle_common\product.xml" file under Oracle Home is successfully created.
Verifying the update...
Inventory check OK: Patch ID 18277370 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 18277370 are present in Oracle Home.
The local system has been patched and can be restarted.
OPatch succeeded.
C:\Users\mariusz\Downloads\PATCH_TOP\18277370\oui\18277370>set oracle_home=C:\Oracle\Middleware7\jdeveloper
C:\Users\mariusz\Downloads\PATCH_TOP\18277370\oui\18277370>cd ..
C:\Users\mariusz\Downloads\PATCH_TOP\18277370\oui>cd ..
C:\Users\mariusz\Downloads\PATCH_TOP\18277370>cd sa
C:\Users\mariusz\Downloads\PATCH_TOP\18277370\sa>cd 18277370
C:\Users\mariusz\Downloads\PATCH_TOP\18277370\sa\18277370>C:\Oracle\Middleware7\oracle_common\OPatch\opatch apply -jdk c:\oracle\jdk
Invoking Standalone OPatch 11.1.0.0.0
Oracle Standalone Interim Patch Installer version 11.1.0.0.0
Copyright (c) 2007, Oracle Corporation. All rights reserved.
Oracle Home : C:\Oracle\Middleware7\jdeveloper
Oracle Home Inventory : C:\Oracle\Middleware7\jdeveloper\sainventory
OPatch version : 11.1.0.0.0
Product information : n/a
Log file location : C:\Oracle\Middleware7\jdeveloper\cfgtoollogs\opatch\opatch2014-03-07_14-09-44PM.log
ApplySession applying interim patch '18277370' to OH 'C:\Oracle\Middleware7\jdeveloper'
Running prerequisite checks...
OPatch finds no 'product.xml' in Oracle Home and will attempt to create 'product.xml' file.
Attempting to retrieve patch inventory's "product" and its "version" information...
Please enter your choice to enable OPatch to create 'product.xml' file or quit creation...
Choice Product Version
------ ------- -------
1 SA_JDEV 11.1.1.7.0
2. If you wish, quit 'product.xml' creation
Please enter [1-2]:
1
User Responded with: 1
OPatch will put the information of selected product 'SA_JDEV' and selected version '11.1.1.7.0'
in product.xml during inventory updation.
OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = 'C:\Oracle\Middleware7\jdeveloper')
Is the local system ready for patching?
Do you want to proceed? [y|n]
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '18277370' for restore. This might take a while...
Backing up files affected by the patch '18277370' for rollback. This might take a while...
Patching component oracle.jdeveloper, 11.1.1.7.0...
Copying file to "C:\Oracle\Middleware7\jdeveloper\adfv\jlib\oracle-page-templates.jar"
Copying file to "C:\Oracle\Middleware7\jdeveloper\jlib\oracle-page-templates.jar"
ApplySession adding interim patch '18277370' to inventory
Attempting to create/replace 'product.xml' as requested...
"C:\Oracle\Middleware7\jdeveloper\product.xml" file under Oracle Home is successfully created.
Verifying the update...
Inventory check OK: Patch ID 18277370 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 18277370 are present in Oracle Home.
The local system has been patched and can be restarted.
OPatch succeeded.
C:\Users\mariusz\Downloads\PATCH_TOP\18277370\sa\18277370>
Tuesday, February 4, 2014
Glassfish: Secure Admin must be enabled to access the DAS remotely
Some times ago I wrote article about installation of Glassfish server 3.1.x on Debian.or Ubuntu. You can find this article here.
But in the fresh installation you can't run administration console from remote IP. If you try this, you will see an message: "Secure Admin must be enabled to access the DAS remotely".
To activate Secure Admin, you have to:
So you first need to run: asadmin change-admin-password and put the new password.
Then you can safely use the command again: asadmin enable-secure-admin
To complete the described procedure you need to restart the Glassfish server. Finally after this operation you can run Glassfish console. Usually, if you have not changed the default ports, the console is available at: https://your_flassfish_server_ip:4848 .
But in the fresh installation you can't run administration console from remote IP. If you try this, you will see an message: "Secure Admin must be enabled to access the DAS remotely".
To activate Secure Admin, you have to:
- start Glassfish server
- go to you Glassfish installation bin folder, by example: /home/glassfish/glassfish3/bin
- run asadmin enable-secure-admin
So you first need to run: asadmin change-admin-password and put the new password.
Then you can safely use the command again: asadmin enable-secure-admin
To complete the described procedure you need to restart the Glassfish server. Finally after this operation you can run Glassfish console. Usually, if you have not changed the default ports, the console is available at: https://your_flassfish_server_ip:4848 .
Thursday, January 16, 2014
VS: Web Publish raises an error: Could not connect to the remote computer, ... , ERROR_COULD_NOT_CONNECT_TO_REMOTESVC. The remote server returned an error: (403) Forbidden.
Above error was raised when we tried to deploy Web Application to a remote IIS server:
The detailed message was:
I tried to resolve an error as shown in IIS.net, but without any success. I gone through the link and checked all the points mentioned there. Both Web Management Service and Web Deployment Agent Service are running fine. In event log on remote server I don't found also any errors. Strange.
Finally I found verry simple (but why not documented) solution. To fix the problem you should go to IIS management console (on remote machine of course) and select appropriate host:
Next you should select Management Service, as shown above.
In management service form you should check "Enable remote connections" checkbox which is in default unchecked. Next restart IIS instance and voila, Web Deployment works.
The detailed message was:
I tried to resolve an error as shown in IIS.net, but without any success. I gone through the link and checked all the points mentioned there. Both Web Management Service and Web Deployment Agent Service are running fine. In event log on remote server I don't found also any errors. Strange.
Finally I found verry simple (but why not documented) solution. To fix the problem you should go to IIS management console (on remote machine of course) and select appropriate host:
Next you should select Management Service, as shown above.
In management service form you should check "Enable remote connections" checkbox which is in default unchecked. Next restart IIS instance and voila, Web Deployment works.
ADF: difference between Create and CreateInsert
Today I met a simple question: what difference exists between Create and CreateInsert operation?
Operation "Create" will create the record but not put it in the VO's recordset whereas operation "CreateInsert" will also create new, empty record and puts it in recordset.
There is a practical effect of described difference. Create Insert should be used to insert new record to af:table, because when you use Create instead, record will be created but not shown in the table. With adf forms you can use Create or CreateInsert.
Operation "Create" will create the record but not put it in the VO's recordset whereas operation "CreateInsert" will also create new, empty record and puts it in recordset.
There is a practical effect of described difference. Create Insert should be used to insert new record to af:table, because when you use Create instead, record will be created but not shown in the table. With adf forms you can use Create or CreateInsert.
Subscribe to:
Posts (Atom)