... however, that is really surprising that Oracle cannot call "TEST"."TEST"."PROCEDURE_NAME"(). I might be missing something subtle...
2013/7/31 Lukas Eder <[email protected]> > Hi Dominik, > > It took me a while to figure this out now, as I couldn't reproduce this > problem at first. It appears to me that there is an Oracle issue when the > package name coincides with the schema name and jOOQ then fully qualifies > the procedure call as such: > > declare > v_test O_TEST := O_TEST('a'); > begin > "TEST"."TEST"."AUSGABE"("P_TEST" => v_test); > end; > > When I rename the package to XX, for instance, it works: > > declare > v_test O_TEST := O_TEST('a'); > begin > "TEST"."XX"."AUSGABE"("P_TEST" => v_test); > end; > > > But that doesn't seem to be a jOOQ problem. I can reproduce this with SQL > Developer as well. Can you confirm this? Or did you run into a more general > problem at your side? > > > 2013/7/23 Dominik Amon <[email protected]> > >> Hi Lukas, >> >> no problem, I have attached the DDL scripts. >> >> The Java code is: >> >> Class.forName ("oracle.jdbc.OracleDriver"); >> >> Connection con = >> DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcu", >> "user", "pass"); >> >> Settings settings = new Settings().withRenderSchema(false); >> >> DSLContext context = DSL.using(con, SQLDialect.ORACLE, settings); >> >> Ausgabe ausgabe = new Ausgabe(); >> OTestRecord record = new OTestRecord(); >> record.setTestattrib("test"); >> ausgabe.setPTest(record); >> ausgabe.execute(context.configuration()); >> >> System.out.println(ausgabe.getPTest().getTestattrib()); >> >> OTestRecord ausgabe2 = Test.ausgabe(context.configuration(), record); >> System.out.println(ausgabe2.getTestattrib()); >> >> I have also attached the two configuration files I use. >> >> When generating with "test-working.xml" everything is working just fine, >> but using "test-not-working.xml" the described Exception is thrown. >> >> Setting withRenderSchema(true) does not make any difference. >> >> Regards >> Dominik >> >> >> On Monday, July 22, 2013 9:43:51 AM UTC+2, Lukas Eder wrote: >> >>> Hi Dominik, >>> >>> Sorry for the delay. This does indeed look like a bug, but it might not >>> be easy to reproduce this from your recent mail. Could you provide: >>> >>> - The DDL of the type TEST >>> - The DDL of the package pack_test >>> - Some sample Java code to reproduce the issue >>> >>> Thanks >>> Lukas >>> >>> 2013/7/16 <[email protected]> >>> >>> Hi Lukas, >>>> >>>> I am fairly new to jOOQ, but it seems like I found a bug that is maybe >>>> related to this. >>>> >>>> I am generating from an Oracle Schema using the "default schema" as >>>> output schema (empty <outputSchema> tag). When executing a stored >>>> procedure I get a ClassCastException: >>>> >>>> java.lang.ClassCastException: oracle.sql.STRUCT cannot be cast to >>>> de.test.jooq.udt.records.**TestRecord >>>> at de.test.y.jooq.packages.pack_**test.TestRetrieve.getTest(** >>>> TestRetrieve.java:106) >>>> >>>> However when generation has run with: >>>> >>>> <inputSchema>TEST</**inputSchema> >>>> <outputSchema>TEST</**outputSchema> >>>> >>>> and >>>> >>>> Settings settings = new Settings().withRenderSchema(**false); >>>> >>>> everything is fine. >>>> >>>> Is it a bug or am I missing something? >>>> >>>> Regards >>>> Dominik >>>> >>>> BTW: In the case where the Exception occurs setting: >>>> >>>> Settings settings = new Settings().withRenderSchema(**false); >>>> >>>> Does also lead to the ClassCastException. >>>> >>>> On Friday, June 14, 2013 4:49:19 PM UTC+2, Lukas Eder wrote: >>>> >>>>> Hi James, >>>>> >>>>> Thanks for reporting this. This is a bug. I have created #2522 for >>>>> this. >>>>> https://github.com/jOOQ/jOOQ/**i**ssues/2522<https://github.com/jOOQ/jOOQ/issues/2522> >>>>> >>>>> This bug may be related to another bug that was fixed some time ago. >>>>> https://github.com/jOOQ/jOOQ/**i**ssues/1693<https://github.com/jOOQ/jOOQ/issues/1693> >>>>> >>>>> Cheers >>>>> Lukas >>>>> >>>>> >>>>> 2013/6/12 <[email protected]> >>>>> >>>>>> Hi, >>>>>> i have found a problem while mapping a different schema at runtime; >>>>>> the mapping doesn't work with udts (types and records). >>>>>> the piece of code involved in the mapping operation is the following >>>>>> >>>>>> DataSourceConnectionProviderFa****ctory dsFactory = >>>>>> DataSourceConnectionProviderFa****ctory.getInstance(config); >>>>>> ConnectionProvider cp = dsFactory.**getDataSourceConnect** >>>>>> ionProvide**r(type, ds); >>>>>> Settings st = new Settings() >>>>>> .withRenderMapping(new RenderMapping() >>>>>> .withSchemata( >>>>>> new MappedSchema().withInput("DEV"****).withOutput("PRODUCTION"))); >>>>>> Configuration cfg = new DefaultConfiguration().set(cp)**** >>>>>> .set(dialect).set(st); >>>>>> return DSL.using(cfg); >>>>>> >>>>>> The same problem occurs if classes are generated by the generation >>>>>> tool (input/output schema defined in configuration xml). >>>>>> >>>>>> Is this a bug or am I doing something wrong? >>>>>> >>>>>> thanks >>>>>> James >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "jOOQ User Group" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to jooq-user+...@**googlegroups.com**. >>>>>> >>>>>> For more options, visit >>>>>> https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out> >>>>>> . >>>>>> >>>>>> >>>>>> >>>>> >>>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "jOOQ User Group" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to jooq-user+...@**googlegroups.com. >>>> For more options, visit >>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >>>> . >>>> >>>> >>>> >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "jOOQ User Group" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
