Oracle® Application Server Adapters for Files, FTP, Databases, and Enterprise Messaging User's Guide
10g Release 2 (10.1.2.) B25307-01 |
|
Previous |
Next |
This appendix describes Oracle BPEL Process Manager troubleshooting methods.
This appendix contains the following topics:
Troubleshooting the Oracle Application Server Adapter for Databases
Troubleshooting the Oracle Application Server Adapter for Databases When Using Stored Procedures
Troubleshooting the Oracle Application Server Adapter for Files/FTP
Troubleshooting the Oracle Application Server Adapter for Advanced Queuing
The following sections describe possible issues and solutions when using the Oracle Application Server Adapter for Databases (database adapter).
Problem
At run time, you may see the "Could not create the TopLink session"
exception.
Solution
This common error occurs when the run-time connection is not configured properly. See "Deployment" for more information.
Problem
You may see the "Could not find adapter for eis/DB/
my_connection
/...."
exception.
Solution
See "Deployment" for more information.
Changes through TopLink Mapping Workbench require you to run the Adapter Configuration Wizard again in edit mode to force a refresh of the toplink_mappings.xml
file.
If you redeploy using obant
, unless the bpel.xml
or .bpel
files have changed, the redeployment is skipped by design.
Problem
Changes to Customers_table.xsd
are not reflected, or you get an exception.
Solution
You cannot specify the XSD format that the database adapter produces. See "XML Schema Definition (XSD)" for details.
Problem
After clicking Finish, or at deployment, you may see the following exception:
Caused by Exception [TOPLINK-0] (OracleAS TopLink - 10g (9.0.4.4) (Build 040705)): oracle.toplink.exceptions.IntegrityException Descriptor Exceptions: ---------------------- Exception [TOPLINK-64] (OracleAS TopLink - 10g (9.0.4.4) (Build 040705)): oracle.toplink.exceptions.DescriptorException Exception Description: No target foreign keys have been specified for this mapping. Mapping: oracle.toplink.mappings.OneToManyMapping[phonesCollection] Descriptor: Descriptor(Test.Customers --> [DatabaseTable(CUSTOMERS)])
This generally means that there was a problem in the wizard.
Solution
The simplest solution is to create all constraints on the database first. Also, depending on the problem, you may only need to fix something in the offline tables, and then run the wizard again.
If you want to create a one-to-many mapping from CUSTOMERS to PHONES, you need a foreign key constraint on PHONES.
This procedure assumes that this constraint does not exist on the database, and that you tried to create it with the wizard and it generated an exception.
In your JDeveloper BPEL Designer project, click the plus sign (+) in the Applications Navigator to add files to your project. Select database > schemaName > schemaName.schema. This imports all your database objects.
Open the PHONES table and manually create the foreign key constraint from PHONES to CUSTOMERS.
Save all.
Now open the OracleAS TopLink project. In JDeveloper BPEL Designer, go to Application Sources > TopLink > TopLink Mappings. In the Structure window, open CUSTOMERS and double-click the phonesCollection mapping.
You should now see a Table Reference tab in the main window. This was probably blank previously. From the menu, select the one you just created.
Save again.
Edit the database partner link.
Click Next to the end in the wizard, and then click Finish and Close.
This refreshes toplink_mappings.xml
for your project.
Open the toplink_mappings.xml
file in JDeveloper BPEL Designer. You may need to add it to the project first.
Search for phonesCollection
.
You should find a tag like this:
<database-mapping> <attribute-name>phonesCollection</attribute-name>
Scroll down and you should now see something like this:
<source-key-fields> <field>CUSTOMERS.someColumn</field> </source-key-fields> <target-foreign-key-fields> <field>PHONES.someColumn</field> </target-foreign-key-fields>
If you do not see the tags shown here, then manually add them. This is not the preferred method because toplink_mappings.xml
is a generated file, which gets refreshed whenever you edit a database partner link.
Undeploy the old process in Oracle BPEL Console, and redeploy your fixed process with a new revision number.
Problem
After clicking Finish, or at deployment, you may see the following exception:
Caused by Exception [TOPLINK-0] (OracleAS TopLink - 10g (9.0.4.4) (Build 040705)): oracle.toplink.exceptions.IntegrityException Descriptor Exceptions: ---------------------- Exception [TOPLINK-46] (OracleAS TopLink - 10g (9.0.4.4) (Build 040705)): oracle.toplink.exceptions.DescriptorException Exception Description: There should be one non-read-only mapping defined for the primary key field [PHONES.ID]. Descriptor: Descriptor(Test.Phones --> [DatabaseTable(PHONES)])
This probably means that no primary key was defined for PHONES
.
Solution
If this exception appears in conjunction with the No Target Foreign Keys error, then see "No Target Foreign Keys Error" and resolve that problem first. Otherwise, do the following:
Open Application Sources > TopLink > TopLink Mappings.
In the Structure window, double-click PHONES.
On the first page, you should see Primary Keys:. Ensure that columns are selected and that they are mapped in the project.
Save.
Edit the database partner link.
Click Next to the end in the wizard, and then click Finish and Close.
Open toplink_mappings.xml
. For the PHONES
descriptor, you should see something like this:
<primary-key-fields> <field>PHONES.ID</field> </primary-key-fields>
Make sure that there is at least one field, and for that field, make sure you can find it somewhere else in the toplink_mappings.xml
file. If you can, then this means that the database adapter can detect it. If not, then you must map this field.
Open Application Sources > Test > Phones.
You should see Java code. Add a line as follows:
long id;
Save.
Now open Application Sources > TopLink > TopLink Mappings.
Double-click PHONES and go to the Structure window.
You should be able to map the id as DirectToField, and set the database field to ID.
Save and then edit the database partner link.
Click Next to the end in the wizard, and then click Finish and Close.
Undeploy the old process in Oracle BPEL Console, and redeploy your fixed process with a new revision number.
Problem
You may get a conversion exception when you pass in an xs:dateTime
value to the database adapter.
Solution
If an attribute is of type xs:dateTime
, then the database adapter is expecting a string in one of the following formats:
1999-12-25T07:05:23-8:00 1999-12-25T07:05:23.000-8:00 1999-12-25T15:05:23:000Z 1999-12-25T15:05:23
The format 1999-12-25
is accepted, although it is not a valid xs:dateTime
value. The xs:dateTime
format is yyyy-MM-ddTHH:mm:ss.SSSZ
, where
yyyy
is the year (2005, for example)
MM
is the month (01 through 12)
dd
is the day (01 through 31)
HH
is the hour (00 through 23)
mm
is the minute (00 through 59)
ss
is the second (00 through 59)
SSS
is milliseconds (000 through 999), optional
Z
is the time zone designator (+hh:mm
or -hh:mm
), optional
A DATE
column may exist on an Oracle Database, which can accept the 25-DEC-1999
date format. However, this is not a date format that the database adapter can accept. The following workaround applies to TopLink only.
If you want to pass in the 25-DEC-1999
date format, then map the attribute as a plain string. The database adapter passes the value through as-is.
To do this, you must edit the offline database table and change the column datatype from DATE
to VARCHAR2
.
Save.
Edit the database partner link.
Click Next to the end in the wizard, and then click Finish and Close.
While not a valid xs:dateTime
format, the format yyyy-mm-dd
is a valid xs:date
format.
Problem
The time portion of DATE
fields may be truncated on Oracle9 or greater platforms when using oracle.toplink.internal.databaseaccess.DatabasePlatform
. For example, 2005-04-28 16:21:56
becomes 2005-04-28T00:00:00.000+08:00
.
Or, the millisecond portion of DATE
fields may be truncated on Oracle9 or greater platforms when using oracle.toplink.internal.databaseaccess.Oracle9Platform
. For example, 2005-04-28 16:21:56.789
becomes 2005-04-28T16:21:56.000+08:00
.
Or, you may have trouble with TIMESTAMPTZ
(time stamp with time zone) or TIMESTAMPLTZ
(time stamp with local time zone).
Solution
You must set the platformClassName
for Oracle platforms, because these include special workarounds for working with date-time values on Oracle. So, if you are connecting to an Oracle9 platform, you must set the platformClassName
accordingly.
Due to an issue with the time portion of DATE
being truncated with Oracle9 JDBC drivers, the property oracle.jdbc.V8Compatible
was set when using any Oracle platform class name. Therefore, use oracle.toplink.internal.databaseaccess.Oracle9Platform
to solve the time truncation problem.
However, starting with Oracle9, dates started to include millisecond precision. Setting oracle.jdbc.V8Compatible
in response had the drawback of returning the milliseconds as 000
, as an Oracle8 database did. (This also introduced an issue with null IN/OUT DATE
parameters for stored procedure support.) You do not see any truncation (of the time portion or milliseconds) when using the Oracle9Platform
class.
You must also use the Oracle9Platform
class if you have TIMESTAMPTZ
and TIMESTAMPLTZ
.
If you want DATE
to be treated like a date (with no time portion), set the attribute-classification in the toplink_mappings.xml
to java.sql.Date
.
In general, if you are having an issue with a particular database, check to see if TopLink has a custom platformClassName
value for that database, and whether you are using it.
See "Deployment" and Table 4-19, "Application Server Connection Pooling" for more information.
To understand how to handle faults, such as a unique constraint violation on inserts or when a database or network is temporarily unavailable, see the InsertWithCatch
tutorial at Oracle_Home
\integration\orabpel\samples\tutorials\122.DBAdapter
.
Problem
A BPEL process modeled against one database does not run against another database.
The most likely cause for this problem is that you are using a different schema in the second database. For example, if you run the wizard and import the table SCOTT.EMPLOYEE
, then, in the toplink_mappings.xml
file, you see SCOTT.EMPLOYEE
. If you run the sample in the USER
schema on another database, you get a "table not found"
exception.
Solution
Until qualifying all table names with the schema name is made optional, manually edit toplink_mappings.xml
and replace SCOTT.
with nothing, as shown in the bold portions of the following example.
Change:
<project>
<project-name>toplink_mappings</project-name>
<descriptors>
<descriptor>
<java-class>BPELProcess1.A</java-class>
<tables>
<table>SCOTT.A</table>
</tables>
To:
<project>
<project-name>toplink_mappings</project-name>
<descriptors>
<descriptor>
<java-class>BPELProcess1.A</java-class>
<tables>
<table>A</table>
</tables>
You must repeat this step every time after running the Adapter Configuration Wizard.
Note: HavingEMPLOYEE on both the SCOTT and USER schemas, and querying against the wrong table, can result in a problem that is difficult to detect. For this reason, the database adapter qualifies the table name with the schema name.
|
Problem
Many departments with many employees are read in, but only one employee per department appears.
Solution
You must use a transform with a for-each
statement. An Assign activity with a too-simplistic XPath query can result in only the first employee being copied over.
For an example of how to use a transform for database adapter outputs, go to
Problem
If you use an outbound SELECT
to find all employees where firstName =
some_parameter
, then you have a problem if firstName
on the database is a CHAR
column, as opposed to a VARCHAR2
column.
It is a known problem with some databases that if you insert a CHAR
value (for example, 'Jane'
) into a CHAR(8)
field, then the database pads the value with extra spaces (for example, 'Jane '
).
If you then execute the query
SELECT ... WHERE firstName = 'Jane';
no rows may be returned. Although you are querying for the same value that you inserted, and some tools such as SQL*Plus and SQL Worksheet operate as expected, the query does not work with the database adapter.
Solution
The best practice is to use a CHAR
column for fields that must be fixed, such as SSN
, and VARCHAR2
for columns that can take a variable length, such as firstName
.
Transforming the value to add padding may be difficult, and using SELECT
to trim the value on the database (as opposed to padding the other side) requires using SQL statements. For example:
SELECT ... WHERE trim(firstName) = #firstName;
Note that #
is an OracleAS TopLink convention for denoting input parameters.
Problem
When querying on table A
, which has a one-to-one relationship to B
, where B
contains a CLOB
, you may see the following exception:
Exception Description: java.sql.SQLException: ORA-00932: inconsistent datatypes: expected - got CLOB
Solution
A SELECT
returning CLOB
values must not use the DISTINCT
clause. The simplest way to avoid DISTINCT
is to disable batch attribute reading from A
to B
. Batch reading is a performance enhancement that attempts to simultaneously read all B
s of all previously queried A
s. This query uses a DISTINCT
clause. Use joined reading instead, or neither joined reading nor batch attribute reading.
Because both DISTINCT
and CLOB
s are common, you may see this problem in other scenarios. For example, an expression like the following uses a DISTINCT
clause:
SELECT DISTINCT dept.* from Department dept, Employee emp WHERE ((dept.ID = emp.DEPTNO) and (emp.name = 'Bob Smith'));
See "Relational-to-XML Mappings (toplink_mappings.xml)" for more information about batch reading and joined reading.
Problem
You may sometimes notice that merge performs an UPDATE
when it should do an INSERT
, or vice versa.
Solution
Merge works by first determining, for each element in the XML, whether the corresponding database row exists or not. For each row, it does an existence check. There are two known limitations with the existence check.
First, you can configure the existence check to either Check cache or Check database. You can configure this for each descriptor (mapped table) in your Mapping Workbench Project. The default is Check database, but TopLink's check database works like "check cache first, then database" for performance reasons. If a row exists in the cache, but was deleted from the database (the cache is stale), then you may see an UPDATE
when you expect an INSERT
. You can configure caching and a WeakIdentityMap
is used by default, meaning rows are only held in memory while being processed. However, Java garbage collection is not controlled by the adapter. Therefore, if you insert a row, delete it in a separate process, and insert it again, all within a very short time, you may see an INSERT
and then an UPDATE
. One solution is to use NoIdentityMap
. However, performance may suffer, and if you are doing SELECT
statements on a mapped schema with complex cycles (which you should avoid!), then the adapter may become trapped in an endless loop when building the XML.
Second, there is a timing issue to doing a read first and then later an INSERT
or UPDATE
. If the same row is simultaneously inserted by multiple invokes, then each may do an existence check that returns false, and then all attempt an INSERT
. This does not seem realistic, but the following scenario did come up:
A polling receive reads 100 employee rows and their departments from database A
. With maxRaiseSize
set to 1
, 100 business process instances were initiated. This led to 100 simultaneous invokes to database B
, one for each employee row. No problems were encountered when existence checking on employee, but some employees had the same department. Hence, many of the 100 invokes failed because the existence checks on department were more or less simultaneous.
There are two solutions to this problem. The first is to avoid it. In a data synchronization-style application, setting maxRaiseSize
to unlimited
boosts performance and eliminates this problem. A second solution is to retry the merge in your BPEL process. Optimistic lock and concurrency exceptions are common, and the best solution is usually to wait and try again a short time later.
Problem
Child records found an integrity violation with DeletePollingStrategy
.
When deleting rows, you must be aware of integrity constraints. For example, if DEPARTMENT
has a one-to-many relationship to EMPLOYEE
, that means DEPTID
is a foreign key on EMPLOYEE
. If you delete a DEPARTMENT
record, but not its employees, then DEPTID
becomes a broken link and this can trigger an integrity constraint.
This problem occurs because you imported a table by itself and did not import its related tables. For example, if you import only the DEPARTMENT
table from the database and not the EMPLOYEE
table, which has an integrity constraint on column DEPTID
, then the database adapter does not know about EMPLOYEE
and it cannot delete a record from DEPARTMENT
. You receive an exception.
Solution
Make sure you import the master table and all its privately-owned relationships. Or set the constraint on the database to CASCADE
for deletions, or use a nondelete polling strategy.
Make sure that the one-to-many relationship between DEPARTMENT
and EMPLOYEE
is configured to be privately owned. It is by default, but if the above fails, check the run-time X-R mappings file. See "Relational-to-XML Mapping" for more information.
If the problem is not this simple, OracleAS TopLink supports shallow/two-phase inserts (but does not support this for DELETE
). For example, if A
has a foreign key pointing to B
, and B
has a foreign key pointing to A
, then there is no satisfactory order by which you can delete both A
and B
. If you delete A
first, then you orphan B
. If you delete B
first, then you orphan A
. The safest DELETE
is a two-phase DELETE
that performs an UPDATE
first as follows:
UPDATE B set A_FK = null; DELETE from A; DELETE from B;
Problem
When you execute a query, you may get the correct number of rows, but some rows appear multiple times and others do not appear at all.
This behavior is typically because the primary key is configured incorrectly. If the database adapter reads two different rows that it thinks are the same (for example, the same primary key), then it writes both rows into the same instance and the first row's values are overwritten by the second row's values.
Solution
Open Application Sources > TopLink > TopLink Mappings. In the Structure window, double-click PHONES. On the first page, you should see Primary Keys. Make sure that the correct columns are selected to make a unique constraint.
Save and then edit the database partner link.
Click Next to the end, and then click Finish and Close.
Open your toplink_mappings.xml
file. For the PHONES
descriptor, you should see something like this:
<primary-key-fields> <field>PHONES.ID1</field> <field>PHONES.ID2</field> </primary-key-fields>
Problem
Importing a table from a database on one host and also importing a table with the same name, and the same schema name, from a database on another host raises an error.
Solution
Create one project against database #1 and model the adapter service. Next create a second project against database #2 and model the adapter service. (Because the databases are on different hosts, you use different database connections.) Then create a third project, but do not run the Adapter Configuration Wizard. Instead, copy the BPEL artifacts (WDSL, XSD, and toplink_mapings.xml
) from projects one and two. Deploy only the third project.
If the two tables are identical, or if the data you are interested in is identical, then you need not follow the preceding procedure.
Problem
In the Relationship window of the Adapter Configuration Wizard, all elements of the primary key appear and cannot be removed. Therefore, a foreign key referring to only part of the composite primary key cannot be created.
Solution
Because foreign key constraints must map to every part of the primary key (not a subset), there is no solution. The database adapter allows a foreign key only with a corresponding primary key at the other end.
The wizard does not let you create an ambiguous relationship. For example, assume that a PurchaseOrder
has a 1-1 billTo
relationship to a Contact
. For uniqueness, the primary key of Contact
is name
and province
. This means PurchaseOrder
must have two foreign keys (bill_to_name
and bill_to_province
). If there is only one foreign key (bill_to_name
), then the wizard does not allow you to create that ambiguous 1-1 relationship. Otherwise, the same purchase order can be billed to multiple people.
The BFILE
, USER DEFINED
, OBJECT
, STRUCT
, VARRAY
, and REF
types are not supported.
Because a table may be used for other services inside the same project, it cannot be deleted within the interface. No problems occur if the unneeded table remains as part of your project.
Problem
When you run the Adapter Configuration Wizard, any changes that affect the TopLink project (importing tables, creating or removing mappings, specifying an expression, and so on) are applied immediately, and are not undone if you cancel the wizard.
Solution
If you remove one or more of the autogenerated relationships and later want to get them back, you must reimport the tables containing the corresponding database constraints.
Problem
The database adapter can become unstable if, within the same wizard session, you remove a relationship and then immediately create a relationship with the same name.
Solution
You can do one of the following:
Give the new relationship a different name from the one you removed.
Finish the wizard after you remove the first relationship. Then, start the wizard again in edit mode to add the new relationship, using the same name as the deleted relationship.
Problem
When you import tables from some third-party databases, JDeveloper can encounter problems handling certain datatypes. You may see error messages such as "Columns of type VARCHAR cannot have a size specified"
or "A primary or unique key must define at least one column"
.
Solution
Use the following workaround:
Click OK to dismiss the error message; then cancel the wizard.
Edit the offline table definition to change the type of the columns mentioned in the error message to the closest supported type.
Run the Adapter Configuration Wizard again and continue with the rest of the wizard.
The offline table definitions for your project can be found under the Database Objects > schema name node in the Applications Navigator of JDeveloper BPEL Designer. If you do not see this node after importing your tables, then you can add it manually by clicking the Add to project name.jpr button in the Applications Navigator. Then select the database > schemaName > schemaName.schema file.
See "Configuring Offline Database Tables" for more information.
Problem
JDeveloper does not currently support importing object tables. If you try to import an object table, then you see the following message: "The following tables were 'Object Tables' and aren't supported offline."
Solution
There is currently no workaround for this problem.
Problem
If tables are imported one at a time, relationships are not generated even if foreign key constraints exist on the database.
Solution
Relationship mappings can be autogenerated only if all the related tables are imported in one batch. When importing tables, you can select multiple tables to be imported as a group. If you have related tables, then they should all be imported at the same time.
Problem
If you try to create a relationship that has the same name as the primary key field name, then you encounter a problem in which the PK field becomes unmapped.
Solution
To add the PK mapping back manually, follow these instructions:
Open the Java source for the descriptor to which you want to add the mapping (for example, Movies.java
).
Add a new Java attribute appropriate for the field to which you are mapping. For example, if the PK of the Movies
table is a VARCHAR
field named TITLE
, then create a new attribute: "private String title;"
Save the Java file.
Click the TopLink Mappings node in the Applications - Navigator pane; then choose the Descriptor from the TopLink Mappings - Structure pane. You see the newly created attribute in the Descriptor as unmapped (in this example, title).
Right-click the new attribute and select Map As > Direct To Field.
Double-click the new attribute. The TopLink Mappings editor should appear in the main JDeveloper window. Change the database field to match the PK field on the database (in this example, TITLE).
Click the Descriptor in the TopLink Mappings - Structure pane. Ensure that the PK field has a check box next to it in the Primary Keys list.
Run the Adapter Configuration Wizard again and continue with the rest of the wizard.
Problem
If you import a database table that contains a column whose name is a Java keyword, you receive the following error message:
The following error occurred: null
Solution
Do the following in JDeveloper BPEL Designer:
Click OK in the error dialog box.
Click Cancel in the Adapter Configuration Wizard.
Click Cancel in the Create Partner Link dialog box.
Open the .java
file that was generated during the failed import. In the Application Navigator, click Applications, then WorkspaceName, then ProcessName, then Application Sources, then ProcessName, and then TableName.java.
Rename any Java fields that have errors. For example, you may see
private String class;
If you have syntax error highlighting turned on, this line will be underlined in red, indicating there is a Java error. Change the line to
private String myClass;
(Or use some other nonreserved word.)
Delete all the methods from the Java class. This step is normally handled automatically by the database adapter, but must be done manually here because of the error encountered during import. After you delete the methods, your class looks something like this:
package MyBPELProcess; public class MyDatabaseTable { private String fieldOne; private String fieldTwo; ... private String fieldN; }
Remap the field that you renamed in Step 5. Click the Mapping tab at the bottom of the Java Class editor. The Structure pane updates to show the Java class attributes. Right-click the field that you renamed in step 5 (unlike the other fields, it has a single dot icon indicating it is unmapped) and select Map As -> Direct To Field. In the main editor window, select the database field that this Java field maps to (the field has the same name as the attribute did before you renamed it). Then close the Java Class editor.
From File, select Save All.
Rerun the Adapter Configuration Wizard. When you get to the Select Table page, your database table will already be in the list. Select it and continue with the wizard. Do not import the table again.
The following sections describe possible issues and solutions when using the database adapter for stored procedures.
Problem
Using an unsupported or undefined parameter type in the chosen API is a common problem. Consider the following procedure:
PROCEDURE PROC (O OBJ) AS BEGIN … END;
In this example, OBJ
refers to a type that is undefined.
After you click Finish on the final page of the wizard, an attempt to generate the XSD is made, which produces the following error message:
The message indicates that the named parameter, O
, which is of type OBJ
, is either not defined or is otherwise inaccessible.
To generate an XSD for APIs containing parameters whose types are user-defined, those types must first be defined in the database and be accessible through the associated service connection. This error also occurs if such types have not been created (that is, implemented) in the database or if the database is inaccessible.
Solution
Ensure that only supported datatypes are used as types for parameters when choosing an API. If the types are user-defined, check to ensure that the types are defined in the database and that the database is accessible when the attempt to generate the XSD is made.
Problem
When the type of one or more of the parameters in the chosen API is a user-defined type that belongs to a different schema, a design-time problem can occur.
Assume type OBJ
is created in SCHEMA2
, as in
CREATE TYPE OBJ AS OBJECT (X NUMBER, Y VARCHAR2 (10));
And, a procedure is created in SCHEMA1
that has a parameter whose type is SCHEMA2.OBJ
, as in
CREATE PROCEDURE PROC (O SCHEMA2.OBJ) AS BEGIN … END;
If you attempt to create the XSD for procedure PROC
, you may see the following error:
PLS-00201: identifier SCHEMA1.OBJ must be declared
Solution
SCHEMA1
must grant permission to SCHEMA2
so that SCHEMA2
can refer to type OBJ
from SCHEMA1
, as in
SQL> GRANT EXECUTE ON OBJ TO SCHEMA2;
See "Referencing Types in Other Schemas" for more information.
Problem
A mismatch between the formal parameters provided by the instance XML and the actual parameters that are defined in the signature of the stored procedure is a common run-time problem. When this type of error occurs, the invoke activity that tried to execute the stored procedure faults, as shown in Figure A-1.
Figure A-1 Example of a Faulted Invoke Due to MIsmatched Parameters
The bindingFault
has three parts—code, summary, and detail. The information for these parts comes from the java.sql.SQLException
that gets thrown by JDBC when it attempts to execute the stored procedure. The code is the ORA error number, seen in Figure A-1 as 6550 and as ORA-06550 in the summary and detail parts. The summary includes an adapter-specific error message followed by the message from the SQLException
and a suggested resolution to the issue. The detail contains just the message from the SQLException
.
As shown in Figure A-1, the ADDEMPLOYEES
stored procedure failed to execute due to "wrong number or types of arguments" passed into the API. Possible causes for this problem include:
An element corresponding to one of the required parameters was not provided in the instance XML.
Solution: Add the necessary element to resolve the issue.
More elements than were specified in the XSD were included in the instance XML.
Solution: Remove the extra elements from the XML.
The XSD does not accurately describe the signature of the stored procedure. For example, if the type of one of the parameters were to change and the XSD was not regenerated to reflect that change, a type mismatch can occur between the db:type
of the element and the new type of the modified parameter.
Solution: Ensure that the parameters match the signature of the API, as indicated in the summary part of the bindingFault
.
Problem
A bindingFault
can also occur if the stored procedure is not defined in the database when an attempt to execute it is made. In this example, the ADDEMPLOYEES
API is invoked, but fails to execute because it is not defined. The invoke activity faults, as shown in Figure A-2.
PL/SQL is revealing that "... identifier ADDEMPLOYEES must be declared," which is an indication that the stored procedure may not be defined in the database. This can occur, for example, if the procedure was dropped sometime between when the process was deployed and when the procedure was invoked. This can also occur if the required privileges to execute the stored procedure have not been granted.
Solution
Ensure that the API is defined in the database, as indicated in the summary, and that the appropriate privileges to execute that procedure have been granted.
Some run-time errors can occur if the instance XML does not conform to the XSD generated for the chosen API. XML validation can be enabled in the partner link that coincides with the execution of the API. Edit the partnerLinkBinding
in the BPEL suitcase located in your process bpel.xml
file, as shown in bold:
<partnerLinkBinding name=ÓPROCÓ>
<property name=ÓwsdlLocationÓ>Proc.wsdl</property>
<property name=ÓvalidateXMLÓ>true</property>
</partnerLinkBinding>
Adding the validateXML
property and setting it to true
enables XML validation for all instance XML passed into the service associated with the partner link that executes the API.
XML validation can also be enabled globally in Oracle BPEL Console. Click Manage BPEL Domain and look for the validateXML property. Setting the value to true causes all XML to be validated. Turning on XML validation helps catch and avoid problems that are associated with the instance XML (rather than the adapter run time).
The following sections describe possible issues and solutions when using the Oracle Application Server Adapter for Files/FTP (file and FTP adapters).
If you later rerun the Adapter Configuration Wizard and change a previously specified logical name to a different name, both the old and new logical names appear in the bpel.xml
file. You must manually edit the bpel.xml
file to remove the old logical name.
While the Native Format Builder Wizard does not restrict you from creating native schema file names with spaces, it is recommended that your file names do not have spaces in them.
This section describes common user errors.
On the Adapter Configuration Wizard - Messages window (Figure 2-5), you can select the Native format translation is not required (Schema is Opaque) check box. Opaque cannot be selected in only one direction. Opaque must be selected in the both inbound and outbound directions.
Messages have a different meaning based on whether they are inbound or outbound. For example, assume you make the following selections:
Select 2 from the Publish Messages in Batches of list (Figure 2-3) in the inbound direction.
Select 3 from the Number of Messages Equal list (Figure 2-7) in the outbound direction.
If an inbound file contains two records, it is split (debatched) into two messages. However, because 3 was specified in the outbound direction, a file is not created. This is because there are not three outbound messages available. Ensure that you understand the meaning of inbound and outbound messages before selecting these options.
If the file adapter or the FTP adapter is not able to read or get your file, respectively, it may be because you selected to match file names using the regular expression (regex), but are not correctly specifying the name (Figure 2-3). See Table 2-2 for details.
You may have content that does not require translation (for example, a JPG or GIF image) that you just want to send "as is." The file is passed through in base-64 encoding. This content is known as opaque. To do this, select the Native format translation is not required (Schema is Opaque) check box on the Adapter Configuration Wizard - Messages window (Figure 2-5). If you select this check box, you do not need to specify an XSD file for translation.
The inbound directory must exist for the file adapter or the FTP adapter to read or get your file, respectively.
If the FTP adapter cannot connect to a remote host, ensure that you have configured the Oracle_Home
\integration\orabpel\system\appserver\oc4j\j2ee\home\application-deployments\default\FtpAdapter\
oc4j-ra.xml
deployment descriptor file for adapter instance JNDI name and FTP server connection information. See "FTP Adapter for Get File Concepts" for instructions.
You cannot use completely static names such as po.txt
for outbound files. Instead, outgoing file names must be a combination of static and dynamic portions. This is to ensure the uniqueness of outgoing files names, which prevents files from being inadvertently overwritten. See "Specifying the Outbound File Naming Convention" for instructions on creating correct outbound file names.
Two header files are created in the Applications Navigator after you finish running the Adapter Configuration Wizard in both directions:
type
AdapterInboundHeader.wsdl
Provides information such as the name of the file being processed and its directory path, as well as data about which message and part define the header operations
type
AdapterOutboundHeader.wsdl
Provides information about the outbound file name
where type
is either ftp
or file
.
You can define properties in these header files. For example, you can specify dynamic inbound and outbound file names through use of the InboundHeader_msg
and OutboundHeader_msg
message names in the type
AdapterInboundHeader.wsdl
and type
AdapterOutboundHeader.wsdl
files, respectively.
You can also set header variables that appear in the BPEL process file. Header variables are useful for certain scenarios. For example, in a file propagation scenario, files are being moved from one file system to another using the file adapter. In this case, it is imperative that you maintain file names across the two systems. Use file headers in both directions and set the file name in the outbound file header to use the file name in the inbound file header.
See the online help available with the Adapters tab of invoke, receive, reply, and pick - OnMessage branch activities for more information.
The Adapter Configuration Wizard - File Modification Time window (Figure 2-11) prompts you to select a method for obtaining the modification times of files on the FTP server.
You must perform the following procedure to obtain this information:
Determine the modification time format supported by the FTP Server by running the command mdtm
or ls -al
(whichever is supported by the operating system).
Determine the time difference between the system time (time on which Oracle BPEL Server is running) and the file modification time. Obtain the file modification time by running either mdtm
or ls -al
on the FTP server.
Manually add the time difference to the bpel.xml
as a property:
<activationAgents> <activationAgent ...> <property name="timestampOffset">2592000000</property>
Specify the Substring Begin Index field and End Index field values that you determine by running the mdtm
or ls -al
command on the FTP server.
The following sections describe possible issues and solutions when using the Oracle Application Server Adapter for Advanced Queuing (AQ adapter).
The following sections describe possible issues and solutions for inbound errors when using the AQ adapter.
Sample error:
<timestamp> <WARN> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JNDI lookup of 'eis/AQ/aqSample2' failed due to: eis/AQ/aqSample2 not found <timestamp> <ERROR> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Error while performing endpoint Activation: ORABPEL-12510 Unable to locate the JCA Resource Adapter via WSDL port element jca:address. The Adapter Framework is unable to startup the Resource Adapter specified in the WSDL jca:address element: {http://xmlns.oracle.com/pcbpel/wsdl/jca/}address: location='eis/AQ/aqSample2'
Problem
It is likely that either 1) the resource adapter's RAR file has not been deployed successfully to the OC4J Application Server or 2) the location
attribute in $J2EE_HOME/application-deployments/default/deployed-adapter-name /oc4j-ra.xml
has not been set to eis/AQ/aqSample2
. In the last case, you may have to add a new connector-factory
entry (connection) to the oc4j-ra.xml
. Correct this and then restart the BPEL/OC4J Application Server.
Solution
Look for the file $J2EE_HOME/application-deployments/default/aqAdapter/oc4j-ra.xml
.
This file should be created when the adapter is deployed, which occurs the first time Oracle BPEL Process Manager is started. If the adapter is undeployed for some reason, deploy the adapter with the following command, then follow step 2:
java -jar $J2EE_HOME/admin.jar ormi://localhost admin welcome -deployconnector -file <path to AQAdapter.rar> -name AqAdapter
>
If $J2EE_HOME/application-deployments/default/aqAdapter /oc4j-ra.xml
exists, make sure the JNDI location is defined in oc4j-ra.xml
.
For example:
<connector-factory location="eis/AQ/aqSample2" connector-name="AQ Adapter"> <config-property name="connectionString" value="jdbc:oracle:thin:@myhost:1521:appdb2"/> <config-property name="userName" value="scott"/> <config-property name="password" value="tiger"/> </connector-factory>
Sample error:
<timestamp> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound> DBConnection_connect: database error while try to connect to jdbc:oracle:thin:@localhost:1521:ORCL : Io exception: The Network Adapter could not establish the connection
Solution
If the connectionString
is correct, make sure the database and listener are up, then redeploy the process.
If the connectionString
is not correct:
Change the connectionString
in $J2EE_HOME\application-deployments\default\AqAdapter\oc4j-ra.xml
.
Restart Oracle BPEL Process Manager.
Sample error:
<timestamp> <ERROR> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Error while performing endpoint Activation: ORABPEL-11929 SQL error while creating managed (database) connection. SQL error while creating managed (database) connection: Error while trying to connect to database. Error while trying to connect to database using connect string "jdbc:oracle:thin:@localhost:1521:appdb2 - java.sql.SQLException: ORA-01017: invalid username/password; logon denied
Solution
Make sure you have the correct username and password in $J2EE_HOME\application-deployments\default\AqAdapter\oc4j-ra.xml
.
Restart Oracle BPEL Process Manager.
Sample error:
<timestamp> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound> oracle.AQ.AQException: JMS-190: Queue SCOTT.AQ_SUPPORTED_ADT_IN not found at oracle.AQ.AQUtil.throwAQEx(AQUtil.java:196) at oracle.AQ.AQOracleSession.getQueue(AQOracleSession.java:720) at oracle.tip.adapter.aq.database.Queue.connect(Queue.java:102) at oracle.tip.adapter.aq.database.MessageReader.init(MessageReader.java:575)
Solution
Create the queue and redeploy the process. If this process is deployed from the samples, all queue creation scripts are located in sql\create_queues.sql
under each project.
Sample error:
2005-04-20 16:10:52,695> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound> oracle.AQ.AQOracleSQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'DBMS_AQIN' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored at oracle.AQ.AQOracleQueue.dequeue(AQOracleQueue.java:1795) at oracle.AQ.AQOracleQueue.dequeue(AQOracleQueue.java:1307) at oracle.tip.adapter.aq.database.MessageReader.readMessage(MessageReader.java:399) at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.run(AQActivationSpecDequeue r.java:163) at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51) at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:267) at java.lang.Thread.run(Thread.java:534)
Solution
Log on to the database using sys
as sysdba
, GRANT EXECUTE ON SYS.DBMS_AQIN to <username>;
. No deployment is necessary because this failure occurs after the connection has succeeded, the adapter automatically reconnects until the error is gone or the process is undeployed.
Sample error:
<timestamp> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound> MessageReader_readMessage: Received TranslationException <timestamp> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound> ORABPEL-11211 DOM Parsing Exception in translator. DOM parsing exception in inbound XSD translator while parsing InputStream. Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable. at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(X SDTranslator.java:131)
Solution
Look for the rejected message and find out why it has failed translation. For instance, the message may not be XML, or the XML root element may be incorrect, or the message may be blank. If a rejection handler has been defined for this process, look for the message in the rejection handler. Otherwise, look for the message in the default rejection handler, which is located at
Oracle_Home\integration\orabpel\domains\default\archive\jca
\AQMessageRejectionHandler\rejectedMessages
For an example of how a user can define the rejection handler, look in
ORACLE_HOME
\integration\orabpel\samples\tutorials\124.AQAdapter\AQMessageRejectionHandler
Sample error:
<timestamp> <INFO> <default.collaxa.cube.activation> <AQ Adapter::Inbound> Subscriber PriorityOneDequeuer already exists in the database. If the subscriber does not contain the rule that you want, please undeploy the business process, drop the subscriber with the following sql*plus command, and redeploy. DECLARE subscriber sys.aq$_agent; BEGIN subscriber := sys.aq$_agent('<subscriber_name>', NULL, NULL); DBMS_AQADM.REMOVE_SUBSCRIBER( queue_name => '<queue_name>', subscriber => subscriber); END;
Solution
This is not a problem if the subscriber has been generated with the rule the user expects. The adapter can create new rule-based subscribers, but cannot modify existing ones. Hence, the first time you deploy the adapter with a nonnull value for MessageSelectorRule
, a subscriber is created if the consumer does not already exist, using the consumer as the subscriber and the MessageSelectorRule
as the rule. This message appears in any subsequent redeployment or restart of Oracle BPEL Process Manager.
You can determine if the rule is what you want for the subscriber by entering the following SQL command:
SQL> select name, rule, queue from AQ$RuleBased_Raw_In_R; NAME ------------------------------ RULE -------------------------------------------------------------------------------- QUEUE ------------------------------ PRIORITYONEDEQUEUERpriority = 1 RULEBASED_RAW_IN
As a general note, problems in the outbound direction are often not caught at deployment time, because an outbound thread is only activated if there is a message going to outbound.
Sample error:
Adapter Framework unable to create outbound JCA connection. file:/C:/050420/integration/orabpel/domains/default/tmp/.bpel_File2AQBLOB_ 1.0.jar/EnqueueBlobPayload.wsdl [ Enqueue_ptt::Enqueue(opaque) ] - : The Adapter Framework was unable to establish an outbound JCA connection due to the following issue: ORABPEL-12510 Unable to locate the JCA Resource Adapter via WSDL port element jca:address. The Adapter Framework is unable to startup the Resource Adapter specified in the WSDL jca:address element: {http://xmlns.oracle.com/pcbpel/wsdl/jca/}address: location='eis/AQ/aqSample3'
The reason for this is most likely that either 1) the resource adapter's RAR file has not been deployed successfully to the OC4J Application server or 2) the location
attribute in $J2EE_HOME/application-deployments/default/deployed-adapter-name/oc4j-ra.xml
has not been set to eis/AQ/aqSample3
. In the last case you may have to add a new connector-factory
entry (connection) to oc4j-ra.xml
. Correct this and then restart the BPEL/OC4J Application Server
Solution
See the solution section for the same problem in the inbound section, as described in "Inbound Errors".
2005-04-20 18:41:40,570> <ERROR> <default.collaxa.cube.ws> <AdapterFramework::Outbound> file:/C:/050420/integration/orabpel/domains/default/tmp/.bpel_File2AQBLOB_ 1.0.jar/EnqueueBlobPayload.wsdl [ Enqueue_ptt::Enqueue(opaque) ] - Could not invoke operation 'Enqueue' against the 'AQ Adapter' due to: ORABPEL-12511 Adapter Framework unable to create outbound JCA connection. file:/C:/050420/integration/orabpel/domains/default/tmp/.bpel_File2AQBLOB_ 1.0.jar/EnqueueBlobPayload.wsdl [ Enqueue_ptt::Enqueue(opaque) ] - : The Adapter Framework was unable to establish an outbound JCA connection due to the following issue: ORABPEL-11929 SQL error while creating managed (database) connection. SQL error while creating managed (database) connection: Error while trying to connect to database. Error while trying to connect to database using connect string "jdbc:oracle:thin:@localhost:1521:appdb - java.sql.SQLException: Io exception: The Network Adapter could not establish the connection"
Solution
If the connectionString
is not correct, do the following:
Change the connectionString
in $J2EE_HOME\application-deployments\default\AqAdapter\oc4j-ra.xml
.
Restart Oracle BPEL Process Manager.
If the connectionString
is correct, make sure the database and listener are up. If you had enabled outbound retry, the message should be automatically retried when the database and its listener are up.To configure outbound retry, set the retryMaxCount
property and retryInterval
property for the partner link in bpel.xml
.For example, the following configuration means 10
retries, at 60
second intervals.
<partnerLinkBinding name="EnqueueBLOBPayload"> <property name="wsdlLocation">EnqueueBlobPayload.wsdl</property> <property name="retryMaxCount">10</property> <property name="retryInterval">60</property> </partnerLinkBinding>
<timestamp> <ERROR> <default.collaxa.cube.ws> <AQ Adapter::Outbound> oracle.AQ.AQException: JMS-190: Queue SCOTT.BLOBPAYLOAD_QUEUE not found at oracle.AQ.AQUtil.throwAQEx(AQUtil.java:196) at oracle.AQ.AQOracleSession.getQueue(AQOracleSession.java:720) at oracle.tip.adapter.aq.database.Queue.connect(Queue.java:102) at oracle.tip.adapter.aq.database.MessageWriter.init(MessageWriter.java:231)
Solution
Same solution as the inbound Queue not found problem. Create the queue and redeploy the process. If this process is deployed from the samples, all queue creation scripts are located in sql\create_queues.sql
under each project.
Sample error:
file:/C:/050420/integration/orabpel/domains/default/tmp/.bpel_File2AQBLOB_ 1.0.jar/EnqueueBlobPayload.wsdl [ Enqueue_ptt::Enqueue(opaque) ] - : The Adapter Framework was unable to establish an outbound JCA connection due to the following issue: ORABPEL-11929 SQL error while creating managed (database) connection. SQL error while creating managed (database) connection: Error while trying to connect to database. Error while trying to connect to database using connect string "jdbc:oracle:thin:@localhost:1521:appdb2 - java.sql.SQLException: ORA-01017: invalid username/password; logon denied.
Solution
Make sure you have the correct username and password in $J2EE_HOME\application-deployments\default\AqAdapter\oc4j-ra.xml
.
Restart Oracle BPEL Process Manager.
Sample error:
<timestamp> <ERROR> <default.collaxa.cube.ws> <AQ Adapter::Outbound> oracle.AQ.AQOracleSQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'DBMS_AQIN' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored at oracle.AQ.AQOracleQueue.enqueue(AQOracleQueue.java:1267)
Solution
Log on to the database using sys
as sysdba
, GRANT EXECUTE ON SYS.DBMS_AQIN to <username>;
. Again, if you have retry configured for this partner link, retry automatically happens.
Sample error:
<timestamp> <ERROR> <default.collaxa.cube.ws> <AQ Adapter::Outbound> ORABPEL-11101 Translation Failure. Translation to native failed. Invalid text 'blahblah' in element: 'Root-Element'. Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable. at oracle.tip.pc.services.translation.xlators.nxsd.NXSDTranslatorImpl.translateToNati ve(NXSDTranslatorImpl.java:502) at oracle.tip.adapter.aq.database.MessageWriter.translateToNative(MessageWriter.java: 1102) at oracle.tip.adapter.aq.database.MessageWriter.doEnqueue(MessageWriter.java:494)
Solution
From Oracle BPEL Console, click the Instances tab.
Click the failed instance and select Debug.
Look for the variable passed to the invoke activity that failed. You should notice this variable match schema definition. Back track in the Debug window to find out why.
I have an AQ inbound to AQ outbound end-to-end scenario. How do I copy the priority from an inbound queue to an outbound queue?
Solution: Create both the inbound header and outbound header, and use an assign activity to copy the priority.
Create the inbound header:
Click the receive activity that is linked to the AQ Inbound partner link.
Select the Adapters tab and click the flashlight icon to the right of the Header Variable field.
Right click Variables and select Create Variable.
Enter a name such as inbound_header.
Click Message type and the flashlight icon.
If a payloadHeader
is not required (most cases):
In the Type Chooser window, click Type Explorer > Message Types > Partner Links > inbound_partnerlink_name > inbound_service.wsdl > Imported WSDL > aqAdapterInboundHeader.wsdl > Message Types > Header. Go to step 8.
If a payloadHeader
is required (only if PayloadHeaderRequired="true"
in the JCA operation section of service_name
.wsdl
):
In the Type Chooser window, click Type Explorer > Message Types > Partner Links > inbound_partnerlink_name > Message Types > Header_msg.
Click OK to exit the Type Chooser window.
While the variable is still highlighted, click OK to pick this variable.
The variable now appears as the header variable.
Click OK to exit the receive activity.
Create the outbound header:
Click the invoke activity that is linked to the AQ outbound partner link.
Select the Adapters tab and click the flashlight icon to the right of the Header Variable field.
Right click Variables and select Create Variable.
Enter a name such as outbound_header.
Click Message type and click the flashlight icon.
If a payloadHeader
is not required (most cases):
In the Type Chooser window, click Type Explorer > Message Types > Partner Links > outbound_partnerlink_name > outbound_service.wsdl > Imported WSDL > aqAdapterOutboundHeader.wsdl > Message Types > Header. Go step 8.
If a payloadHeader
is required, only if PayloadHeaderRequired="true"
in the JCA operation section of service_name
.wsdl
:
In the Type Chooser window, click Type Explorer > Message Types > Partner Links > outbound_partnerlink_name > Message Types > Header_msg.
Click OK to exit the Type Chooser window.
While the variable is still highlighted, click OK to pick this variable.
The variable now appears as the header variable. Click OK to exit the receive activity.
In an Assign activity:
Click the Copy Rules tab and select Create.
In the From section: drill down to priority for the inbound header variable.
In the To section: drill down to priority for the outbound header variable.
Click OK to exit Create Copy Rule window.
Click OK to exit the Assign window.
I redefined the adapter WSDL by stepping through the wizard again. Why doesn't my service_name.wsdl change?
Solution:
It did work, but JDeveloper BPEL Designer did not refresh the file properly. Close the service_name
.wsdl
file and open it again.
I redefined the adapter service WSDL using the wizard. But at deployment time, I got the following error:
Process "AQSupportedADTTypes" (revision "1.0") compilation failed.<timestamp> <ERROR> <default.collaxa.cube.engine.deployment> <CubeProcessLoader::create> BPEL validation failed. BPEL source validation failed, the errors are: [Error ORABPEL-10007]: unresolved messageType [Description]: in line 16 of "C:\050420\integration\orabpel\domains\default\tmp\.bpel_AQSupportedADTTypes_ 1.0.jar\AQSupportedADTTypes.bpel", WSDL messageType "{http://xmlns.oracle.com/pcbpel/adapter/aq/Enqueue/}Header_msg" of variable "out_header" is not defined in any of the WSDL files. [Potential fix]: Make sure the WSDL messageType "{http://xmlns.oracle.com/pcbpel/adapter/aq/Enqueue/}Header_msg" is defined in one of the WSDLs referenced by the deployment descriptor.
Solution:
When you redefine the adapter service WSDL, you also need to redefine the header variables. The creation of header variables the input
element in the JCA binding section which defines the header.
For example:
<input> <jca:header message="tns:Header_msg" part="Header"/> </input>
When the adapter service is redefined, the old WSDL file is overwritten. Delete the old header variables and re-create them.
Sample error:
<timestamp> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound> MessageReader_readMessage: Received TranslationException <timestamp> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound> ORABPEL-11211 DOM Parsing Exception in translator. DOM parsing exception in inbound XSD translator while parsing InputStream. Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable. at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(X SDTranslator.java:131)
Solution:
Look for the rejected message and find out why it has failed translation. The message may not be XML or the XML root element maybe incorrect, or the message may be blank. If a rejection handler has been defined for this process, look for the message in the rejection handler. Otherwise, look for the message in the default rejection handler which is located at:
ORACLE_HOME
\integration\orabpel\domains\default\archive\jca\AQMessageRejectionHandler\rejectedMessages
For an example of how a user can define the rejection handler, look in
ORACLE_HOME
\integration\orabpel\samples\tutorials\124.AQAdapter\AQMessageRejectionHandler
I have a new adapter *.RAR file; how do I redeploy the adapter?
Save a copy of $J2EE_HOME\application-deployments\default\AqAdapter \oc4j-ra.xml
so you have your endpoint information.
Undeploy the adapter by entering the following command:
java -jar $JE22_HOME\admin.jar ormi://localhost admin welcome -undeployconnector -name AqAdapter
Deploy the new .rar
file by entering the following command:
java -jar $J2EE_HOME/admin.jar ormi://localhost admin welcome -deployconnector -file <rarfile> -name AqAdapter
Modify $J2EE_HOME\application-deployments\default\AqAdapter \oc4j-ra.xml
to add your endpoints.
Restart Oracle BPEL Process Manager. You should not have to redeploy your business processes.
Subscriber already exists when using MessageRuleSelector
<timestamp> <INFO> <default.collaxa.cube.activation> <AQ Adapter::Inbound> Subscriber PriorityOneDequeuer already exists in the database. If the subscriber does not contain the rule that you want, please undeploy the business process, drop the subscriber with the following sql*plus command, and redeploy. DECLARE subscriber sys.aq$_agent; BEGIN subscriber := sys.aq$_agent('<subscriber_name>', NULL, NULL); DBMS_AQADM.REMOVE_SUBSCRIBER( queue_name => '<queue_name>', subscriber => subscriber); END;
Solution:
This is not a problem if the subscriber has been generated with the rule the user expects. The adapter can create new rule-based subscribers, but cannot modify existing ones. Therefore, the first time you deploy the adapter with a nonnull value for MessageSelectorRule
, a subscriber is created if the consumer does not already exist, using the consumer as the subscriber and the MessageSelectorRule
as the rule. This message would appear in any subsequent redeployment or restart of Oracle BPEL Process Manager.
You can determine if the rule is what you want for the subscriber by entering the following SQL command: select name, rule, queue from
AQ$
QUEUE_TABLE_NAME
_R;
SQL> select name, rule, queue from AQ$RuleBased_Raw_In_R; NAME ------------------------------ RULE -------------------------------------------------------------------------------- QUEUE ------------------------------ PRIORITYONEDEQUEUER priority = 1 RULEBASED_RAW_IN
You do not have DBMS_AQIN privileges, which are required by the AQ Java API
2005-04-20 16:10:52,695> <ERROR> <default.collaxa.cube.activation> <AQ Adapter::Inbound> oracle.AQ.AQOracleSQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'DBMS_AQIN' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored at oracle.AQ.AQOracleQueue.dequeue(AQOracleQueue.java:1795) at oracle.AQ.AQOracleQueue.dequeue(AQOracleQueue.java:1307) at oracle.tip.adapter.aq.database.MessageReader.readMessage(MessageReader.java:399) at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.run(AQActivationSpecDeq ueuer.java:163) at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51) @ at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:267) at java.lang.Thread.run(Thread.java:534)
Solution:
Log on to the database using sys as sysdba
'GRANT EXECUTE ON SYS.DBMS_AQIN to
username
;'
. No deployment is necessary because this failure occurs after the connection has succeeded. The adapter automatically attempts to reconnect until the error is gone or the process is undeployed.
Failed JNDI Lookup
<timestamp> <WARN> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JNDI lookup of 'eis/AQ/aqSample2' failed due to: eis/AQ/aqSample2 not found <timestamp> <ERROR> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Error while performing endpoint Activation: ORABPEL-12510 Unable to locate the JCA Resource Adapter via WSDL port element jca:address. The Adapter Framework is unable to startup the Resource Adapter specified in the WSDL jca:address element: @ {http://xmlns.oracle.com/pcbpel/wsdl/jca/}address: location='eis/AQ/aqSample2'
Solution:
The reason for this is most likely that either:
The resource adapter's RAR file has not been deployed successfully to the OC4J Application Server.
The Resource Adapters RAR file has not been deployed successfully to the location
attribute in:
$J2EE_HOME/application-deployments/default/deployed-adapter-name/oc4j-ra.xml has not been set to eis/AQ/aqSample2
.
In this case, you may have to add a new connector-factory
entry (connection) to the oc4j-ra.xml
file. Add the correct entry and then restart the BPEL Application Server.
How to fix:
Look for the file $J2EE_HOME/application-deployments/default/aqAdapter/oc4j-ra.xml
. This file should be created when the adapter is deployed, which occurs the first time Oracle BPEL Process Manager is started. If the adapter is undeployed for some reason, deploy the adapter with the following command, then follow step 2:
java -jar $J2EE_HOME/admin.jar ormi://localhost admin welcome -deployconnector -file <path to AQAdapter.rar> -name AqAdapter
If $J2EE_HOME/application-deployments/default/aqAdapter/oc4j-ra.xml
exists, make sure the JNDI location is defined in the oc4j-ra.xml
file.
<connector-factory location="eis/AQ/aqSample" connector-name="AQ Adapter"> <config-property name="connectionString" value="jdbc:oracle:thin:@myhost:1521:appdb2"/> <config-property name="userName" value="scott"/> @ <config-property name="password" value="tiger"/> </connector-factory>