Wednesday, June 17, 2009

Enterprise Manager/Application Server control is not coming up/ reachable after installing Oracle SOA Suite 10131

After installing the Oracle SOA Server 10131, When you click on the Application Control url you will hit with 404 page cannot be found exception.

Application Server Control has no routing relationship with the Oracle HTTP Server by default. We have to make that relationship.
To do the modification you have to edit the "default-web-site.xml" file with the below change.

The file is located in the below location with in the server.
\j2ee\home\config\default-web-site.xml

make the ohs-routing="true", by default this will be set to "false".



Bounce the server and try to launch the enterprise manager then try to login.

If the above solution is not working then try to change an entry in the server.xml file which is located in the same location.

The file is located in the below location with in the server.
\j2ee\home\config\server.xml


In the file change the below property to true and bounce the server.

application name="ascontrol" path="../../home/applications/ascontrol.ear" parent="system" start="true" /




Now try launching the enterprise manager and login to the server. You should be able to see the AS control page now.

Tuesday, June 16, 2009

Sending Email using Telnet / How to check email server

While working with Oracle SOA, for every project we may need to configure the SMTP set up with the oracle SOA Server.
You have the SMTP server information with you, how to make sure the mail server is working fine.

So we can run a simple test to make sure the mail server is working fine. Please try the below steps.

1. Open a command prompt and enter as below to connect to mail server using telnet.
telnet mailserverdomain 25 ( 25 is the default port number)

You may receive a response from the mail server as below

220 mailserverdomain Microsoft Exchange Internet Mail Connector

2. Say hello to the server.

HELO mailserverdomain [You may get the response as below ]
250 mailserverdomain Hello mailserverdomain, pleased to meet you

3. MAIL FROM:yourmail@domain.com
250 2.1.0 Sender OK

The from address should be informed to the mail server.
4. RCPT TO: yourmail@domain.com

250 2.1.5 Recipient ok
The Recipient address should be informed to the mail server.
5. DATA
This command tells the server that we are going to send data from now on.
DATA
354 Enter mail, end with "." on a line by itself
6. SUBJECT: THIS MAIL IS SENT USING TELNET [This line is used to set the subject line for the mail]
SUBJECT: THIS MAIL IS SENT USING TELNET
Hit the enter key 2 times.
7. Then start your body part message for the mail. Once you entered the message for the body part terminate with a period.
THIS IS THE BODY MESSAGE
.
250 2.6.0 Message accepted for delivery
8. To come out of the telnet connection enter the "QUIT" keyword.
221 2.0.0 acsmt358.oracle.com Closing connection

This will terminate the telnet session. Watch your mail box for the mail that you just sent from telnet.

I hope the above post is useful. Please leave your comments to improve the post and for my learning if there is any mistake.

Tuesday, May 26, 2009

How to add an external XSD file to a BPEL project

Create a BPEL Project, then add the external XSD to your bpel project, inside the bpel folder. Open the bpel file in jdeveloper,
Then in the structure window travel to the messages folder.
By default you can see 2 messages one for request and another for response. If you want to use the custom xsd to the request message type.
Edit the request type to map to the external XSD node. Then refresh the strucure window.
Sometimes the structure window won't get refreshed, in that case you can relaunch the bpel process. This will load the current messages to the structure window.

Messages can be mapped to a element or type based on the struture of the XSDs.
If the node that you are mapping to the message type is element map it as element or if it is type ie.., complex type,
map it as message type otherwise there will be type mismatch and compilation error will be thrown. Once you done mapping to the custom xsd, you can check that in the
structure window.

Monday, January 19, 2009

How to use Logical path with File Adapter in BPEL

I used file adapter in one of my projects and i thought will share some useful information that you can use.

Logical Path : BPEL supports the Logical and Physical path. Physical path is nothing but complete path. Logical path will be a relative path.

For defining the logical path you can start with . which denotes the current folder. By default current folder is /somefolder/app/oracle/product/soa/j2ee in oc4j container.

We need to mention this configuration in the bpel.xml file. like below.

{property name="oc4j_soa" type="LogicalDirectory"} ./../../arrowlogs/soa {property}
replace { with < and } with >

Thursday, January 08, 2009

javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: Not authorized;

Issue:
======
I have kept my AQ Connection in ESB, so the esb will read the queue and a BPEL will do all the orchestration and another ESB, which will have all the
DB Connections for the insert statements.

Once the AQ adapter is created in ESB, we are able to read the message from the queue and we need to pass to the bpel process. we have made the
input variable as the incoming message type. We deployed the esb and bpel processes. when we try to run, we faced with a challenge.

The esb is not able to pass the xml from esb to bpel even though we have the same message type.

Exception:
=========
Authentication failure:javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: Not authorized;
nested exception is: javax.naming.AuthenticationException: Not authorized


