3 Replies Latest reply: May 15, 2013 4:43 AM by 1004476 RSS

    Error : datasource error when weblogic run as windows service

    1004476
      Hi

      I am using weblogic server 10.3.5. i have configured a datasource (MSSQL 2010, JTDS driver) and its working/getting connected when i start weblogic from a command prompt (domain/ startWebLogic.cmd ).

      I wanted to start weblogic as window service, so followed this doument

      http://docs.oracle.com/cd/E11035_01/wls100/server_start/winservice.html

      My Service Installer file
      echo off
      SETLOCAL
      set DOMAIN_NAME= DOMAIN NAME
      set USERDOMAIN_HOME=E:\Weblogic\user_projects\domains\ DOMAIN NAME
      set SERVER_NAME= SERVER NAME

      set WLS_USER= ADMIN USER NAME
      set WLS_PW= ADMIN PASSWORD

      set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.management.username=%WLS_USER%
      set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.management.password=%WLS_PW%

      call "E:\Weblogic\wlserver_10.3\server\bin\installSvc.cmd"

      ENDLOCAL



      Now i am able to start server as windows service. but after its start and try to activate the datasource i am getting following error.

      Messages
      Message icon - Error An error occurred during activation of changes, please see the log for details.
      Message icon - Error weblogic.application.ModuleException:
      Message icon - Error weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

      it would be nice if someone could help me solving this error.

      Thanks
      chandru
        • 1. Re: Error : datasource error when weblogic run as windows service
          Joe Weinstein-Oracle
          So the same server and datasource config works when hand-started? Please show
          the datasource config file.
          • 2. Re: Error : datasource error when weblogic run as windows service
            1004476
            Hi Joe,

            Thanks for your responce...

            My datasourcexml file generated when its hand started and its working good.. but same its not working when i start from win service

            <?xml version='1.0' encoding='UTF-8'?>
            <jdbc-data-source xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/jdbc-data-source http://xmlns.oracle.com/weblogic/jdbc-data-source/1.0/jdbc-data-source.xsd">
            <name>JTDS</name>
            <jdbc-driver-params>
            <url>jdbc:jtds:sqlserver://172.16.1.90:1433/ DB NAME </url>
            <driver-name>net.sourceforge.jtds.jdbc.Driver</driver-name>
            <properties></properties>
            <password-encrypted>{AES}bXOVUeDJBCvRJq4DXtfq0SDEWsacElauTu7PJbWwy0u4=</password-encrypted>
            </jdbc-driver-params>
            <jdbc-connection-pool-params>
            <initial-capacity>1</initial-capacity>
            <max-capacity>15</max-capacity>
            <capacity-increment>1</capacity-increment>
            <test-table-name></test-table-name>
            <statement-cache-size>10</statement-cache-size>
            <statement-cache-type>LRU</statement-cache-type>
            </jdbc-connection-pool-params>
            <jdbc-data-source-params>
            <jndi-name>VSMT62DS</jndi-name>
            <global-transactions-protocol>OnePhaseCommit</global-transactions-protocol>
            </jdbc-data-source-params>
            </jdbc-data-source>
            • 3. Re: Error : datasource error when weblogic run as windows service
              1004476
              Problem got resolved, Thanks Joe for giving clue. problem was in the jdbc datasouce xml file.

              I set 2 properties in Datasouce

              From console:+
              Connection Pool - > Properties:

              user= DB USER NAME
              DatabaseName= DATABASE NAME

              Datasource XML file.+
              *<properties>*
              *<property>*
              *<name>user</name>*
              *<value>username</value>*
              *</property>*
              *<property>*
              *<name>DatabaseName</name>*
              *<value>DBNAME</value>*
              *</property>*
              *</properties>*

              everything was working fine.. :)