OpenLDAP on Linux refusing connection to remote JNDI client
Hello,
I have set up an openLDAP server on Linux and its running fine. I have written a small client using JNDI which when run on my windows pc gives me the following exception
at java.lang.Thread.run(Thread.java:534)
javax.naming.CommunicationException: 128.0.7.152:389. Root exception is java.net.SocketException: Connection reset by peer: connect
If I run the same code in a JSP page on the Linux box (on tomcat) I get proper results.
There is no firewall / proxy server (I checked it doing a tracert on the Linux IP)
My client has the following code.
// Set up environment for creating initial context
Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://128.0.7.152/");
// env.put(Context.SECURITY_AUTHENTICATION,"simple");
// env.put(Context.SECURITY_PRINCIPAL,"o=ozone,o=bsil.com");
// env.put(Context.SECURITY_CREDENTIALS, "secret3");
try {
// Create the initial context
DirContext ctx = new InitialDirContext(env);
ctx.close();
} catch (Exception e) {
e.printStackTrace();
I tried changing the ldap.conf file. It had an entry that said
HOST 127.0.0.1
I made it
HOST 128.0.7.152
But it still did not work.
Please can you help me out.
Which linux distribution you are using, redhat? Maybe you need to open the 389 port from the inside firewall of redhat.
Similar Messages
-
Ejb connect to remote jndi resource
Hi,
I want my ejb to connect to a jndi reource (in this case a jms topic) on another server (also AS7). I'm trying to use somthing like this:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
env.put(Context.PROVIDER_URL, "iiop://remoteserver:3700");
ctx = new InitialContext(env);
tconFactory = (TopicConnectionFactory) PortableRemoteObject.narrow(ctx.lookup(JMS_FACTORY),TopicConnectionFactory.class);
tcon = tconFactory.createTopicConnection();
tsession = tcon.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
topic = (Topic) PortableRemoteObject.narrow(ctx.lookup("jms/MyTopic"), Topic.class);
tpublisher = tsession.createPublisher(topic);
I get the following exception:
WARNING ( 2944): CORE3283: stderr: javax.naming.NameNotFoundException. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
Anyway, it throws the exception on the
ctx = new InitialContext(env);
So, if this is not the way to connect to a resource on another server, what's the correct way?
Tony FHi,
Refer the fifth post at http://swforum.sun.com/jive/thread.jspa?forumID=114&threadID=15846
-Amol -
6.3.5 upgrade to 7.2.2 cant connect over remote VPN client
The device is a PIX 525 UR with v. 7.2.2 installed over 6.3.5. I have deleted all previous VPN setups and re-installed the remote vpn and client software multiple times and the VPN times out during securing the channel and comes back with a error: 412 the local client has disconnected the session. I have been using the ASDM VPN wizard to configure the VPN and upon submitting the config I recieve a warning saying the tunnel-group does not exist but then when I exit it shows up in the tunnel group and is listed in the CLI. Also in the debug logs iget the error: 3713902 Group = Eisenhower, IP = 166.214.197.X, Removing peer from peer table failed, no match!
I would appreicate any assisance with this attached is the relevent configuration.
Thanks,
Scott rThis document describes how to use the Cisco Adaptive Security Device Manager (ASDM) to configure authentication and authorization server groups on the Cisco PIX 500 Series Security Appliance. In this example, the server groups created are used by the policy of a VPN tunnel group to authenticate and authorize incoming users.
http://www.cisco.com/en/US/products/hw/vpndevc/ps2030/products_configuration_example09186a008060f261.shtml -
Remote desktop refused connection
why is my connection refused when I try to connect my macbook pro from my iMac
Hi,
Seems the issue you are facing is related to MAC. If you are using MRD MAC to connect to other MAC device remotely then I think sorry to say but we can’t. As there is specified to use MRD as only windows OS. You can check the details “Which PCs can I connect
to using Remote Desktop Connection?” from below link.
Remote Desktop Client on Mac: FAQ
https://technet.microsoft.com/en-us/library/dn473006.aspx
Aaprt for MAC to MAC remote connection you must used some other related software.
Hope it helps!
Thanks.
Dharmesh Solanki
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
Slow connecting to remote Linux oracle 11g
Hi
Please help below is the problem
i have linux oracle 11g installed newly, while trying to connect from remote desktop through tnsnames or sqldeveloper, the connection is taking 10 sec to connect.
I cleared listener.log also
Thanks
91-9663615728Printed the requested command output please let me know what to do on this issue.
Thanks a lot
cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.132.99 sdd-dev-oracle11g sdd-dev-oracle11g.yelladworks.in
192.168.132.100 sdd-qa-oracle11g sdd-qa-oracle11g.yelladworks.in
192.168.132.197 bnw-oracle bnw-oracle.yelladworks.in
# Magnum Studios
192.168.128.103 mag1-sls
192.168.128.104 mag1-db
192.168.128.105 mag1-app1
192.168.128.106 mag1-app2
192.168.128.107 mag1-app3
192.168.128.107 mag1-app
192.168.132.103 mag2-sls
192.168.132.104 mag2-db
192.168.132.105 mag2-app1
192.168.132.106 mag2-app2
192.168.132.107 mag2-app3
# Lisa BNW UAT Kit
192.168.132.36 rhel-bnw-clipper01
192.168.132.37 rhel-bnw-clipper02
192.168.132.38 rhel-bnw-controller01
192.168.132.39 rhel-bnw-esb01
192.168.132.40 rhel-bnw-modules01
192.168.132.41 rhel-bnw-msg01
192.168.132.42 rhel-bnw-security01
192.168.132.43 rhel-bnw-oracle-11g
# India UAT Kit Hosts, Sun V490 #1
192.168.132.135 mag-uat1
192.168.132.161 fo1-db
192.168.132.162 fo1-sls
192.168.132.163 fo1-app1
192.168.132.164 fo1-app2
192.168.132.165 studio1
192.168.132.166 studio2
192.168.132.167 pag
192.168.132.176 alfresco
# India UAT Kit Hosts, Sun V490 #2
192.168.132.136 mag-uat2
192.168.132.168 fo2-db
192.168.132.169 fo2-sls
192.168.132.170 fo2-app1
192.168.132.171 fo2-app2
192.168.132.172 studio3
192.168.132.173 studio4
192.168.132.174 svb
192.168.132.175 bibo
192.168.132.149 pag-client
192.168.132.197 bnw-oracle
192.168.132.47 bnw-oracle-10g
# VMware Host Hardware
192.168.132.145 india-uat-vmware01
192.168.132.181 uat-ipn01
192.168.132.182 uat-ipn02
192.168.132.183 uat-ipn03
192.168.132.184 uat-ipn04
192.168.132.185 uat-ipn05
192.168.132.186 uat-ipn06
192.168.132.187 uat-ipn07
192.168.132.188 uat-ipn08
192.168.132.189 uat-ipn09
192.168.132.190 uat-ipn10
192.168.132.191 uat-ipn11
192.168.132.192 uat-ipn12
192.168.132.193 uat-ipn13
192.168.132.194 uat-ipn14
192.168.132.195 uat-ipn15
192.168.132.196 uat-ipn16
192.168.132.146 india-uat-vmware02
192.168.132.149 pag-client
192.168.132.150 setipn-uat
192.168.132.151 trapping01
192.168.132.152 trapping02
192.168.132.153 trapping03
192.168.132.154 trapping04
192.168.132.247 jira-uat
192.168.132.147 india-uat-vmware03
192.168.132.155 ascent01
192.168.132.156 ascent02
192.168.132.157 ascent03
192.168.132.158 diad
192.168.132.178 ff-render01
192.168.132.208 ff-render02
192.168.132.207 ff-render03
192.168.132.179 openedit
192.168.132.180 vdp
192.168.132.71 india-uat-vmware04
192.168.132.72 india-uat-vmware05
cat /etc/nsswitch.conf
# /etc/nsswitch.conf
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
# Legal entries are:
# nisplus or nis+ Use NIS+ (NIS version 3)
# nis or yp Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# db Use the local database (.db) files
# compat Use NIS on compat mode
# hesiod Use Hesiod for user lookups
# [NOTFOUND=return] Stop searching if not found so far
# To use db, put the "db" in front of "files" for entries you want to be
# looked up first in the databases
# Example:
#passwd: db files nisplus nis
#shadow: db files nisplus nis
#group: db files nisplus nis
passwd: files
shadow: files
group: files
#hosts: db files nisplus nis dns
hosts: files dns
# Example - obey only what nisplus tells us...
#services: nisplus [NOTFOUND=return] files
#networks: nisplus [NOTFOUND=return] files
#protocols: nisplus [NOTFOUND=return] files
#rpc: nisplus [NOTFOUND=return] files
#ethers: nisplus [NOTFOUND=return] files
#netmasks: nisplus [NOTFOUND=return] files
bootparams: nisplus [NOTFOUND=return] files
ethers: files
netmasks: files
networks: files
protocols: files
rpc: files
services: files
netgroup: nisplus
publickey: nisplus
automount: files nisplus
aliases: files nisplus
cat /etc/resolv.conf
search yelladworks.in
nameserver 192.168.132.10
nameserver 192.168.128.10 -
I get this error 'The proxy server is refusing connections' i use autoproxy and use linux
hi I use autoproxy for cross over proxy in my country and i get this error all the time :
The proxy server is refusing connections
Firefox is configured to use a proxy server that is refusing connections.
Check the proxy settings to make sure that they are correct.
Contact your network administrator to make sure the proxy server is
working.
what can I do?hello dave, please check in the firefox ''menu ≡ > options > advanced > network > connection - settings...'' that firefox is set up to directly connect to the internet ('no proxy').
[[Firefox can't load websites but other browsers can]]
in addition since there is the malicious "general crawler" extension present in your list of addons, please perform a scan of your system with those two free security tools specialised in removing adware and browser hijackers:
* [http://www.malwarebytes.org/antimalware/ Malwarebytes Anti-Malware Free]
* [http://www.bleepingcomputer.com/download/adwcleaner/ Adwcleaner]
[[Troubleshoot Firefox issues caused by malware]] -
Unable to connect to remote Jrockit instance
Hi,
I Tried configuring Jrockit and integrating weblogic server with it.
I was successfull in monitoring the locally deployed app through integrated weblogic in JRMC 4.0.
Please suggest if the following steps mentioned are proper or not.
1) Installed JRMC 4.0 .
2. Configured in default domain/bin folder of Weblogic server setDomainEnv.cmd as follows:-(Configuring oracle Jrockit in Weblogic since i have to use Jrockit JVM instead of Sun JDK Hot Spot)
set BEA_JAVA_HOME=C:\Program Files\Java\jrmc-4.0.0-1.6.0
set SUN_JAVA_HOME=D:\Oracle\Middleware\jdk160_18
if "%JAVA_VENDOR%"=="Oracle" (
set JAVA_HOME=%BEA_JAVA_HOME%
) else (
if "%JAVA_VENDOR%"=="Sun" (
set JAVA_HOME=%SUN_JAVA_HOME%
) else (
set JAVA_VENDOR=Oracle
set JAVA_HOME=C:\Program Files\Java\jrmc-4.0.0-1.6.0
3.Inturn i modified Java_Options in my local weblogic server startWebLogic.cmd and Remote weblogic server startWebLogic.cmd as follows:-
Local weblogic server startWebLogic.cmd :-
set SAVE_JAVA_OPTIONS="-Djava.rmi.server.hostname=ZSLW521 -Xmanagement:ssl=false,authenticate=false,port=7091,autodiscovery=true"
export JAVA_OPTIONS
Remote weblogic server startWebLogic.cmd :-
set SAVE_JAVA_OPTIONS="-Djava.rmi.server.hostname=ZSLW577 -Xmanagement:ssl=false,authenticate=false,port=7091,autodiscovery=true"
export JAVA_OPTIONS
4. My Oracle Jrockit Start parameters are as follows:-
C:\Program Files\Java\jrmc-4.0.0-1.6.0\bin>java -Xmanagement:port=7091,ssl=false,authenticate=false,autodiscovery=true
and even i am getting the status as follows in command prompt:
[INFO ][mgmnt ] Remote JMX connector started at address zslw577:7091
[INFO ][mgmnt ] Local JMX connector started
[INFO ][mgmnt ] JDP autodiscovery started at address 232.192.1.212:7095
Iin jrmc4.0 UI i am getting JDP (JRockit Discovered protocal)as follows:-
1. Discovered --> JDP --> zslw577:zsl.local and
zslw51
2.But the Problem is that in the tabbed menu
Discovered-->LOACL-->Getting Local JRockit Weblogic server Instance and Not Remote Server Weblogic Server Instance
is when i am trying to establish a connection :-
HOST:zslw521
PORT:7091
1.And testing the connection giving me : Unable to Connect
Even If I want To test The JDP of Remote and Local JVM Instances by right clicking and selecting the option of START CONSOLE
Could not open Management Console for zslw577.zsl.local.
com.jrockit.mc.rjmx.ConnectionException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 172.16.26.60; nested exception is:
java.net.ConnectException: Connection refused: connect]
com.jrockit.mc.rjmx.ConnectionException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 172.16.26.60; nested exception is:
java.net.ConnectException: Connection refused: connect]
at com.jrockit.mc.rjmx.ConnectionManager.connect(ConnectionManager.java:63)
at com.jrockit.mc.console.ui.actions.StartConsole$1.preConnect(StartConsole.java:39)
at com.jrockit.mc.browser.utils.PreConnectJob.run(PreConnectJob.java:74)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 172.16.26.60; nested exception is:
java.net.ConnectException: Connection refused: connect]
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:338)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:227)
at com.jrockit.mc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:593)
at com.jrockit.mc.rjmx.internal.RJMXConnection.establishConnection(RJMXConnection.java:561)
at com.jrockit.mc.rjmx.internal.RJMXConnection.setupServer(RJMXConnection.java:545)
at com.jrockit.mc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:145)
at com.jrockit.mc.rjmx.internal.RJMXConnectorModel.establishConnection(RJMXConnectorModel.java:114)
at com.jrockit.mc.rjmx.internal.RJMXConnectorModel.connect(RJMXConnectorModel.java:157)
at com.jrockit.mc.rjmx.ConnectionManager.innerConnect(ConnectionManager.java:95)
at com.jrockit.mc.rjmx.ConnectionManager.connect(ConnectionManager.java:61)
... 3 more
Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 172.16.26.60; nested exception is:
java.net.ConnectException: Connection refused: connect]
at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1886)
at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1856)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257)
... 12 more
Caused by: java.rmi.ConnectException: Connection refused to host: 172.16.26.60; nested exception is:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:97)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1886)
at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1856)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:228)
at com.jrockit.mc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:594)
at com.jrockit.mc.rjmx.internal.RJMXConnection.establishConnection(RJMXConnection.java:561)
at com.jrockit.mc.rjmx.internal.RJMXConnection.setupServer(RJMXConnection.java:545)
at com.jrockit.mc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:146)
at com.jrockit.mc.rjmx.internal.RJMXConnectorModel.establishConnection(RJMXConnectorModel.java:114)
at com.jrockit.mc.rjmx.internal.RJMXConnectorModel.connect(RJMXConnectorModel.java:158)
... 5 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at java.net.Socket.<init>(Socket.java:372)
at java.net.Socket.<init>(Socket.java:186)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:97)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1886)
at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1856)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:227)
at com.jrockit.mc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:593)
at com.jrockit.mc.rjmx.internal.RJMXConnection.establishConnection(RJMXConnection.java:561)
at com.jrockit.mc.rjmx.internal.RJMXConnection.setupServer(RJMXConnection.java:545)
at com.jrockit.mc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:145)
at com.jrockit.mc.rjmx.internal.RJMXConnectorModel.establishConnection(RJMXConnectorModel.java:114)
at com.jrockit.mc.rjmx.internal.RJMXConnectorModel.connect(RJMXConnectorModel.java:157)
... 5 more
Thanks in advance
Regards
RK
Edited by: user9352887 on Jun 17, 2010 6:52 AM
Edited by: user9352887 on Jun 17, 2010 7:07 AM
Edited by: user9352887 on Jun 17, 2010 7:13 AMProbably, you'll have more luck on the JRockit forum, I would guess - or perhaps the WebLogic Server forum :)
John -
Problem with creating Connection pool and JNDI, driver is not detected
Hi,
I have an issue with creating Connection Pool and JNDI.
I'm using:
- JDK 1.6
- OS: Linux(ubuntu 8.10)
- Netbeans IDE 6.5.1
- Java EE 5.0
- Apache Tomcat 6.0.18 Its lib directory contains all necessary jar files for Oracle database driver
- Oracle 11g Enterprise
My problem is that the Oracle database driver is not detected when I want to create a pool (it works pretty well and is detected without any problem when I create ordinary connection by DriverManager)
Therefore after running:
InitialContext ic = new InitialContext();
Context context = (Context)ic.lookup("java:comp/env");
DataSource dataSource = (DataSource)context.lookup("jdbc/oracle11g");
Connection connection = dataSource.getConnection();and right after dataSource.getConnection() I have the following exception:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at servlets.Servlet1.doPost(Servlet1.java:47)
at servlets.Servlet1.doGet(Servlet1.java:29)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1130)
... 17 more
My application context file (context.xml) is:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/WebApplication3">
<Resource auth="Container"
driverClassName="oracle.jdbc.OracleDriver"
maxActive="8"
maxIdle="4"
name="jdbc/oracle11g"
username="scott"
password="tiger"
type="javax.sql.DataSource"
url="jdbc:oracle:thin:@localhost:1521:database01" />
</Context>and my web.xml is:
<resource-ref>
<description>Oracle Datasource example</description>
<res-ref-name>jdbc/oracle11g</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
...I found similar threads in different forums including sun, such as
http://forums.sun.com/thread.jspa?threadID=567630&start=0&tstart=0
http://forums.sun.com/thread.jspa?threadID=639243&tstart=0
http://forums.sun.com/thread.jspa?threadID=5312178&tstart=0
, but no solution.
As many suggest, I also tried to put context directly in the server.xml (instead of my application context) and referencing it by <ResourceLink /> inside my application context but it didn't work and instead it gave me the following message:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class ' ' for connect URL 'null'
Has anyone succeeded in creating a connection pool with JNDI by using Tomcat 6 or higher ? If yes, could kindly explain about the applied method.
Regards,Hello again,
Finally I managed to run my application also with Tomcat 6.0.18. There was only two lines that had to be modified
in the context.xml file (the context of my application project and not server's)
Instead of writing
<Context antiJARLocking="true" path="/WebApplication2">
type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
</Context>we had to write:
<Context antiJARLocking="true" path="/WebApplication2">
type="oracle.jdbc.pool.OracleDataSource"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
</Context>- No modification was needed to be done at server level (niether server.xml nor server context.xml)
- I just added the ojdbc6.jar in $CATALINA_HOME/lib (I didn't even need to add it in WEB-INF/lib of my project)
- The servlet used to do the test was the same that I presented in my precedent post.
For those who have encountered my problem and are interested in the format of the web.xml and context.xml
with Tomcat 6.0, you can find them below:
Oracle server: Oracle 11g Enterprise
Tomcat server version: 6.0.18
Oracle driver: ojdbc.jar
IDE: Netbeans 6.5.1
The context.xml file of the web application
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/WebApplication2">
<Resource name="jdbc/oracle11g"
type="oracle.jdbc.pool.OracleDataSource"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
url="jdbc:oracle:thin:@localhost:1521:database01"
driverClassName="oracle.jdbc.OracleDriver"
userName="scott"
password="tiger"
auth="Container"
maxActive="100"
maxIdle="30"
maxWait="10000"
logAbandoned="true"
removeAbandoned="true"
removeAbandonedTimeout="60" />
</Context>The web.xml of my web application
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<resource-ref>
<description>Oracle Database 11g DataSource</description>
<res-type>oracle.jdbc.pool.OracleDataSource</res-type>
<res-auth>Container</res-auth>
<res-ref-name>jdbc/oracle11g</res-ref-name>
</resource-ref>
<servlet>
<servlet-name>Servlet1</servlet-name>
<servlet-class>servlets.Servlet1</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Servlet1</servlet-name>
<url-pattern>/Servlet1</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>Ok, now I'm happy as the original problem is completely solved
Regards -
ODBC Gateway on Linux error - connects ok with Sybase SQL Anywhere
OS: CentOS 5.8 64-bit
DB: Oracle XE 11gR1 64-bit
Gateway: Oracle Gateway for ODBC 64-bit
Database and gateway reside on same Linux Server.
Connecting to remote Sybase SQL Anywhere 10 server on WindowsXP.
Using SQL Anywhere 11 odbc driver and unixODBC driver manager on Linux server.
isql tool connects without any problems.
One LISTENER, service for db and gateway on same port.
===================================
Via SQL*Plus, the following error occurs....
SQL> select * from dual@dblink;
select * from dual@dblink
ERROR at line 1:
ORA-28513: internal error in heterogeneous remote agent
ORA-02063: preceding line from dblink
===================================
sqlnet.ora
# sqlnet.ora Network Configuration File: /u01/app/oracle/product/11.2.0/xe/network/admin/sqlnet.ora
# Generated by Oracle configuration tools.
NAMES.DIRECTORY_PATH=(TNSNAMES)
ADR_BASE = /u01/app/oracle/product/11.2.0/xe
==================================
tnsnames.ora
# tnsnames.ora Network Configuration File:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = mysystem)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
dblink =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)(HOST = mysystem)(PORT = 1521)
(CONNECT_DATA =
(SID = dblink))
(HS=OK))
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
=======================
listener.ora
# listener.ora Network Configuration File:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
(PROGRAM = extproc)
(SID_DESC =
(SID_NAME = dblink)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/gtw)
(PROGRAM = dg4odbc)
(ENVS=LD_LIBRARY_PATH=/opt/sqlanywhere11/lib64:/u01/app/oracle/product/11.2.0/gtw/lib)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = mysystem)(PORT = 1521))
DEFAULT_SERVICE_LISTENER = (XE)
========================
initdblink.ora
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
# HS init parameters
HS_FDS_CONNECT_INFO=dblink
HS_FDS_SHAREABLE_NAME=/usr/lib64/libodbc.so
HS_FDS_TRACE_LEVEL=255
HS_LANGUAGE=american_america.we8iso8859p1
HS_NLS_NCHAR=UTF-8
# ODBC specific environment variables
set ODBCINI=/etc/odbc.ini
========================
Oracle Corporation --- MONDAY OCT 15 2012 17:23:39.915
Heterogeneous Agent Release
11.2.0.1.0
Oracle Corporation --- MONDAY OCT 15 2012 17:23:39.914
Version 11.2.0.1.0
Entered hgogprd
HOSGIP for "HS_FDS_TRACE_LEVEL" returned "255"
Entered hgosdip
setting HS_OPEN_CURSORS to default of 50
setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
setting HS_FDS_RECOVERY_PWD to default value
setting HS_FDS_TRANSACTION_LOG to default of HS_TRANSACTION_LOG
setting HS_IDLE_TIMEOUT to default of 0
setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
HOSGIP returned value of "UTF-8" for HS_NLS_NCHAR
setting HS_FDS_TIMESTAMP_MAPPING to default of "DATE"
setting HS_FDS_DATE_MAPPING to default of "DATE"
setting HS_RPC_FETCH_REBLOCKING to default of "ON"
setting HS_FDS_FETCH_ROWS to default of "100"
setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
setting HS_FDS_RSET_RETURN_ROWCOUNT to default of "FALSE"
setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
setting HS_FDS_MAP_NCHAR to default of "TRUE"
setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
setting HS_FDS_QUERY_DRIVER to default of "TRUE"
setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
Parameter HS_FDS_QUOTE_IDENTIFIER is not set
setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
Default value of 64 assumed for HS_FDS_SQLLEN_INTERPRETATION
setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
setting HS_FDS_DELAYED_OPEN to default of "TRUE"
setting HS_FDS_WORKAROUNDS to default of "0"
Exiting hgosdip, rc=0
ORACLE_SID is "dblink"
Product-Info:
Port Rls/Upd:1/0 PrdStat:0
Agent:Oracle Database Gateway for ODBC
Facility:hsa
Class:ODBC, ClassVsn:11.2.0.1.0_0008, Instance:dblink
Exiting hgogprd, rc=0
hostmstr: 0: HOA After hoagprd
Invalid HS_NLS_NCHAR value UTF-8 specified
Setting HS_NLS_NCHAR to Server Default 2000
Invalid HS_NLS_NCHAR value UTF-8 specified
Setting HS_NLS_NCHAR to Server Default 2000
hostmstr: 0: HOA Before hoainit
Entered hgoinit
HOCXU_COMP_CSET=1
HOCXU_DRV_CSET=31
HOCXU_DRV_NCHAR=2000
HOCXU_DB_CSET=873
HOCXU_SEM_VER=112000
Exiting hgoinit, rc=28513
hostmstr: 0: HOA After hoainit
RPC Calling nscontrol(0), rc=0
hostmstr: 0: RPC Before Exit Agent
hostmstr: 0: HOA Before hoaexit
Entered hgoexit
HS Gateway: NULL connection context at exit
Exiting hgoexit, rc=0 with error ptr FILE:hgoexit.c LINE:108 FUNCTION:hgoexit() ID:Connection context
hostmstr: 0: HOA After hoaexit
hostmstr: 0: RPC After Exit Agent
=============================
Also, does anyone know how to determine the location (full path) of the unixODBC driver manager ?
Please assist if you can...thx.
Edited by: user601798 on Oct 15, 2012 3:37 PMLet me start with the unixODBC driver:
There's no generic location as it depends which package you've used to install the UnixODBC driver manager or how you compiled it from scratch. I commonly prefer to compile it from scratch as this offers me to install it to any location I like.
If you're not sure where it is located, you could perform a search on your machine looking for libodbc.so. Then cross check it with "file <location>/libodbc.so" to see the lib is a 64bit library.
So let's assume in the /usr/lib64 you found the libodbc.so library, then the setting
HS_FDS_SHAREABLE_NAME=/usr/lib64/libodbc.so
is correct. Else you need to adopt the parameter.
Next step is to check out which unixODBC version is installed. That's commonly done by calling "odbcinst -j".
Looking now ta the gateway init file there's a parameter HS_NLS_NCHAR set to UTF-8. UnixODBC is commonly compiled with UCS2 support, so please change it to HS_NLS_NCHAR=UCS2
Could you also please post the content of the odbc.ini file "more /etc/odbc.ini"?
Thanks,
Klaus -
Java code to connect to remote windows machine from local machine
Hi,
I have developed a code to connecting remote windows M/C from local M/C by using SSH2 (ganymed-ssh2-build209.jar) API. when I run the code its giving below error. Can any one please help me how to resolve it. And also please let me know, is there any other way to connect remote windows system using java code.
Exception.
java.io.IOException: There was a problem while talking to <host name>:22
at ch.ethz.ssh2.Connection.connect(Connection.java:642)
at ch.ethz.ssh2.Connection.connect(Connection.java:460)
at Connect.RemoteServer.ConnectWindowsServer.runCommand(ConnectWindowsServer.java:55)
at Connect.RemoteServer.ConnectWindowsServer.main(ConnectWindowsServer.java:27)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at ch.ethz.ssh2.transport.TransportManager.initialize(TransportManager.java:299)
at ch.ethz.ssh2.Connection.connect(Connection.java:591)
... 3 more
JAVA Code
import ch.ethz.ssh2.Connection;
import ch.ethz.ssh2.Session;
public void setAuthenticationInfo(String hostname, String username,String password) {
this.host = hostname;
this.userid = username;
this.password = password;
this.recentCommand = "";
System.out.println("setting authentication info completed for host=" + host );
public void runCommand() throws Exception {
try{
// Setup ssh session with endpoint
System.out.println("starting connection with " + host);
Connection connection = new Connection(host);
System.out.println("connection object created..");
connection.connect();
System.out.println("Connect to connection");
connection.authenticateWithPassword(userid,password);
System.out.println(connection.isAuthenticationComplete());
Session session = connection.openSession();
System.out.println("connected");
}catch (Exception e) {
e.printStackTrace();
Regards,
PraveenHi baftos,
I tried to telnet remote windows machine from my local machine on port 23, its not connected and given error message like "Connect failed".
As your response, if we can telnet to remote windows machine from local machine then we can connect from Java. Is it correct ?.
Can you please help me to resolve this issue. And also please confirm the port (23) is correct, which I was used to connect remote machine from telnet.
Regards,
Praveen -
HTTP Response :500 unable to connect to remote system.
Hi,
I am doing proxy-xi-file scenario, where i am getting this error in sxmb_moni in R/3.
The error reads with red flag:
HTTP Response :500 unable to connect to remote system.
Please tell me what can be the reason.Snehal,
Error: The error message 503 Service unavailable Application stopped! is displayed.
Description: The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response.
Note: The existence of the 503 status code does not imply that a server must use it when becoming overloaded. Some servers may wish to simply refuse the connection.
Possible Tips: Because of J2EE application com.sap.aii.af.ms.app not active
Try to (re)start the application using the Visual Administrator Choose Server --> Services --> Deploy --> View on Application or restart the J2EE engine
The problem is that not all J2EE services can be started by the J2EE. i.e Start the Visual Administrator and select Server->Services->Deploy in the tree on the left. On the right-hand side, choose the Runtime tab page. You see a tree in the right window with all applications if you select the APPLICATION radio button. Check if they are running, otherwise choose Start. Usually the J2EE engine starts all services automatically.
Refer SAP Note 803145,807000,791655
You can have a look on this blog for the same.
/people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi
Regards,
Sarvesh -
Error in debugging ,failed to connect to remote the VM
Hii,
iam trying to debug an application,, for that i had created a new configuration and mentioned the details.
when i debug the application it throwing a error as
Excetption occured during launch
Reason:
failed to connect to remote VM. connection refused
can anyone sort it out this issue
Regards
satishHi,
If you are debugging on your local server,then restart the server it should resolve the problem.
Also make sure before restarting the server that Debug configuration for WD app is Pointing to the Valid J2EE Engine
Siddharth
Edited by: Siddharth Jain on Oct 23, 2008 9:41 AM -
OVMAPI_6000E Internal Error: Connection refused Connection refused - OVM
Hi,
Test environment, as per this doc
http://www.oracle.com/technetwork/server-storage/vm/template-1482544.html
Running the above OVMs on virtual box version 4.2.10
OVM is version 3.1.1.365
I setup my environment and was ready to import VM templates. Following a reboot of the server I can no longer login to the Manager.
Error is: Unexpected error during login (com.oracle.ovm.mgr.api.exception.FailedOperationException: OVMAPI_6000E Internal Error: Connection refused Connection refused
After some investigation in the App logs I found this error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
(------------- lsnrctl service shows this ----------)
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 20-APR-2013 22:58:31
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
The command completed successfully
(-----------) - This is just a test environment, but I would really appreciate if someone could tell me why this error is occurring and how I can fix it, I've tried restarting services, still no joy. This issue seems to occur after I setup the server pool \ Storage resources, etc
Thanks for all your help!You need to learn how to start an oracle database. The database does not start automatically if you're using the database that comes with the VM Manager.
ps -ef | grep pmon
will tell you if the database is running and mounted.
ps -ef | grep tns
will tell you if the database listener is running
OR
You could use 3.2.2 and use the MYSQL database that come with the VM Manager
OR
you could load the enterprise version of Oracle Database and use cluster services to automatically start and stop the database. You get a single use license with the VM Manger that allows you either use standard of enterprise edition of the Oracle Database. -
Proxy server refused connections
Everytime I try to open Firefox and go online, I get the msg "proxy server refused connection". I tried going to options and choosing auto detect proxy and no proxy. They both allow me to go online but when I close Firefox, the settings I did aren't saved and I need to go to options again and change the settings. It's a hassle to go through this all the time. Help pls.
You can try to create a [https://support.mozilla.org/en-US/kb/Managing-profiles?s=profile&r=0&e=sph&as=s new profile] and see if the problem goes away. i.e. in Windows Start menu > '''Run''' (or press Windows key + '''R'''), type and enter '''firefox -p -no-remote''' > '''Create Profile''', after finishing select the newly created profile, '''Start Firefox''', edit and save the proxy settings and restart in the newly created profile. If the profile is okay, you can later [https://support.mozilla.org/en-US/kb/Recovering%20important%20data%20from%20an%20old%20profile?s=profile&r=1&e=sph&as=s copy] needed data like bookmarks, passwords etc. from the previous profile to the new profile and delete the previous profile.
If the problem persists, it could be a security software that is trying to transparently proxy Firefox and may also be reverting the Firefox proxy changes. You may have to go into the security software settings and exempt Firefox/[http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder or Files]. -
JDBC connect from remote computer fails
Hi all,
I have successfully installed the XE server and I can connect over JDBC from clients running locally on the machine where the XE server is installed.
However when I try to connect from a remote computer using the same client I get an error saying: The Network Adapter could not establish the connection
I can ping the machine with XE installed and all firewalls on the machines are turned off.
Any ideas on the subject of JDBC remote connect to XE server? Or is it simply that it is not supported?
Appreciate all the help I can get.
Thanks,
/AndersOn my machine I have the listener bound to local interface.
Listener.ora has hostname in it, and this is the listener status:
As status shows the hostname is resolved to localhost, on this machine I am unable (with this configuration) to share the db to other machines (I do not have oracle client on my other pc, but telnet is unable to connect to port 1521).
Changing hostname to ipaddres solves.
[andrea@bones ~]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Beta on 15-DEC-2005 21:28:51
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bones)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Beta
Start Date 15-DEC-2005 21:28:40
Uptime 0 days 0 hr. 0 min. 11 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Listener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service...
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...
The command completed successfully
[andrea@bones ~]$
Maybe you are looking for
-
How can I hear streaming audio from webpages? Is there a special software that I need to use? I have a BlackBerry 8703e.
-
How can I find the warp tool in Elements 11?
I have used Elements 9 using the warp tool but I have up-graded to Elements 11 and cannot locate it.
-
Reconnecting media after frame rate change
Shane Ross wrote a reply ( see below ) to a person that had the same problem as I am now. I shot with HVX200 using the Firestore that converted footage to 59.94. Then, mid-project I shot with the P2 which shot at 24. I now have 2 diff. frame rates I
-
What is the field name for logo and site from but000 table
when i enter the logo , i should get all the sites of that logo,can u plz help me
-
Problems booting new iMac after using Migration Assistant
My new iMac is less than 24 hours old and I have hit a problem I have not encountered on any Mac I have owned in the last 17 years. My iMac booted beautifully and I hooked up my firewire external hard-drive because I have a partition there that conta