Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Unable to deploy to DB using Data Deploy
nileshs
Hi
I am new to Teamsite and I was folllowing the instructions in the documentation for Data Deploy but I am getting this error when deploying to the database. Here is part of the log displaying the exception
DBD: Deployment : deployment1
DBD: Database Vendor set to microsoft-inetuna
DBD: Max Identifier length set to 128 characters.
DBD: SQL datatype for column ar_title is VARCHAR(2000)
DBD: SQL datatype for column ar_contenttypeid is smallint
DBD: SQL datatype for column ar_locale is VARCHAR(20)
DBD: SQL datatype for column ar_teaser is VARCHAR(1000)
DBD: SQL datatype for column ar_contentid is smallint
DBD: # of columns: 5
DBD: # of primary key columns specified: 1
DBD: # of groups defined in element: 1
DBD: [Thu Mar 27 20:58:37 GMT-12:00 2008] Begin executing deployment1
DBD: Begin Set up the publisher thread
DBD: End Set up the publisher thread
DBD: Area VPath:C:\Interwoven\OpenDeployNG\examples\conf-dd\tutorial\data1
DBD: Setting up TDbSchemaAgent.
DBD: Validating cached connection...
DBD: Cached connection OK
DBD: Connected to [localhost:1433?database=test_datadeploy]
DBD: CREATE TABLE IWDELTRACKER ( PATH VARCHAR(255) NOT NULL , AREA VARCHAR(255) NOT NULL , KEYCOLNAME VARCHAR(255) NOT NULL , KEYCOLVALUE VARCHAR(255) NOT NULL )
DBD: CREATE INDEX iwdelt_idx ON IWDELTRACKER( PATH , AREA )
DBD: IWDELTRACKER created successfully.
DBD: Table [pp_content_articles] exists.
DBD: Running deployment [deployment1]
DBD: extraction type=default
DBD: tuple mode=wide
DBD: area=C:\Interwoven\OpenDeployNG\examples\conf-dd\tutorial\data1
DBD: Building replicant order column information.
DBD: Building replicant order column information... Done.
DBD: TUPLE={IWOV_PROC_FLAG=true, state=Original, article/0/locale/0=en_US, article/0/contenttypeid/0=1234, article/0=, article/0/teaser/0=Hello this a test, article/0/title/0=Test, article/0/contentid/0=111111, path=./source}
DBD: ERROR:Values for PK column [ar_contentid] missing in [./source].
DBD: ERROR:Exception occured: Values for PK column [ar_contentid] missing in [./source].
DBD: ERROR:
com.interwoven.dd100.dd.InvalidSourceTupleException: Values for PK column [ar_contentid] missing in [./source].
at com.interwoven.dd100.dd.TDbSchemaGroupCfg.BuildSelectStmtForExistCheck(TDbSchemaGroupCfg.java:2142)
at com.interwoven.dd100.dd.TDbSchemaGroupCfg.RowsExistForTuple(TDbSchemaGroupCfg.java:2059)
at com.interwoven.dd100.dd.TDbSchemaCfg.RowsExistForTuple(TDbSchemaCfg.java:1063)
at com.interwoven.dd100.dd.TDbSchemaCfg.RowsExist(TDbSchemaCfg.java:1042)
at com.interwoven.dd100.dd.TDbSchemaAgent.BasicWriteTuple(TDbSchemaAgent.java:421)
at com.interwoven.dd100.dd.TDbSchemaAgent.WriteTuple(TDbSchemaAgent.java:336)
at com.interwoven.dd100.dd.TConsumerManager.WriteConsumerInternal(TConsumerManager.java:399)
at com.interwoven.dd100.dd.TConsumerManager.WriteConsumers(TConsumerManager.java:388)
at com.interwoven.dd100.dd.TAgentClient.DoOneTeamSiteSource(TAgentClient.java:1002)
at com.interwoven.dd100.dd.TAgentClient.DoTeamSiteSources(TAgentClient.java:502)
This is the structure of the table that I am deploying to
AR_LOCALE varchar(20)NOT NULL,
AR_CONTENTTYPEID smallint NOT NULL,
AR_CONTENTID smallint NOT NULL,
AR_TITLE varchar(2000) NOT NULL,
AR_TEASER varchar(1000) NOT NULL,
Attached is my dbschema.cfg file
I am doing a standalone update using the OD admin console
Can someone please help me solve this isuue
Thanks in advance
Find more posts tagged with
Comments
nbwoven
The primary key for [ar_contentid] is missing .
DBD: ERROR:Values for PK column [ar_contentid] missing in [./source].
It does show article/0/contentid/0=111111,
as per
DBD: TUPLE={IWOV_PROC_FLAG=true, state=Original, article/0/locale/0=en_US, *********----article/0/contentid/0=111111, path=./source}
Search the DD/OD "deployment1" config file for "ar_contentid" and
you should see it mapped to value-from="xy123"
then search for "xy123" in the log file, Is it getting any value ?
nileshs
Thanks for your response.
It is getting all the values as null. I believe it is picking up the values from the xml source but is not able to map the columns to the fields in the xml file.
I am atttaching the entire ddconfig.xml . I am also attaching the source.xml file. If I remove the primary key attribute from the ddconfig file then it gives me DB errors saying that it cannot insert null.
Please advise as to what can be the issue ?
nileshs
I am able to insert the examples given in the pdf to the DB . I am just not able to deploy my source xml file . Is it mandatory to have a doctype and a DTD for the source xml file ??
nakumar
DTD for the source xml is not required. Looked into your config file and found the mapping is NOT correct.
Your code:
[html]
[/html]
Corrected config file:
[html]
[/html]
nileshs
Thx a lot Narendra . This solved my problem
developer2008
When you dont have the support of generating the dbschema from GUI do u have to write all the content in dbschema tags manually ??
I read that iwsyncdb -dbschemagen can generate dbschema.cfg file whose content is copied to dbschema of the deploy config file .But I dont know which dtd should be used for generating the dbschema.cfg file for a particular dcr.Any help?
nakumar
We can generate dbschema.cfg via UI. Use OD Admin -> Schema Mapping, to generate the dbschema.
For DCR, to generate dbschema.cfg, the input is datacapture.cfg (for the DCR)
developer2008
I generated the dbschema.cfg file for "advertisement" content from the datacapture.cfg using iwsyncdb CLT.But it is not just cut and paste into the config file of advertisement .I mean the config file has all the tables specified for mapping but the generated schema file doesnt have all those[like metadata and even table names are not given].So does this mean we have to write the mappings to the particular columns of the tables manually.
nakumar
What kind of deployment do you want to perform? DAS or Standalone DD
datacapture.cfg ----> (iwsyncdb -dbschemagen V-path DCR Category/Type) -------> dbschema.cfg
The generated dbschema.cfg will have all the mapping relations of associated DCT/DTD items to column names.
developer2008
I am doing a stand alone deploy and I used the following CLT
iwsyncdb -dbschemagen -dcfile ..../Help/FAQ/Content/datacapture.cfg
It generated a dbschema.cfg but the file doent contain any table names.Please look thru the generated file vch I attached.I also observed that there are no dtds for the category/content anywhere except datacapture6.0.dtd.
groupAgg.rptdesign
nakumar
By default, if the table name is not present in dbschema.cfg, automatically it will take group name as table name.
i.e.
[html]
"QA/0/QUESTION_TEXT" allows-null="yes" is-url="no"/>
[/html]
In the above example, table name would be "QA". If you need different table name other than group name then need to configure the table name like:
[html]
[/html]
new_report_1.rptdesign
developer2008
I want to map to 2 different group names and 2 different tables.I am attaching my deploy config file Its already there.I am just trying to understand how did they get the dbschema piece in the config file.So coming to my problem, the dbschema file I generated is so limited.Does this mean dbschema piece in the config file is written manually.
EmbeddedTablesInCrossTab.rptdesign
nakumar
You can do that. Can you attach your input DTD or DCT? If there is no DTD, then you might be using DCT i.e. ruleset datacapture.cfg from teamsite as input to generate dbschema.cfg. You can also manually map as per your requirements.
developer2008
Here is the datacapture.cfg So does this mean it was written manually
nakumar
Yes in your deployment configuration file, "dbschema" part is tweaked with manual mappings.
developer2008
Thanks a lot .You have been such a big help.