Tuesday, December 01, 2009

How to create file with some required size

In my current project i want to move files from one FTP server to another. For this i have to create a file with size of 2 gb or more.

I found this FSUTIL utility from windows XP

To create a file with some size. Run the below command.

c:\> fsutil file createnew Sample.txt 2147483648

The above command will get you a file named Sample.txt of size 2GB.

FSUTIL has lot of other features aswell. Check it out.


http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/fsutil.mspx?mfr=true

Wednesday, November 25, 2009

The exception reported is: "oracle.tip.esb.console.exception.ConsoleTransactionException:File repository not initialized.May be ESB bootstrap failed

When i try to delete a ESB component from ESB Console, it was throwing the below error message "An unhandled exception has been thrown in the ESB system. The exception reported is: "oracle.tip.esb.console.exception.ConsoleTransactionException: File repository not initialized.May be ESB bootstrap failed Please review ESB prameters for their correctness. at oracle.tip.esb.console.XMLConsoleManagerImpl.commit(XMLConsoleManagerImpl.java:2317) at oracle.tip.esb.console.XMLConsoleManagerImpl.deleteSystem(XMLConsoleManagerImpl.java:637) at oracle.tip.esb.configuration.servlet.command.DeleteSystemCommand.execute(DeleteSystemCommand.java:34) at oracle.tip.esb.configuration.servlet.CommandServlet.doJob(CommandServlet.java:109) at oracle.tip.esb.configuration.servlet.CommandServlet.doPost(CommandServlet.java:76) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64) at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:400) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:414) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595) ".
"

Solution: Some time the ESB Components are not loaded properly during that time you will get to see these kind of error messages surface.
Restart the oc4j_soa component using the below command.

> opmnctl restartproc process-type=oc4j_soa

The above command is used to restart only the required component without restarting all the components in the server .

Server Version : SOA Suite 10.1.3.4V

Monday, November 23, 2009

Exception message is: javax.resource.ResourceException: RollbackException: Transaction has been marked for rollback: Timed out

Problem:

When i try to deploy a bpel which is of 30kb size using JDeveloper it was throwing "Exception message is: javax.resource.ResourceException: RollbackException: Transaction has been marked for rollback: Timed out" Exception.

"ORABPEL-04077
Cannot fetch a datasource connection.
The process domain was unable to establish a connection with the datasource with the connection URL "jdbc/BPELServerDataSource". The exception report
ed is: javax.resource.ResourceException: RollbackException: Transaction has been marked for rollback: Timed out"

The JDeveloper/Ant script will take too much time and finally it will say failed to deploy.
SOA Suite Version: 10.1.3.4 and JDeveloper Version : 10.1.3.4.0.4270

Fix: To fix this issue i have to revisit some of the configuration files on the server.

1. Open the transaction-manager.xml file using some editor.

Path for the file : \j2ee\oc4j_soa\config\transaction-manager.xml

Modify the transaction-timeout attribute value to some higher value, i have set the value as transaction-timeout="7200".

2. Open the orion-ejb-jar.xml file using editor

Path for the file : \j2ee\oc4j_soa\application-deployments\orabpel\ejb_ob_engine\orion-ejb-jar.xml

Modify the transaction-timeout attribute, with some higher value.

I have set the value as transaction-timeout="3600".

Note: There will be 6 entries of transaction-timeout attributes. Make sure you change in all the 6 attributes.

3. Reboot the system or only the particular component.

> opmnctl restartproc process-type=oc4j_soa

4. You can deploy now using JDeveloper or ant script.

XPath expression failed to execute. Error while processing xpath expression

If you get this exception while deploying your bpel process, there could be some issue with the xsl file that you have in your bpel process.

To fix this issue, open your bpel process in IDE and double click on the transform activity and click on source part payload and target part payload. Then you deploy.


Before loading the source part and target part if you close the transform box, these kind of issues will stop you from deploying.

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"