Monday, June 24, 2013

BMP stale workflow messages

We were facing two issues regarding the re-deployment of BPM applications

Issue 1 :
BPM application got undeployed messages become stale .What to do to recover the stale messages ?
There is no standard oracle way of recovering the active messages. Only thing we can help ourself from this situation is to take regular backups. Need to make sure the backups are taken before a deploy/undeploy activity to recover the active messages if required in future

Issue 2 :
How to move the midtier to some other servers. It can be due to some hardware issue or something else we may need to move our weblogic server to some other server .

Install the mid tier and point to the old database. Make sure regular backups are taken in the db side. Also once we point to the new instances we can do a re-deploy of the composite application from there.

Monday, June 17, 2013

SQL to find Oracle SID

select sys_context('userenv','db_name') s_id from dual;

Similar queries to get SID.

select * from v$database;
select ora_database_name from dual;
select * from global_name;

Sunday, June 16, 2013

SSL client on Jdeveloper


If we want to access a URL which is ssl protected either through a java.net.URL or using a webservice client we need to have the trusted keystore location to communicate.

When we got a ssl certificate we need to import the certificate to the keystore

D:\Middleware\JDev11gR1PS4\jdk160_24\jre\bin>keytool -list -keystore D:\Middlewa
re\JDev11gR1PS4\jdk160_24\jre\lib\security\cacerts


Adding the trusted key into the keystore.

D:\Middleware\JDev11gR1PS4\jdk160_24\jre\bin>keytool -keystore D:\Middleware\JDe
v11gR1PS4\jdk160_24\jre\lib\security\cacerts -alias mycert

D:\Middleware\JDev11gR1PS4\jdk160_24\jre\bin>keytool -delete D:\Middleware\JDe
v11gR1PS4\jdk160_24\jre\lib\security\cacerts -alias mycert

The default password is "changeit" .keytool -help will give list of options available.

Write a Java program with main method as :

    public static void main(String[] args) {
        URL url;


        try {
            url = new URL("https://test.test.com/test");
       
                BufferedReader in =
                    new BufferedReader(new InputStreamReader(url.openConnection().getInputStream()));
                String urlString = "";
                String current;
                while ((current = in.readLine()) != null) {
                    urlString += current;
                }
                System.out.println(urlString);
        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

From the tools> Preference >Credential , points to the keystore location.


Run the java programe to connect to the https:// url.

If you want to use a seperate keystore other than JDK keystore, Copy the cacerts to some different location. Import the key as above.


Wednesday, June 12, 2013

Exception in thread "main" java.lang.InternalError: Can't connect to X11 window

Running RCU to install Oracle BI 11g . Getting the following exception

[svraman@adc2201664 bin]$ sudo ./rcu
Password:
Xlib: connection to ":1.0" refused by server
Xlib: No protocol specified

Exception in thread "main" java.lang.InternalError: Can't connect to X11 window
server using ':1.0' as the value of the DISPLAY variable.
        at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
        at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java
:52)
        at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:1

Solution:

[svraman@adc2201664 bin]$ echo $DISPLAY
[svraman@adc2201664 bin]$ 1.0

[svraman@adc2201664 bin]$ setenv DISPLAY adc2201664:1

I have used the vncserver to connect to the remote m/c.

[svraman@adc2201664 bin]$ xhost +
access control disabled, clients can connect from any host

[svraman@adc2201664 bin]$ sudo ./rcu