I got some strange errors since I changed most of my datasources to autoDeriveSchema="true".
When starting apache, and after trying to load my application, I get this error:
The application is not loaded.
It seems that the 'stufen' datasource is not loaded correctly:
But each time, the datasource which could not be loaded changes:
10 minutes ago I had the same error but with *another* datasource, which also has autoDeriveSchema="true".
If I stop apache and start it again, the application is loaded correctly and I get no errors. What may be happening here?
Using v9.1p_2014-09-25/PowerEdition Deployment (built 2014-09-25) with Apache 8.0.9 and MSSQL 2014.
When starting apache, and after trying to load my application, I get this error:
Code:
=== 2014-10-04 13:07:01,849 [ec-1] DEBUG XML - Parsed XML from C:\Users\Eduardo\git\zedes2\zedes2\war\ds\stufen.ds.xml: 2ms === 2014-10-04 13:07:01,849 [ec-1] DEBUG ISCKeyedObjectPool - Borrowing object for 'DataSource' === 2014-10-04 13:07:01,851 [ec-1] DEBUG ISCKeyedObjectPool - Borrowing object for 'operationBinding' === 2014-10-04 13:07:01,852 [ec-1] DEBUG ISCKeyedObjectPool - Borrowing object for 'OperationBinding' === 2014-10-04 13:07:01,854 [ec-1] INFO SQLDataSource - Deriving dataSource stufen from table: t_tex_texte === 2014-10-04 13:07:01,855 [ec-1] DEBUG SQLConnectionManager - Borrowed connection '542164306' === 2014-10-04 13:07:01,855 [ec-1] INFO SQLDSGenerator - Fetching column metadata for table: t_tex_texte === 2014-10-04 13:07:01,855 [ec-1] INFO SQLDSGenerator - =============Using catalog: zedes2 === 2014-10-04 13:07:01,888 [ec-1] INFO SQLDSGenerator - Fetching column metadata for t_tex_texte complete === 2014-10-04 13:07:01,889 [ec-1] INFO PoolableSQLConnectionFactory - No explicit configuration for db: derivedFromConnection in server.properties - will look for a Connection object at derivedFromConnection or java:comp/env/derivedFromConnection. === 2014-10-04 13:07:01,889 [ec-1] INFO PoolManager - SmartClient pooling disabled for 'derivedFromConnection' objects === 2014-10-04 13:07:01,889 [ec-1] DEBUG PoolableSQLConnectionFactory - Initializing SQL config for 'derivedFromConnection' via JNDI === 2014-10-04 13:07:01,894 [ec-1] DEBUG JNDI - No configuration for JNDI context '' - assuming default initialContext === 2014-10-04 13:07:01,897 [ec-1] DEBUG JNDI - No configuration for JNDI context '_container_' - assuming default initialContext === 2014-10-04 13:07:01,897 [ec-1] DEBUG JNDI - Detected container context, using new InitialContext(env) lookup method === 2014-10-04 13:07:01,900 [ec-1] ERROR SQLDSGenerator - Unable to load foreign key information for autoDeriveFK logic. java.sql.SQLException: java.sql.SQLException: javax.naming.NameNotFoundException: Name [derivedFromConnection] is not bound in this Context. Unable to find [derivedFromConnection]. at com.isomorphic.sql.SQLMetaData.conn(SQLMetaData.java:113) at com.isomorphic.sql.SQLMetaData.getMetaData(SQLMetaData.java:132) at com.isomorphic.sql.SQLMetaData.getForeignKeys(SQLMetaData.java:334) at com.isomorphic.sql.SQLDSGenerator.getFieldsFromTable(SQLDSGenerator.java:363) at com.isomorphic.sql.SQLDSGenerator.generate(SQLDSGenerator.java:176) at com.isomorphic.sql.SQLDataSource.getConfigFromTable(SQLDataSource.java:3822) at com.isomorphic.sql.SQLDataSource.fromTable(SQLDataSource.java:3771) at com.isomorphic.sql.SQLDataSource.init(SQLDataSource.java:250) at com.isomorphic.datasource.DataSource.initialize(DataSource.java:528) at com.isomorphic.datasource.BasicDataSource.fromConfig(BasicDataSource.java:177) at com.isomorphic.datasource.DataSource.fromConfig(DataSource.java:513) at com.isomorphic.datasource.FileSystemDSRepo.loadDS(FileSystemDSRepo.java:110) at com.isomorphic.datasource.DataSource.forName(DataSource.java:272) at com.isomorphic.datasource.DataSource.forName(DataSource.java:264) at com.isomorphic.datasource.DataSource.forName(DataSource.java:253) at com.isomorphic.datasource.PoolableDataSourceFactory.makeUnpooledObject(PoolableDataSourceFactory.java:135) at com.isomorphic.datasource.PoolableDataSourceFactory.makeObject(PoolableDataSourceFactory.java:151) at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:964) at com.isomorphic.pool.ISCKeyedObjectPool.borrowObject(ISCKeyedObjectPool.java:106) at com.isomorphic.pool.PoolManager.borrowObject(PoolManager.java:84) at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:135) at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:86) at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:157) at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:100) at javax.servlet.http.HttpServlet.service(HttpServlet.java:618) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) at de.mks_infofabrik.zedes2.server.filter.GWTCacheControlFilter.doFilter(GWTCacheControlFilter.java:50) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at de.mks_infofabrik.zedes2.server.filter.UserInfoSessionInjecterFilter.doFilter(UserInfoSessionInjecterFilter.java:51) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:260) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) === 2014-10-04 13:07:01,903 [ec-1] DEBUG PoolableSQLConnectionFactory - Initializing SQL config for 'derivedFromConnection' via JNDI === 2014-10-04 13:07:01,903 [ec-1] DEBUG JNDI - No configuration for JNDI context '' - assuming default initialContext === 2014-10-04 13:07:01,904 [ec-1] DEBUG JNDI - No configuration for JNDI context '_container_' - assuming default initialContext === 2014-10-04 13:07:01,904 [ec-1] DEBUG JNDI - Detected container context, using new InitialContext(env) lookup method === 2014-10-04 13:07:01,904 [ec-1] DEBUG SQLConnectionManager - Connection 542164306 was already closed when we came to free it === 2014-10-04 13:07:01,904 [ec-1] ERROR DataSourceLoader - Key[type=com.isomorphic.servlet.DataSourceLoader, annotation=[none]] - Exception while attempting to load a DataSource java.sql.SQLException: java.sql.SQLException: javax.naming.NameNotFoundException: Name [derivedFromConnection] is not bound in this Context. Unable to find [derivedFromConnection]. at com.isomorphic.sql.SQLMetaData.conn(SQLMetaData.java:113) at com.isomorphic.sql.SQLMetaData.getMetaData(SQLMetaData.java:132) at com.isomorphic.sql.SQLMetaData.getPrimaryKeys(SQLMetaData.java:326) at com.isomorphic.sql.SQLDSGenerator.getFieldsFromTable(SQLDSGenerator.java:389) at com.isomorphic.sql.SQLDSGenerator.generate(SQLDSGenerator.java:176) at com.isomorphic.sql.SQLDataSource.getConfigFromTable(SQLDataSource.java:3822) at com.isomorphic.sql.SQLDataSource.fromTable(SQLDataSource.java:3771) at com.isomorphic.sql.SQLDataSource.init(SQLDataSource.java:250) at com.isomorphic.datasource.DataSource.initialize(DataSource.java:528) at com.isomorphic.datasource.BasicDataSource.fromConfig(BasicDataSource.java:177) at com.isomorphic.datasource.DataSource.fromConfig(DataSource.java:513) at com.isomorphic.datasource.FileSystemDSRepo.loadDS(FileSystemDSRepo.java:110) at com.isomorphic.datasource.DataSource.forName(DataSource.java:272) at com.isomorphic.datasource.DataSource.forName(DataSource.java:264) at com.isomorphic.datasource.DataSource.forName(DataSource.java:253) at com.isomorphic.datasource.PoolableDataSourceFactory.makeUnpooledObject(PoolableDataSourceFactory.java:135) at com.isomorphic.datasource.PoolableDataSourceFactory.makeObject(PoolableDataSourceFactory.java:151) at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:964) at com.isomorphic.pool.ISCKeyedObjectPool.borrowObject(ISCKeyedObjectPool.java:106) at com.isomorphic.pool.PoolManager.borrowObject(PoolManager.java:84) at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:135) at com.isomorphic.datasource.DataSourceManager.getDataSource(DataSourceManager.java:86) at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:157) at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:100) at javax.servlet.http.HttpServlet.service(HttpServlet.java:618) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) at de.mks_infofabrik.zedes2.server.filter.GWTCacheControlFilter.doFilter(GWTCacheControlFilter.java:50) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at de.mks_infofabrik.zedes2.server.filter.UserInfoSessionInjecterFilter.doFilter(UserInfoSessionInjecterFilter.java:51) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:260) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) === 2014-10-04 13:07:01,907 [ec-1] ERROR DataSourceLoader - Key[type=com.isomorphic.servlet.DataSourceLoader, annotation=[none]] - Top-level servlet error: javax.servlet.ServletException: DataSource 'stufen' failed to load due to an exception on the server: java.sql.SQLException: javax.naming.NameNotFoundException: Name [derivedFromConnection] is not bound in this Context. Unable to find [derivedFromConnection]. See the server-side log for additional details. at com.isomorphic.servlet.DataSourceLoader.processRequest(DataSourceLoader.java:249) at com.isomorphic.servlet.DataSourceLoader.doGet(DataSourceLoader.java:100) at javax.servlet.http.HttpServlet.service(HttpServlet.java:618) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) at de.mks_infofabrik.zedes2.server.filter.GWTCacheControlFilter.doFilter(GWTCacheControlFilter.java:50) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at de.mks_infofabrik.zedes2.server.filter.UserInfoSessionInjecterFilter.doFilter(UserInfoSessionInjecterFilter.java:51) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:260) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) === 2014-10-04 13:07:01,917 [ec-1] INFO Compression - /zedes2/zedes2V010214/sc/DataSourceLoader: 93779 -> 14585 bytes === 2014-10-04 13:07:01,917 [ec-1] DEBUG ServletTools - setting cookie 'isc_cState' to: 'ready'
It seems that the 'stufen' datasource is not loaded correctly:
Code:
<DataSource ID="stufen" serverType="sql" tableName="t_tex_texte" autoDeriveSchema="true"> <operationBindings> <operationBinding operationType="fetch"> <whereClause><![CDATA[ t_tex_texte.f_typ = 3 AND ($defaultWhereClause) ]]></whereClause> </operationBinding> </operationBindings> </DataSource>
10 minutes ago I had the same error but with *another* datasource, which also has autoDeriveSchema="true".
If I stop apache and start it again, the application is loaded correctly and I get no errors. What may be happening here?
Using v9.1p_2014-09-25/PowerEdition Deployment (built 2014-09-25) with Apache 8.0.9 and MSSQL 2014.
Comment