Google Groups failed to attach my file, so here's a Google Drive link: https://drive.google.com/file/d/0B-5v58M-7QhtMDlKWGpvYVcwMWc/view?usp=sharing
On Tuesday, October 4, 2016 at 11:47:10 AM UTC-4, Mike Koch wrote: > > I have a project with the following maven structure: > > Parent > - First Module with JBehave Story > - Data Access Module > - Second Module with JBehave Story > > Both of the modules that have a JBehave Story utilize a local MS SQL > server database connection as they rely on database tests. The data access > modules provides the necessary DataSource to connect to this database. The > issue I'm coming across is when running `mvn clean verify` across the > parent module, only *one* of the JBehave stories will run. The other > module will fail with the following error: > > WARNING: Failed to load the sqljdbc_auth.dll cause : Native Library C:\ > Windows\System32\sqljdbc_auth.dll already loaded in another classloader > > If only one (or none) of the modules utilize the database connection, the > modules run fine. Also, I can run each story separately. I can also use > this same data access logic across regular JUnit tests and those work fine, > even when ran through maven. This issue almost appears to be due to some > sort of backend runner that is not shutting down / garbage collecting > because if I don't explicitly close my DataSource after the story is > complete (which I should be doing anyway), I get the following warning when > the second module starts to run its tests: > > [WARNING] A C3P0Registry mbean is already registered. This probably means > that an application using c3p0 was undeployed, but not all > PooledDataSources were closed prior to undeployment. This may lead to > resource leaks over time. Please take care to close all PooledDataSources. > > Is there something I am forgetting to do during my story's run() method to > make sure everything is properly destroyed after the story is finished > running, so the next story can run correctly without problems? I've > attached a .zip of a sample project that can reproduce this issue. > -- You received this message because you are subscribed to the Google Groups "JBehave User" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/jbehave-user/2adc0710-6499-4ee8-b7b0-2323fdd563f4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
