Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    CONNECTING TO SQLSERVER 2008 R2 - SmartClient_v120p_2020-02-13_Evaluation

    Good afternoon Guys,
    I have been evaluating your package for a long time. For some time I put it aside. I'm taking it up today.
    Well, what I am finding, repeated issue, is difficulty connecting to SQLSERVER database.
    At the beginning, when I started trying it, the attempts to connect to this database became "heavy", but not against ORACLE.
    The same thing is happening today !!!!! ...
    When accessing for the first instance, after decompressing, the driver class is implemented, I create my new datasource pointing to the SQLSERVER 2008R2 server, the connection is satisfactory, I save that definition, it gives me the message that I must wait for everything to restart, and here we have the problem ... STOP EVERYTHING ... the server throws error 404 "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists." ... and it Everything goes to hell. Nothing works.
    What I do to retest is to unzip the zip of the evaluation package, overwriting all files and retest ... and so on.

    It is absolutely anomalous that when creating a new data source everything stops working.
    Additionally, I wanted to define a default data source other than HIBERNATE and everything also went to hell ... it stopped working, so I guess, TOMCAT.

    Please indicate that I can send you (the server notes) to help with the solution.

    VERSION: SmartClient_v120p_2020-02-13_Evaluation
    BROWSER: FIREFOX 72.0.2(64 BITS)
    VMWARE WORKSTATION 12.0
    SO: WINDOWS 10 PRO RETAIL
    DATABASE: SQLSEVER 2008 R2
    JDBC: mssql-jdbc-8.2.0.jre11.jar
    SERVER-SIDE PROBLEM: === 2020-02-18 22:56:47,311 [at]]] INFO Logger - Logging system started.
    === 2020-02-18 22:56:47,336 [at]]] WARN ISCInit - Failed to populate JNDI context with JDBC connections configured in server.properties - impacted databases: [Mysql, GoogleCloudSQL, Cache, PostgreSQL, Firebird, DB2, HSQLDB, Oracle, Informix, SQLServer, defaultDatabase]
    javax.naming.NameAlreadyBoundException: Name [defaultDatabase] is already bound in this Context
    at org.apache.naming.NamingContext.bind(NamingContext.java:913)
    at org.apache.naming.NamingContext.bind(NamingContext.java:192)
    at org.apache.naming.NamingContext.bind(NamingContext.java:905)
    at org.apache.naming.NamingContext.bind(NamingContext.java:192)
    at org.apache.naming.NamingContext.bind(NamingContext.java:905)
    at org.apache.naming.NamingContext.bind(NamingContext.java:192)
    at org.apache.naming.NamingContext.bind(NamingContext.java:209)
    at org.apache.naming.SelectorContext.bind(SelectorContext.java:201)
    at java.naming/javax.naming.InitialContext.bind(InitialContext.java:417)
    at com.isomorphic.base.ISCInit.bindJDBCViaJNDI(ISCInit.java:409)
    at com.isomorphic.base.ISCInit.go(ISCInit.java:123)
    at com.isomorphic.base.ISCInit.go(ISCInit.java:75)
    at com.isomorphic.messaging.MessagingWebSocketEndpoint.<clinit>(MessagingWebSocketEndpoint.java:52)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:80)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3759)
    at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:291)
    at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5537)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1381)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1385)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1385)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1353)
    at java.base/java.lang.Thread.run(Thread.java:835)
    === 2020-02-18 22:56:47,340 [at]]] INFO ISCInit - No ServletContext available yet - using container IO for now
    === 2020-02-18 22:56:47,340 [at]]] INFO ISCInit - Isomorphic SmartClient/SmartGWT Framework (v12.0p_2020-02-13/EVAL Deployment 2020-02-13) - Initialization Complete
    === 2020-02-18 22:56:47,348 [at]]] INFO MessagingWebSocketEndpoint - Registering Realtime Messaging endpoint at: /isomorphic/websocket
    feb. 18, 2020 10:56:47 P. M. org.apache.jasper.servlet.TldScanner scanJars
    INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    === 2020-02-18 22:56:47,829 [at]]] INFO ISCInit - Auto-detected webRoot - using: C:\Temp\SmartClient_v120p_2020-02-13_Evaluation\SmartClient_v120p_2020-02-13_Evaluation\smartclientSDK
    feb. 18, 2020 10:56:47 P. M. org.apache.catalina.core.ApplicationContext log
    INFO: Initializing Spring root WebApplicationContext
    log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
    log4j:WARN Please initialize the log4j system properly.
    log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
    === 2020-02-18 22:56:49,282 [at]]] DEBUG SQLConnectionManager - Borrowed connection '551773355'
    feb. 18, 2020 10:56:49 P. M. org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'supplyItemDaoTarget' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'hibernateSessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateSessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to query java.sql.DatabaseMetaData
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1534)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1281)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4699)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5165)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3759)
    at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:291)
    at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5537)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1381)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1385)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1385)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1353)
    at java.base/java.lang.Thread.run(Thread.java:835)
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateSessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to query java.sql.DatabaseMetaData
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1631)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
    ... 26 more
    Caused by: org.hibernate.exception.JDBCConnectionException: Unable to query java.sql.DatabaseMetaData
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:99)
    at org.hibernate.dialect.resolver.BasicSQLExceptionConverter.convert(BasicSQLExceptionConverter.java:50)
    at org.hibernate.dialect.resolver.AbstractDialectResolver.resolveDialect(AbstractDialectResolver.java:56)
    at org.hibernate.dialect.resolver.DialectResolverSet.resolveDialect(DialectResolverSet.java:57)
    at org.hibernate.dialect.resolver.DialectFactory.determineDialect(DialectFactory.java:127)
    at org.hibernate.dialect.resolver.DialectFactory.buildDialect(DialectFactory.java:96)
    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:117)
    at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2863)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2859)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1870)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:795)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:717)
    at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:191)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1689)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1627)
    ... 33 more
    Caused by: java.sql.SQLNonTransientConnectionException: connection exception: closed
    at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
    at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
    at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)
    at org.hsqldb.jdbc.JDBCStatement.executeQuery(Unknown Source)
    at org.hsqldb.jdbc.JDBCDatabaseMetaData.execute(Unknown Source)
    at org.hsqldb.jdbc.JDBCDatabaseMetaData.getDatabaseMajorVersion(Unknown Source)
    at org.apache.commons.dbcp.DelegatingDatabaseMetaData.getDatabaseMajorVersion(DelegatingDatabaseMetaData.java:249)
    at org.hibernate.dialect.resolver.StandardDialectResolver.resolveDialectInternal(StandardDialectResolver.java:63)
    at org.hibernate.dialect.resolver.AbstractDialectResolver.resolveDialect(AbstractDialectResolver.java:53)
    ... 45 more
    Caused by: org.hsqldb.HsqlException: connection exception: closed
    at org.hsqldb.error.Error.error(Unknown Source)
    at org.hsqldb.error.Error.error(Unknown Source)
    at org.hsqldb.Session.execute(Unknown Source)
    ... 52 more

    feb. 18, 2020 10:56:49 P. M. org.apache.catalina.core.StandardContext startInternal
    SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
    feb. 18, 2020 10:56:49 P. M. org.apache.catalina.core.StandardContext startInternal
    SEVERE: Context [] startup failed due to previous errors
    feb. 18, 2020 10:56:49 P. M. org.apache.catalina.core.ApplicationContext log
    INFO: Closing Spring root WebApplicationContext
    feb. 18, 2020 10:56:49 P. M. org.apache.catalina.core.StandardContext reload
    INFO: Reloading Context with name [] is completed

    Regards,
    Charles

    #2
    This log simply shows that you set up
    some DB connections that aren’t working, because the DBs are just not there, not through any fault of our framework.

    Then server startup completes and the Admin Console is ready to use again.

    You may have tried to reload the page before the server finished restarting.

    Comment


      #3
      How are you MAN, everything ok ???
      Let's see if I understand, after thirty years in IT, I am trying to connect to a database that does not exist ??? !!!, only exists in my mind ??? !!! ... is what you You say, well, I interpret your answer.
      To your knowledge, both SQLSERVER 2008 R2 and SMARTCLIENT are running on the same virtual machine. I don't know where you could deduce that the database does not exist.
      Well, don't worry, I'll leave it that way, without connecting to the engine I need. For now I am using the client-side, I will populate the controls with my own web-services.

      Thanks,
      Carlos

      Comment


        #4
        We wouldn’t care to speculate as how to 30 years of IT experience led to this situation, but the log clearly shows a failure to connect. That could be bad credentials or permissions, or in troubleshooting you temporarily stopped the server, or many other things, but what we can say for a certainty is that our software is not the problem, as our code (com.isomorphic) isn’t even in the error stack trace.

        Comment


          #5
          BTW you seem to be saying that this log is from starting our embedded server, configuring a DB and just saving. But you've got Hibernate and Spring-related logs going on here that suggest you must have made some other changes to get this kind of error.

          Also, you haven't said for what URL you get a 404. For the Admin Console? That also doesn't seem possible, given the claimed steps. You would have to have the embedded server running to receive a 404 at all. And once it is running, the only kind of error you could get, if you had somehow broken the Admin Console, would be some 5xx server error. Unless you just deleted the .jsp outright?

          In a nutshell, the diagnostics you've provided here don't line up with the steps you say you took. It looks more like: you set up several things, then as the server started, you turned off networking on the VM (*shrug*).

          Comment


            #6
            Good afternoon,
            I already found the cause that causes the service to be interrupted.

            When from the admin-console you want to perform any action that modifies the SERVER.PROPERTIES file, it records it incompletely, truncates it, without defining the datasources section and something the rest of configuration.
            Then, of course, that is why TOMCAT throws the error.

            What I did was then, unzip only the SERVER.PROPERTIES file from the package that I downloaded. I overwritten the corrupt file.
            Finally, I modified that file by hand and ... Voilá!!!, everything works correctly.
            I even created several datasources at different sqlserver engine.

            PD: I just think you had to get a little more what I had written and we would have solved it much earlier.

            Anyway

            THANKS A LOT.

            Regards,
            Carlos

            Comment


              #7
              We were unable to reproduce any issue with a truncated server.properties file. However, it does look like Tomcat has recently introduced a new bug, where, on certain platforms, attempts to restart the server just fail. Nothing is wrong with the configuration and again, nothing truncated, but Tomcat does manage to wedge itself, requiring a restart.

              We're looking into how to work around this new Tomcat bug. In the meantime, if you use the Admin Console to save a new properties file, just manually restart Tomcat.

              Note also that there is comprehensive documentation on directly setting SQL settings if you need them.

              Comment


                #8
                Just to confirm - it wasn’t Tomcat per se but some other dependent libraries that don’t properly handle a server reload.

                Since there are multiple libraries with problems and the workarounds required would be rather involved, we have just changed the Admin Console to tell the user a manual server restart is required.

                Comment


                  #9
                  Update on this: as of March 3, 2020 builds of SmartClient 11.0 and newer, the container will properly auto-restart so long as you are running our SDK (as opposed to, say, deploying the entire contents of the SDK in your own container). We auto-detect both cases and the popup after you make a change in the Admin Console will let you know whether the server is auto-restarting or whether you need to manually restart.

                  Comment

                  Working...
                  X