Resolution:
===========
When you install the oracle soa, we need to provide the user credentials. There is a file inside the soa which stores this information.
${soa_home}/bpel/utilities/ant-orabpel.properties. If you have any custom password then we need to replace the password with your custom.
By default the password will be "welcome1". You need to replace the password with your own password, then only you can communicate between the ESB and the BPEL
Projects.

If a bpel fails to create any instance you can take a look at the "View Process Log", its a worth try.

Click on this link "View Process Log" to get the failed bpel information.

In one of my project i was working with AQ, when we try to move the code from DEV to TEST, we were hit with this issue.
We have every thing in place, we have created AQ and we have created the required DataSource and when we push message to the AQ.
The BPEL is not picking up the AQ Message, we checked each and every thing that we could.

We looked at all the logs from the server and we couldnt identify the issue. Then i clicked on the view process log. We got the below exception.

"ORA-06550: line 1, column 7: PLS-00201: identifier 'DBMS_AQIN' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored"

Basically we dont have the permission to dequeue, because of the above permission is not there for that user. Once we granted for this user. we were able to
goahead with our testing.

How to append content to a file while using file adapter in bpel

Modify the fileadapter wsdl with append="true" in the jca tag.
This will append the messages comes into the file.

jca:operation
LogicalDirectory="oc4j_soa"
InteractionSpec="oracle.tip.adapter.file.outbound.FileInteractionSpec"
FileNamingConvention="arrow_SW_IN_ORDER_CONTROLLER_OC4J_soa.log"
OpaqueSchema="false"
Append="true"

Tuesday, November 11, 2008

Weblogic "java.lang.OutOfMemoryError"

Oracle SOA on Weblogic

You will get to see this kind of exception, when you run Oracle BPELPM on weblogic server.

If you get "java.lang.OutOfMemoryError:" when you try to launch the BPEL Console page from OracleBPELServer domain.
You can find the fix below.

If you get this exception from your log file (oracleBPELServer.out) under your domain. Then do the following to fix this issue.

1. Navigate to the Weblogic Admin console.
2. Click on the server tab on your left side.
3. Click on your instance - domain
4. Click on the Server start, you can see this tab when the Configuration link is selected.
5. Please set values for those empty fields.
a. Java_home:
b. Java Vendor:
c. Bea Home:
d. Root Directory: root directory of the bpel domain.
6. Then in the "Arguments:" field you have to add the following. prefix the entry with the below value and add a space after adding the string.

-Xms128m -Xmx256m -XX:MaxPermSize=512m

7. Then restart the oracleBPELServer using the admin console.

8. Then you can launch your BPEL Console. It should come up.

NOTE: The arguments that you include in the console is specific to the domain and if you try modifying the arguments in the setEnv.cmd file,
it will be for the Admin Server. Keep this point in mind.

If my entry is wrong, please put your comment.

"Authentication denied: Boot identity not valid; "

This post is for WEBLOGIC Server Issue.

If you hit with this exception while launching your weblogic server the below are the fix you can try.

1. Launch the Admin console.
2. Click on the domain.
3. Click on the general tab.
4. Click on the Server start
5. In the Arguments property serach for the proxy entries and keep the values for those proxy entries as empty values.

Because the server is trying with the proxy and if there is some problem with the proxy it throws the Boot Identity not valid error.

Remove the proxy information from the arguments. Make the -Dhttp.proxySet=false as false. by default it will be "true".

Then restart the domain.

Hope your domain will come up.

If you still have problem, plz detail your exception.

Wednesday, October 22, 2008

"URI is not hierarchical Error"

One of my colleague was hit with this issue and helped him to resolve.

Check the following to fix this issue.

a. Check the path of your jdevleoper and your project names.
The path of the jdeveloper should not have spaces between then like the example given below.
"c:\Program Files\Jdeveloper\jdev"
or Your project name should not have something like "SOA Samples"
This will create project while deploying the bpel projects.

b. WSDL with multiple namespaces using RPC/Literal didn't work on JDeveloper version 10.1.3.2, but works with 10.1.3.1

Same namespaces may have multiple prefixes in partner link wsdl or wsdls.


Please check on this.

You should be able to fix the issue.

Thursday, October 16, 2008

How to get the last row of a table

To get the last row of a table we need to run the below query.

With Table Column:

SELECT * FROM table_name WHERE column_name =
(
SELECT max(column_name)
FROM table_name );

Without using table column:

select * from table_name where rowid=(select max(rowid) from table_name);

Friday, October 10, 2008

Exception in JDBC Java client : "java.sql.SQLException: ORA-01410: invalid ROWID"

I was facing an issue with JDBC Java client which pulls the data from a function in Oracle Database. Whenever i try to get the value , i get exception saying
"java.sql.SQLException: ORA-01410: invalid ROWID",

