Not able to connect Oracle 10g XE to Eclipse [duplicate] - eclipse

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Eclipse cannot connect oracle 10g XE on windows 7
I am getting this error when i try to test the connection..
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection"
What to do now? I have downloaded the ojdbc14.jar from site also but still i am getting this error.

Do this Steps as below Check First with Sql plus :
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 29 08:51:27 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn system
Enter password:
Connected.
SQL> select instance_name from V$instance;
INSTANCE_NAME
----------------
xe
SQL>
Here is the listener status and services
C:\>lsnrctl services
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 29-JUL-2008 08:46:43
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1002 state:ready
DISPATCHER <machine: KIRANKUMAR-PC, pid: 3632>
(ADDRESS=(PROTOCOL=tcp)(HOST=KiranKumar-PC)(PORT=49160))
Service "XE_XPT" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
The command completed successfully
C:\>lsnrctl status
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 29-JUL-2008 08:46:56
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date 29-JUL-2008 08:39:27
Uptime 0 days 0 hr. 7 min. 29 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\listener.ora
Listener Log File C:\oraclexe\app\oracle\product\10.2.0\server\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=KiranKumar-PC)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=KiranKumar-PC)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "XE_XPT" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
The command completed successfully
C:\>TNSPING xe
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 29-JUL-2008 08:49:28
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = KiranKumar-PC)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (250 msec)
C:\>tnsping localhost-pc<hostname>
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 29-JUL-2008 08:49:42
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
OK (170 msec)
Please check this... Let me know the solution.. Hope this helps!

Related

I'm trying to set up apcupsd on a raspberry pi to communicate with a tripp-lite power supply

