Pages

Tuesday, December 27, 2011

Logging.xml file got overwritten after managed server restarted

After installing and configuring WebCenter Cluster (admin server and all the managed servers are in seperate boxs), I tried to set custom webcenter application logging configurations to all the managed servers in cluster by manually adding logging settings into $DOMAIN_NAME/config/fmwconfig/servers//logging.xml file.

As expected, the log files defined in that file should be generated automatically after accessing the custom application. But to my surprise the logging.xml file got overwritten (to the original one) right after the managed server restarted.

Finally found the solution in support.oracle.com under support id 1335539.1. This issue shows up when admin server is in box1 and managed server is in box2.
The solution is simple. Just modify the logging.xml file of box1 (admin server) and restart other managed servers. The change will propagate to other Boxs where those managed servers are running.

Wednesday, November 30, 2011

oracle.jbo.RowInconsistentException: JBO-25014: Another user has changed the row with primary key oracle.jbo.Key

public void lock() {


try {

super.lock();

} catch (RowInconsistentException e) {

refresh(REFRESH_WITH_DB_ONLY_IF_UNCHANGED
REFRESH_CONTAINEES);

super.lock();

}

}

What does that do? Well, it should do nothing. REFRESH_WITH_DB_ONLY_IF_UNCHANGED is a flag telling refresh() to update the row with the current value only if it’s unchanged. And REFRESH_CONTAINEES is a flag saying to refresh all composed entities, with any other flags passed down to them. So, what is it doing? It’s refreshing this entity if it’s unchanged, and then refreshing all composed entities if they’re unchanged. But an unchanged entity shouldn’t be the cause of a consistency problem, so this shouldn’t fix anything.



http://www.avromroyfaderman.com/2008/05/bring-back-the-hobgoblin-dealing-with-rowinconsistentexception/

Tuesday, November 29, 2011

OUI-10136: An Oracle Home with name OH1241764777 already exists at location

When installing OHS in the machine, which has also installed WLS, webcenter, SOA and UCM etc, it reported the below error during installation:

OUI-10136: An Oracle Home with name OH1241764777 already exists at location


Cause:

As we has also installed WLS, WC, SOA etc before, oraInventory folder exists in /u01 directory, which recorded the Oracle Home information when installing other products before.

Solution:

Remove or rename this folder name, and do it again. It should succeed to install it.

Friday, November 25, 2011

Get files from ADF web application in Java classes

./adf

throw warning when opening pages.xml in webcenter application

When opening pages.xml in our custom webcenter application to edit the security access, there is an error msg shown on message log board:

Nov 25, 2011 5:13:04 PM oracle.jps.credstore


WARNING: Opening of wallet based credential store failed. Reason java.io.IOException: PKI-02002: Unable to open the wallet. Check password.

And even pages.xml can open, but the security shows nothing there.
 
Cause:
 
There is a cwallet.sso file under src\META-INF folder. please check this file is valid or not.
 

 
Solution:
 
As we have source control of project source codes, reverse to the right version, and it works properly.

Monday, November 21, 2011

Changing hostname/IP for Weblogic 11g

Lest I forget !: Changing hostname/IP for Weblogic 11g: Recently I had to migrate two VMs hosting SOA/WebCenter 11g respectively from our US centers to India centers. This involved change in the ...

Friday, November 11, 2011

Java code in jsp source files is not allowed in ojsp

Applies to:


Oracle JDeveloper - Version: 11.1.1.1.x

Symptoms

Your application includes a JSP page with scriptlets like the following:














This page runs correctly in JDeveloper 11.1.1.0

After having migrated to JDeveloper 11.1.1.2.0, running the page fails with the following error:

Java code in jsp source files is not allowed in ojsp.next mode.



You see the following error displayed in the page:



"JSP scriptlets will not work properly if using OJSP".

Changes

You upgraded from JDeveloper 11.1.1.0.x to 11.1.1.1.x

It was working correctly in JDev 11.1.1.0.x



Cause

The deployment descriptor file weblogic-application.xml is automatically updated '(for performance reasons) with the following lines:



oracle.jsp.next

under one of these conditions:



•you use MDS (Metadata Services), that you set up with the option

"Enable user customizations" in "ADF View" in the "Project Properties"

•or you use WebCenter (that automatically turns on the aforementioned option)



•or you use the ADF Library Filter ("ADFLibraryFilter") for your JSP page.



OJSP does not support scriptlets in its 'next' mode,



Solution

