- Управление пакетами ПО:
- Установить пакет:
pkgadd -G -d VBoxSolarisAdditions.pkg
- Удалить пакет:
pkgrm SUNWvboxguest
- Список установленных пакетов:
pkginfo
- Установить пакет:
- Сеть и удалённый доступ:
- Вывести список активных сетевых адаптеров:
ifconfig -a
- Перезапустить демона сетевых соединений:
svcadm restart network
- Перезапустить SSH-сервер:
svcadm restart ssh
- Вывести список активных сетевых адаптеров:
- Выключение/перезапуск:
- Выключить ОС:
poweroff
- Перезапуск ОС:
reboot
- Выключить ОС:
четверг, 29 ноября 2012 г.
Полезные команды Solaris (для консультантов)
В дополнение к статье по полезным командам Unix-систем.
понедельник, 12 ноября 2012 г.
четверг, 1 ноября 2012 г.
Проблема с сохранением изменений в Oracle SQL Developer
Проблема:
При сохранить изменения в таблице через Oracle SQL Developer получается ошибка:
При сохранить изменения в таблице через Oracle SQL Developer получается ошибка:
One error saving changes to table "SCHEMA"."TABLENAME":
Row 1: Data got commited in another/same session, cannot update row.
Вариант решения:понедельник, 22 октября 2012 г.
Ошибка "java.lang.UnsupportedOperationException: Remote JDBC disabled" и варианты её решения
Ошибка:
При попытке удалённого доступа к DataSource-у Weblogic-сервера генерируется следующая ошибка:
Удалённый доступ к JDBC отключен в Weblogic Server.
Варианты решения:
Первый вариант:
При попытке удалённого доступа к DataSource-у Weblogic-сервера генерируется следующая ошибка:
java.lang.UnsupportedOperationException: Remote JDBC disabled
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at weblogic.jdbc.common.internal.RmiDataSource_1036_WLStub.getConnection(Unknown Source)
at oracle.integration.platform.blocks.event.saq.SAQRemoteBusinessEventConnection.createConnection(SAQRemoteBusinessEventConnection.java:122)
at oracle.integration.platform.blocks.event.saq.SAQRemoteBusinessEventConnection.enqueueEvent(SAQRemoteBusinessEventConnection.java:67)
at oracle.integration.platform.blocks.event.saq.SAQRemoteBusinessEventConnection.publishEvent(SAQRemoteBusinessEventConnection.java:54)
...
Caused by: java.lang.UnsupportedOperationException: Remote JDBC disabled
at weblogic.jdbc.common.internal.JDBCServerHelperImpl.<clinit>(JDBCServerHelperImpl.java:50)
at weblogic.jdbc.common.internal.JDBCService.initialize(JDBCService.java:91)
at weblogic.jdbc.common.internal.JDBCService.start(JDBCService.java:138)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Причина:Удалённый доступ к JDBC отключен в Weblogic Server.
Варианты решения:
Первый вариант:
- Перейти в директорию домена. Перейти в поддиректорию bin и изменить файл setDomainEnv.sh
- Найти свойство WLS_JDBC_REMOTE_ENABLED и изменить его значение с false на true:
... WLS_JDBC_REMOTE_ENABLED="-Dweblogic.jdbc.remoteEnabled=true" export WLS_JDBC_REMOTE_ENABLED ...
- Перестартовать все Managed-сервера домена.
- Установить при запуске сервера системное свойство (как сделать см.здесь):
-Dweblogic.jdbc.remoteEnabled=true
воскресенье, 7 октября 2012 г.
Публикация события в EDN из Java
Рассмотрим пример публикации события в EDN из Java для AQ и JMS на примере события:
Класс реализующий отправку события:
Данное приложение-пример для JDeveloper содержащее два проекта (здесь):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://schemas.oracle.com/events/edl" targetNamespace="http://schemas.oracle.com/events/edl/TestEvent">
<schema-import namespace="http://nl.xenta/events" location="xsd/TestEvent.xsd"/>
<event-definition name="EventElement">
<content xmlns:ns0="http://nl.xenta/events" element="ns0:TestEvent"/>
</event-definition>
</definitions>
По-умолчанию используется механизм AQ, но можно настроить и с использованием JMS (см. 41.3.6 How to Configure JMS-based EDN Implementations)
Класс реализующий отправку события:
import oracle.fabric.blocks.event.BusinessEventConnection;
import oracle.fabric.blocks.event.BusinessEventConnectionFactory;
import oracle.integration.platform.blocks.event.BusinessEventBuilder;
import oracle.integration.platform.blocks.event.jms.JmsRemoteBusinessEventConnectionFactory;
import oracle.integration.platform.blocks.event.saq.SAQRemoteBusinessEventConnectionFactory;
import oracle.soa.common.util.XMLUtil;
import org.w3c.dom.Element;
import java.util.Date;
import java.util.Properties;
import javax.jms.Queue;
import javax.jms.QueueConnectionFactory;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
import javax.transaction.UserTransaction;
import javax.xml.namespace.QName;
public class EdnUtils {
private static final String EDN_JMS_CONNECTION_FACTORY_NAME = "jms/fabric/EDNConnectionFactory";
private static final String EDN_JMS_XA_CONNECTION_FACTORY_NAME = "jms/fabric/xaEDNConnectionFactory";
private static final String EDN_QUEUE_NAME = "jms/fabric/EDNQueue";
private static final String EDN_DATASOURCE = "jdbc/EDNDataSource";
private static final String EDN_LOCALTX_DATASOURCE = "jdbc/EDNLocalTxDataSource";
public static void main(String[] args) {
Properties props = new Properties();
props.put(Context.PROVIDER_URL, "t3://127.0.0.1:8001");
props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
props.put(Context.SECURITY_PRINCIPAL, "weblogic");
props.put(Context.SECURITY_CREDENTIALS, "welcome1");
try{
String eventName = "EventElement";
String eventNamespace = "http://schemas.oracle.com/events/edl/TestEvent";
String eventBodyStr = "<TestEvent xmlns=\"http://nl.xenta/events\">\n"
+ "<action>action from java</action> \n"
+ "<description>description at [" + new Date() + "]</description> \n"
+ "</TestEvent>";
Element eventBody = XMLUtil.parseDocumentFromXMLString(eventBodyStr.toString()).getDocumentElement();
InitialContext context = new InitialContext(props);
EdnUtils.publishEvent(context, false, eventName, eventNamespace, eventBody);
} catch (Exception e) {
e.printStackTrace();
}
}
public static void publishEvent(InitialContext context, boolean isJmsEdnMode, String eventName,
String eventNamespace, Element eventBody) throws NamingException {
BusinessEventConnectionFactory factory = null;
UserTransaction userTransaction =
(UserTransaction) context.lookup("javax.transaction.UserTransaction");
if (!isJmsEdnMode) {
DataSource ds = (DataSource) context.lookup(EDN_DATASOURCE);
DataSource localTxDs = (DataSource) context.lookup(EDN_LOCALTX_DATASOURCE);
factory = new SAQRemoteBusinessEventConnectionFactory(ds, localTxDs, userTransaction);
} else {
QueueConnectionFactory queueConnectionFactory =
((QueueConnectionFactory) context.lookup(EDN_JMS_CONNECTION_FACTORY_NAME));
QueueConnectionFactory xaQueueConnectionFactory =
((QueueConnectionFactory) context.lookup(EDN_JMS_XA_CONNECTION_FACTORY_NAME));
Queue jmsQueue = ((Queue) context.lookup(EDN_QUEUE_NAME));
factory = new JmsRemoteBusinessEventConnectionFactory(queueConnectionFactory, xaQueueConnectionFactory,
jmsQueue, userTransaction);
}
BusinessEventConnection conn = factory.createBusinessEventConnection();
BusinessEventBuilder builder = BusinessEventBuilder.newInstance();
builder.setEventName(new QName(eventNamespace, eventName));
builder.setBody(eventBody);
conn.publishEvent(builder.createEvent(), 3);
conn.close();
}
}
Для сборки и запуска примера из JDeveloper потребуются следующие библиотеки:
Данное приложение-пример для JDeveloper содержащее два проекта (здесь):
- EventToFile - композит который при получении события пишет в файл на файловой системе, так же через него можно отправить событие;
- PublishEventFromJava - проект содержащий данный пример.
вторник, 25 сентября 2012 г.
Тренинги по Oracle Unified Method
Тренинги по Oracle Unified Method доступны на Oracle Learning Library.
На момент написания статьи доступно два уровня OUM:
Полезные ссылки:
На момент написания статьи доступно два уровня OUM:
- Level 1 - Overview and Awareness
- Level 2:
Полезные ссылки:
понедельник, 17 сентября 2012 г.
Ошибка "internal xpath error" в oraext:query-database и вариант её решения
Ошибка:
При использовании XPath-функции oraext:query-database, если в запросе используются функции БД (например: select max(salary) from employee) возникает ошибка следующего вида:
XML SQL Utility (XSU) обрабатывает имя столбца как имя тега. В нашем случае имя столбца max(salary) рассматривается XSU как недопустимое имя тега, и происходит ошибка.
Вариант решения:
Необходимо добавить алиас для столбца в котором используются функции, т.е. в нашем случае:
При использовании XPath-функции oraext:query-database, если в запросе используются функции БД (например: select max(salary) from employee) возникает ошибка следующего вида:
<bpelFault>
<faultType>0</faultType>
<subLanguageExecutionFault xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
<part name="summary">
<summary>An error occurs while processing the XPath expression; the
expression is oraext:query-database("select
max(salary) from employee",false(),false(),'jdbc/examplesDS').</summary>
</part>
<part name="detail">
<detail>XPath expression failed to execute. An error occurs while
processing the XPath expression; the expression is
oraext:query-database("select max(salary) from
employee",false(),false(),'jdbc/examplesDS'). The XPath
expression failed to execute; the reason was: internal xpath
error. Check the detailed root cause described in the exception
message text and verify that the XPath query is correct.</detail>
</part>
<part name="code">
<code>XPath expression failed to execute</code>
</part>
</subLanguageExecutionFault>
</bpelFault>
А в логе managed-сервера:
oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an XML tag name.
at oracle.xml.sql.core.OracleXMLConvert.getXML(OracleXMLConvert.java:1178)
at oracle.xml.sql.query.OracleXMLQuery.getXMLDOM(OracleXMLQuery.java:417)
at oracle.xml.sql.query.OracleXMLQuery.getXMLDOM(OracleXMLQuery.java:384)
at oracle.xml.sql.query.OracleXMLQuery.getXMLDOM(OracleXMLQuery.java:345)
at oracle.tip.pc.services.functions.ExtFunc.queryDatabase(ExtFunc.java:152)
at oracle.tip.pc.services.functions.ExtFuncFunction$QueryDatabaseFunction.call(ExtFuncFunction.java:359)
...
Причина:XML SQL Utility (XSU) обрабатывает имя столбца как имя тега. В нашем случае имя столбца max(salary) рассматривается XSU как недопустимое имя тега, и происходит ошибка.
Вариант решения:
Необходимо добавить алиас для столбца в котором используются функции, т.е. в нашем случае:
oraext:query-database("select max(salary) as salary from employee",
false(),false(),'jdbc/examplesDS')
суббота, 15 сентября 2012 г.
Хеширование SHA-1 и MD5 на PL/SQL и Java
- Реализация на PL/SQL:
-
SHA-1:
CREATE OR REPLACE FUNCTION SHA1(plain_text VARCHAR2) RETURN VARCHAR2 AS BEGIN RETURN UTL_RAW.CAST_TO_VARCHAR2(UTL_ENCODE.BASE64_ENCODE(DBMS_CRYPTO.HASH (src => utl_i18n.string_to_raw (plain_text, 'AL32UTF8'), typ => DBMS_CRYPTO.HASH_SH1))); END;
- MD5:
CREATE OR REPLACE FUNCTION MD5(plain_text VARCHAR2) RETURN VARCHAR2 IS BEGIN RETURN RAWTOHEX(DBMS_OBFUSCATION_TOOLKIT.MD5(INPUT => TL_RAW.CAST_TO_RAW(plain_text) )); END;
-
SHA-1:
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class CryptoUtils {
private final static char[] ALPHABET =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray();
public static String sha1(String plain) {
try {
MessageDigest md = MessageDigest.getInstance("sha");
md.update(plain.getBytes());
byte[] digest = md.digest();
return encode(digest);
/* Альтернативные варианты:
return javax.xml.bind.DatatypeConverter.printBase64Binary(digest);
или
return com.sun.org.apache.xml.internal.security.utils.Base64.encode(digest);
*/
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
return null;
}
}
public static String md5(String raw) {
try {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(raw.getBytes(), 0, raw.length());
return new BigInteger(1, md.digest()).toString(16);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
return null;
}
}
public static String encode(byte[] buf) {
int size = buf.length;
char[] ar = new char[((size + 2) / 3) * 4];
int a = 0;
int i = 0;
while (i < size) {
byte b0 = buf[i++];
byte b1 = (i < size) ? buf[i++] : 0;
byte b2 = (i < size) ? buf[i++] : 0;
int mask = 0x3F;
ar[a++] = ALPHABET[(b0 >> 2) & mask];
ar[a++] = ALPHABET[((b0 << 4) | ((b1 & 0xFF) >> 4)) & mask];
ar[a++] = ALPHABET[((b1 << 2) | ((b2 & 0xFF) >> 6)) & mask];
ar[a++] = ALPHABET[b2 & mask];
}
switch (size % 3) {
case 1:
ar[--a] = '=';
case 2:
ar[--a] = '=';
}
return new String(ar);
}
}
воскресенье, 29 июля 2012 г.
Управление структурой MDS с помощью MDS Explorer
MDS Explorer - это OpenSource-проект, цель которого создание средства для доступа к Oracle MDS (Meta Data Services) репозиториям с помощью которого можно создавать, удалять, загружать, выгружать директории и файлы.
На сайте проекта можно скачать исходники (в скомпилированном виде отсутствуют). В скомпилированном виде в одном jar-файле выкладываю здесь.
Запуск:
На сайте проекта можно скачать исходники (в скомпилированном виде отсутствуют). В скомпилированном виде в одном jar-файле выкладываю здесь.
Запуск:
- Выполнить следующую команду:
где DB - для доступа к репозиторию в БД;java -Drepository.flavor=DB -jar MDSExplorer.jar
FILE - для доступа к репозиторию в файловой системе. - Ввести параметры соединения со схемой MDS, затем нажать "Connect", выбрать нужный раздел (partition) и нажать "OK":
- В открывшемся окне можно выполнять действия по управлению структурой MDS:
пятница, 29 июня 2012 г.
Удаление метаданных из MDS
Все команды выполняются из wlst.cmd или wlst.sh находящегося в SOA_HOME, у меня например это:
C:\Apps\Oracle\Weblogic\10.3.6\Oracle_SOA1\common\bin\wlst.cmd
- Удаление файлов
Примечание: удаляются файлы, но не каталоги:
- Соединяемся с SOA-сервером:
где weblogic - логин административного пользователя; welcome1 - пароль административного пользователя; bpm-dev.mycompany.com - хост SOA-сервера; 8001 - порт SOA-сервера.wls:/offline> connect('weblogic','welcome1','t3://bpm-dev.mycompany.com:8001')
- Выполняем удаление файлов:
где soa_server1 - имя SOA-сервера; /apps/MyComponents - директория из которой будут удаляться файлы; ** - удаление в текущем каталоги в всех вложенных каталогах.wls:/soa_dev/serverConfig> deleteMetadata('soa-infra','soa_server1','/apps/MyComponents/**')
- Соединяемся с SOA-сервером:
- Удаление каталогов (рекурсивное)
Примечание: если в удаляемом каталоге нет ни одного файла может произойти ошибка и каталог не будет удалён.
где bpm-dev.mycompany.com - хост SOA-сервера; 8001 - http-порт SOA-сервера; MyComponents - директория из корневой директории apps которую следует удалить; weblogic - логин административного пользователя; welcome1 - пароль административного пользователя.wls:/offline> sca_removeSharedData('http://bpm-dev.mycompany.com:8001', 'MyComponents', 'weblogic', 'welcome1')
суббота, 5 мая 2012 г.
Ошибка валидации SOA-композита при сборке на сервере Hudson
Ошибка:
При сборке композита возникает ошибка вида:
Причина:
Проблема с доступом к MDS-репозиторию или к сервису через механизм прямого связывания.
Вариант решения:
Разобраться почему не удается получить доступ (лучший вариант) или убрать валидацию композита при сборке (но до этого убедится в успешной валидации на рабочей станции), для этого:
При сборке композита возникает ошибка вида:
scac:
[scac] Validating composite "/var/lib/hudson/jobs/SAPRetailRegistrationInventoryComments/workspace/tools/ant/../../composite.xml"
[scac] info: Validating composite "/var/lib/hudson/jobs/SAPRetailRegistrationInventoryComments/workspace/tools/ant/../../composite.xml"
[scac] info: Pass
[scac] error: location {/ns:composite}(12,61): Parse of component type files failed, check the adf-config.xml file : "oracle.fabric.common.FabricException: oracle.fabric.common.FabricException: javax.management.InstanceNotFoundException: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: javax.management.InstanceNotFoundException: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: oracle.fabric.common.FabricException: javax.management.InstanceNotFoundException: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: javax.management.InstanceNotFoundException: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean"
BUILD FAILED
/var/lib/hudson/jobs/SAPRetailRegistrationInventoryComments/workspace/tools/ant/build.xml:28: The following error occurred while executing this line:
/u01/jdeveloper11.1.1.5/jdeveloper/bin/ant-sca-package.xml:46: The following error occurred while executing this line:
/u01/jdeveloper11.1.1.5/jdeveloper/bin/ant-sca-compile.xml:269: Java returned: 1 Check log file : /u01/tmp/SAPRetailRegistrationInventoryComments.err for errors
Или следующего вида: scac:
[scac] Validating composite "/var/lib/hudson/jobs/SAPRetailRegistrationInventoryComments/workspace/tools/ant/../../composite.xml"
[scac] BPEL 2.0 validation of "RegistrationInventoryCommentsBPELProcess" took 391.7 milliseconds
[scac] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[scac] >> modified xmlbean locale class in use
[scac] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[scac] info: Validating composite "/var/lib/hudson/jobs/SAPRetailRegistrationInventoryComments/workspace/tools/ant/../../composite.xml"
[scac] info: Pass
[scac] error: location {/ns:composite/ns:import[@location='file:/var/lib/hudson/jobs/SAPRetailRegistrationInventoryComments/workspace/RegistrationInventoryCommentsBPELProcess.wsdl']}: Load of wsdl "ZINV_VERIF_receive.wsdl with Message part element undefined in wsdl [file:/var/lib/hudson/jobs/SAPRetailRegistrationInventoryComments/workspace/RegistrationInventoryCommentsBPELProcess.wsdl] part name = payload type = {urn:sap-com:document:sap:idoc}ZINV_VERIF" failed
[scac] error: location {/ns:composite/ns:import[@location='file:/var/lib/hudson/jobs/SAPRetailRegistrationInventoryComments/workspace/CheckIfMsgExistsDBAdapter.wsdl']}: Load of wsdl "ZINV_VERIF_receive.wsdl with Message part element undefined in wsdl [file:/var/lib/hudson/jobs/SAPRetailRegistrationInventoryComments/workspace/CheckIfMsgExistsDBAdapter.wsdl] part name = OutputParameters type = {http://xmlns.oracle.com/pcbpel/adapter/db/RTKESBPROTO/INTEGRATION_PKG/CHECK_IF_MSG_EXISTS/}OutputParameters" failed
[scac] error: location {/ns:composite/ns:import[@location='http://oracle-sb.tsretail.ru:9030/soa-infra/directWsdl/SAP/SAPRetailRegistrationCommon/RegistrationCommonService?resource=%2FRegistrationCommonService.wsdl']}(20,30): Load of wsdl "ZINV_VERIF_receive.wsdl with Message part element undefined in wsdl [http://oracle-sb.tsretail.ru:9030/soa-infra/directWsdl/SAP/SAPRetailRegistrationCommon/RegistrationCommonService?resource=%2FRegistrationCommonService.wsdl] part name = payload type = {http://www.tsretail.ru/integration/sap/retail}registration_reply" failed
[scac] error: location {/ns:composite/ns:import[@location='file:/var/lib/hudson/jobs/SAPRetailRegistrationInventoryComments/workspace/RegistrationCommonServiceWrapper.wsdl']}: Load of wsdl "ZINV_VERIF_receive.wsdl with Message part element undefined in wsdl [http://oracle-sb.tsretail.ru:9030/soa-infra/directWsdl/SAP/SAPRetailRegistrationCommon/RegistrationCommonService?resource=%2FRegistrationCommonService.wsdl] part name = payload type = {http://www.tsretail.ru/integration/sap/retail}registration_reply" failed
[scac] error: location {/ns:composite/ns:import[@location='http://oracle-sb.tsretail.ru:9030/soa-infra/directWsdl/SAP/SAPRetailRegistrationCommon/RegistrationCommonService?resource=%2FRegistrationCommonService.wsdl']}(20,30): Load of wsdl "ZINV_VERIF_receive.wsdl with Message part element undefined in wsdl [http://oracle-sb.tsretail.ru:9030/soa-infra/directWsdl/SAP/SAPRetailRegistrationCommon/RegistrationCommonService?resource=%2FRegistrationCommonService.wsdl] part name = payload type = {http://www.tsretail.ru/integration/sap/retail}registration_reply" failed
[scac] error: location {/ns:composite/ns:import[@location='file:/var/lib/hudson/jobs/SAPRetailRegistrationInventoryComments/workspace/ZINV_VERIF_receive.wsdl']}: Load of wsdl "ZINV_VERIF_receive.wsdl with Message part element undefined in wsdl [file:/var/lib/hudson/jobs/SAPRetailRegistrationInventoryComments/workspace/ZINV_VERIF_receive.wsdl] part name = event_ZINV_VERIF type = {urn:sap-com:document:sap:idoc}ZINV_VERIF" failed
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(38): Error loading schema from file:/var/lib/hudson/jobs/SAPRetailRegistrationInventoryComments/workspace/RegistrationInventoryCommentsBPELProcess.wsdl [Cause=Error in getting XML input stream: oramds:/apps/core.xsd: Error encountered while creating the MDS Session]
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(81): "element" is set to "ns4:error" on this <bpel:variable> but it cannot be resolved (check value of "element", imports, WSDLs or XSDs).
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(94): "element" is set to "ns8:comments" on this <bpel:variable> but it cannot be resolved (check value of "element", imports, WSDLs or XSDs).
[scac] info: in RegistrationInventoryCommentsBPELProcess.bpel(100): Copy rule not checked - from-spec type-of "xsd:string", to-spec type-of "unspecified".
[scac] info: in RegistrationInventoryCommentsBPELProcess.bpel(104): Copy rule not checked - from-spec type-of "xsd:string", to-spec type-of "unspecified".
[scac] info: in RegistrationInventoryCommentsBPELProcess.bpel(108): Copy rule not checked - from-spec type-of "xsd:string", to-spec type-of "unspecified".
[scac] info: in RegistrationInventoryCommentsBPELProcess.bpel(112): Copy rule not checked - from-spec type-of "xsd:string", to-spec type-of "unspecified".
[scac] info: in RegistrationInventoryCommentsBPELProcess.bpel(116): Copy rule not checked - from-spec type-of "xsd:string", to-spec type-of "unspecified".
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(146): Variable "OnMessage_process_InputVariable" does not have a part named "payload" - check expression segment "$OnMessage_process_InputVariable.payload"
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(160): Variable "OnMessage_ZINV_VERIF_InputVariable" does not have a part named "event_ZINV_VERIF" - check expression segment "$OnMessage_ZINV_VERIF_InputVariable.event_ZINV_VERIF"
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(160): The XPath segment "child::ns5:IDOC" cannot be resolved.
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(161): Variable "InvokeCheckIfMsgExists_InputVariable" does not have a part named "InputParameters" - check expression segment "$InvokeCheckIfMsgExists_InputVariable.InputParameters"
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(161): The XPath segment "child::ns6:P_IN_MSG_SYS_ID" cannot be resolved.
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(165): Variable "InvokeCheckIfMsgExists_InputVariable" does not have a part named "InputParameters" - check expression segment "$InvokeCheckIfMsgExists_InputVariable.InputParameters"
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(165): The XPath segment "child::ns6:P_IN_MSG_TYPE" cannot be resolved.
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(177): Variable "InvokeCheckIfMsgExists_OutputVariable" does not have a part named "OutputParameters" - check expression segment "$InvokeCheckIfMsgExists_OutputVariable.OutputParameters"
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(177): The XPath segment "child::ns6:P_ERR_CODE" cannot be resolved.
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(184): Variable "InvokeCheckIfMsgExists_OutputVariable" does not have a part named "OutputParameters" - check expression segment "$InvokeCheckIfMsgExists_OutputVariable.OutputParameters"
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(184): The XPath segment "child::ns6:P_ERR_MESSAGE" cannot be resolved.
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(188): Variable "InvokeCheckIfMsgExists_OutputVariable" does not have a part named "OutputParameters" - check expression segment "$InvokeCheckIfMsgExists_OutputVariable.OutputParameters"
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(188): The XPath segment "child::ns6:P_ERR_CODE" cannot be resolved.
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(199): Variable "InvokeCheckIfMsgExists_OutputVariable" does not have a part named "OutputParameters" - check expression segment "$InvokeCheckIfMsgExists_OutputVariable.OutputParameters"
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(199): The XPath segment "child::ns6:P_RESULT" cannot be resolved.
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(210): Variable "OnMessage_ZINV_VERIF_InputVariable" does not have a part named "event_ZINV_VERIF" - check expression segment "$OnMessage_ZINV_VERIF_InputVariable.event_ZINV_VERIF"
[scac] warning: in RegistrationInventoryCommentsBPELProcess.bpel(211): The node <bpel:to> refers to a bpel:variable (via the attribute "variable") - this bpel:variable needs to be defined correctly.
[scac] error: in RegistrationInventoryCommentsBPELProcess.bpel(219): Variable "OnMessage_ZINV_VERIF_InputVariable" does not have a part named "event_ZINV_VERIF" - check expression segment "$OnMessage_ZINV_VERIF_InputVariable.event_ZINV_VERIF"
[scac] info: File to validate does not exist fault-policies.xml:/var/lib/hudson/jobs/SAPRetailRegistrationInventoryComments/workspace/tools/ant/../../fault-policies.xml (No such file or directory)
[scac] info: Checking validateMessages....testsuites/SAPRetailRegistrationInventoryComments/messages
[scac] info: Begin validateIncludes....testsuites/SAPRetailRegistrationInventoryComments/includes
[scac] info: Begin validateTests....testsuites/SAPRetailRegistrationInventoryComments/tests
[scac] info: Check validateTestDocument....testsuites/SAPRetailRegistrationInventoryComments/tests/CommonRegistration-Test.xml
[scac] info: Check doSchemaValidation....testsuites/SAPRetailRegistrationInventoryComments/tests/CommonRegistration-Test.xml
[scac] info: Check isSetInitiate ....testsuites/SAPRetailRegistrationInventoryComments/tests/CommonRegistration-Test.xml
[scac] info: Check WireActionsModel ....testsuites/SAPRetailRegistrationInventoryComments/tests/CommonRegistration-Test.xml
[scac] info: Check WireActionsModel ....testsuites/SAPRetailRegistrationInventoryComments/tests/CommonRegistration-Test.xml
[scac] info: validateTestDocument Pass
[scac] info: validateTests Pass
BUILD FAILED
/var/lib/hudson/jobs/SAPRetailRegistrationInventoryComments/workspace/tools/ant/build.xml:39: The following error occurred while executing this line:
/u01/jdeveloper11.1.1.5/jdeveloper/bin/ant-sca-package.xml:46: The following error occurred while executing this line:
/u01/jdeveloper11.1.1.5/jdeveloper/bin/ant-sca-compile.xml:269: Java returned: 1 Check log file : /u01/tmp/SAPRetailRegistrationInventoryComments.err for errors
Total time: 4 seconds
Recording test results
[DEBUG] Skipping watched dependency update for build: SAPRetailRegistrationInventoryComments #31 due to result: FAILURE
Finished: FAILURE
Причина:
Проблема с доступом к MDS-репозиторию или к сервису через механизм прямого связывания.
Вариант решения:
Разобраться почему не удается получить доступ (лучший вариант) или убрать валидацию композита при сборке (но до этого убедится в успешной валидации на рабочей станции), для этого:
- Перейти в директорию в которой установлен Oracle JDeveloper:
$ cd /u01/jdeveloper11.1.1.5/
- Перейти в директорию с Ant-скриптами для SOA Suite:
$ cd jdeveloper/bin
- Забэкапить файл ant-sca-package.xml:
$ cp ant-sca-package.xml ant-sca-package.xml.original
- Изменить файл ant-sca-package.xml:
$ vi ant-sca-package.xml
Найти в нём следующие строки:
...
<target name="scac-validate" depends="init">
<echo message="Running scac-validate in ${scac.input}"/>
<antcall target="scac" inheritall="true"/>
</target>
...
Заменить их на следующие:
...
<target name="scac-validate" depends="init">
<echo message="Running scac-validate in ${scac.input}"/>
<!--antcall target="scac" inheritall="true"/-->
<echo message="Skipping scac-validate in ${scac.input}"/>
</target>
...
пятница, 4 мая 2012 г.
Непрерывная интеграция для Oracle SOA Suite 11g. Альтернативный вариант
Программное обеспечение:
В предыдущей статье (см. здесь) описана конфигурация в которой предполагалось, что в SOA-приложениях не много SOA-проектов (например, 1-3), а на уровне системы непрерывной интеграции (в нашем случае - Hudson) производится опрос системы контроля версий (в нашем случае - SVN) на уровне SOA-приложения. Эта стратегия не оптимальна, при условии что в SOA-приложении большое количество (например, 5-15) SOA-проектов, т.к. при изменении одного из проектов будут собраны, развернуты и запущенны автотесты всех проектов в приложении. В данной статье описана конфигурация на уровне SOA-проекта.
Последовательность шагов:
- Сервер непрерывной интеграции: Oracle Enterprise Linux 5.7, JDeveloper 11.1.1.5, Hudson 2.2.0;
- Сервер SOA: Oracle SOA Suite 11.1.1.5.
В предыдущей статье (см. здесь) описана конфигурация в которой предполагалось, что в SOA-приложениях не много SOA-проектов (например, 1-3), а на уровне системы непрерывной интеграции (в нашем случае - Hudson) производится опрос системы контроля версий (в нашем случае - SVN) на уровне SOA-приложения. Эта стратегия не оптимальна, при условии что в SOA-приложении большое количество (например, 5-15) SOA-проектов, т.к. при изменении одного из проектов будут собраны, развернуты и запущенны автотесты всех проектов в приложении. В данной статье описана конфигурация на уровне SOA-проекта.
Последовательность шагов:
- Скачиваем дистрибутив Hudson с официального сайта и устанавливаем его.
- Создать тестовое SOA-приложение (в нашем случае это HelloWorldApplication), включая автотесты для этого приложения (подробнее об их создании для Oracle SOA Suite здесь).
- Добавим в SOA-проект директорию tools, а в неё конфигурационный файл с именем project.properties:
Следующего содержания:
project.name=HelloWorldProject project.revision=1.0 project.partition=test
- Для композита сгенерировать "Configuration Plan":
- Отредактировать конфигурационный файл build.properties находящийся в директории SOA-проект/tools/ant/:
Если структура SVN-репозитория идентична структуре описанной на шаге 2, то изменить значения параметров выделенных красным и настройки развертывания.# global wn.bea.home=/u01/jdeveloper11.1.1.5 oracle.home=${wn.bea.home}/jdeveloper java.passed.home=/u01/jdk1.6.0_30 wl_home=${wn.bea.home}/wlserver_10.3 # temp tmp.output.dir=/u01/tmp junit.output.dir=../.. deployment.plan.environment=dev # dev deployment server weblogic dev.serverURL=http://192.168.2.130:9030 dev.user=weblogic dev.password=welcome1 dev.overwrite=true dev.forceDefault=true # testing deployment server weblogic test.serverURL=http://192.168.2.130:8801 test.overwrite=true test.user=weblogic test.password=welcome1 test.forceDefault=true # production deployment server weblogic prod.serverURL=http://192.168.2.130:8001 prod.overwrite=true prod.user=weblogic prod.password=welcome1 prod.forceDefault=true
- Отредактировать конфигурационный файл для каждого окружения (в нашем тестовом примере будем использовать только dev) - файл с именем <окружение>.jndi.properties (в нашем случае это dev.jndi.properties) в директорию SOA-проект/tools/ant/:
java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory java.naming.provider.url=t3://192.168.2.130:9030/soa-infra java.naming.security.principal=weblogic java.naming.security.credentials=welcome1 dedicated.connection=true dedicated.rmicontext=true
- Теперь настроим Hudson на наш тестовый пример.
- Зайти в консоль Hudson, затем "Настроить Hudson" -> "Конфигурирование системы":
- Добавляем в секцию JDK используемую версию, а в секцию Ant добавляем входящий в состав JDeveloper из директории
jdeveloper/ant : - Создать новую задачу для нашего SOA-проекта (для этого нажать "Новая задача" в консоли Hudson):
- Откроется меня настройки проекта (или нажать "Настроить проект"). В "Управление исходным кодом" выбрать "Subversion" и ввести "URL репозитория" - в нашем случае указываем путь до SOA-проекта: Если используется авторизация, то нажать "enter credential" и ввести параметры авторизации:
- В секции "Триггеры сборки" выбрать "Опрашивать SCM об изменениях" и ввести в поле расписание значение "* * * * *" (это значит что опрашивать каждую минуту):
- В секции "Сборка" выбрать "Добавить шаг сборки" и далее выбрать "Вызвать Ant":
- Заполнить поля следующим образом:
- Версия Ant - jdev_ant;
- Цели - deployProject;
- Сборочный файл - tools/ant/build.xml;
- Опции Java - -Dbasedir=/u01/jdeveloper11.1.1.5/jdeveloper/bin
- В секции "Послесборочные операции" выбрать "Publish JUnit test result report" и ввести значение "*.xml":
- Сохранить все настройки.
- Протестируем работоспособность.
- Изменяем любой файл в SVN-репозитории (в течении одной минуты будет запущена сборка);
- Нажав на кнопку "Собрать сейчас":
Started by user sdevyatov Reverting /var/lib/hudson/jobs/HelloWorldProject/workspace/. ignoreExternals: false Updating http://127.0.0.1/repo/TestingApplication/HelloWorldProject revision: May 3, 2012 2:48:07 PM depth:infinity ignoreExternals: false At revision 93 no change for http://127.0.0.1/repo/TestingApplication/HelloWorldProject since the previous build [ant] $ /u01/jdeveloper11.1.1.5/jdeveloper/ant/bin/ant -file build.xml deployProject Buildfile: build.xml [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] Please enter composite directory: [input] Please enter composite name: [input] Please enter composite revision: [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper deployProject: [echo] deploy project HelloWorldProject for environment dev [echo] deploy compositeName HelloWorldProject [echo] deploy compositeDir /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../.. [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] skipping input as property compositeDir has already been set. [input] skipping input as property compositeName has already been set. [input] skipping input as property revision has already been set. Trying to override old definition of task scac Trying to override old definition of task attachplan Trying to override old definition of task extractplan Trying to override old definition of task generateplan Trying to override old definition of task validateplan Trying to override old definition of task replaceRevision [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper clean: [echo] deleting /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../deploy/sca_HelloWorldProject_rev1.0.jar [delete] Deleting: /var/lib/hudson/jobs/HelloWorldProject/workspace/deploy/sca_HelloWorldProject_rev1.0.jar init: scac-validate: [echo] Running scac-validate in /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../composite.xml [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] skipping input as property compositeDir has already been set. [input] skipping input as property compositeName has already been set. [input] skipping input as property revision has already been set. [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper scac: [scac] Validating composite "/var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../composite.xml" [scac] BPEL 2.0 validation of "BPELProcess1" took 99.9 milliseconds [scac] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> [scac] >> modified xmlbean locale class in use [scac] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> [scac] info: Validating composite "/var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../composite.xml" [scac] info: Pass [scac] info: File to validate does not exist fault-policies.xml:/var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../fault-policies.xml (No such file or directory) [scac] info: Checking validateMessages....testsuites/TestCase2/messages [scac] info: Begin validateIncludes....testsuites/TestCase2/includes [scac] info: Begin validateTests....testsuites/TestCase2/tests [scac] info: Check validateTestDocument....testsuites/TestCase2/tests/Test2.1.xml [scac] info: Check doSchemaValidation....testsuites/TestCase2/tests/Test2.1.xml [scac] info: Check isSetInitiate ....testsuites/TestCase2/tests/Test2.1.xml [scac] info: Check WireActionsModel ....testsuites/TestCase2/tests/Test2.1.xml [scac] info: validateTestDocument Pass [scac] info: validateTests Pass [scac] info: Checking validateMessages....testsuites/TestCase1/messages [scac] info: Begin validateIncludes....testsuites/TestCase1/includes [scac] info: Begin validateTests....testsuites/TestCase1/tests [scac] info: Check validateTestDocument....testsuites/TestCase1/tests/Test1.xml [scac] info: Check doSchemaValidation....testsuites/TestCase1/tests/Test1.xml [scac] info: Check isSetInitiate ....testsuites/TestCase1/tests/Test1.xml [scac] info: Check WireActionsModel ....testsuites/TestCase1/tests/Test1.xml [scac] info: validateTestDocument Pass [scac] info: Check validateTestDocument....testsuites/TestCase1/tests/Test2.xml [scac] info: Check doSchemaValidation....testsuites/TestCase1/tests/Test2.xml [scac] info: Check isSetInitiate ....testsuites/TestCase1/tests/Test2.xml [scac] info: Check WireActionsModel ....testsuites/TestCase1/tests/Test2.xml [scac] info: validateTestDocument Pass [scac] info: validateTests Pass package: [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] skipping input as property compositeDir has already been set. [input] skipping input as property compositeName has already been set. [input] skipping input as property revision has already been set. [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper compile-source: [mkdir] Created dir: /var/lib/hudson/jobs/HelloWorldProject/workspace/dist [copy] Copying 28 files to /var/lib/hudson/jobs/HelloWorldProject/workspace/dist [copy] Warning: /var/lib/hudson/jobs/HelloWorldProject/.adf not found. [copy] Warning: /var/lib/hudson/jobs/HelloWorldProject/src not found. [copy] Warning: /var/lib/hudson/jobs/HelloWorldProject/workspace/src not found. [jar] Building jar: /var/lib/hudson/jobs/HelloWorldProject/workspace/deploy/sca_HelloWorldProject_rev1.0.jar [delete] Deleting directory /var/lib/hudson/jobs/HelloWorldProject/workspace/dist [echo] deploy on http://192.168.2.130:9030 with user weblogic [echo] deploy sarFile /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../deploy/sca_HelloWorldProject_rev1.0.jar [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] Please enter composite directory: [input] Please enter composite name: [input] Please enter composite revision: [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper deploy: [input] skipping input as property serverURL has already been set. [input] skipping input as property sarLocation has already been set. [deployComposite] setting user/password..., user=weblogic [deployComposite] Processing sar=/var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../deploy/sca_HelloWorldProject_rev1.0.jar [deployComposite] Adding sar file - /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../deploy/sca_HelloWorldProject_rev1.0.jar [deployComposite] INFO: Creating HTTP connection to host:192.168.2.130, port:9030 [deployComposite] INFO: Received HTTP response from the server, response code=200 [deployComposite] ---->Deploying composite success. [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] Please enter composite directory: [input] Please enter composite name: [input] Please enter composite revision: [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper test: [echo] Classpth = /u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-ext.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/oracle-soa-client-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel-common.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel.jar:/u01/jdeveloper11.1.1.5/wlserver_10.3/server/lib/weblogic.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-api.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-common.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-internal.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jrf_11.1.1/jrf-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-client-stubs-was.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.orb_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/plugins/com.ibm.ws.runtime.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.admin.client_7.0.0.jar [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper HelloWorldProject [echo] Using context = build.properties [echo] Using path = /u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-ext.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/oracle-soa-client-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel-common.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel.jar:/u01/jdeveloper11.1.1.5/wlserver_10.3/server/lib/weblogic.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-api.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-common.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-internal.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jrf_11.1.1/jrf-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-client-stubs-was.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.orb_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/plugins/com.ibm.ws.runtime.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.admin.client_7.0.0.jar [input] skipping input as property scatest.input has already been set. [input] skipping input as property jndi.properties.input has already been set. [scatest] Junit formatting [scatest] <testsuite name="sca.test-HelloWorldProject.TestCase1" tests="2" errors="0" failures="0" time="0.132"><properties><property name="db.type" value="oracle"/><property name="bpel.host.name" value="oracle-sb.tsretail.ru"/><property name="soa.oracle.home" value="/opt/Middleware/soa_11.1"/><property name="suite.start.date" value="2012-05-03T14:42:30.978+04:00"/><property name="suite.end.date" value="2012-05-03T14:42:31.110+04:00"/><property name="run.start.date" value="2012-05-03T14:42:30.978+04:00"/><property name="run.end.date" value="2012-05-03T14:42:31.163+04:00"/></properties><testcase name="Test1" classname="sca.test-HelloWorldProject.TestCase1.Test1" time="0.132"/><testcase name="Test2" classname="sca.test-HelloWorldProject.TestCase1.Test2" time="0.052"/></testsuite> [scatest] /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../BPEL-sca.test-HelloWorldProject.TestCase1.xml [scatest] <testsuite name="sca.test-HelloWorldProject.TestCase2" tests="1" errors="0" failures="0" time="0.102"><properties><property name="db.type" value="oracle"/><property name="bpel.host.name" value="oracle-sb.tsretail.ru"/><property name="soa.oracle.home" value="/opt/Middleware/soa_11.1"/><property name="suite.start.date" value="2012-05-03T14:42:31.061+04:00"/><property name="suite.end.date" value="2012-05-03T14:42:31.163+04:00"/><property name="run.start.date" value="2012-05-03T14:42:30.978+04:00"/><property name="run.end.date" value="2012-05-03T14:42:31.163+04:00"/></properties><testcase name="Test2.1" classname="sca.test-HelloWorldProject.TestCase2.Test2.1" time="0.102"/></testsuite> [scatest] /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../BPEL-sca.test-HelloWorldProject.TestCase2.xml [scatest] <testsuite name="sca.test-HelloWorldProject.codeCoverages" errors="0" failures="0" tests="0" time="0.0"/> [scatest] /var/lib/hudson/jobs/HelloWorldProject/workspace/tools/ant/../../BPEL-sca.test-HelloWorldProject.codeCoverages.xml BUILD SUCCESSFUL Total time: 13 seconds Recording test results Finished: SUCCESS
четверг, 3 мая 2012 г.
Виртуальная машина с Hudson и JDeveloper для целей непрерывной интеграции
В продолжении статьи об непрерывной интеграции Oracle SOA Suite выкладываю ссылки на загрузку сконфигурированной виртуальной машины VMware в соответствии с данным постом.
Установленное ПО:
Установленное ПО:
- Операционная система - Oracle Enterprise Linux 5 Update 7;
- Сервер непрерывной интеграции - Hudson 2.2.0;
- Система контроля версии - Subversion;
- Oracle JDeveloper 11.1.1.5.
- AutoTestingStand.zip.001
- AutoTestingStand.zip.002
- AutoTestingStand.zip.003
- AutoTestingStand.zip.004
- AutoTestingStand.zip.005
- AutoTestingStand.zip.006
- Операционная система:
- root/welcome1
- oracle/welcome1
- Subversion:
- oracle/welcome1
пятница, 27 апреля 2012 г.
Автоматизация бэкапа проекта в JDeveloper
Пояснение: иногда требуется забэкапить текущий проект (это более актуально при SOA и BPM приложениям), но коммитить в систему контроля версии ещё нельзя (например, если сервер непрерывной интеграции слушает систему контроля версии и по изменениям запускается сборка, развертывание и тесты).
- Настройка:
- Запустить JDeveloper;
- В меню "Tools" выбрать "External Tools...":
- Выбрать тип "External Program":
- Далее заполнить поля аналогично: В данном случае бэкапы будут складываться в директорию C:\JDeveloper\backups, если требуется то изменить на другую.
- Переименовать метку на кнопке:
- Поставить галку "Main Toolbar":
- Проверка:
- Нажать на созданную кнопку "Backup Project" - появится окно с запросом ввода метки для данного бэкапа:
- В JDeveloper можно увидеть лог выполнения бэкапа:
- В директории указанной для бэкапа появится zip-архив проекта с меткой в имени файла:
вторник, 24 апреля 2012 г.
Непрерывная интеграция для Oracle SOA Suite 11g
Программное обеспечение:
В нашем примере к качестве интеграционного сервера будет использоваться Hudson и он будет последовательно выполнять следующие действия:
P.S. см. так же статью Непрерывная интеграция для Oracle SOA Suite 11g. Альтернативный вариант
- Сервер непрерывной интеграции: Oracle Enterprise Linux 5.7, JDeveloper 11.1.1.5, Hudson 2.2.0;
- Сервер SOA: Oracle SOA Suite 11.1.1.5.
В нашем примере к качестве интеграционного сервера будет использоваться Hudson и он будет последовательно выполнять следующие действия:
- Периодический опрос SVN-репозитория, в случае наличия изменений выполнение последующих шагов;
- Сборка композитов;
- Развертываение композитов на SOA-сервере;
- Выполнение автотестов;
- Публикация отчетов о тестировании.
- Скачиваем дистрибутив Hudson с официального сайта и устанавливаем его.
- Создадим в репозитории SNV следующую структуру:
- Создать тестовое SOA-приложение (в нашем случае это HelloWorldApplication), включая автотесты для этого приложения (подробнее об их создании для Oracle SOA Suite здесь).
- Добавим в SOA-приложение конфигурационный файл с именем build.properties:
Следующего содержания:
projects=HelloWorldProject,TestingProject HelloWorldProject.revision=1.0 HelloWorldProject.partition=default TestingProject.revision=1.0 TestingProject.partition=default
- Для каждого композита сгенерировать "Configuration Plan": В наименование добавить суффикс dev (для разработческого окружения):
- Отредактировать конфигурационный файл build.properties находящийся в директории tools/ant/:
Если структура SVN-репозитория идентична структуре описанной на шаге 2, то изменить значения параметров выделенных красным и настройки развертывания.# global wn.bea.home=/u01/jdeveloper11.1.1.5 oracle.home=${wn.bea.home}/jdeveloper java.passed.home=/u01/jdk1.6.0_30 wl_home=${wn.bea.home}/wlserver_10.3 # temp tmp.output.dir=/u01/tmp junit.output.dir=../.. applications.home=../../apps applications=HelloWorldApplication deployment.plan.environment=dev # dev deployment server weblogic dev.serverURL=http://192.168.2.130:9030 dev.user=weblogic dev.password=welcome1 dev.overwrite=true dev.forceDefault=true # testing deployment server weblogic test.serverURL=http://192.168.2.130:8801 test.overwrite=true test.user=weblogic test.password=welcome1 test.forceDefault=true # production deployment server weblogic prod.serverURL=http://192.168.2.130:8001 prod.overwrite=true prod.user=weblogic prod.password=welcome1 prod.forceDefault=true
- Отредактировать конфигурационный файл для каждого окружения (в нашем тестовом примере будем использовать только dev) - файл с именем <окружение>.jndi.properties (в нашем случае это dev.jndi.properties) в директорию tools/ant/:
java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory java.naming.provider.url=t3://192.168.2.130:9030/soa-infra java.naming.security.principal=weblogic java.naming.security.credentials=welcome1 dedicated.connection=true dedicated.rmicontext=true
- Теперь настроим Hudson на наш тестовый пример.
- Зайти в консоль Hudson, затем "Настроить Hudson" -> "Конфигурирование системы":
- Добавляем в секцию JDK используемую версию, а в секцию Ant добавляем входящий в состав JDeveloper из директории
jdeveloper/ant : - Создать новую задачу для нашего SOA-приложения (для этого нажать "Новая задача" в консоли Hudson):
- Откроется меня настройки проекта (или нажать "Настроить проект"). В "Управление исходным кодом" выбрать "Subversion" и ввести "URL репозитория": Если используется авторизация, то нажать "enter credential" и ввести параметры авторизации:
- В секции "Триггеры сборки" выбрать "Опрашивать SCM об изменениях" и ввести в поле расписание значение "* * * * *" (это значит что опрашивать каждую минуту):
- В секции "Сборка" выбрать "Добавить шаг сборки" и далее выбрать "Вызвать Ant":
- Заполнить поля следующим образом:
- В секции "Послесборочные операции" выбрать "Publish JUnit test result report" и ввести значение "*.xml":
- Сохранить все настройки.
- Протестируем работоспособность.
- Изменяем любой файл в SVN-репозитории (в течении одной минуты будет запущена сборка);
- Нажав на кнопку "Собрать сейчас":
Started by user oracle Updating http://autoteststand/repo/Projects revision: Apr 20, 2012 21:53:53 AM depth:infinity ignoreExternals: false At revision 49 no change for http://autoteststand/repo/Projects since the previous build [ant] $ /u01/jdeveloper11.1.1.5/jdeveloper/ant/bin/ant -file build.xml deployAll Buildfile: build.xml [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] Please enter composite directory: [input] Please enter composite name: [input] Please enter composite revision: [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper deployAll: [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] Please enter composite directory: [input] Please enter composite name: [input] Please enter composite revision: [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper deployApplication: [echo] deploy application HelloWorldApplication [echo] deploy application.home ../../apps [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] Please enter composite directory: [input] Please enter composite name: [input] Please enter composite revision: [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper deployProject: [echo] deploy project HelloWorldProject for environment dev [echo] deploy compositeName HelloWorldProject [echo] deploy compositeDir /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] skipping input as property compositeDir has already been set. [input] skipping input as property compositeName has already been set. [input] skipping input as property revision has already been set. [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper clean: [echo] deleting /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/deploy/sca_HelloWorldProject_rev1.0.jar init: [mkdir] Created dir: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/HelloWorldProject/deploy scac-validate: [echo] Running scac-validate in /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/composite.xml [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] skipping input as property compositeDir has already been set. [input] skipping input as property compositeName has already been set. [input] skipping input as property revision has already been set. [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper scac: [scac] Validating composite "/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/composite.xml" [scac] BPEL 2.0 validation of "BPELProcess1" took 136.1 milliseconds [scac] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> [scac] >> modified xmlbean locale class in use [scac] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> [scac] info: Validating composite "/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/composite.xml" [scac] info: Pass [scac] info: File to validate does not exist fault-policies.xml:/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/fault-policies.xml (No such file or directory) [scac] info: Checking validateMessages....testsuites/TestCase2/messages [scac] info: Begin validateIncludes....testsuites/TestCase2/includes [scac] info: Begin validateTests....testsuites/TestCase2/tests [scac] info: Check validateTestDocument....testsuites/TestCase2/tests/Test2.1.xml [scac] info: Check doSchemaValidation....testsuites/TestCase2/tests/Test2.1.xml [scac] info: Check isSetInitiate ....testsuites/TestCase2/tests/Test2.1.xml [scac] info: Check WireActionsModel ....testsuites/TestCase2/tests/Test2.1.xml [scac] info: validateTestDocument Pass [scac] info: validateTests Pass [scac] info: Checking validateMessages....testsuites/TestCase1/messages [scac] info: Begin validateIncludes....testsuites/TestCase1/includes [scac] info: Begin validateTests....testsuites/TestCase1/tests [scac] info: Check validateTestDocument....testsuites/TestCase1/tests/Test1.xml [scac] info: Check doSchemaValidation....testsuites/TestCase1/tests/Test1.xml [scac] info: Check isSetInitiate ....testsuites/TestCase1/tests/Test1.xml [scac] info: Check WireActionsModel ....testsuites/TestCase1/tests/Test1.xml [scac] info: validateTestDocument Pass [scac] info: Check validateTestDocument....testsuites/TestCase1/tests/Test2.xml [scac] info: Check doSchemaValidation....testsuites/TestCase1/tests/Test2.xml [scac] info: Check isSetInitiate ....testsuites/TestCase1/tests/Test2.xml [scac] info: Check WireActionsModel ....testsuites/TestCase1/tests/Test2.xml [scac] info: validateTestDocument Pass [scac] info: validateTests Pass package: [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] skipping input as property compositeDir has already been set. [input] skipping input as property compositeName has already been set. [input] skipping input as property revision has already been set. Trying to override old definition of task scac Trying to override old definition of task attachplan Trying to override old definition of task extractplan Trying to override old definition of task generateplan Trying to override old definition of task validateplan Trying to override old definition of task replaceRevision [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper compile-source: [mkdir] Created dir: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/HelloWorldProject/dist [copy] Copying 19 files to /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/HelloWorldProject/dist [copy] Warning: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/HelloWorldProject/src not found. [copy] Copying 2 files to /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/HelloWorldProject/dist/SCA-INF/classes [jar] Building jar: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/HelloWorldProject/deploy/sca_HelloWorldProject_rev1.0.jar [delete] Deleting directory /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/HelloWorldProject/dist [echo] deploy on http://192.168.2.130:9030 with user weblogic [echo] deploy sarFile /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/deploy/sca_HelloWorldProject_rev1.0.jar [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] Please enter composite directory: [input] Please enter composite name: [input] Please enter composite revision: [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper deploy: [input] skipping input as property serverURL has already been set. [input] skipping input as property sarLocation has already been set. [deployComposite] setting user/password..., user=weblogic [deployComposite] Processing sar=/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/deploy/sca_HelloWorldProject_rev1.0.jar [deployComposite] Adding sar file - /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/HelloWorldProject/deploy/sca_HelloWorldProject_rev1.0.jar [deployComposite] INFO: Creating HTTP connection to host:192.168.2.130, port:9030 [deployComposite] INFO: Received HTTP response from the server, response code=200 [deployComposite] ---->Deploying composite success. [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] Please enter composite directory: [input] Please enter composite name: [input] Please enter composite revision: [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper test: [echo] Classpth = /u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-ext.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/oracle-soa-client-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel-common.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel.jar:/u01/jdeveloper11.1.1.5/wlserver_10.3/server/lib/weblogic.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-api.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-common.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-internal.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jrf_11.1.1/jrf-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-client-stubs-was.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.orb_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/plugins/com.ibm.ws.runtime.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.admin.client_7.0.0.jar [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper HelloWorldProject [echo] Using context = build.properties [echo] Using path = /u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-ext.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/oracle-soa-client-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel-common.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel.jar:/u01/jdeveloper11.1.1.5/wlserver_10.3/server/lib/weblogic.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-api.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-common.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-internal.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jrf_11.1.1/jrf-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-client-stubs-was.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.orb_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/plugins/com.ibm.ws.runtime.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.admin.client_7.0.0.jar [input] skipping input as property scatest.input has already been set. [input] skipping input as property jndi.properties.input has already been set. [scatest] Junit formatting [scatest] <testsuite name="sca.test-HelloWorldProject.TestCase1" tests="2" errors="0" failures="0" time="0.313"><properties><property name="db.type" value="oracle"/><property name="bpel.host.name" value="oracle-sb.tsretail.ru"/><property name="soa.oracle.home" value="/opt/Middleware/soa_11.1"/><property name="suite.start.date" value="2012-04-20T11:51:18.297+04:00"/><property name="suite.end.date" value="2012-04-20T11:51:18.610+04:00"/><property name="run.start.date" value="2012-04-20T11:51:18.297+04:00"/><property name="run.end.date" value="2012-04-20T11:51:18.644+04:00"/></properties><testcase name="Test1" classname="sca.test-HelloWorldProject.TestCase1.Test1" time="0.313"/><testcase name="Test2" classname="sca.test-HelloWorldProject.TestCase1.Test2" time="0.067"/></testsuite> [scatest] /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../BPEL-sca.test-HelloWorldProject.TestCase1.xml [scatest] <testsuite name="sca.test-HelloWorldProject.TestCase2" tests="1" errors="0" failures="0" time="0.115"><properties><property name="db.type" value="oracle"/><property name="bpel.host.name" value="oracle-sb.tsretail.ru"/><property name="soa.oracle.home" value="/opt/Middleware/soa_11.1"/><property name="suite.start.date" value="2012-04-20T11:51:18.529+04:00"/><property name="suite.end.date" value="2012-04-20T11:51:18.644+04:00"/><property name="run.start.date" value="2012-04-20T11:51:18.297+04:00"/><property name="run.end.date" value="2012-04-20T11:51:18.644+04:00"/></properties><testcase name="Test2.1" classname="sca.test-HelloWorldProject.TestCase2.Test2.1" time="0.115"/></testsuite> [scatest] /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../BPEL-sca.test-HelloWorldProject.TestCase2.xml [scatest] <testsuite name="sca.test-HelloWorldProject.codeCoverages" errors="0" failures="0" tests="0" time="0.0"/> [scatest] /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../BPEL-sca.test-HelloWorldProject.codeCoverages.xml [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] Please enter composite directory: [input] Please enter composite name: [input] Please enter composite revision: [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper deployProject: [echo] deploy project TestingProject for environment dev [echo] deploy compositeName TestingProject [echo] deploy compositeDir /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] skipping input as property compositeDir has already been set. [input] skipping input as property compositeName has already been set. [input] skipping input as property revision has already been set. [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper clean: [echo] deleting /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/deploy/sca_TestingProject_rev1.0.jar init: [mkdir] Created dir: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/TestingProject/deploy scac-validate: [echo] Running scac-validate in /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/composite.xml [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] skipping input as property compositeDir has already been set. [input] skipping input as property compositeName has already been set. [input] skipping input as property revision has already been set. [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper scac: [scac] Validating composite "/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/composite.xml" [scac] BPEL 2.0 validation of "TestBPELProcess" took 1.412 seconds [scac] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> [scac] >> modified xmlbean locale class in use [scac] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> [scac] info: Validating composite "/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/composite.xml" [scac] info: Pass [scac] info: File to validate does not exist fault-policies.xml:/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/fault-policies.xml (No such file or directory) [scac] info: Checking validateMessages....testsuites/TestSuite1/messages [scac] info: Begin validateIncludes....testsuites/TestSuite1/includes [scac] info: Begin validateTests....testsuites/TestSuite1/tests [scac] info: Check validateTestDocument....testsuites/TestSuite1/tests/Test2.1.xml [scac] info: Check doSchemaValidation....testsuites/TestSuite1/tests/Test2.1.xml [scac] info: Check isSetInitiate ....testsuites/TestSuite1/tests/Test2.1.xml [scac] info: Check WireActionsModel ....testsuites/TestSuite1/tests/Test2.1.xml [scac] info: Check WireActionsModel ....testsuites/TestSuite1/tests/Test2.1.xml [scac] info: validateTestDocument Pass [scac] info: Check validateTestDocument....testsuites/TestSuite1/tests/Test2.2.xml [scac] info: Check doSchemaValidation....testsuites/TestSuite1/tests/Test2.2.xml [scac] info: Check isSetInitiate ....testsuites/TestSuite1/tests/Test2.2.xml [scac] info: Check WireActionsModel ....testsuites/TestSuite1/tests/Test2.2.xml [scac] info: validateTestDocument Pass [scac] info: Check validateTestDocument....testsuites/TestSuite1/tests/Test3.0.xml [scac] info: Check doSchemaValidation....testsuites/TestSuite1/tests/Test3.0.xml [scac] info: Check isSetInitiate ....testsuites/TestSuite1/tests/Test3.0.xml [scac] info: Check WireActionsModel ....testsuites/TestSuite1/tests/Test3.0.xml [scac] info: Check WireActionsModel ....testsuites/TestSuite1/tests/Test3.0.xml [scac] info: validateTestDocument Pass [scac] info: Check validateTestDocument....testsuites/TestSuite1/tests/Test1.1.xml [scac] info: Check doSchemaValidation....testsuites/TestSuite1/tests/Test1.1.xml [scac] info: Check isSetInitiate ....testsuites/TestSuite1/tests/Test1.1.xml [scac] info: Check WireActionsModel ....testsuites/TestSuite1/tests/Test1.1.xml [scac] info: validateTestDocument Pass [scac] info: validateTests Pass package: [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] skipping input as property compositeDir has already been set. [input] skipping input as property compositeName has already been set. [input] skipping input as property revision has already been set. Trying to override old definition of task scac Trying to override old definition of task attachplan Trying to override old definition of task extractplan Trying to override old definition of task generateplan Trying to override old definition of task validateplan Trying to override old definition of task replaceRevision [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper compile-source: [mkdir] Created dir: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/TestingProject/dist [copy] Copying 18 files to /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/TestingProject/dist [copy] Warning: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/TestingProject/src not found. [copy] Copying 2 files to /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/TestingProject/dist/SCA-INF/classes [jar] Building jar: /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/TestingProject/deploy/sca_TestingProject_rev1.0.jar [delete] Deleting directory /var/lib/hudson/jobs/HelloWorldApplication/workspace/apps/HelloWorldApplication/TestingProject/dist [echo] deploy on http://192.168.2.130:9030 with user weblogic [echo] deploy sarFile /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/deploy/sca_TestingProject_rev1.0.jar [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] Please enter composite directory: [input] Please enter composite name: [input] Please enter composite revision: [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper deploy: [input] skipping input as property serverURL has already been set. [input] skipping input as property sarLocation has already been set. [deployComposite] setting user/password..., user=weblogic [deployComposite] Processing sar=/var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/deploy/sca_TestingProject_rev1.0.jar [deployComposite] Adding sar file - /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../apps/HelloWorldApplication/TestingProject/deploy/sca_TestingProject_rev1.0.jar [deployComposite] INFO: Creating HTTP connection to host:192.168.2.130, port:9030 [deployComposite] INFO: Received HTTP response from the server, response code=200 [deployComposite] ---->Deploying composite success. [echo] basedir /u01/jdeveloper11.1.1.5/jdeveloper/bin [echo] current folder /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [echo] oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper [input] Please enter composite directory: [input] Please enter composite name: [input] Please enter composite revision: [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper test: [echo] Classpth = /u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-ext.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/oracle-soa-client-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel-common.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel.jar:/u01/jdeveloper11.1.1.5/wlserver_10.3/server/lib/weblogic.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-api.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-common.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-internal.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jrf_11.1.1/jrf-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-client-stubs-was.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.orb_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/plugins/com.ibm.ws.runtime.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.admin.client_7.0.0.jar [echo] Running scatest using oracle.home = /u01/jdeveloper11.1.1.5/jdeveloper TestingProject [echo] Using context = build.properties [echo] Using path = /u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-ext.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/oracle-soa-client-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel-common.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.bpel_11.1.1/orabpel.jar:/u01/jdeveloper11.1.1.5/wlserver_10.3/server/lib/weblogic.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-api.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-common.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jps_11.1.1/jps-internal.jar:/u01/jdeveloper11.1.1.5/oracle_common/modules/oracle.jrf_11.1.1/jrf-api.jar:/u01/jdeveloper11.1.1.5/jdeveloper/soa/modules/oracle.soa.mgmt_11.1.1/soa-client-stubs-was.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.ejb.thinclient_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.orb_7.0.0.jar:/u01/jdeveloper11.1.1.5/websphere/plugins/com.ibm.ws.runtime.jar:/u01/jdeveloper11.1.1.5/websphere/runtimes/com.ibm.ws.admin.client_7.0.0.jar [input] skipping input as property scatest.input has already been set. [input] skipping input as property jndi.properties.input has already been set. [scatest] Junit formatting [scatest] <testsuite name="sca.test-TestingProject.TestSuite1" tests="4" errors="0" failures="0" time="7.389"><properties><property name="db.type" value="oracle"/><property name="bpel.host.name" value="oracle-sb.tsretail.ru"/><property name="soa.oracle.home" value="/opt/Middleware/soa_11.1"/><property name="suite.start.date" value="2012-04-20T11:51:46.894+04:00"/><property name="suite.end.date" value="2012-04-20T11:51:54.283+04:00"/><property name="run.start.date" value="2012-04-20T11:51:46.894+04:00"/><property name="run.end.date" value="2012-04-20T11:51:54.283+04:00"/></properties><testcase name="Test3.0" classname="sca.test-TestingProject.TestSuite1.Test3.0" time="0.166"/><testcase name="Test2.1" classname="sca.test-TestingProject.TestSuite1.Test2.1" time="0.224"/><testcase name="Test1.1" classname="sca.test-TestingProject.TestSuite1.Test1.1" time="7.346"/><testcase name="Test2.2" classname="sca.test-TestingProject.TestSuite1.Test2.2" time="7.304"/></testsuite> [scatest] /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../BPEL-sca.test-TestingProject.TestSuite1.xml [scatest] <testsuite name="sca.test-TestingProject.codeCoverages" errors="0" failures="0" tests="0" time="0.0"/> [scatest] /var/lib/hudson/jobs/HelloWorldApplication/workspace/tools/ant/../../BPEL-sca.test-TestingProject.codeCoverages.xml BUILD SUCCESSFUL Total time: 1 minute 7 seconds Recording test results [DEBUG] Skipping watched dependency update; build not configured with trigger: HelloWorldApplication #2 Finished: SUCCESS
P.S. см. так же статью Непрерывная интеграция для Oracle SOA Suite 11g. Альтернативный вариант
Подписаться на:
Сообщения (Atom)