Quantcast
Channel: SCN : All Content - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6745

Strange issue when use 'regi' to import the package(attribute view/analytic view)

$
0
0

Hi experts,


I am bothered by a troublesome issue in recent days when activate the package(attribute views/analytic views). Could you please help me have a look?  Prior thanks.

 

Does anyone meet this issue before?  Can anyone point me to activate the package?

Any suggestion is welcomed.

 

 

My steps:

1, import some tables.

2, grant the select privilege to _SYS_REPO with grant option.

3, set 3 variables, because if use regi we need to export REGI_USER, REGI_PASSWD, REGI_HOST.

4, regi import  '/tmp/sqltrace/Model.tgz'

5, do some test......

6, delete from "_SYS_REPO"."ACTIVE_OBJECT" where PACKAGE_ID='acceptance-explorer'

7, regi delete packname

 

PS: We can think step 1~4 as setup section, 6~7 as cleanup section.

If I do the above steps for the first time,  everything is OK. Then do it again, hit error.

 

I use "regi import DUname"  to import my delivery unit that I export.

When use "regi import" for the first time, everything goes well, the attribute views and analytic views can be activated automatic, and this is what I expected. Then delete the package.

For the second time, I do the same steps, but error occurs looks like as below.

 


Using default workspace ("").

ACTIVATION ERROR: object: ".", package: "", timestamp: 2013-06-26 11:15:15.1550000

: code 301: exception 301:

repository/base/activation/activator.cpp:885

message not found;Activation: Source code move.: SQL preparation or execution failed. Details can be found in the indexserver trace file.

exception 71000301:

ptime/query/plan_executor/trex_wrapper/trex_wrapper_body/trex_update.cc:2054

Table(ACTIVE_OBJECTCROSSREF)

 

 

Imported the delivery unit file: /tmp/sqltrace/Model.tgz

Workspace:

Force Remove: 1

Auto Activate: 1

Activation mode: 4

Only test import: 0

Read: 5520 bytes

Delivery Unit: MYCONTENT

Vendor: Sap

Imported objects: 11

Activated objects: 10

Deleted objects: 0

Reverted objects: 0

 

Import failed (40136): Activation during import failed: See check results and trace file for more information.:

 

 

 

Then I try to use HANA Studio to activated the package, still unsuccessful. Errors in log file looks like as below.

 

  • Activation failed: See check results and trace file for more information.
    • Activation is performed with activation mode cascade two-phases.
    • exception 301:nrepository/base/activation/activator.cpp:885nmessage not found;Activation: Source code move.: SQL preparation or execution failed. Details can be found in the indexserver trace file.nexception 71000301:nptime/query/plan_executor/trex_wrapper/trex_wrapper_body/trex_update.cc:2054nTable(ACTIVE_OBJECTCROSSREF)n 

 

 

In the indexserver trace file,

 

[27476]{315693}[131/-1] 2013-06-26 12:46:51.954759 e REPOSITORY       dbutils.cpp(01012) : Copy inactive cross references to active: SQL execution of

'INSERT INTO _SYS_REPO.ACTIVE_OBJECTCROSSREF select o.from_package_id, o.from_object_name, o.from_object_suffix, o.to_tenant_id, o.to_package_id, o.to_object_name, o.to_object_suffix, o.src_path, o.dst_path, o.ref_type  from _SYS_REPO.INACTIVE_OBJECTCROSSREF as o inner join _SYS_REPO.ACTIVATION_HELPER2 as h  on o.from_package_id = h.package_id and o.from_object_name = h.object_name and o.from_object_suffix = h.object_suffix  where h.is_deletion = 0 and o.from_owner = ? and o.from_workspace = ?

('SYSTEM', '')

SQL string with parameter values instead of '?':