I am trying to get this to work. I have:
Raspberry Pi B (I think) running Raspbian 10 (buster)
Tripp Lite OMNI1500LCDT
Connection via USB
I have the following configuration files:
/etc/apcupsd/hosts.conf:
MONITOR 127.0.0.1 "Local Host"
/etc/default/apcupsd
ISCONFIGURED=yes
/etc/apcupsd/apcupsd.conf:
UPSNAME triplite
UPSCABLE usb
UPSTYPE usb
DEVICE
When I run sudo apctest (note that I stopped the daemon first) I get:
apctest
2020-04-04 00:28:18 apctest 3.14.14 (31 May 2016) debian
Checking configuration ...
sharenet.type = Network & ShareUPS Disabled
cable.type = USB Cable
mode.type = USB UPS Driver
Setting up the port ...
apctest FATAL ERROR in apctest.c at line 321
Unable to open UPS device.
If apcupsd or apctest is already running,
please stop it and run this program again.
apctest error termination completed
when I run sudo /etc/init.d/apcupsd start, the log looks OK:
Apr 4 00:29:57 megabyte systemd[1]: Starting UPS power management daemon...
Apr 4 00:29:57 megabyte systemd[1]: apcupsd.service: Can't open PID file /run/apcupsd.pid (yet?) after start: No such file or directory
Apr 4 00:29:57 megabyte apcupsd[6712]: apcupsd 3.14.14 (31 May 2016) debian startup succeeded
Apr 4 00:29:57 megabyte apcupsd[6712]: NIS server startup succeeded
Apr 4 00:29:57 megabyte systemd[1]: Started UPS power management daemon.
When I run lsusb I get (note that the Tripp Lite UPS is listed on Device 4:
lsusb
Bus 001 Device 005: ID 0781:5575 SanDisk Corp. Cruzer Glide
Bus 001 Device 004: ID 09ae:3016 Tripp Lite
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I wound up installing nut by following these directions and now nut is working fine.

SQL*Plus Scheduled Task Hangs After Connect timeout

I have a scheduled task that executes a sqlplus command, with username and password supplied.
Intermittently there is a ORA-12170: TNS:Connect timeout occurred that occurs. After these happen, SQL*Plus asks for a username, which never times out, pausing my task indefinitely.
How can I guard against this? Is there any command line option that can prevent this?
Task batch file
...
sqlplus user/\"password\"#database#script.sql >> "script.log"
script.sql
START TRANSACTION;
call schema.sync_task();
COMMIT;
quit;
successful log
SQL*Plus: Release 12.1.0.2.0 Production on Mon Sep 10 22:15:00 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Last Successful login time: Mon Sep 10 2018 22:10:00 -04:00
Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
With the Automatic Storage Management option
SP2-0310: unable to open file "TRANSACTION.sql"
Call completed.
Commit complete.
Disconnected from Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
With the Automatic Storage Management option
failed log
SQL*Plus: Release 12.1.0.2.0 Production on Mon Sep 10 22:20:00 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ERROR:
ORA-12170: TNS:Connect timeout occurred
Enter user-name:
I didn't find a clean solution, but I did find the simple one.
I've modified the settings of the scheduled task to stop if running longer than an hour. 10 minutes would have been better, but that wasn't an option in the task scheduler.

While running Pact- Karma-Mocha framework, getting error - 'Can't find variable: Pact'

I am trying to get sample PACT JS framework (any variant) running for Contract testing. Initial plan is just to get the sample(s) provided get running & then later on make changes into End point and customise for our own purpose.
PACT Foundation link: https://github.com/pact-foundation/pact-js/tree/master/karma/mocha
Environment:
Win 7
Node: v8.11.4
dependencies installed:
"#pact-foundation/karma-pact": {
"version": "2.1.8",
"#pact-foundation/pact-node": {
"version": "6.19.11",
I am getting following error while trying to get it running.
Command: karma start karma.conf.js
C:\VarProjects\VanillaMocha>karma start test/karma.conf.js
10 09 2018 09:53:34.544:ERROR [config]: File C:\VarProjects\VanillaMocha\test\karma.conf.js does not exist!
C:\VarProjects\VanillaMocha>karma start karma.conf.js
[2018-09-10T08:53:42.384Z] INFO: pact-node#6.19.11/16892 on W5167037:
Creating Pact Server with options:
port = 1234,
consumer = KarmaMochaConsumer,
provider = KarmaMochaProvider,
logLevel = DEBUG,
log = C:\VarProjects\VanillaMocha\logs\pact.log,
dir = C:\VarProjects\VanillaMocha\pacts,
pactFileWriteMode = overwrite,
ssl = false,
cors = false,
host = localhost
[2018-09-10T08:53:42.401Z] INFO: pact-node#6.19.11/16892 on W5167037: Created 'standalone\win32-1.54.4\bin\pact-mock-service.bat service --port '1234' --consumer 'KarmaMochaConsumer
' --provider 'KarmaMochaProvider' --log-level 'DEBUG' --log 'C:\VarProjects\VanillaMocha\logs\pact.log' --pact_dir 'C:\VarProjects\VanillaMocha\pacts' --pact-file-write-mode 'overwri
te' --host 'localhost'' process with PID: 18912
10 09 2018 09:53:44.980:INFO [pact]: Pact Mock Server running on port: 1234
10 09 2018 09:53:45.054:WARN [watcher]: Pattern "C:/dist-web/pact-web.js" does not match any file.
10 09 2018 09:53:45.092:INFO [karma]: Karma v3.0.0 server started at http://0.0.0.0:9876/
10 09 2018 09:53:45.093:INFO [launcher]: Launching browser PhantomJS_without_security with unlimited concurrency
10 09 2018 09:53:45.101:INFO [launcher]: Starting browser PhantomJS
10 09 2018 09:53:46.811:INFO [PhantomJS 2.1.1 (Windows 7 0.0.0)]: Connected on socket qMhVUJZzdDCD_YuKAAAA with id 47921548
PhantomJS 2.1.1 (Windows 7 0.0.0) Client "before all" hook FAILED
Can't find variable: Pact
client-spec.js:10:32
PhantomJS 2.1.1 (Windows 7 0.0.0) Client "after all" hook FAILED
undefined is not an object (evaluating 'provider.finalize')
client-spec.js:21:28
PhantomJS 2.1.1 (Windows 7 0.0.0): Executed 2 of 4 (2 FAILED) ERROR (0.013 secs / 0.001 secs)
[2018-09-10T08:53:46.985Z] INFO: pact-node#6.19.11/16892 on W5167037: Removing all Pact servers.
[2018-09-10T08:53:46.986Z] INFO: pact-node#6.19.11/16892 on W5167037: Removing Pact with PID: 18912
C:\VarProjects\VanillaMocha>KARMA start
[2018-09-10T08:54:14.809Z] INFO: pact-node#6.19.11/7492 on W5167037:
Creating Pact Server with options:
port = 1234,
consumer = KarmaMochaConsumer,
provider = KarmaMochaProvider,
logLevel = DEBUG,
log = C:\VarProjects\VanillaMocha\logs\pact.log,
dir = C:\VarProjects\VanillaMocha\pacts,
pactFileWriteMode = overwrite,
ssl = false,
cors = false,
host = localhost
[2018-09-10T08:54:14.823Z] INFO: pact-node#6.19.11/7492 on W5167037: Created 'standalone\win32-1.54.4\bin\pact-mock-service.bat service --port '1234' --consumer 'KarmaMochaConsumer'
--provider 'KarmaMochaProvider' --log-level 'DEBUG' --log 'C:\VarProjects\VanillaMocha\logs\pact.log' --pact_dir 'C:\VarProjects\VanillaMocha\pacts' --pact-file-write-mode 'overwrit
e' --host 'localhost'' process with PID: 2920
10 09 2018 09:54:17.376:INFO [pact]: Pact Mock Server running on port: 1234
10 09 2018 09:54:17.447:WARN [watcher]: Pattern "C:/dist-web/pact-web.js" does not match any file.
10 09 2018 09:54:17.483:INFO [karma]: Karma v3.0.0 server started at http://0.0.0.0:9876/
10 09 2018 09:54:17.484:INFO [launcher]: Launching browser PhantomJS_without_security with unlimited concurrency
10 09 2018 09:54:17.489:INFO [launcher]: Starting browser PhantomJS
10 09 2018 09:54:19.243:INFO [PhantomJS 2.1.1 (Windows 7 0.0.0)]: Connected on socket rn-kwBRGhJbyUwvZAAAA with id 54614606
PhantomJS 2.1.1 (Windows 7 0.0.0) Client "before all" hook FAILED
Can't find variable: Pact
client-spec.js:10:32
PhantomJS 2.1.1 (Windows 7 0.0.0) Client "after all" hook FAILED
undefined is not an object (evaluating 'provider.finalize')
client-spec.js:21:28
PhantomJS 2.1.1 (Windows 7 0.0.0): Executed 2 of 4 (2 FAILED) ERROR (0.012 secs / 0 secs)
Kindly advise, Thanks a lot
The code is failing because it's missing pact-web. You can see this in the error message you included:
Pattern "C:/dist-web/pact-web.js" does not match any file.
This is happening because you're using the example karma.conf.js outside the example repository without modification.
Quoting the relevant part of karma.conf.js:
// if you are using this example to setup your own project
// load pact from the node_modules directory
'../../dist-web/pact-web.js',
// Example Using NPM package
// 'node_modules/#pact-foundation/pact-web/pact-web.js',
Looking at your directory structure, commenting this line:
'../../dist-web/pact-web.js',
and uncommenting this line:
// 'node_modules/#pact-foundation/pact-web/pact-web.js',
should solve your problem.
Note that you also need to ensure that #pact-foundation/pact-web is a dev-dependency:
npm install --save-dev '#pact-foundation/pact-web'

Running ServiceBus in windows docker container

The main goal is to run the ServiceBus in a docker container for windows.
Output of docker version:
Client:
Version: 1.13.1
API version: 1.26
Go version: go1.7.5
Git commit: 092cba3
Built: Wed Feb 8 08:47:51 2017
OS/Arch: windows/amd64
Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.24)
Go version: go1.7.5
Git commit: 092cba3
Built: Wed Feb 8 08:47:51 2017
OS/Arch: windows/amd64
Experimental: true
Dockerfile content:
# Is used as sql server local storage for servicebus
FROM microsoft/mssql-server-windows-express
COPY install/ /install
# WebPlatform Installer http://download.microsoft.com/download/C/F/F/CFF3A0B8-99D4-41A2-AE1A-496C08BEB904/WebPlatformInstaller_amd64_en-US.msi
RUN msiexec /i install\WebPlatformInstaller_amd64_en-US.msi /qn
# Install servicebus using webpicmd offline installation https://msdn.microsoft.com/en-us/library/dn441408.aspx#BMK_SBConfig1616
RUN WebpiCmd /Install /Products:ServiceBus_1_1 /AcceptEula /SuppressReboot /xml:c:\install\SBWebPICache\feeds\latest\webproductlist.xml
Steps to reproduce:
1. Build image with parameters:
docker build --no-cache -t servicebus $folder
...
Verifying successful installation...
Microsoft Visual C++ 2012 SP1 Redistributable Package (x64) True
Microsoft Windows Fabric V1 RTM True
Microsoft Windows Fabric V1 CU1 True
Windows Azure Pack: Service Bus 1.1 True
Windows Azure Pack: Update for Service Bus 1.1 - .NET Framework 4.6 Compatibility (KB3086798) True
Install of Products: SUCCESS
Servicebus installed successfully as expected
2. Run container with parameters:
docker run -it --rm --isolation hyperv servicebus powershell
3. Create new servicebus farm:
New-SBFarm -SBFarmDBConnectionString 'data source=.; integrated security=true' -CertificateAutoGenerationKey (ConvertTo-SecureString -string "P#assword" -force -AsPlainText)
Failed with error:
New-SBFarm : The Server service is not started.
Starting service manually:
Start-Service : Service 'Server (LanmanServer)' cannot be started due to the following error: Cannot start service LanmanServer on computer '.'
Found that service depends on ‘srvnet’ that fails to start on Windows 10 (10.0.14393) using hyper-v isolation:
Start-Service : Failed to start service 'srvnet (srvnet)'.
But successfully starts on Windows Server 2016 (10.0.14393) using process isolation. However, even with srvnet service running and File-Services installed it's still not working. Server lanmanserver service can not be started
Question:
Are any possibilities to make lanmanserver working inside windows container? Or any other ways to create servicebus farm?

Timeout when executing MERGE-statement in SQL Server 2016 in simple recovery model

After migrating from SQL Server 2014 to SQL Server 2016, we have been experiencing query timeouts using MERGE-statements on some datasets.
Tested versions:
WORKING: SQL Server 2014 Enterprise (64-bit) (12.0.5532.0)
TIMEOUTS: SQL Server 2016 Enterprise (64-bit) (13.0.4001.0) and SQL Server 2016 Enterprise (64-bit) (13.0.1601.5)
Code to reproduce the timeout error: enter link description here