Then did a small change in the JDBC java client, then was able to fix this issue.
The change that i made on the connection object is as below.
After getting the connection object using the driver manager i made the auto commit option as "False". By doing this i was able to get the value from the database with out any issue.

DriverManager.registerDriver(new OracleDriver());
//Establishing the connection
oracleConnection =
DriverManager.getConnection(thinConn, userName, password);
oracleConnection.setAutoCommit(false);

Tuesday, August 19, 2008

How to use the TCP Monitor

Whats the use of TCP Monitor : Think about you have created all the BPEL Processes with hostname as localhost and then you want to deploy from different machine. If you try to make use of jdeveloper
to deploy, jdev will complain that the localhost is not the actual path. In case if you are not having any soa suite in your machine and you dint deploy to your local soa suite.

Inorder to bypass this issue, you can use the TCP Monitor, which will route to the server

Where you can find the TCP Monitor:Its available with the bpel bin folder,
C:\product\10.1.3.1\OracleAS_2\bpel\bin\obtunnel.bat

What need to mention in the TCP Monitor:
You just need to mention the routing hostname, port number.
Then you can deploy to the server with out doing any modification to the code.

Screenshot of TCP Monitor:

How to get the version of Oracle Database

1. Run the command in your sql window.

select * from v$version where banner like 'Oracle%';

2. When you login using SQLPlus, you will get to see the sql version first then the database version that you are logging in.

Thursday, August 07, 2008

"weblogic.rjvm.PeerGoneException: ; nested exception is: weblogic.utils.NestedException: java.lang.NoClassDefFoundError: com/bea/xml/XmlException"

I was trying to create a connection with datasource lying in weblogic 9.2 from Oracle Jdeveloper Studio Version 10.1.3.3.

To create a application connection and integration connection with Oracle Jdeveloper we have to copy the "weblogic.jar" file from the "c:\bea\weblogic92\server\lib" folder to
Oracle Jdeveloper "D:\JDevstudio10133\jdk\jre\lib\ext" folder.
This setup will work for creating application connection and integration connection with oracle Jdeveloper. But when i run a java client which calls the datasource it is failing and throwing following error message.


"weblogic.rjvm.PeerGoneException: ; nested exception is:
weblogic.utils.NestedException: java.lang.NoClassDefFoundError: com/bea/xml/XmlException
",

I dropped all the below jar files into the "D:\JDevstudio10133\jdk\jre\lib\ext" location and added these jar file into the project libraries.
Then i tried to run the java client and it worked. The java code is pasted below.

ojdbc14.jar
xbean.jar
xmlx.jar
xqrl.jar
wlxbean.jar
weblogic.jar

public class JavaClient {
public JavaClient()
{
}

public void getDataSourceConnection()
{
Context ctx = null;
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
DataSource ds = null;
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL,"t3://hostname:9700");

try
{
ctx = new InitialContext(ht);
ds = (javax.sql.DataSource) ctx.lookup ("jdbc/BPELServerDataSource");
conn = ds.getConnection();

stmt = conn.createStatement();
stmt.execute("select * from domain");
rs = stmt.getResultSet();

while(rs.next())
{
System.out.println("The value of the domain id column is ==>"+rs.getString(1));
}
}
catch (Exception e)
{
System.out.println("Exception is: " + e.getMessage());
e.printStackTrace();
}
finally
{
try
{
ctx.close();
if (rs != null) rs.close();
if (stmt != null) stmt.close();
if (conn != null) conn.close();
} catch (Exception e)
{
System.out.println("Exception ==>"+e);
}
}
}

public static void main(String[] args) {
JavaClient jc = new JavaClient();
jc.getDataSourceConnection();
}
}

Please reply with your comment, if you are facing any issues.

How to create outbound connection pooling using datasource in weblogic server 9.2

Creating outbound connection pooling using the web console is not allowing to create and it defaults to the local instances.
So there is a workaround to do this, You can create the outbound connection pooling by editing the weblogic-ra.xml file.
weblogic-ra.xml file is the one, which holds all the eis connections. By default it has some examples, so we can copy and paste the existing connection information and edit for your use.
You can find the weblogic-ra.xml file under the following path
"C:\bea\user_projects\apps\bpelApps\DbAdapter\META-INF\weblogic-ra.xml"

After modifying the content, you need to restart the server. Stop the oracleBPELServer, Admin Server and nodemanager. Then bring all three up.
Test the outbound connection pooling that we created by navigating to outbound connection pooling page, the path for is as follows.