INSERT INTO _SYS_REPO.ACTIVE_OBJECTCROSSREF select o.from_package_id, o.from_object_name, o.from_object_suffix, o.to_tenant_id, o.to_package_id, o.to_object_name, o.to_object_suffix, o.src_path, o.dst_path, o.ref_type  from _SYS_REPO.INACTIVE_OBJECTCROSSREF as o inner join _SYS_REPO.ACTIVATION_HELPER2 as h  on o.from_package_id = h.package_id and o.from_object_name = h.object_name and o.from_object_suffix = h.object_suffix  where h.is_deletion = 0 and o.from_owner = 'SYSTEM' and o.from_workspace = '''

failed:

unique constraint violated: Table(ACTIVE_OBJECTCROSSREF) at ptime/query/plan_executor/trex_wrapper/trex_wrapper_body/trex_update.cc:2054

exception  1: no.71000301  (ptime/query/plan_executor/trex_wrapper/trex_wrapper_body/trex_update.cc:2054)

    Table(ACTIVE_OBJECTCROSSREF)

NO exception throw location recorded. Stack generation suppressed.

[27476]{315693}[131/-1] 2013-06-26 12:46:51.954862 e REPOSITORY       activator.cpp(00870) : Activator::moveSourceCode: Caught SQLException during source code move for activation 86:

exception  1: no.71000301  (ptime/query/plan_executor/trex_wrapper/trex_wrapper_body/trex_update.cc:2054)

    Table(ACTIVE_OBJECTCROSSREF)

NO exception throw location recorded. Stack generation suppressed.

[27476]{315693}[131/-1] 2013-06-26 12:46:51.968871 e REPOSITORY       repository.cpp(00284) : Fatal activation error: exception  1: no.70000301  (repository/base/activation/activator.cpp:885)

    message not found;Activation: Source code move.: SQL preparation or execution failed. Details can be found in the indexserver trace file.

exception throw location:

1: 0x00007fd04d11d37d in repo::RepoException::RepoException(int, ltt_adp::basic_string<char, ltt::char_traits<char>, ltt::integral_constant<bool, true> > const&, char const*, int)+0x39 at repoexception.cpp:31 (libhdbrepo.so)

2: 0x00007fd04d11d411 in repo::FatalError::FatalError(int, ltt_adp::basic_string<char, ltt::char_traits<char>, ltt::integral_constant<bool, true> > const&, char const*, int)+0x10 at repoexception.cpp:40 (libhdbrepo.so)

3: 0x00007fd04cff84e6 in repo::Activator::moveSourceCode(repo::InactiveSession*, ltt_adp::vector<repo::ObjectID, ltt::integral_constant<bool, true> > const&, repo::InactiveVersion const&, repo::ActivationMode, ltt_adp::vector<repo::CheckResult, ltt::integral_constant<bool, true> >&)+0x1a2 at activator.cpp:885 (libhdbrepo.so)

4: 0x00007fd04d000278 in repo::Activator::activateObjectsInternalFast2(repo::AbstractSession*, ltt_adp::vector<repo::ObjectID, ltt::integral_constant<bool, true> > const&, repo::InactiveVersion const&, repo::ActivationMode, ltt_adp::vector<Authorization::ObjectId, ltt::integral_constant<bool, true> >&, repo::ObjectDependenciesFacade&, ltt_adp::vector<repo::CheckResult, ltt::integral_constant<bool, true> >&)+0x7e4 at activator.cpp:597 (libhdbrepo.so)

5: 0x00007fd04d002bfc in repo::Activator::activateObjects(repo::AbstractSession*, ltt_adp::vector<repo::ObjectID, ltt::integral_constant<bool, true> > const&, repo::InactiveVersion const&, repo::ActivationMode, bool, repo::ObjectDependenciesFacade&, ltt_adp::vector<repo::CheckResult, ltt::integral_constant<bool, true> >&)+0x408 at activator.cpp:271 (libhdbrepo.so)

6: 0x00007fd04d545783 in repo::Repository::activateObjectsInternal(repo::Activator&, repo::InactiveSession*, ltt_adp::vector<repo::ObjectID, ltt::integral_constant<bool, true> > const&, repo::ActivationMode, bool, ltt_adp::vector<repo::CheckResult, ltt::integral_constant<bool, true> >&)+0x1a0 at repository.cpp:346 (libhdbrepo.so)

7: 0x00007fd04d56af99 in repo::Repository::activateObjects(repo::InactiveSession*, ltt_adp::vector<repo::ObjectID, ltt::integral_constant<bool, true> > const&, repo::ActivationMode, int&, ltt_adp::vector<repo::CheckResult, ltt::integral_constant<bool, true> >&, bool)+0x5c5 at repository.cpp:265 (libhdbrepo.so)

8: 0x00007fd04d379d13 in repo::ProtoHandler::dispatchActivateObjects(TRexUtils::JsonObject&, TRexUtils::JsonObject&, TRexUtils::JsonAllocator&, ltt_adp::basic_ostringstream<char, ltt::char_traits<char> >&)+0x4a0 at proto.cpp:3160 (libhdbrepo.so)

9: 0x00007fd04d38c091 in repo::ProtoHandler::_dispatch(ltt_adp::basic_string<char, ltt::char_traits<char>, ltt::integral_constant<bool, true> > const&, ltt_adp::basic_ostringstream<char, ltt::char_traits<char> >&, bool&)+0x1840 at proto.cpp:1175 (libhdbrepo.so)

10: 0x00007fd04d38edc4 in repo::ProtoHandler::dispatch(ltt_adp::basic_string<char, ltt::char_traits<char>, ltt::integral_constant<bool, true> > const&, ltt_adp::basic_string<char, ltt::char_traits<char>, ltt::integral_constant<bool, true> >&, bool&)+0x2e0 at proto.cpp:812 (libhdbrepo.so)

11: 0x00007fd04d3938dd in repo::Transporter::handleV2()+0x699 at transport.cpp:244 (libhdbrepo.so)

12: 0x00007fd04d394f08 in repo::Transporter::process()+0x194 at transport.cpp:37 (libhdbrepo.so)

13: 0x00007fd04d395041 in processRestMessage+0xb0 at transport.cpp:387 (libhdbrepo.so)

14: 0x00007fd02db00731 in ptime::BuiltinProcedure_REPOSITORY_REST::execute(ptime::Env&) const+0x130 at dyn.h:71 (libhdbrskernel.so)

15: 0x00007fd02d4b1b28 in ptime::Proc_call::execute(ptime::Env&) const+0x11f4 at qe_proc_call.cc:173 (libhdbrskernel.so)

16: 0x00007fd02d4b20c5 in ptime::Proc_call::operator()(ptime::Env&) const+0x1e1 at qe_proc_call.cc:131 (libhdbrskernel.so)

17: 0x00007fd02daaac31 in ptime::Query::_execute(ptime::Transaction&, ptime::Query::Plan*, ptime::Query::param_t*, ptime::Query::result_t*)+0x1c0 at query.cc:3726 (libhdbrskernel.so)

[27476]{315693}[131/-1] 2013-06-26 12:46:51.968871 e REPOSITORY       repository.cpp(00284) : 18: 0x00007fd02daacc56 in ptime::Query::execute(ptime::Transaction&, char const*, ptime::Query::param_t*, ptime::Query::Plan*, ptime::Query::result_t*, ptime::Statement*)+0x5a2 at query.cc:587 (libhdbrskernel.so)

19: 0x00007fd02dc859c3 in ptime::Statement::execute_(bool, bool)+0x8c0 at Statement.cc:1752 (libhdbrskernel.so)

20: 0x00007fd02dcbaa15 in ptime::CallableStatement::execute(bool, bool, bool, bool, ptime::Statement::BatchProcessingState, bool)+0x381 at CallableStatement.cc:280 (libhdbrskernel.so)

21: 0x00007fd02dd87ef6 in ptime::Session::executeQuery(ptime::Action&)+0xa2 at sm_session.cc:1204 (libhdbrskernel.so)

22: 0x00007fd02dd80bc3 in ptime::SessionHandler::handleEvent(ptime::AppEvent*)+0x150 at sm_handler.cc:677 (libhdbrskernel.so)

23: 0x00007fd02dd8435c in ptime::SessionHandler::receiveMessage(ptime::CommEvent*)+0xb08 at sm_handler.cc:512 (libhdbrskernel.so)

24: 0x00007fd02dd96500 in ptime::TcpReceiver::doWork(ptime::CommMgr*)+0x8d0 at tcp_receiver.cc:358 (libhdbrskernel.so)

25: 0x00007fd02dd97574 in ptime::TcpReceiver::run(void*)+0x1d0 at tcp_receiver.cc:413 (libhdbrskernel.so)

exception  2: no.71000301  (ptime/query/plan_executor/trex_wrapper/trex_wrapper_body/trex_update.cc:2054)

    Table(ACTIVE_OBJECTCROSSREF)

 

 

In the activator.cpp,

858     void Activator::moveSourceCode(InactiveSession* activationSession, const _STL::vector<ObjectID>& objectIDs, const InactiveVersion& version,

859             ActivationMode activationMode, CheckResults & results)

860     {

861         try

862         {

863             m_pSourceCodeMover->moveSourceCode(objectIDs, version, activationMode, m_activationID, results);

864         }

865         catch(const ptime::SQLException & ex)

866         {

867             TRC_ERROR(Tracer) << "Activator::moveSourceCode: Caught SQLException during source code move for activation "

868                     << m_activationID << ":\n" << ex << TrexTrace::endl;

869             if (ptime::PtimeErrorCode::ERR_TX_ROLLBACK_QUERY_CANCEL == ex.getErrorCode())

870             {

871                 _STL::ostringstream os;

872                 os << "Activation " << m_activationID << ": Source code move has been canceled by user";

873                 TRC_ERROR(Tracer) << os.str() << TrexTrace::endl;

874                 NAMED_REPO_CANCEL_EXCEPTION(cancelEx, os.str());

875                 cancelEx << ex;

876                 throw cancelEx;

877             }

878             else

879             {

880                 TREX_ERROR::TRexError trexError;

881                 setTrexErrorFromSQLException(ex, trexError, "Activation: Source code move.");

882                 NAMED_REPO_FATAL_ERROR(fatalError, trexError.getCode(), trexError.getMsg());

883                 fatalError << ex;

884                 throw fatalError;

885             }

886         }

887         catch(const SourceCodeMoveException &)

888         {

889             TRC_ERROR(Tracer) << "Activator::moveSourceCode: Source code move failed for activation "

890                     << m_activationID << "." << TrexTrace::endl;

891             throw;

892         }

893         catch(const ltt::exception & ex)

894         {

895             TRC_ERROR(Tracer) << "Activator::moveSourceCode: Caught ltt::exception during source code move for activation "

896                     << m_activationID << ":\n" << ex << TrexTrace::endl;

897             throw;

898         }

899

900     }

 

 

 

 

HDB version info:

  version:             1.50.00.379167

  branch:              orange_COR

  git hash:            not set

  git merge time:      not set

  weekstone:           0000.00.0

  compile date:        2013-06-24 10:22:45

  compile host:        ldm062.server

  compile type:        opt

 

Studio version:

SAP HANA Studio

Version: 1.0.48

Build id: 201301130825 (372847)

 

 

 

 

By the way, if use HANA Studio to import the DU at first(do not use regi at command line), everything goes well. Then redo the step use HANA Studio, everything is still OK.

If use regi to import the DU, then delete it, then use HANA Studio to import and activated it, error occurs. So I think there is something I miss in my steps.

 

 

Can you point me which steps is wrong or I miss something? How can I fix it?

Request your help.


Viewing all articles
Browse latest Browse all 6745

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>