Reverse mapping tool in 3.0.1 ignores "-schemas" option
I believe I have discovered a bug in the 3.0.1 version of the reverse
mapping tool.
Here is a script of the commands that worked fine in 3.0.0:
Script started on Mon Jan 12 11:02:19 2004
1$ which schemagen
/opt/kodo-jdo-3.0.0/bin/schemagen
2$ echo $PATH
/opt/kodo-jdo-3.0.0/bin:/sw/db/oracle/oracle817/bin:/sw/gen/sparc-sun-solaris2.9/acroread/5.06/bin:/sw/gen/sparc-sun-solaris2.9/cvs/1.11.5/bin:/sw/gen/sparc-sun-solaris2.9/esound/0.2.29/bin:/sw/gen/sparc-sun-solaris2.9/mpg123/0.59r/bin:/usr/bin:/sw/gen/sparc-sun-solaris2.9/gnupg/1.2.1/bin:/sw/gen/sparc-sun-solaris2.9/mozilla/1.3/bin:/sw/gen/sparc-sun-solaris2.9/openssh/3.7.1p2/sbin:/sw/gen/sparc-sun-solaris2.9/openssh/3.7.1p2/bin:/sw/pd/workman-1.3.4/bin:/usr/openwin/bin:/usr/bin:/sbin:/bin:/usr/sbin:/usr/ccs/bin:/usr/ucb:/opt/local/bin:/sw/modules/bin:/sw/com/bin:/sw/pd/bin:/sw/pd/office52/program:/sw/pd/RealPlayer8:/users/n9208/bin:/opt/openssh/bin:/usr/dt/bin:/usr/dt/bin:/usr/openwin/bin:/sw/db/tools/bin:/sw/db/iss/bin:/usr/local/bin:/usr/local/scripts
3$ echo $CLASSPATH
:/opt/oracle/oracle9.0.1.4.zip:/opt/kodo-jdo-3.0.0:/opt/kodo-jdo-3.0.0/lib/kodo-jdo-runtime.jar:/opt/kodo-jdo-3.0.0/lib/kodo-jdo.jar:/opt/kodo-jdo-3.0.0/lib/jakarta-commons-collections-2.1.jar:/opt/kodo-jdo-3.0.0/lib/jakarta-commons-lang-1.0.1.jar:/opt/kodo-jdo-3.0.0/lib/jakarta-commons-logging-1.0.3.jar:/opt/kodo-jdo-3.0.0/lib/jakarta-commons-pool-1.0.1.jar:/opt/kodo-jdo-3.0.0/lib/jakarta-regexp-1.1.jar:/opt/kodo-jdo-3.0.0/lib/jca1.0.jar:/opt/kodo-jdo-3.0.0/lib/jdbc-hsql-1_7_0.jar:/opt/kodo-jdo-3.0.0/lib/jdbc2_0-stdext.jar:/opt/kodo-jdo-3.0.0/lib/jdo-1.0.1.jar:/opt/kodo-jdo-3.0.0/lib/jndi.jar:/opt/kodo-jdo-3.0.0/lib/jta-spec1_0_1.jar:/opt/kodo-jdo-3.0.0/lib/log4j-1.2.6.jar:/opt/kodo-jdo-3.0.0/lib/xalan.jar:/opt/kodo-jdo-3.0.0/lib/xercesImpl.jar:/opt/kodo-jdo-3.0.0/lib/xml-apis.jar:/opt/kodo-jdo-3.0.0/lib/jfreechart-0.9.13.jar:/opt/kodo-jdo-3.0.0/lib/jcommon-0.8.8.jar
4$ schemagen -p kodo.properties -f schema.xml -schemas PRODTRDTA.F0101
0 INFO [main] kodo.Tool - Schema generator running on schemas
"PRODTRDTA.F0101". This process may take some time. Enable the
kodo.jdbc.Schema logging category to see messages about the collection of
schema data.
136 INFO [main] jdbc.Schema - Reading table information for schema name
"PRODTRDTA", table name "F0101".
672 INFO [main] jdbc.Schema - Reading column information for table
"PRODTRDTA.F0101".
727 INFO [main] jdbc.Schema - Reading primary keys for schema name
"PRODTRDTA", table name "F0101".
2187 INFO [main] jdbc.Schema - Reading indexes for schema name
"PRODTRDTA", table name "F0101".
2432 INFO [main] jdbc.Schema - Reading foreign keys for schema name
"PRODTRDTA", table name "F0101".
2632 INFO [main] kodo.Tool - Writing XML schema.
5$
script done on Mon Jan 12 11:03:14 2004
Note the first line of logging output: both the schema name and table name
are properly recognized.
Here is the scripted output of the same commands in 3.0.1:
Script started on Mon Jan 12 10:29:03 2004
1$ which schemagen
/opt/kodo-jdo-3.0.1/bin/schemagen
2$ echo $PATH
/opt/kodo-jdo-3.0.1/bin:/sw/db/oracle/oracle817/bin:/sw/gen/sparc-sun-solaris2.9/acroread/5.06/bin:/sw/gen/sparc-sun-solaris2.9/cvs/1.11.5/bin:/sw/gen/sparc-sun-solaris2.9/esound/0.2.29/bin:/sw/gen/sparc-sun-solaris2.9/mpg123/0.59r/bin:/usr/bin:/sw/gen/sparc-sun-solaris2.9/gnupg/1.2.1/bin:/sw/gen/sparc-sun-solaris2.9/mozilla/1.3/bin:/sw/gen/sparc-sun-solaris2.9/openssh/3.7.1p2/sbin:/sw/gen/sparc-sun-solaris2.9/openssh/3.7.1p2/bin:/sw/pd/workman-1.3.4/bin:/usr/openwin/bin:/usr/bin:/sbin:/bin:/usr/sbin:/usr/ccs/bin:/usr/ucb:/opt/local/bin:/sw/modules/bin:/sw/com/bin:/sw/pd/bin:/sw/pd/office52/program:/sw/pd/RealPlayer8:/users/n9208/bin:/opt/openssh/bin:/usr/dt/bin:/usr/dt/bin:/usr/openwin/bin:/sw/db/tools/bin:/sw/db/iss/bin:/usr/local/bin:/usr/local/scripts
3$ echo $CLASSPATH
:/opt/oracle/oracle9.0.1.4.zip:/opt/kodo-jdo-3.0.1:/opt/kodo-jdo-3.0.1/lib/kodo-jdo-runtime.jar:/opt/kodo-jdo-3.0.1/lib/kodo-jdo.jar:/opt/kodo-jdo-3.0.1/lib/jakarta-commons-collections-2.1.jar:/opt/kodo-jdo-3.0.1/lib/jakarta-commons-lang-1.0.1.jar:/opt/kodo-jdo-3.0.1/lib/jakarta-commons-logging-1.0.3.jar:/opt/kodo-jdo-3.0.1/lib/jakarta-commons-pool-1.0.1.jar:/opt/kodo-jdo-3.0.1/lib/jakarta-regexp-1.1.jar:/opt/kodo-jdo-3.0.1/lib/jca1.0.jar:/opt/kodo-jdo-3.0.1/lib/jdbc-hsql-1_7_0.jar:/opt/kodo-jdo-3.0.1/lib/jdbc2_0-stdext.jar:/opt/kodo-jdo-3.0.1/lib/jdo-1.0.1.jar:/opt/kodo-jdo-3.0.1/lib/jndi.jar:/opt/kodo-jdo-3.0.1/lib/jta-spec1_0_1.jar:/opt/kodo-jdo-3.0.1/lib/log4j-1.2.6.jar:/opt/kodo-jdo-3.0.1/lib/xalan.jar:/opt/kodo-jdo-3.0.1/lib/xercesImpl.jar:/opt/kodo-jdo-3.0.1/lib/xml-apis.jar:/opt/kodo-jdo-3.0.1/lib/jfreechart-0.9.13.jar:/opt/kodo-jdo-3.0.1/lib/jcommon-0.8.8.jar:/opt/kodo-jdo-3.0.1/lib/jline.jar:/opt/kodo-jdo-3.0.1/lib/sqlline.jar
4$ schemagen -p kodo.properties -f schema.xml -schemas PRODTRDTA.F0101
1 INFO [main] kodo.Tool - Schema generator running on schemas "all".
This process may take some time. Enable the kodo.jdbc.Schema logging
category to see messages about the collection of schema data.
103 INFO [main] jdbc.Schema - Reading table information for schema name
"null", table name "null".
Exception in thread "main" java.lang.OutOfMemoryError
5$
script done on Mon Jan 12 11:01:45 2004
Note the first line of logging output here: the schema is listed as "all"
instead of the limited scope I had specified.
This run eventually crashes due to the fact that the account which I am
running the mapping tool in has access to thousands of tables, and thus
eventually the JVM runs out of available heap.
My workaround is to fall back to 3.0.0.
Thanks for the report. We noticed this ourselves a short while ago.
The bug will be fixed in 3.0.2.
Similar Messages
-
3.1.4 reverse mapping tool issue
(Sorry for the duplicate posting...I meant to start a new thread with
this but accidentally posted it as a reply to a 6-month old thread)
Hello,
I was running Kodo 3.0.2 when Abe and I had the exchange reproduced
below back in January to deal with Oracle tables with "$" in the column
names (which I subsequently updated to 3.0.3). The original subject of
this discussion was "3.0.2 reverse mapping tool generates invalid
..mapping file".
I was able to get this working by running the following commands to
implement Abe's suggestion:
reversemappingtool -p kodo.properties -package db \
-cp custom.properties -ds false schema.xml
sed -e 's/\$/__DOLLAR__/' db/package.mapping > db/package.mapping.new
mv db/package.mapping.new db/package.mapping
javac db/*.java
mappingtool -p kodo.properties -a import db/package.mapping
sed -e 's/__DOLLAR__/\$/' db/package.jdo > db/package.jdo.new
mv db/package.jdo.new db/package.jdo
In my custom.properties file, I had lines like these to put useful names
on my class's fields:
db.TransactionDetailHistory.y$an8.rename : addressNumber
As I said, in 3.0.3, this worked perfectly.
I picked this code back up for the first time since getting it working 6
months ago, and decided to update it to 3.1.4 (since I'm already using
that on other projects). Problem is, the reverse mapping tool has
changed and the code it generates no longer works as it once did. I
tried running the 3.1.2 and 3.1.0 reverse mapping tool, and it failed
the same way, so it looks like this change happened in the 3.0.x to
3.1.x version change.
What happens is this: In the generated Java source, my fields used to
end up with names as per my specification (e.g., the Oracle column named
"y$an8" showed up as "addressNumber" in the java source).
However, it looks like the "$" became special somehow in 3.1.0 - the
"y$an8" column now shows up as "yAn8" in the generated Java. I tried
changing my custom.properties file accordingly, but it still shows up as
yAn8 even after changing my mapping to look like this:
db.TransactionDetailHistory.yAn8.rename : addressNumber
What do you make of this?
Thanks,
Bill
Abe White wrote:
> Hmmm... this is a problem. '$' is not legal in XML names, and there
is no standard way to escape it.
>
> Your best bet is probably to do the following:
> 1. In the generated .mapping file, replace all '$' characters with
another token, such as '--DOLLAR--'.
> 2. Switch your properties to use the metadata mapping factory:
> kodo.jdbc.MappingFactory: metadata
> 3. Import your mappings into the metadata mapping factory:
> mappingtool -a import package.mapping
> 4. Delete the mapping file.
> 5. In your .jdo file, replace '--DOLLAR--' with '$' again.
>
> The metadata mapping factory doesn't put column names in its XML
attribute names, so you should be able to use it safely.William-
However, it looks like the "$" became special somehow in 3.1.0 - the
"y$an8" column now shows up as "yAn8" in the generated Java. I tried
changing my custom.properties file accordingly, but it still shows up as
yAn8 even after changing my mapping to look like this:
db.TransactionDetailHistory.yAn8.rename : addressNumberWell, the reverse mapping tool makes some assumptions based on common
naming strategies for relational databases and Java naming: columns like
"FIRST_NAME" will be renamed to "firstName". The Reverse Mapping tool is
seeing the "$" and treating it as a non-alphanumeric delimiter, so is
fixing it.
Can you try a couple of additional properties:
db.TransactionDetailHistory.y$An8.rename: addressNumber
db.TransactionDetailHistory.y$an8.rename: addressNumber
Also, are other rename properties working for you, or is that the only
field or class you attempt to rename? It might just be the case that
you aren't correctly specifying the properties file or something.
Finally, bear in mind that you can always implement your own
kodo.jdbc.meta.ReverseCustomizer and just use that; not the easiest
solution, but it can certainly be used to have very fine-grained control
over the exact names that are generated.
In article <[email protected]>, William Korb wrote:
(Sorry for the duplicate posting...I meant to start a new thread with
this but accidentally posted it as a reply to a 6-month old thread)
Hello,
I was running Kodo 3.0.2 when Abe and I had the exchange reproduced
below back in January to deal with Oracle tables with "$" in the column
names (which I subsequently updated to 3.0.3). The original subject of
this discussion was "3.0.2 reverse mapping tool generates invalid
.mapping file".
I was able to get this working by running the following commands to
implement Abe's suggestion:
reversemappingtool -p kodo.properties -package db \
-cp custom.properties -ds false schema.xml
sed -e 's/\$/__DOLLAR__/' db/package.mapping > db/package.mapping.new
mv db/package.mapping.new db/package.mapping
javac db/*.java
mappingtool -p kodo.properties -a import db/package.mapping
sed -e 's/__DOLLAR__/\$/' db/package.jdo > db/package.jdo.new
mv db/package.jdo.new db/package.jdo
In my custom.properties file, I had lines like these to put useful names
on my class's fields:
db.TransactionDetailHistory.y$an8.rename : addressNumber
As I said, in 3.0.3, this worked perfectly.
I picked this code back up for the first time since getting it working 6
months ago, and decided to update it to 3.1.4 (since I'm already using
that on other projects). Problem is, the reverse mapping tool has
changed and the code it generates no longer works as it once did. I
tried running the 3.1.2 and 3.1.0 reverse mapping tool, and it failed
the same way, so it looks like this change happened in the 3.0.x to
3.1.x version change.
What happens is this: In the generated Java source, my fields used to
end up with names as per my specification (e.g., the Oracle column named
"y$an8" showed up as "addressNumber" in the java source).
However, it looks like the "$" became special somehow in 3.1.0 - the
"y$an8" column now shows up as "yAn8" in the generated Java. I tried
changing my custom.properties file accordingly, but it still shows up as
yAn8 even after changing my mapping to look like this:
db.TransactionDetailHistory.yAn8.rename : addressNumber
What do you make of this?
Thanks,
Bill
Abe White wrote:
Hmmm... this is a problem. '$' is not legal in XML names, and thereis no standard way to escape it.
Your best bet is probably to do the following:
1. In the generated .mapping file, replace all '$' characters withanother token, such as '--DOLLAR--'.
2. Switch your properties to use the metadata mapping factory:
kodo.jdbc.MappingFactory: metadata
3. Import your mappings into the metadata mapping factory:
mappingtool -a import package.mapping
4. Delete the mapping file.
5. In your .jdo file, replace '--DOLLAR--' with '$' again.
The metadata mapping factory doesn't put column names in its XMLattribute names, so you should be able to use it safely.--
Marc Prud'hommeaux
SolarMetric Inc. -
Hi!
I am having a problem with reverse mapping. Here's what I do (copying the
generated files to a correct directory omitted):
% rd-schemagen -properties jdo.properties -file schema.xml
% rd-reversemappingtool -properties jdo.properties -package testi
schema.xml
% javac -d build/classes src/testi/*.java
% rd-importtool -properties jdo.properties src/testi/testi.mapping
Here's a part of the output:
<clip>
2958 INFO [main] jdbc.Schema - Found existing table "Kirja" for schema
"null".
3002 INFO [main] jdbc.Schema - Found existing table "Kustantaja" for
schema "n
ull".
3047 INFO [main] jdbc.SQL - [C: 5948361; T: 15336018]close
3125 INFO [main] jdbc.SQL - [C: 2478770; T: 15336018]open:
jdbc:mysql://localh
ost/kirjakauppa (root)
3129 INFO [main] jdbc.Schema - Found existing table "Kirjailija" for
schema "n
ull".
3140 INFO [main] jdbc.SQL - [C: 2478770; T: 15336018]close
3187 INFO [main] jdbc.SQL - [C: 7529545; T: 15336018]open:
jdbc:mysql://localh
ost/kirjakauppa (root)
3193 INFO [main] jdbc.Schema - Found existing table "Kirjoittaja" for
schema "
null".
3225 INFO [main] jdbc.SQL - [C: 7529545; T: 15336018]close
Exception in thread "main" javax.jdo.JDOFatalInternalException:
java.lang.Illega
lArgumentException: You are attempting to link to a primary key column in
table "Kirja" in a foreign key that is already linked to primary key
columns in table "Kirjailija".
NestedThrowables:
java.lang.IllegalArgumentException: You are attempting to link to a primary
key column in table "Kirja" in a foreign key that is already linked to
primary key c
olumns in table "Kirjailija".
at
com.solarmetric.rd.kodo.impl.jdbc.meta.Mappings.createClassMapping(Ma
ppings.java:160)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(M
appingRepository.java:279)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMetaData(
MappingRepository.java:147)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(M
appingRepository.java:158)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.getMapping(I
mportTool.java:126)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.importMappin
gs(ImportTool.java:57)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.run(ImportTo
ol.java:408)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.main(ImportT
ool.java:385)
NestedThrowablesStackTrace:
java.lang.IllegalArgumentException: You are attempting to link to a primary
key column in table "Kirja" in a foreign key that is already linked to
primary key c
olumns in table "Kirjailija".
at
com.solarmetric.rd.kodo.impl.jdbc.schema.ForeignKey.join(ForeignKey.j
ava:238)
at
com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGenerator.generateFore
ignKeys(SchemaGenerator.java:625)
at
com.solarmetric.rd.kodo.impl.jdbc.schema.DynamicSchemaFactory.findTab
le(DynamicSchemaFactory.java:111)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.map.BaseClassMapping.fromMappi
ngInfo(BaseClassMapping.java:113)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.Mappings.createClassMapping(Ma
ppings.java:144)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(M
appingRepository.java:279)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMetaData(
MappingRepository.java:147)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(M
appingRepository.java:158)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.getMapping(I
mportTool.java:126)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.importMappin
gs(ImportTool.java:57)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.run(ImportTo
ol.java:408)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.main(ImportT
ool.java:385)
</clip>
Here's what MySQLCC gives for creation statement of the tables:
<clip>
# Host: localhost
# Database: kirjakauppa
# Table: 'Asiakas'
# CREATE TABLE `Asiakas` (
`Asiakas_id` int(11) NOT NULL auto_increment,
`Nimi1` varchar(50) default NULL,
`Nimi2` varchar(50) default NULL,
`KatuOsoite` varchar(50) default NULL,
`Postiosoite` varchar(50) default NULL,
`Email` varchar(50) default NULL,
`Puhelin` varchar(50) default NULL,
`Fax` varchar(50) default NULL,
`Salasana` varchar(50) default NULL,
`ExtranetTunnus` varchar(50) default NULL,
PRIMARY KEY (`Asiakas_id`),
KEY `Asiakas_id` (`Asiakas_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Kirja'
# CREATE TABLE `Kirja` (
`Kirja_id` int(11) NOT NULL auto_increment,
`Kustantaja_id` int(11) default NULL,
`Nimi` varchar(60) default NULL,
`Nimi2` varchar(60) default NULL,
`ISBN` varchar(50) default NULL,
`Kieli` varchar(50) default NULL,
`Kansi_URL` varchar(50) default NULL,
`Sisalto_URL` varchar(50) default NULL,
`Tukkuhinta` decimal(10,2) default NULL,
`Kuluttajahinta` decimal(10,2) default NULL,
`Varastokpl` int(11) default NULL,
PRIMARY KEY (`Kirja_id`),
KEY `Kirja_id` (`Kirja_id`),
KEY `Kustantaja_id` (`Kustantaja_id`),
FOREIGN KEY (`Kustantaja_id`) REFERENCES `kirjakauppa.Kustantaja`
(`Kustantaja_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Kirjailija'
# CREATE TABLE `Kirjailija` (
`Kirjailija_id` int(11) NOT NULL auto_increment,
`Sukunimi` varchar(50) default NULL,
`Etunimi` varchar(50) default NULL,
`Maa` varchar(50) default NULL,
`Kirjailija_URL` varchar(50) default NULL,
PRIMARY KEY (`Kirjailija_id`),
KEY `Kirjailija_id` (`Kirjailija_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Kirjoittaja'
# CREATE TABLE `Kirjoittaja` (
`Kirjoittaja_id` int(11) NOT NULL auto_increment,
`Kirjailija_id` int(11) NOT NULL default '0',
`Kirja_id` int(11) NOT NULL default '0',
PRIMARY KEY (`Kirjoittaja_id`),
KEY `Kirjailija_id` (`Kirjailija_id`),
KEY `Kirja_id` (`Kirja_id`),
FOREIGN KEY (`Kirjailija_id`) REFERENCES `kirjakauppa.Kirjailija`
(`Kirjailija_id`),
FOREIGN KEY (`Kirja_id`) REFERENCES `kirjakauppa.Kirja` (`Kirja_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Koodi'
# CREATE TABLE `Koodi` (
`Koodi_id` int(11) NOT NULL auto_increment,
`Koodi` varchar(50) default NULL,
`Tyyppi` varchar(50) default NULL,
`Arvo` varchar(50) default NULL,
PRIMARY KEY (`Koodi_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Kustantaja'
# CREATE TABLE `Kustantaja` (
`Kustantaja_id` int(11) NOT NULL auto_increment,
`Nimi` varchar(80) default NULL,
`Maa` varchar(50) default NULL,
`Kustantaja_URL` varchar(50) default NULL,
`KirjaLkm` int(11) default NULL,
PRIMARY KEY (`Kustantaja_id`),
KEY `Kustantaja_id` (`Kustantaja_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Luokittelu'
# CREATE TABLE `Luokittelu` (
`Luokittelu_id` int(11) NOT NULL auto_increment,
`Luokka_id` int(11) NOT NULL default '0',
`Kirja_id` int(11) NOT NULL default '0',
PRIMARY KEY (`Luokittelu_id`),
KEY `Luokka_id` (`Luokka_id`),
KEY `Kirja_id` (`Kirja_id`),
FOREIGN KEY (`Luokka_id`) REFERENCES `kirjakauppa.Luokka` (`Luokka_id`),
FOREIGN KEY (`Kirja_id`) REFERENCES `kirjakauppa.Kirja` (`Kirja_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Luokka'
# CREATE TABLE `Luokka` (
`Luokka_id` int(11) NOT NULL auto_increment,
`Luokka` varchar(50) default NULL,
PRIMARY KEY (`Luokka_id`),
KEY `Luokka_id` (`Luokka_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Myyja'
# CREATE TABLE `Myyja` (
`Myyja_id` int(11) NOT NULL auto_increment,
`Myyja` varchar(50) default NULL,
`Myyja_URL` varchar(50) default NULL,
PRIMARY KEY (`Myyja_id`),
KEY `Myyja_id` (`Myyja_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Tilaus'
# CREATE TABLE `Tilaus` (
`Tilaus_id` int(11) NOT NULL auto_increment,
`Asiakas_id` int(11) NOT NULL default '0',
`Myyja_id` int(11) default NULL,
`TilausPvm` timestamp(14) NOT NULL,
`EnsimmToimitusPvm` timestamp(14) NOT NULL,
`ViimToimitusPvm` timestamp(14) NOT NULL,
`Tila` int(11) NOT NULL default '0',
`Mk` decimal(10,2) default NULL,
PRIMARY KEY (`Tilaus_id`),
KEY `Asiakas_id` (`Asiakas_id`),
KEY `Myyja_id` (`Myyja_id`),
KEY `Tilaus_id` (`Tilaus_id`),
FOREIGN KEY (`Asiakas_id`) REFERENCES `kirjakauppa.Asiakas`
(`Asiakas_id`),
FOREIGN KEY (`Myyja_id`) REFERENCES `kirjakauppa.Myyja` (`Myyja_id`)
) TYPE=InnoDB;
# Host: localhost
# Database: kirjakauppa
# Table: 'Tilausrivi'
# CREATE TABLE `Tilausrivi` (
`TilausRivi_id` int(11) NOT NULL auto_increment,
`Tilaus_id` int(11) NOT NULL default '0',
`Kirja_id` int(11) NOT NULL default '0',
`TilausLkm` int(11) default NULL,
`Ahinta` decimal(10,2) default NULL,
`Alepros` float default NULL,
`Mk` decimal(10,2) default NULL,
`ToimitettuLkm` int(11) default NULL,
`ToimitusPvm` timestamp(14) NOT NULL,
`ViimToimitusPvm` timestamp(14) NOT NULL,
`Tila` int(11) NOT NULL default '0',
PRIMARY KEY (`TilausRivi_id`),
KEY `Tilaus_id` (`Tilaus_id`),
KEY `Kirja_id` (`Kirja_id`),
FOREIGN KEY (`Tilaus_id`) REFERENCES `kirjakauppa.Tilaus` (`Tilaus_id`),
FOREIGN KEY (`Kirja_id`) REFERENCES `kirjakauppa.Kirja` (`Kirja_id`)
) TYPE=InnoDB;
</clip>
I can find the original creation script if it is necessary.
My guess was that I need to define the foreign keys myself into the
generated schema.xml This is stated in the manual. However, this did not
help, although it changed the stack trace a little (it complains about
different classes than before):
<clip>
Exception in thread "main" javax.jdo.JDOFatalInternalException:
java.lang.IllegalArgumentException: You are attempting to link to a primary
key column in table "Myyja" in a foreign key that is already linked to
primary key columns in table "Asiakas".
NestedThrowables:
java.lang.IllegalArgumentException: You are attempting to link to a primary
key column in table "Myyja" in a foreign key that is already linked to
primary key columns in table "Asiakas".
at
com.solarmetric.rd.kodo.impl.jdbc.meta.Mappings.createFieldMapping(Mappings.java:208)
</clip>
I don't think I fully understand the error message, what exactly is wrong
here? How can I fix it?
Here's a sample of the changes I made to schema.xml:
- added the name - attribute to schema (it was missing)
<schema name="kirjakauppa">
- added the foreign key elements according to the table creation statements
given above
<fk name="Kustantaja_id" to-table="Kustantaja" column="Kustantaja_id"/>
etc...
-AnttiOn Mon, 16 Jun 2003 17:55:35 -0500, Abe White <[email protected]>
wrote:
It seems the last three options are being ignored - I still get a
mapping
file with schema names in front of tables (e.g. kirjakauppa.Asiakas, not
Asiakas),That, unfortunately, is impossible to turn off. The -useSchemaName
option controls whether the schema name is included as part of the
generated class name; it doesn't affect the mapping data that is
generated. What problems does including the schema name in the mapping
data cause?
rd-importtool -properties jdo.properties gensrc/testi/testi.mapping0 INFO [main] kodo.MetaData - Parsing metadata resource
"file:/home/akaranta/work/kurssit/jdo/Harjoituskoodi/kirjakauppa/gensrc/testi/testi.mapping".
Exception in thread "main"
com.solarmetric.rd.kodo.meta.JDOMetaDataNotFoundException: No JDO metadata
was found for type "class testi.Asiakas".
FailedObject:class testi.Asiakas
at
com.solarmetric.rd.kodo.meta.JDOMetaDataRepositoryImpl.getMetaData(JDOMetaDataRepositoryImpl.java:126)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMetaData(MappingRepository.java:184)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:197)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.getMapping(ImportTool.java:128)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.importMappings(ImportTool.java:60)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.run(ImportTool.java:400)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.main(ImportTool.java:377)
This exception goes away if I edit the schema name out of the mapping
file from all classes.
separate classes are being generated for join tables with
primary keysDo these join tables have an extra primary key column? TheYes, they do. Ok, now I know where the problem is.
-primaryKeyOnJoin flag tells Kodo to ignore a join table with a primary
key on the join columns. But Kodo can't handle join tables with extra
column(s) just for a primary key identifier. This isn't a limitation of
the reverse mapping tool, it's a limitation of Kodo. Kodo wouldn't know
what to insert in those extra primary key column(s) when adding membersWhy not? If it can handle single numeric pk columns when making the
generated classes use data store identity, it has to generate something to
those columns. I can't see why this is different.
That is simply out of curiosity - the next thing fixed my problem:
to the join table. Of course, if the primary key is an auto-increment or
something where Kodo can ignore it for inserts, you can just remove the
<column> elements and the <pk> element from your .schema file and the
reverse mapping tool will map it as a join table appropriately.It is auto-increment, so I did this and it worked. Thanks.
, and application id is used for all classes.Are your primary keys on single, numeric columns? Kodo uses Java longsYes (int in MySQL), so that should not be a problem. They are also auto-
incremented. This seems to be the only real problem remaining with this
schema.
-Antti -
Unrecognized types in Reverse Mapping
In our database schema there is use of a user-defined database type. The
reverse mapping tool cannot recogize this type and automatically
classifies it as a blob in the mapping file and the generic Object for the
java sources. I would like to cast this user-defined type to a String in
java, because otherwise kodo blows up when I try to retrieve the field. I
extended PropertiesReverseCustomizer and was able to get the java sources
to output String instead. But I couldn't find an easy way of getting the
mapping file to use "value" instead of "blob". Right now I am having to do
a query replace on the mapping file, but I would like to know if there's
way of getting the Reverse mapping tool to do this for you?
TobyYou can probably just add the fields for UDT types manually in your
customizer:
import java.sql.*;
import kodo.meta.*;
import kodo.jdbc.meta.*;
import kodo.jdbc.schema.*;
private ReverseMappingTool tool; // set in setTool ()
public boolean customize (ClassMapping cls)
Column[] cols = cls.getTable ().getColumns ();
for (int i = 0; i < cols.length; i++)
if (cols.isCompatible (Types.BLOB, 0))
addStringField (cls, cols[i]);
return super.customize (cls);
private void addStringField (ClassMapping cls, Column col)
String name = tool.getFieldName (col.getName (), cls);
FieldMetaData fmd = tool.newFieldMetaData (name, String.class, cls);
ValueFieldMapping field = new ValueFieldMapping (fmd);
mapping.setColumn (col);
tool.addFieldMapping (field, cls); -
Reverse Mapping: letting Kodo manage pk-column
Hi again,
i have a db with many predefined tables. Its not allowed to change the db
schema. The generated Java-classes are looking fine but i want to let kodo
manage the pk columns (like JDOIDX in generated tables). I dont want the
more technical pks in my business classes. Is it possible?
Any help is welcome!Abe White wrote:
Adding a data store identity option to the reverse mapping tool is relatively
high on our to-do list, but it's not implemented yet. For now, you can
follow the steps in the documentation for reverse-mapping your classes, then
switch over to datastore identity manually by changing the class definitions
and metadata.Ok, this solution is workable. Will try it, thanks! -
While trying to run the reverse mapping tool on an existing Oracle
Database(Version 9.2.0.1), I am getting an error "An Error occurred while
accessing the Schema". Do we need some special settings in the Kodo
Workbench other than the connection settings? Am I missing something?
Here is my config settings...
For the driver class : oracle.jdbc.driver.OracleDriver
For the Connection URL :jdbc:oracle:thin:@IPAddress:1521:DBNAMEBy the way, if you launch the tool from the start menu, then it will
probably use javaw and there will be no stack trace.
"Marc Prud'hommeaux" <[email protected]> wrote in message
news:[email protected]..
Vijay-
Can you post the complete stack trace of the exception?
In article <cpkg6d$q7v$[email protected]>, Vijay Kumar Narayanan
wrote:
>>
While trying to run the reverse mapping tool on an existing Oracle
Database(Version 9.2.0.1), I am getting an error "An Error occurredwhile
accessing the Schema". Do we need some special settings in the Kodo
Workbench other than the connection settings? Am I missing something?
Here is my config settings...
For the driver class : oracle.jdbc.driver.OracleDriver
For the Connection URL :jdbc:oracle:thin:@IPAddress:1521:DBNAME
Marc Prud'hommeaux
SolarMetric Inc. -
Reverse Mapping Tutorial - Finder.java queries the wrong table?!
I have been almost successful in running the Reverse Mapping Tutorial, by
creating Java Classes from the hsqldb sample database, and running the JDO
Enhancer on them.
However, I cannot get he Finder.java to work. It seems to look in the wrong
table: MAGAZINEX instead of MAGAZINE?
Did anyone have trouble with this step, or ran it successfully?
Liviu
PS: here is the trace:
0 [main] INFO kodo.Runtime - Starting Kodo JDO version 2.4.2
(kodojdo-2.4.2-20030326-1841) with capabilities: [Enterprise Edition
Features, Standard Edition Features, Lite Edition Features, Evaluation
License, Query Extensions, Datacache Plug-in, Statement Batching, Global
Transactions, Developer Tools, Custom Database Dictionaries, Enterprise
Databases]
70 [main] WARN kodo.Runtime - WARNING: Kodo JDO Evaluation expires in 25
days. Please contact [email protected] for information on extending your
evaluation period or purchasing a license.
68398 [main] INFO kodo.MetaData -
com.solarmetric.kodo.meta.JDOMetaDataParser@19eda2c: parsing source:
file:/C:/Documents%20and%20Settings/default/jbproject/JDO/classes/reversetut
orial.jdo
74577 [main] INFO jdbc.JDBC - [ C:24713456; T:31737213; D:22310332 ] open:
jdbc:hsqldb:hsql_sample_database (sa)
75689 [main] INFO jdbc.JDBC - [ C:24713456; T:31737213; D:22310332 ] close:
com.solarmetric.datasource.PoolConnection@17918f0[[requests=0;size=0;max=70;
hits=0;created=0;redundant=0;overflow=0;new=0;leaked=0;unavailable=0]]
75699 [main] INFO jdbc.JDBC - [ C:24713456; T:31737213; D:22310332 ] close
connection
77331 [main] INFO jdbc.JDBC - Using dictionary class
"com.solarmetric.kodo.impl.jdbc.schema.dict.HSQLDictionary" to connect to
"HSQL Database Engine" (version "1.7.0") with JDBC driver "HSQL Database
Engine Driver" (version "1.7.0")
1163173 [main] INFO jdbc.JDBC - [ C:3093871; T:31737213; D:22310332 ] open:
jdbc:hsqldb:hsql_sample_database (sa)
1163293 [main] INFO jdbc.SQL - [ C:3093871; T:31737213; D:22310332 ]
preparing statement <17940412>: SELECT DISTINCT MAGAZINEX.JDOCLASSX FROM
MAGAZINEX
1163313 [main] INFO jdbc.SQL - [ C:3093871; T:31737213; D:22310332 ]
executing statement <17940412>: [reused=1;params={}]
1163443 [main] INFO jdbc.JDBC - [ C:3093871; T:31737213; D:22310332 ]
close:
com.solarmetric.datasource.PoolConnection@2f356f[[requests=1;size=0;max=70;h
its=0;created=1;redundant=0;overflow=0;new=1;leaked=0;unavailable=0]]
1163443 [main] INFO jdbc.JDBC - [ C:3093871; T:31737213; D:22310332 ] close
connection
Hit uncaught exception javax.jdo.JDOFatalDataStoreException
javax.jdo.JDOFatalDataStoreException:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
[SQL=SELECT DISTINCT MAGAZINEX.JDOCLASSX FROM MAGAZINEX]
[PRE=SELECT DISTINCT MAGAZINEX.JDOCLASSX FROM MAGAZINEX]
Table not found: S0002 Table not found: MAGAZINEX in statement [SELECT
DISTINCT MAGAZINEX.JDOCLASSX FROM MAGAZINEX] [code=-22;state=S0002]
NestedThrowables:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
[SQL=SELECT DISTINCT MAGAZINEX.JDOCLASSX FROM MAGAZINEX]
[PRE=SELECT DISTINCT MAGAZINEX.JDOCLASSX FROM MAGAZINEX]
Table not found: S0002 Table not found: MAGAZINEX in statement [SELECT
DISTINCT MAGAZINEX.JDOCLASSX FROM MAGAZINEX]
at
com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwFatal(SQLException
s.java:17)
at
com.solarmetric.kodo.impl.jdbc.ormapping.SubclassProviderImpl.getSubclasses(
SubclassProviderImpl.java:283)
at
com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.getPrimaryMappingField
s(ClassMapping.java:1093)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCSto
reManager.java:704)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java
:93)
at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:595)
at reversetutorial.Finder.main(Finder.java:32)
NestedThrowablesStackTrace:
java.sql.SQLException: Table not found: S0002 Table not found: MAGAZINEX in
statement [SELECT DISTINCT MAGAZINEX.JDOCLASSX FROM MAGAZINEX]
at org.hsqldb.Trace.getError(Trace.java:226)
at org.hsqldb.jdbcResultSet.<init>(jdbcResultSet.java:6595)
at org.hsqldb.jdbcConnection.executeStandalone(jdbcConnection.java:2951)
at org.hsqldb.jdbcConnection.execute(jdbcConnection.java:2540)
at org.hsqldb.jdbcStatement.fetchResult(jdbcStatement.java:1804)
at org.hsqldb.jdbcStatement.executeQuery(jdbcStatement.java:199)
at
org.hsqldb.jdbcPreparedStatement.executeQuery(jdbcPreparedStatement.java:391
at
com.solarmetric.datasource.PreparedStatementWrapper.executeQuery(PreparedSta
tementWrapper.java:93)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedQueryI
nternal(SQLExecutionManagerImpl.java:771)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQueryInternal(
SQLExecutionManagerImpl.java:691)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQuery(SQLExecu
tionManagerImpl.java:372)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQuery(SQLExecu
tionManagerImpl.java:356)
at
com.solarmetric.kodo.impl.jdbc.ormapping.SubclassProviderImpl.getSubclasses(
SubclassProviderImpl.java:246)
at
com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.getPrimaryMappingField
s(ClassMapping.java:1093)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCSto
reManager.java:704)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java
:93)
at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:792)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:595)
at reversetutorial.Finder.main(Finder.java:32)The reason I did not run importtool is because ... I actually ran it, but it
was not successfull. **!
I now tried the solutions directory, from the kodo distribution, and that
failed as well. Here is what I did:
- I went to reversetutorial/solutions, and compiled all the classes, and
then placed them into a reversetutorial folder (to match the package)
- ran "rd-importtool reversetutorial.mapping" (the mapping file from the
solutions directory), which failed as below:
0 [main] INFO kodo.MetaData - Parsing metadata resource
"file:/C:/kodo/reversetutorial/solutions/reversetutorial.mapping".
Exception in thread "main"
com.solarmetric.rd.kodo.meta.JDOMetaDataNotFoundException: No JDO metadata
was found for type "class reversetutorial.Article".
FailedObject:class reversetutorial.Article
at
com.solarmetric.rd.kodo.meta.JDOMetaDataRepositoryImpl.getMetaData(JDOMetaDa
taRepositoryImpl.java:148)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMetaData(Mapping
Repository.java:147)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository.getMapping(MappingR
epository.java:158)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.getMapping(ImportTo
ol.java:126)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.importMappings(Impo
rtTool.java:57)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.run(ImportTool.java
:408)
at
com.solarmetric.rd.kodo.impl.jdbc.meta.compat.ImportTool.main(ImportTool.jav
a:385)
Any idea why? The solutions directory should work, right? I even tried
specifying a kodo.properties file, but it did not seem to help.
Liviu
"Abe White" <[email protected]> wrote in message
news:[email protected]...
Running the reversemappingtool creates classes, metadata files, and a
.mapping file. That .mapping file contains all the O/R mapping
information for how the generated classes map to your existing database
tables. What the importtool does is just transfer that mapping
information to the metadata files, in the form of <extension> elements.
The reason this is a separate step will be clear once Kodo 3.0 comes out.
So in sum, the importtool does not affect the database in any way. It
just moves information from one format (.mapping file) to another
(<extension> elements in the .jdo file). -
Which object-relational mapping tool is the best for Oracle Coherence?
Which object-relational mapping tool is the best for Oracle Coherence?
My application is read-and-write-intensive. Which tool is most suitable for this application?
TopLink essentials, TopLink, Eclipse or Hibernate?
Thank youI would pick Hibernate mainly because of its popularity and wide knowledge base.
Coherence has provided some documentation for the integration.
http://download.oracle.com/docs/cd/E14526_01/coh.350/e14537/usehibernateascoh.htm#CEGFEFJH
If you have the schema in database, myEclipse can provide you hibernate bindings by reverse engineering. -
Opacity / transparency in gradient map tool not working?
Hi *,
when selecting a gradient with transparency, e.g. neutral density in the gradient map tool (in an adjustment layer), transparency is ignored, i.e. neutral density is working like plain black - which I assume is not intended. And, I'm almost certain, the gradient map properly applied transparency earlier but I might have changed involuntarily some setting. So far, I could not find a good answer. Any ideas?
Best regards,
arnieYou want to use a Gradient Fill adjustment layer instead of Gradient Map for the Neutral Density presets
-
Bug in exists() function of XI Graphical Mapping Tool?
Hi!
If I connect a source field with the exists() function in XI Graphical Mapping Tool and the tag exists it returns TRUE, otherwise it returns FALSE, so everything works as expected.
But I have to connect a user-defined function with exists(). The user-defined function will either calculate a value or set Resultset.SUPPRESS.
If there is a value the exits() function returns TRUE, however if Resultset.SUPPRESS is set it does also return TRUE! This looks to me like a bug in exists() function. Shouldn't it always return FALSE if the input is Resultset.SUPPRESS?
Regards, TanjaHi Stefan!
> The exists() function checks, if a queue is empty.
> An empty queue is <b>not</b> represented by the
> SUPPRESS value.
> If inside a queue there is a SUPPRESS value, the
> queue is <b>not</b> empty.
Ok, so it's not a bug and the exists() function is working as expected.
> If you want the exist() function after a UDF, provide
> an empty queue, or easier: return the values "true"
> or "false" directly from the UDF.
Yes, that's how I actually solved the problem. The UDF was used at several places where the ResultList.SUPPRESS output was needed. So I copied the UDF and changed it so that the output was TRUE or FALSE instead.
Regards, Tanja -
Mapping tool creates new columns one at a time
Hi All,
I'm using Kodo 3.2.2 with MySql 4.1. I have a fairly large table (over
2million rows) representing one persistent class. I need to add several
new fields to the object, which will require a refresh mapping on the
database to add new columns for the fields.
It seems when I run refresh mapping on the database, Kodo is adding each
new field individually in seperate ALTER TABLE statements, rather than
adding all the columns in one ALTER TABLE statement.
With MySQL and large tables, this can really increase the time required to
refresh the mapping - I've tried with MSSQL and that database must handle
ALTER TABLE commands differently because it doesn't take a fraction of the
time that MySQL takes.
Is this a bug (I doubt it), but rather a feature improvement?
Thoughts?
Thanks,
BrendanThanks Abe for the reply - I've been meaning to look at the process of
creating SQL scripts to perform the refresh mappings on our databases.
I'll have a look at this process before we talk contracting!
Thanks,
Brendan
Abe White wrote:
Unfortunately, we don't have any immediate plans to optimize ALTER TABLEsince
it's not a runtime operation, and as you say most DBs don't have a problemwith
it. Also, note that the documentation shows how to get Kodo to create SQL
scripts rather than directly modify the DB; you could easily edit thescripts
Kodo generates to make them more efficient before piping the SQL to MySQLusing
its client app. (Note that Kodo 3.3 introduces the ability to generate SQL
scripts directly from the mapping tool, rather than having to take an extrastep
through the schema tool).
If getting Kodo to combine ALTER statements is important to you, you couldalso
contact [email protected] about contracting us to expedite this work. -
Hi All,
I am abap consultant, so its difficult to write a XSLT mapping program.
Is there any XSLT mapping tool available on net to use free?
Which can take source XML & Target XML and upon doing graphical mapping
it generates the XSLT mapping program between source & target XML.
RegardsRohan,
Is there any XSLT mapping tool available on net to use free?
Yes, Stylus Studio and Altova have free download-able tool for XSL Mapping.
Which can take source XML & Target XML and upon doing graphical mapping
it generates the XSLT mapping program between source & target XML.
I don't think there is any tool which will make use of graphical mapping to create an XSL Mapping.
But the point is, if you are creating a graphical mapping, why you need XSL?
Regards,
Neetesh -
Different mapping tools in the market -- For BPM mapping in XI
Hi All
I am more intersted in learning the BPM mapping tools(3rd party or any)
Can any list out the different tools and which are the best ?
Our company looking forward to implement XI (BPM's) with mapping tools
Can any help me on this
Regards
RakeshHi Rakesh,
plz have a look to <a href="http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm">SAP Library: SAP Exchange Infrastructure</a> for understanding XI, BPM and Mappings.
BPM has no special mapping tool. You can use Java, ABAP, XSLT and graphical Mapping (Message Mapping) at XI, for any case - BPM or not. 3rd Party has nothing to do with BPM or Mapping. That means a non SAP system.
Regards,
Udo -
Hi,
Most of my flows are <b>"IDoc -> file" or "file -> Idoc"</b>, and I need to manage several transcodification tables for different countries (I prefer a DDIC table to FixValue or Value mapping) and with an amount of Business systems (more than 300).
Before this week, I used <b>Graphical mapping</b>... but with some difficults to manage correctly several levels of IDoc segments. Graphical mapping is easy to use when there are one or two "0...unbound" segments but no more. And you cannot have an easy access to a DDIC (need to use an RFC in BPM).
Since I'm trying to use <b>abap mapping</b>... but with some difficults to manage correctly the creation of an "0..unbound" messages, in order to distribute them to one or several receivers. Abap mapping is esay to use when there is only one receiver (no management before a block "Multiline to single line"; and it is interresting for requests on DDIC tables (very easy). But it seems there is some differences between a testing with tcode "sxi_mapping_test" (thus in foreground ==> easy to debug) and with the execution of the scenario (thus in background ==> difficult to debug).
I don't know yet the XSLT mapping and the Java mapping (a complete one, not a java function inside graph mapping).
Inside XI 3.0, for such flows, is there a <b>mapping tool</b> which is better than the other with IDocs?
Regards.
Mickael.You can call Java programs from XSLT mapping.
So any lookups you can code in Java and call it from XSLT program.
Below is the link to know more on XSLT Mapping with Java Enhancement.
http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/frameset.htm
There are couple of blogs on the same.
Hope it helps,
Regards,
Satish -
Any free downloads are there XSLT mapping tool
Hi all ,
any free down loads are there XSLT mapping tool , i need to enchance the mapping which is already done in XSLT mapping there they have done look ups also using java codinh , i do have just XSLT file in import arichive , so please help me in it
thanking you
sridharHi ;
Refer this
XSLT mapping
/people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
Mudit
Maybe you are looking for
-
Questions on the ODBC database type
We use a cloud based application, ServiceNow for Service managerment. They provide an odbc 3.5 compliant driver which works outside of Data Services fine. I tried adding a Datastore for this choosing the 'ODBC' database type. When I click [OK], it
-
What does "send to iTunes" do when I am in iWork.com on my iPad2?
-
Pages won't share document via email
Just an FYI: I just experienced the same problem with the Share feature in Pages that others, as long ago as 2011, were reporting: Pages won't initiate the Share via Email function if your document title has a slash (/) in the title. Replacing the /
-
Hi All, I have a query... In crystal reports. ie; I have created a cross tab using Month name in row wise and employeename in column wise. the report is running perfectly but If i create a parameter for month range iam getting the order of month in A
-
Dynamic Programming - Application Development on AS ABAP - SAP Library
To add a comment, please log in or register on the top of this page and choose Reply. Please write your comment in English. You can also go back to the SAP help page.