You need to either adapt your code to remove the scriptlets in your JSP page (that's the only option

if you use WebCenter that forcibly sets that option),



or you can use the following Java option to disable OJSP:



-Dadfvdt.disableOjspDeployment=true

You can add this option -Dadfvdt.disableOjspDeployment=true in your file "ide.conf" in the directory "\jdeveloper\ide\bin".

Alternatively, you can start up JDeveloper with that parameter:



\jdeveloper\jdev\bin\jdev.exe -J-Dadfvdt.disableOjspDeployment=true

For your Production environment, you can have your Managed WLS ignoring the OJSP mode by adding the Java Option -Dadfvdt.disableOjspDeployment=true



•in the "startManagedWebLogic" (if you want to limit it to a specific Managed Server)



•or "setDomainEnv" (for all managed servers in a domain).





Monday, October 31, 2011

Failed to connect SVN server in JDeveloper

when developing ADF web based application, our dev team uses SVN to control the source codes of the project.

We have configured to connect SVN server in JDeveloper successfully.  And able to check in, out files succesfully as well.

But each time when opening JDeveloper, or working inside, it has always to pop up a window as below to say svn authentication error:



Here is the document described how to solve this issue on Oracle Support:

Jdeveloper Fails To Connect With Subversion Using NTLM Authentication [ID 1296116.1]

Applies to:
Oracle JDeveloper - Version: 11.1.1.3.0 and later [Release: and later ]
Information in this document applies to any platform.

Symptoms:
Access problems using NTLM auth with JDeveloper's built-in Subversion support (SVNKit)

Cause:
Problems in the SVNKit library for NTLM support.
Problems reported in SVNKit's bug tracker http://svnkit.com/tracker/view.php?id=367

that's logged for the same SVNKit JDeveloper carries (1.3.0).

Solution:
Install a binary subversion client as JDeveloper's subversion backend.

The documentation in JDeveloper's Help to do this (Setting Up Subversion for Use with JDeveloper, Installing Subversion software) is slightly outdated, so at the time this note was written, this is a more accurate procedure:

1.Go to subversion's Win32 binary archive website and download a client version appropriate to the server version being used for example http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=11151&expandFolder=11151&folderID=11151 for the 1.6.x series.

2.Download svn-win32-1.6.x_javahl.zip that is the JavaHL files for that same version of SVN client downloaded in Step 1

3.Extract the svn-win32-1.6.x.zip to c:\subversion, and added C:\subversion\bin to the system path, checked that "svn" is working from the Command Prompt.

4.Extract libsvnjavahl-1.dll from svn-win32-1.6.x_javahl.zip to c:\subversion\bin

5.Extract svnjavahl.jar from svn-win32-1.6.x_javahl.zip to \jdeveloper\jdev\extensions\oracle.jdeveloper.subversion to make sure the JavaHL jar is from the same subversion version.

6.Start JDeveloper, menu Tools -> Preferences->Versioning, change option from "SVNKit/1.3.0 with JNA Disabled" to "Native Client" and Click OK. The JDeveloper versioning system should now be using native client instead of the built-in SVNKit.








Monday, September 19, 2011

Procedure to kill database session

应用用户用如下procedure kill session:
SQL> connect

Enter password:

Connected.

假设有TEST用户,
SQL> select sid,serial# from v$session where username='TEST';

SID SERIAL#

---------- ----------

401 209

SQL> execute kill_session(401,209);


PL/SQL procedure successfully completed.


SQL>

SQL> select sid,serial#,status from v$session where username='TEST';



SID SERIAL# STATUS

---------- ---------- --------

401 209 KILLED



SQL> /
no rows selected

如果提示没有数据,说明需要Kill的session不存在没有找到

SQL> execute kill_session(463,81);

BEGIN kill_session(463,81); END;
*

ERROR at line 1:

ORA-01403: no data found

ORA-06512: at "SYS.KILL_SESSION", line 7

ORA-06512: at line 1

Sunday, September 18, 2011

LDAP DN: CN, OU and DC

CN, OU, DC 都是 LDAP 连接服务器的端字符串中的区别名称(DN, distinguished name)

LDAP连接服务器的连接字串格式为:ldap://servername/DN


其中DN有三个属性,分别是CN, OU, DC

LDAP是一种通讯协议,如同HTTP是一种协议一样的!

在 LDAP 目录中,

DC (Domain Component)

CN (Common Name)

OU (Organizational Unit)

LDAP 目录类似于文件系统目录。

下列目录:

DC=gc,DC=asia,DC=microsoft,DC=com

如果我们类比文件系统的话,可被看作如下文件路径:

Com\Microsoft\asia\gc


例如:CN=test,OU=users,DC=domainname,DC=com

在上面的代码中 cn=test 可能代表一个用户名,ou=users代表一个 active directory 中的组织单位。这句话的含义可能就是说明 test 这个对象处在domainname.com 域的 developer 组织单元中。

Wednesday, September 7, 2011

HostnameVerifier 'oracle.jdevimpl.webservices.tcpmonitor.config.AnalyzerConfiguration$1CustomHostnameVerifier'

We have called a secured web service on SSL in our demo, which is deployed on weblogic server ansd this server is configured to one way secure on SSL .  Then we tried to call this web service by creating a web service proxy.

But when running this proxy, it threw the below error:

HostnameVerifier 'oracle.jdevimpl.webservices.tcpmonitor.config.AnalyzerConfiguration$1CustomHostnameVerifier'

By default weblogic has hostname verification enabled. This means when you are invoking a https URL , the CN name in the ssl server certificate should match with the hostname part of the url

Then we found we were using IP address to access this web service, which is not matched to the domain name used to create the SSL certificates as well.  After that we can access it successfully.

If this is a dev environment you can try disabling hostname verification in Server --> SSL --> Advanced. In production it is recommended to always turn on hostname verification.

Friday, September 2, 2011

Testing web service on SSL in JDeveloper

If you are going to test a web service on SSL in JDeveloper by creating web service proxy, you might get an error saying that no WSDL document found at this location when creating the web service proxy:





There are two approaches to solve this problem:


(1) Access that web service WSDL on SSL in browser, and then save it to local disk.

In the step 3 of creating web service proxy above, click Browse... to pick up that local WSDL file saved.

Then it will be able to go to next step to generate the proxy for this web service.


(2) Using Non-SSL web service WSDL in step 3 above as WSDL Document URL, and then in the proxy wizard, giving the endpoint as the https port.

This will let you create the proxy and you will be hitting the ssl port only in your client call.

Monday, August 29, 2011

java.lang.ClassNotFoundException: oracle.adf.model.servlet.ADFBindingFilter

When deploying an ADF web application after development in JDeveloper, you might see the below errors on the console:

[01:58:13 PM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application WorkItemTaskFlow_ViewController_webapp1 on AdminServer.: Failed to load webapp: 'WorkItemTaskFlow_ViewController_webapp1.war'.
[01:58:13 PM] Weblogic Server Exception: weblogic.application.ModuleException: Failed to load webapp: 'WorkItemTaskFlow_ViewController_webapp1.war'
[01:58:13 PM] Caused by: java.lang.ClassNotFoundException: oracle.adf.model.servlet.ADFBindingFilter

Reason:
The above error will be thrown if deploying it by right-clicking web project.




Solution:

It can be fixed by right-click application and select Deploy, e.g.:



Friday, July 29, 2011

ORABPEL-30515 error thrown when deploying BPM process

This week, i have installed Oracle SOA, UCM, and WebCenter of latest version PS4. And then create a domain and servers for all of them.

When deploying BPM process to SOA server, it throws an error of ORACLE-30515, which looks like below:
Even throwing this error, the BPM process can be deployed successfully according to deployment message, but this process can't be found in the BPM workspace. So it is unable to initiate it.

Cause: SOA, UCM and WC will overwrite system-jazn-data.xml file separately under domain during starting their corresponding servers.

So here is the solution:

Open %DOMAIN_HOME%/config/fmwconfig/system-jazn-data.xml file, and add the following parts into it:


<grant>
    <grantee>
        <codesource>
            <url>file:${soa.oracle.home}/soa/modules/oracle.soa.workflow_11.1.1/bpm-services.jar
            </url>
        </codesource>
    </grantee>
    <permissions>
        <permission>
            <class>oracle.security.jps.JpsPermission</class>
            <name>VerificationService.createInternalWorkflowContext</name>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=APPLICATION, name=*</name>
            <actions>getApplicationPolicy</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=SYSTEM, name=*</name>
            <actions>getConfiguredApplications</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=SYSTEM, name=*</name>
            <actions>getSystemPolicy</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.credstore.CredentialAccessPermission
            </class>
            <name>context=SYSTEM, mapName=BPM-SERVICES, keyName=BPM-SERVICES
            </name>
            <actions>read</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.credstore.CredentialAccessPermission
            </class>
            <name>context=SYSTEM, mapName=BPM-CRYPTO, keyName=BPM-CRYPTO</name>
            <actions>read,write</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.JpsPermission</class>
            <name>IdentityAssertion</name>
            <actions>*</actions>
        </permission>
        <permission>
            <class>java.security.AllPermission</class>
        </permission>
    </permissions>
</grant>
<grant>
    <grantee>
        <codesource>
            <url>file:${ucm.oracle.home}/soa/modules/oracle.soa.workflow_11.1.1/bpm-services.jar
            </url>
        </codesource>
    </grantee>
    <permissions>
        <permission>
            <class>oracle.security.jps.JpsPermission</class>
            <name>VerificationService.createInternalWorkflowContext</name>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=APPLICATION, name=*</name>
            <actions>getApplicationPolicy</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=SYSTEM, name=*</name>
            <actions>getConfiguredApplications</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=SYSTEM, name=*</name>
            <actions>getSystemPolicy</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.credstore.CredentialAccessPermission
            </class>
            <name>context=SYSTEM, mapName=BPM-SERVICES, keyName=BPM-SERVICES
            </name>
            <actions>read</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.credstore.CredentialAccessPermission
            </class>
            <name>context=SYSTEM, mapName=BPM-CRYPTO, keyName=BPM-CRYPTO</name>
            <actions>read,write</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.JpsPermission</class>
            <name>IdentityAssertion</name>
            <actions>*</actions>
        </permission>
        <permission>
            <class>java.security.AllPermission</class>
        </permission>
    </permissions>
</grant>
<grant>
    <grantee>
        <codesource>
            <url>file:${wc.oracle.home}/soa/modules/oracle.soa.workflow_11.1.1/bpm-services.jar
            </url>
        </codesource>
    </grantee>
    <permissions>
        <permission>
            <class>oracle.security.jps.JpsPermission</class>
            <name>VerificationService.createInternalWorkflowContext</name>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=APPLICATION, name=*</name>
            <actions>getApplicationPolicy</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=SYSTEM, name=*</name>
            <actions>getConfiguredApplications</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.policystore.PolicyStoreAccessPermission
            </class>
            <name>context=SYSTEM, name=*</name>
            <actions>getSystemPolicy</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.credstore.CredentialAccessPermission
            </class>
            <name>context=SYSTEM, mapName=BPM-SERVICES, keyName=BPM-SERVICES
            </name>
            <actions>read</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.service.credstore.CredentialAccessPermission
            </class>
            <name>context=SYSTEM, mapName=BPM-CRYPTO, keyName=BPM-CRYPTO</name>
            <actions>read,write</actions>
        </permission>
        <permission>
            <class>oracle.security.jps.JpsPermission</class>
            <name>IdentityAssertion</name>
            <actions>*</actions>
        </permission>
        <permission>
            <class>java.security.AllPermission</class>
        </permission>
    </permissions>
</grant>

After saving this file, restart servers.

Note: before modifying this file, please make a copy of it.

Tuesday, July 26, 2011

java.lang.ClassNotFoundException: oracle.bpel.services.workflow.WorkflowException


When deploying or running an ADF application with BPM functions, it might throw the error as below:


java.lang.NoClassDefFoundError: oracle/bpel/services/workflow/WorkflowException

Here is the solution for it:

In your ADF project, open weblogic-application.xml in Application Resources Palette and add the below lines:

<library-ref>
	<library-name>oracle.soa.workflow.wc</library-name>
</library-ref>


Which looks like the below:


Monday, July 18, 2011

Changing DefaultServer's Password running in JDeveloper

After you have changed the default password "weblogic1" through the WebLogic Console, you hamve to restart the server running in JDev again to use this new password.

Before restarting the default server in JDev, you will have to follow the below two actions to make it run it properly again.

1. Change the password in boot.properties

Locate C:\Users\\AppData\Roaming\JDeveloper\system11.1.1.5.37.60.13\DefaultDomain\servers\DefaultServer\security folder, open and edit the password in boot.properties. You can use the inencrpyted text for both user name and password.

For example: changing the password to welcome1

#Mon Jul 18 16:00:02 CST 2011
password=welcome1
username=weblogic

Save the file and close it.

2. Open JDev, in the right side of it, expand Resource Palette -> IDE Connections -> Application Server, and then right-click IntegratedWebLogicServer, and choose Properties.


A new window pops up, switch to Authentication tab, and update the password there.

After all is done, restart the Default Server. It should be started up properly.