1

Has anyone out here tried auto-generating sqlj source code , from oracle pl/sql packages or procedures ?

mu is too short
  • 426,620
  • 70
  • 833
  • 800
Abhay Chaware
  • 333
  • 4
  • 14
  • Yes and it works. You might want to highlight the specifics you would want to know about if you expect this question to be answered in a more throughout way. – mulander Nov 27 '11 at 11:23
  • Thanks @mulander. I kind have managed it using ANTLR. Do you have an alternate way ? What I am trying to do is geenerate .java or .sqlj source code from oracle plsql packages/package bodies/procedures. – Abhay Chaware Nov 28 '11 at 04:59

1 Answers1

0

You can use JPublisher to automatically generate java classes for sqlj based on Oracle PL/SQL stored procedures. Below is the setup I typically use, you might want to experiment with *types flags (setting them either to oracle or jdbc).

sqlj/bin/jpub --user db_user -case=mixed -compile=false -omit_schema_names -sql=package_name -usertypes=oracle -numbertypes=jdbc -lobtypes=oracle -builtintypes-jdb -package=namespace -plsql-file=package_name_wrapper.sql,package_name_dropper.sql -plsqlpackage=package_name_jpubwrapper
mulander
  • 196
  • 4
  • Thanks @Mulander. Problem is that JPublisher only creates a SQLJ wrapper on existing plsql objects, compared to converting the plsql object into java. – Abhay Chaware Nov 29 '11 at 05:34