1. Click on the "Environmen" in the Domain Structure
2. Click on the Servers link.
3. Click on the "OracleBPELServer" link on the summary of server, available on the righside window.
4. Click on the "Deployments" tab.
5. Click on the "DbAdapter" from the list of Applications and Modules Deployed to this Server
6. Click on the "Configuration" tab
7. Click on the "Outbound Connection Pools" sub tab.
8. Expand the "javax.resource.cci.ConnectionFactory" available in the Outbound Connection Pool Configuration Table
9. Click on the "Testing" tab.
10. Check your Outbound Connection Pool and hit the "Test" button. You will get the result in the TestResult column.

If the result is success then the outbound connection is established, if it throws error, you need to go and check the xml tags in weblogic-ra.xml file.

Wednesday, July 23, 2008

'weblogic.kernel.Default (self-tuning)'" java.lang.OutOfMemoryError: PermGen space"

You will get to see this kind of exception, when you run Oracle BPELPM on weblogic server.

Entire line of the exception is as below.
Exception in thread "[ACTIVE] ExecuteThread: '19' for queue: 'weblogic.kernel.Default (self-tuning)'" java.lang.OutOfMemoryError: PermGen space

If you get this exception from your log file (oracleBPELServer.out) under your domain. Then do the following to fix this issue.

1. Navigate to the Weblogic Admin console.
2. Click on the server tab on your left side.
3. Click on your instance - domain
4. Click on the Server start, you can see this tab when the Configuration link is selected.
5. Please set values for those empty fields.
a. Java_home
b. Java Vendor:
c. Bea Home:
d. Root Directory: root directory of the bpel domain.
6. Then in the "Arguments:" field you have to add the following. prefix the entry with the below value and add a space after adding the string.

-XX:MaxPermSize=512m

7. Then restart the oracleBPELServer using the admin console.

Note: When i had a talk with the expert team who is working on this, they said this exception occurs when the weblogic uses the SUN JDK, This exception was not there when they use weblogic JRocket JDK.
You will come to know which JDK the weblogic is using by looking at the top entry of the "oracleBPELServer.out" log file, which is available under the following location.
"C:\bea\user_projects\domains\BPELDomain\servers\oracleBPELServer\logs"

In my guess i think, when you run the build file to create oracleBPELServer, we will be configuring the java_home attribute, i think this is set for this domain to use the java_home mentioned while creating the domain.

If my entry is wrong, please put your comment.

Tuesday, July 22, 2008

weblogic.management.ManagementException: Unable to obtain lock

When i was working with the weblogic 9.2 version, i have installed oracle BPEL PM domain in weblogic server.
When i restarted the domain, i was hit with a strange bug, saying

"Exception while starting server 'oracleBPELServer': java.io.IOException: Server failed to start up. See server output log for more details."
"weblogic.management.ManagementException: Unable to obtain lock "
or "FAILED_NOT_RESTARTABLE"

I tryed to googled out the error and found some useful links Link asper the Shekar Atmakur i tried, it was not working. Then i tried with the following i was able to bring up the BPEL domain up and running.

Login to the administrative console and click on the domain that throws error.

Click on the "configuration" tab for that domain
Click on the "Server Start" tab available under the configuration tab.

Pass the username and password as "weblogic/weblogic" then restart the domain.
You should be able to bring the server up and running.

Thursday, June 26, 2008

How to get aiacomponents in to your JDeveloper


Get the aiacomponents files into your jdeveloper by doing the following steps.

You can get the aiacomponents after installing the AIA FP or you can copy from others.

Once you create a bpel project using jdev, you can see the following folder structure.

D:\jdevstudio10133\jdev\mywork\ULApplication\ULCreateCustomerParty

Assume ULCreateCustomerParty is the project name in the jdev, create a folder named src in the same folder and then copy all the aiacomponents into that folder.
Open the jdev or if you have kept already opened, refresh the navigator window.
You should be able to see the files in folder structre under the SRC folder in your navigator window, like in the attached screenshot.

Friday, June 20, 2008

HOW TO RESET YOUR PASSWORD IN WINDOWS - XP WITH LENOVA THINK PAD

1. Open a Command window
2. execute the following command
> net user
3. The above command will display the information about the logged in user, like below.

__vmware_user__ Admin ASPNET
Guest HelpAssistant SUPPORT_388945a0
username
The command completed successfully.

4. Assume the "auser" as the user name.
5. execute the following command
> net user auser
6. The above command will display the following information.
User name auser
Full Name
Comment
User's comment
Country code 000 (System Default)
Account active Yes
Account expires Never

Password last set 5/20/2008 10:43 AM
Password expires 8/18/2008 10:43 AM
Password changeable 5/21/2008 10:43 AM
Password required Yes
User may change password Yes

Workstations allowed All
Logon script
User profile
Home directory
Last logon 6/20/2008 4:15 PM

Logon hours allowed All

Local Group Memberships *Administrators *ORA_DBA
*Users
Global Group memberships *None
The command completed successfully.

7. Execute the following command to reset the password.

> net user auser Welcome1

Command name / login name / password

8. Now you have reset your login password.