-
1. Re: WildFly 8.1: no log output for "import.sql"
jaikiran Jun 2, 2014 2:01 AM (in response to wolfgangknauf)I think that's a Hibernate (JPA implementation) thing rather than the application server log. Perhaps the hibernate forums might be a better place for this.
-
3. Re: WildFly 8.1: no log output for "import.sql"
wolfgangknauf Nov 10, 2015 3:33 PM (in response to wolfgangknauf)There is only hint that can be found by activating TRACE logging for "org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl" (and probably DEBUG for "org.hibernate.tool.hbm2ddl.SchemaExport"): there are 4 places where this file is searched.
If your log contains those lines, the file was not found:
21:02:55,379 TRACE [org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl] trying via [new URL("/import.sql")]
21:02:55,379 TRACE [org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl] trying via [ClassLoader.getResourceAsStream("/import.sql")]
21:02:55,383 TRACE [org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl] trying via [new URL("import.sql")]
21:02:55,383 TRACE [org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl] trying via [ClassLoader.getResourceAsStream("import.sql")]
21:02:55,385 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport] Import file not found: /import.sql
If the log ends after one of the first 4 "trying via" messages and there is no finale message "Import file not found", the file was found ;-).
-
4. Re: WildFly 8.1: no log output for "import.sql"
jaikiran Dec 23, 2015 12:09 AM (in response to wolfgangknauf)Is this still an issue with latest versions of WildFly? If so, can you attach a sample application which reproduces this?
-
5. Re: WildFly 8.1: no log output for "import.sql"
wolfgangknauf Dec 23, 2015 3:12 PM (in response to jaikiran)Hi Jaikiran,
yes, there is still no status report with WildFly 10 CR5.
Attached is my sample. It also contains some security related stuff, so unfortunately you have to add two snippets to "standalone.xml":
A security realm:
<security-realm name="KnaufRealm">
<authentication>
<jaas name="knaufsecurity"/>
</authentication>
</security-realm>
A security domain:
<security-domain name="knaufsecurity" cache-type="default">
<authentication>
<login-module code="Database" flag="required">
<module-option name="dsJndiName" value="java:jboss/datasources/ExampleDS"/>
<module-option name="principalsQuery" value="SELECT PASSWORT FROM BENUTZER WHERE LOGIN=?"/>
<module-option name="rolesQuery" value="SELECT R.ROLLE, 'Roles' FROM ROLLE AS R, BENUTZER_ROLLE AS BR, BENUTZER AS B WHERE B.LOGIN=? AND BR.ROLLEN_ID = R.ID AND BR.BENUTZER_ID = B.ID"/>
</login-module>
</authentication>
</security-domain>
Best regards
Wolfgang
-
6. Re: WildFly 8.1: no log output for "import.sql"
jaikiran Dec 23, 2015 11:20 PM (in response to wolfgangknauf)I think you forgot to attach the sample application
-
7. Re: WildFly 8.1: no log output for "import.sql"
wolfgangknauf Dec 24, 2015 4:38 PM (in response to jaikiran)Sorry! Next try....
-
Security.ear 15.6 KB
-
-
8. Re: WildFly 8.1: no log output for "import.sql"
jaikiran Dec 25, 2015 1:46 AM (in response to wolfgangknauf)I just had a quick look and it appears that the import scripts are executed fine after being picked up. It's just that their names aren't logged when they are being executed.
Wolfgang Knauf wrote:
This one line "Executing import script..." is quite helpful, because it is the only hint that the file was placed in the correct location and that it is processed at all ;-)
I just submitted a pull request to the hibernate project to add this log message Log a message while executing the import script(s) by jaikiran · Pull Request #1200 · hibernate/hibernate-orm · GitHub. If the Hibernate team accepts it, it should be available whenever they release next.
-
9. Re: WildFly 8.1: no log output for "import.sql"
wolfgangknauf Dec 25, 2015 12:40 PM (in response to jaikiran)Perfect, many thanks!
Wolfgang
-
10. Re: WildFly 8.1: no log output for "import.sql"
jaikiran Jan 14, 2016 1:49 AM (in response to wolfgangknauf)FYI - This enhancement is now available in the recently released 5.0.7 version of Hibernate [HHH-10439] Log a message which prints the name of the import script being imported - Hibernate JIRA
-
11. Re: WildFly 8.1: no log output for "import.sql"
wolfgangknauf Feb 14, 2016 6:43 AM (in response to jaikiran)I can confirm that it works perfectly in WildFly 10.0.0.Final.
Thanks
Wolfgang