JDeveloper + Connection Context
Hi All,
I am new to JDeveloper.I want to run a stored procedure in it. I have specified the connection to database,username and password.
While running the sqlj, it gives the error : no connection context was found.
Please tell me what connection context is and how to set it.
Thanks
Srividya
Hi All,
I am new to JDeveloper.I want to run a stored procedure in it. I have specified the connection to database,username and password.
While running the sqlj, it gives the error : no connection context was found.
Please tell me what connection context is and how to set it.
Thanks
Srividya
Similar Messages
-
Null connection context using java wrapped wwsec_api
How can I specify my OID connection information when using the PL/SQL wwsec_api with java wrappers?
I am getting a null connection context, and I assume that it is looking for the directory connection information (OID host,port,user,password).
Is this somehow specified in the .properties file?
The java was created with Jpublisher per the Jdeveloper help instructions. Following is a code snippet using the java classes created.
String userName = "username";
WwsecApi anWwsecApi = new WwsecApi();
WwsecApiRowtypeSql3 userInfo = (WwsecApiRowtypeSql3)anWwsecApi.personInfo(userName);
if (userInfo.getEmpno() != null)
out.print("Employee Number" + userInfo.getEmpno());
else
out.print("null");-- Set the session context for a lightweight user as follows in your java code before executing the API call.
-- portal.wwctx_api.set_context(p_user_name => 'portal',p_password => 'password1',p_company => 'simplerewards');
portal.wwctx_api_private.set_context (p_user_name => 'portal'); -
Null connection context with java wrapped wwsec_api
How can I specify my OID connection information when using the PL/SQL wwsec_api with java wrappers?
I am getting a null connection context, and I assume that it is looking for the directory connection information (OID host,port,user,password).
Is this somehow specified in the .properties file?
The java was created with Jpublisher per the Jdeveloper help instructions. Following is a code snippet using the java classes created.
String userName = "username";
WwsecApi anWwsecApi = new WwsecApi();
WwsecApiRowtypeSql3 userInfo = (WwsecApiRowtypeSql3)anWwsecApi.personInfo(userName);
if (userInfo.getEmpno() != null)
out.print("Employee Number" + userInfo.getEmpno());
else
out.print("null");-- Set the session context for a lightweight user as follows in your java code before executing the API call.
-- portal.wwctx_api.set_context(p_user_name => 'portal',p_password => 'password1',p_company => 'simplerewards');
portal.wwctx_api_private.set_context (p_user_name => 'portal'); -
SQLException: found null connection context
Using JDeveloper, I set up a connection with success. However, running the program generates the following error:
java.sql.SQLException: found null connection context
The error persists even when I use [contextNameFromtheConnection] with #sql{...};
Thanks for your time.
nullYou need to set your connection at runtime in your program. For example, to set the default connection:
oracle.sqlj.runtime.Oracle.connect("jdbc:oracle:thin:@localhost:1521:orcl","scott","tiger");
Or, if you have created a JDBC connection conn you could reuse that as follows.
oracle.sqlj.runtime.Oracle.connect(conn);
Hope this helps. -- Ekkehard -
I have installed (and am evaluating) Oracle 9i AS. I want to connect to it from JDeveloper. AS and JDeveloper are on seperate machines.
The Enterprise Manager shows OC4J to be up and running. If I execute "http://<ohs_host>:7777/j2ee/servlet/HelloWorldServlet" I get the proper response.
But when I connect from JDeveloper to AS the connection fails.
However, if on the server I execute on the command line: "java -jar oc4j.jar" then the connection from JDeveloper works. (I learned this trick from someone else, not from the manual.) But if I interrupt that process then the JDeveloper connection fails again.
What is this oc4j.jar executable? Why won't JDeveloper connect without it? Why isn't it automatically part of the AS services? How can I get it to start with AS? Is there some config setting I need to change? Is it described somewhere in the documentation?
Edward A. Ipser, Jr., PhD
[email protected]
www.ipserlab.comHi all,
I am using JDeveloper 10.1.3 for my development environment.
I am able to deploy the EAR at development environment but at live site, I am getting error like Connection refused.
I am using Oracle Application server 10.1.3 for deployment.
I am getting frequent restarting problem of my application server and the logs are as follows...
09/10/12 11:56:06 SEVERE: CoreRemoteMBeanServer.fetchMBeanServerEjbRemote Error reading application-client descriptor: Error communicating with server: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.io.IOException: Connection refused] for URL: ormis://app3.mptax.net:12702/defaultjavax.naming.NamingException: Error reading application-client descriptor: Error communicating with server: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.io.IOException: Connection refused] [Root exception is java.lang.InstantiationException: Error communicating with server: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.io.IOException: Connection refused]]
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getApplicationContext(ApplicationClientInitialContextFactory.java:127)
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at oracle.oc4j.admin.jmx.client.CoreRemoteMBeanServer.fetchMBeanServerEjbRemote(CoreRemoteMBeanServer.java:468)
at oracle.oc4j.admin.jmx.client.CoreRemoteMBeanServer.<init>(CoreRemoteMBeanServer.java:161)
at oracle.oc4j.admin.jmx.client.RemoteMBeanServer.<init>(RemoteMBeanServer.java:128)
at oracle.oc4j.admin.jmx.client.RemoteMBeanServer.getMBeanServer(RemoteMBeanServer.java:158)
at oracle.oc4j.admin.jmx.client.ClientMBeanServerProxyFactory.getMBeanServer(ClientMBeanServerProxyFactory.java:68)
at oracle.oc4j.admin.jmx.remote.rmi.RMIJMXConnectorImpl.getConnector(RMIJMXConnectorImpl.java:190)
at oracle.oc4j.admin.jmx.remote.JMXConnectorImpl.connect(JMXConnectorImpl.java:400)
at oracle.oc4j.admin.topology.ConnectionRefImpl.getConnector(ConnectionRefImpl.java:241)
at oracle.oc4j.admin.management.farm.mbeans.JVMAgr.getAttribute(JVMAgr.java:1378)
at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:36)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:239)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1071)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:953)
at oracle.oc4j.admin.jmx.server.mbeans.model.DefaultModelMBeanImpl.invoke(DefaultModelMBeanImpl.java:700)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at oracle.oc4j.admin.jmx.server.state.LocalizationFilterMBeanServer.invoke(LocalizationFilterMBeanServer.java:579)
at oracle.oc4j.admin.jmx.distributed.MBeanServerDelegate.invoke(MBeanServerDelegate.java:495)
at oracle.oc4j.admin.management.farm.mbeans.J2EEServerAgr.getAttribute(J2EEServerAgr.java:1599)
at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:36)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:239)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1071)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:953)
at oracle.oc4j.admin.jmx.server.mbeans.model.DefaultModelMBeanImpl.invoke(DefaultModelMBeanImpl.java:700)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at oracle.oc4j.admin.jmx.server.state.LocalizationFilterMBeanServer.invoke(LocalizationFilterMBeanServer.java:579)
at oracle.sysman.ias.studio.jmx.spi.JMXConnectorImpl.invoke(JMXConnectorImpl.java:389)
at oracle.sysman.ias.studio.j2ee.shared.jmx.oc4j.ClusterIASJMXUtil.getAttribute(ClusterIASJMXUtil.java:370)
at oracle.sysman.ias.studio.setup.javasso.JMXJavaSSOConfAdminBean.isJssoConfigured(JMXJavaSSOConfAdminBean.java:1041)
at oracle.sysman.ias.studio.setup.javasso.JavaSSOConfHelper.isJssoConfigured(JavaSSOConfHelper.java:802)
at oracle.sysman.ias.studio.cluster.TopologyHelper.prepareData(TopologyHelper.java:1300)
at oracle.sysman.ias.studio.sdk.AbstractController.prepareData(AbstractController.java:875)
at oracle.sysman.emSDK.svlt.PageHandler.handleRequest(PageHandler.java:391)
at oracle.sysman.emSDK.svlt.EMServlet.myDoGet(EMServlet.java:765)
at oracle.sysman.emSDK.svlt.EMServlet.doGet(EMServlet.java:283)
at oracle.sysman.ias.studio.app.StudioConsole.doGet(StudioConsole.java:297)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.sysman.ias.studio.app.BrowserVersionFilter.doFilter(BrowserVersionFilter.java:75)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at oracle.sysman.ias.studio.app.MultipleJVMFilter.doFilter(MultipleJVMFilter.java:85)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
at oracle.sysman.ias.studio.app.PostLogonFilter.doFilter(PostLogonFilter.java:80)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
at oracle.sysman.ias.studio.app.ShortHostnameRedirectFilter.doFilter(ShortHostnameRedirectFilter.java:68)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:619)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.InstantiationException: Error communicating with server: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.io.IOException: Connection refused]
at com.oracle.naming.J2EEContext.create(J2EEContext.java:104)
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getApplicationContext(ApplicationClientInitialContextFactory.java:124)
... 77 more
Caused by: oracle.oc4j.rmi.OracleRemoteException: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.io.IOException: Connection refused]
at oracle.oc4j.deployment.ApplicationClientResourceFinder.lookupResourceFinder(ApplicationClientResourceFinder.java:110)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.getFinder(ApplicationClientResourceFinder.java:123)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.getLocation(ApplicationClientResourceFinder.java:75)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.getEjbBinding(ApplicationClientResourceFinder.java:38)
at com.oracle.naming.J2EEContext.addEJBReferenceEntries(J2EEContext.java:515)
at com.oracle.naming.J2EEContext.create(J2EEContext.java:97)
... 78 more
Caused by: javax.naming.CommunicationException: Connection refused [Root exception is java.io.IOException: Connection refused]
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:292)
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:51)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.lookupResourceFinder(ApplicationClientResourceFinder.java:101)
... 83 more
Caused by: java.io.IOException: Connection refused
at com.evermind.server.rmi.RMIClientConnection.createSecureSocket(RMIClientConnection.java:703)
at com.evermind.server.rmi.RMIClientConnection.createSocket(RMIClientConnection.java:678)
at oracle.oc4j.rmi.ClientSocketRmiTransport.createNetworkConnection(ClientSocketRmiTransport.java:58)
at oracle.oc4j.rmi.ClientRmiTransport.connectToServer(ClientRmiTransport.java:78)
at oracle.oc4j.rmi.ClientSocketRmiTransport.connectToServer(ClientSocketRmiTransport.java:68)
at com.evermind.server.rmi.RMIClientConnection.connect(RMIClientConnection.java:646)
at com.evermind.server.rmi.RMIClientConnection.sendLookupRequest(RMIClientConnection.java:190)
at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:174)
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:283)
... 85 more
09/10/12 12:00:05 SEVERE: CoreRemoteMBeanServer.fetchMBeanServerEjbRemote Error reading application-client descriptor: Error communicating with server: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.io.IOException: Connection refused] for URL: ormis://app3.mptax.net:12702/defaultjavax.naming.NamingException: Error reading application-client descriptor: Error communicating with server: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.io.IOException: Connection refused] [Root exception is java.lang.InstantiationException: Error communicating with server: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.io.IOException: Connection refused]]
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getApplicationContext(ApplicationClientInitialContextFactory.java:127)
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at oracle.oc4j.admin.jmx.client.CoreRemoteMBeanServer.fetchMBeanServerEjbRemote(CoreRemoteMBeanServer.java:468)
at oracle.oc4j.admin.jmx.client.CoreRemoteMBeanServer.<init>(CoreRemoteMBeanServer.java:161)
at oracle.oc4j.admin.jmx.client.RemoteMBeanServer.<init>(RemoteMBeanServer.java:128)
at oracle.oc4j.admin.jmx.client.RemoteMBeanServer.getMBeanServer(RemoteMBeanServer.java:158)
at oracle.oc4j.admin.jmx.client.ClientMBeanServerProxyFactory.getMBeanServer(ClientMBeanServerProxyFactory.java:68)
at oracle.oc4j.admin.jmx.remote.rmi.RMIJMXConnectorImpl.getConnector(RMIJMXConnectorImpl.java:190)
at oracle.oc4j.admin.jmx.remote.JMXConnectorImpl.connect(JMXConnectorImpl.java:400)
at oracle.oc4j.admin.topology.ConnectionRefImpl.getConnector(ConnectionRefImpl.java:241)
at oracle.oc4j.admin.management.farm.mbeans.JVMAgr.getAttribute(JVMAgr.java:1378)
at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:36)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:239)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1071)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:953)
at oracle.oc4j.admin.jmx.server.mbeans.model.DefaultModelMBeanImpl.invoke(DefaultModelMBeanImpl.java:700)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at oracle.oc4j.admin.jmx.server.state.LocalizationFilterMBeanServer.invoke(LocalizationFilterMBeanServer.java:579)
at oracle.oc4j.admin.jmx.distributed.MBeanServerDelegate.invoke(MBeanServerDelegate.java:495)
at oracle.oc4j.admin.management.farm.mbeans.J2EEServerAgr.getAttribute(J2EEServerAgr.java:1599)
at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:36)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:239)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1071)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:953)
at oracle.oc4j.admin.jmx.server.mbeans.model.DefaultModelMBeanImpl.invoke(DefaultModelMBeanImpl.java:700)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at oracle.oc4j.admin.jmx.server.state.LocalizationFilterMBeanServer.invoke(LocalizationFilterMBeanServer.java:579)
at oracle.sysman.ias.studio.jmx.spi.JMXConnectorImpl.invoke(JMXConnectorImpl.java:389)
at oracle.sysman.ias.studio.j2ee.shared.jmx.oc4j.ClusterIASJMXUtil.getAttribute(ClusterIASJMXUtil.java:370)
at oracle.sysman.ias.studio.setup.javasso.JMXJavaSSOConfAdminBean.isJssoConfigured(JMXJavaSSOConfAdminBean.java:1041)
at oracle.sysman.ias.studio.setup.javasso.JavaSSOConfHelper.isJssoConfigured(JavaSSOConfHelper.java:802)
at oracle.sysman.ias.studio.cluster.TopologyHelper.prepareData(TopologyHelper.java:1300)
at oracle.sysman.ias.studio.sdk.AbstractController.prepareData(AbstractController.java:875)
at oracle.sysman.emSDK.svlt.PageHandler.handleRequest(PageHandler.java:391)
at oracle.sysman.emSDK.svlt.EMServlet.myDoGet(EMServlet.java:765)
at oracle.sysman.emSDK.svlt.EMServlet.doGet(EMServlet.java:283)
at oracle.sysman.ias.studio.app.StudioConsole.doGet(StudioConsole.java:297)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.sysman.ias.studio.app.BrowserVersionFilter.doFilter(BrowserVersionFilter.java:75)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at oracle.sysman.ias.studio.app.MultipleJVMFilter.doFilter(MultipleJVMFilter.java:85)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
at oracle.sysman.ias.studio.app.PostLogonFilter.doFilter(PostLogonFilter.java:80)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
at oracle.sysman.ias.studio.app.ShortHostnameRedirectFilter.doFilter(ShortHostnameRedirectFilter.java:68)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:619)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.InstantiationException: Error communicating with server: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.io.IOException: Connection refused]
at com.oracle.naming.J2EEContext.create(J2EEContext.java:104)
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getApplicationContext(ApplicationClientInitialContextFactory.java:124)
... 77 more
Caused by: oracle.oc4j.rmi.OracleRemoteException: Connection refused; nested exception is:
javax.naming.CommunicationException: Connection refused [Root exception is java.io.IOException: Connection refused]
at oracle.oc4j.deployment.ApplicationClientResourceFinder.lookupResourceFinder(ApplicationClientResourceFinder.java:110)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.getFinder(ApplicationClientResourceFinder.java:123)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.getLocation(ApplicationClientResourceFinder.java:75)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.getEjbBinding(ApplicationClientResourceFinder.java:38)
at com.oracle.naming.J2EEContext.addEJBReferenceEntries(J2EEContext.java:515)
at com.oracle.naming.J2EEContext.create(J2EEContext.java:97)
... 78 more
Caused by: javax.naming.CommunicationException: Connection refused [Root exception is java.io.IOException: Connection refused]
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:292)
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:51)
at oracle.oc4j.deployment.ApplicationClientResourceFinder.lookupResourceFinder(ApplicationClientResourceFinder.java:101)
... 83 more
Caused by: java.io.IOException: Connection refused
at com.evermind.server.rmi.RMIClientConnection.createSecureSocket(RMIClientConnection.java:703)
at com.evermind.server.rmi.RMIClientConnection.createSocket(RMIClientConnection.java:678)
at oracle.oc4j.rmi.ClientSocketRmiTransport.createNetworkConnection(ClientSocketRmiTransport.java:58)
at oracle.oc4j.rmi.ClientRmiTransport.connectToServer(ClientRmiTransport.java:78)
at oracle.oc4j.rmi.ClientSocketRmiTransport.connectToServer(ClientSocketRmiTransport.java:68)
at com.evermind.server.rmi.RMIClientConnection.connect(RMIClientConnection.java:646)
at com.evermind.server.rmi.RMIClientConnection.sendLookupRequest(RMIClientConnection.java:190)
at com.evermind.server.rmi.RMIClientConnection.lookup(RMIClientConnection.java:174)
at com.evermind.server.rmi.RMIClient.lookup(RMIClient.java:283)
... 85 more
Please help me out,
Thanks,
RGB Team -
Java stored procedures connection context
In my Oracle database there are two java stored procedures:
A java stored procedure P1 having
Connection conn1 = DriverManager.getConnection("jdbc:default:connection")
and
a java stored procedure P2 having
Connection conn2 = DriverManager.getConnection("jdbc:default:connection")
P1 calls P2 using conn1.CallableStatement.
Here is the question: does P2 inherit the connection
context conn1 (so that actualy conn2 = conn1) or P2's transactional
scope is separate from P1's one?
Thanks,
-EugeneAFAIK, when you run Java in the database, for local SQL data access, there is only one default connection per session, P1 and P2 should share the same transaction context.
Kuassi -
JDeveloper connect ok, but not getConnection
Hi all, I am working on my first java program with JDeveloper. I was able to connect to my local Oracle9i database successfully, but when I tried to connect it in the program, I got "ORA-06401: NETCMN: invalid driver designator".
*** Here is the export from my JDeveloper connection *****
<?xml version = '1.0'?>
<!DOCTYPE connections>
<connections>
<connection>
<JDBC_PORT>1521</JDBC_PORT>
<ConnectionType>JDBC</ConnectionType>
<HOSTNAME>localhost</HOSTNAME>
<user>SCOTT</user>
<ConnectionName>Connection1</ConnectionName>
<SID>CIS</SID>
<JdbcDriver>oracle.jdbc.driver.OracleDriver</JdbcDriver>
<password>tiger</password>
<ORACLE_JDBC_TYPE>oci8</ORACLE_JDBC_TYPE>
</connection>
</connections>
**** Here is my connection codes in program ******
DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
conn = DriverManager.getConnection ("jdbc:oracle:oci8:@localhost.1521:CIS", "scott", "tiger");
Thanks in advance for your help.
ChrisFor using the 'thin' driver
<ORACLE_JDBC_TYPE>thin</ORACLE_JDBC_TYPE>
conn = DriverManager.getConnection ("jdbc:oracle:thin:@localhost.1521:CIS", "scott", "tiger");
If you want to use the thick-oci driver the connection string will be of the format
conn = DriverManager.getConnection ("jdbc:oracle:oci8:@tns_entry_name", "scott", "tiger");
Regards
Elango. -
JDeveloper Connections AQ Setup?
We are still using BPEL & JDeveloper 10.1.2 . I'm trying to set up a AQ service in JDeveloper so I can use it in the Partner Link wizard. Can someone either explain the steps required, or point me to a URL that explains how to set up the AQ service.
The current BPEL application has a process that is invoked by a message on the database AQ. I'm assuming the developer had the JDeveloper connection tab on his system set up before creating the partner link. His system and configuration are long gone, and I am trying to recreate the configuration. I would appreciate any help you might provide.Hi,
I am trying to setup Oracle AQ on 10.2 on Linux platform. When I execute catmgw.sql script to load database objects, I am getting errors. Specifically it is failing to execute mgwityp.plb script. The script has CREATE OR REPLACE TYPE mgwi_msglink OID '00000000000000000000000000021090' wrapped statement followed by wapped code. I get a ORA-02304: invalid object identifier literal error.
Has anybody seen this error? Am I missing some setup/dependancies before I execute catmgw.sql script?
Regards
Kiran -
Public connection context class
Is there any way to force sqlj to generate a public
connection context class ? Right now, it always generates
connection context classes which are only accessible within
the current package, not outside of the package.
Regards,
Francois Staes.Is there any way to force sqlj to generate a public
connection context class ? Right now, it always generates
connection context classes which are only accessible within
the current package, not outside of the package.
Regards,
Francois Staes. -
Hi,
i was trying to create a SQLJ connection context following the procedure given in the following link.
https://help.sap.com/saphelp_nw04/helpdata/en/70/a19cc472e72c4481172909938578fc/frameset.htm
But i am getting error when i am inserting this sqlj statement inside the class Ctx
public class Ctx
#sql public context Ctx with (dataSource = "java:comp/env/TMP_PERSISTENCE_EXAMPLE");//here i am getting this error
Error
SQLJ: The ConnectionContext class "Ctx" must not be declared as an inner class of the class "temp.persistence.gettingstarted.dao.Ctx". It may be declared as a static inner class. Ctx.sqlj OpenSQLWeb/source/temp/persistence/gettingstarted/dao
could u tell me how i can resolve this.Hi,
i think you are refering to the sqlj file
with reference to the example its ctx.sqlj
The contents of the file are
<-- Start -->
package temp.persistence.gettingstarted.dao;
#sql public context Ctx with (dataSource = "java:comp/env/TMP_PERSISTENCE_EXAMPLE");
<-- End -->
its not a class file.
If you have installed JDT, you will have the complete working example in 'C:\Program Files\SAP\JDT\eclipse\examples\J2EE_GettingStartedOpenSQL.zip'
Hope that helps.
Regards,
S.Divakar -
Hi everybody,
I'm running in an urgent problem, because binding to my OpenDirectory got lost. I've lots of "Module: AppleODClientLDAP - unable to open connection to LDAP server - unable to create connection context" messages in the system.log and OD service stoppped running. In the OD-section no server is listed any longer and all buttons are greyed. All network users for sure are not available, but all other services are up. I didn't changed anything to the existing services but started with the netinstall config. I got the following entries in the systemlog
Jun 19 00:35:30 macminiserver.homenet bootpd[95005]: server name macminiserver.homenet
Jun 19 00:35:30 macminiserver.homenet bootpd[95005]: interface en0: ip 192.168.0.11 mask 255.255.255.0
Jun 19 00:35:30 macminiserver.homenet bootpd[95005]: subnets: Failed to convert 'domain_search': Empty array
Jun 19 00:35:30 macminiserver.homenet bootpd[95005]: bsdpd: re-reading configuration
Jun 19 00:35:30 macminiserver.homenet bootpd[95005]: bsdpd: shadow file size will be set to 48 megabytes
Jun 19 00:35:30 macminiserver.homenet bootpd[95005]: bsdpd: age time 00:15:00
Jun 19 00:35:30 macminiserver.homenet bootpd[95005]: bsdpd: no NetBoot images found
Jun 19 00:35:30 macminiserver.homenet bootpd[95005]: bootpd: NetBoot service turned off
Jun 19 00:35:30 macminiserver.homenet bootpd[95005]: DHCP REQUEST [en0]: 1,0:1b:77:36:47:f6 <NB01>
Jun 19 00:35:30 macminiserver.homenet bootpd[95005]: ACK sent NB01 192.168.0.107 pktsize 304
Since these logentries appeared, no network users and groups are available anymore. I'm running OS X ML 10.8.3 and DNS is fine.
Are there any steps to perform to get LDAP working again? With all buttons in the server admin OD section greyed out I even can't setup a new directory.
BR
JensI was able to restore the existing server with the automatic OD backup that Server.app creates. When my OD fails to start after a crash and db_recover commands don't work, it's always worked for me to restore the odmaster from a backup using the command:
sudo slapconfig -restoredb /private/var/backups/ServerBackup_OpenDirectoryMaster.sparseimage
I'm careful to keep an independent OD backup with Carbon Copy Cloner and this preflight script.
You can also grab an earlier version of the sparse image ServerBackup_OpenDirectoryMaster.sparseimage from a Time Machine backup. It's also possible to rsync the database files directory from a Time Machine backup. -
Emctl and jdeveloper connection error
Hi all,
I have installed oracle database 11g 11.1.0.6 on a windows server 2003 machine, and then used patchset 11.1.0.7 to upgrade. After that, I am able to connect this database and the database instance using sqlplus.
However, when I tried to create a new connection using JDeveloper, I got the following error:
Test failed: ORA-01017: invalid username/password; logon denied
When I tried with emctl.bat start dbconsole, I got error saying
"could not find appropriate listener for this database. configuring db control requires database to be registered with at least one listener"
Can anyone please help me with this strange issue?
Thank you so much! Happy New Year too.here is the output of set:
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\Application Data
ARISHOME110=C:\program files\Oracle BPA Suite11g\
ATRIAHOME=c:\atria
CCCS_HOME=c:\cccs
ClusterLog=C:\WINDOWS\Cluster\cluster.log
CommonProgramFiles=C:\Program Files\Common Files
ComSpec=C:\WINDOWS\system32\cmd.exe
COPYCMD=/Y
DEFLOGDIR=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\user1
ImageType=windows2003enterprise.hosted
ImageVersion=1.06
include=C:\Program Files\Microsoft Visual Studio\VC98\atl\include;C:\Program Files\Microsoft Visual Studio\VC98\mfc\include;C:\Program Files\Microsoft Visual Studio\VC98\include;c:\Program Files\Intel\Compiler60\IA32\Include;c:\Program Files\Intel\Compiler70\IA32\Include;C:\Program Files\Intel\CPP\Compiler81\Ia32\Include
INTEL=c:\program files\intel
INTEL_COMPILER80=C:\Program Files\Intel\CPP\Compiler81
INTEL_LICENSE_FILE=C:\Program Files\Common Files\Intel\Licenses
INTEL_SHARED=C:\Program Files\Common Files\Intel\Shared Files
invPtr=C:\STEMAgent\agent10g\oraInst.loc
JDK_15=c:\jdk1.5.0\bin
lib=C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib;C:\Program Files\Microsoft Visual Studio\VC98\lib;c:\Program Files\Intel\Compiler60\IA32\Lib;c:\Program Files\Intel\Compiler70\IA32\Lib;c:\Program Files\Common Files\Intel\Shared Files\Ia32\Lib;C:\Program Files\Intel\CPP\Compiler81\Ia32\Lib;C:\Program Files\Common Files\Intel\Shared Files\Ia32\Lib
machine_type=X86
MSDevDir=C:\Program Files\Microsoft Visual Studio\Common\MSDev98
NUMBER_OF_PROCESSORS=4
ORACLE_HOME=C:\app\product\11.1.0\db_1
ORACLE_SID=DB11
OS=Windows_NT
Path=C:\app\product\11.1.0\db_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\MsNfs\;C:\AIME\BIN;C:\CCCS\BIN;c:\emacs\bin;C:\MKSNT;c:\PROGRAM FILES\TERATERM;C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\COMMON\TOOLS\WINNT;C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\COMMON\MSDEV98\BIN;C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\COMMON\TOOLS;C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\BIN;c:\PROGRAM FILES\COMMON FILES\INTEL\SHARED FILES\IA32\BIN;c:\program files\intel\ICID;c:\program files\intel\EDB;c:\program files\intel\ISELECT\BIN6;c:\program files\intel\COMPILER60\IA32\BIN;c:\program files\intel\EDB70;c:\program files\intel\COMPILER70\IA32\BIN;C:\Program Files\Intel\CPP\Compiler81\IA32\BIN;C:\Program Files\Common Files\Intel\Shared Files\IA32\BIN;c:\program files\intel\CPP\IDB73\BIN;c:\program files\intel\cpp\idb80\bin;c:\Program Files\WinZip;c:\orautil;h:\mw\Oracle_IDM1\bin;h:\mw\Oracle_IDM1\opmn\lib;h:\mw\Oracle_IDM1\perl\bin;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0209
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\LOCALS~1\Temp
USERNAME=user1
USERPROFILE=C:\Documents and Settings\user1
VS=C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO
VS71COMNTOOLS=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\
VS80COMNTOOLS=c:\Program Files\Microsoft Visual Studio 8\Common7\Tools\
VSEDEFLOGDIR=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection
windir=C:\WINDOWS -
I tried to connect to the Oracle DB by JDeveloper.. it connects with no problems..
but sometimes.. it comes out with Io exception: The Network Adapter could not establish the connection
well I have a network between 2 PCs.. when both are working there is no problem.. when the one with the Oracle Server only work I gotthat Exception....
and now Turn both PCs on and still got that Exception..
Why??!! It was wroking before well ?? so why it do this??
Need help PleaseIf I understand your setup properly, you have one PC that you are running JDeveloper on, that you are connecting to an Oracle DB with.
Obviously if the database server (or the JDev PC) is disconnected, the connection wouldn't be possible.
If you are getting that error after starting both machines, verify that you can connect to the server from the client PC. Try doing a tnsping (you should have the Oracle client loaded if JDev is installed properly). This will give you a clearer reason as to what is wrong.
Often the issue is that the listener isn't being started automatically on the databas server. It is also entirely possible that the database PC isn't set up to autostart the database as well. -
How does a standalone program running in JDeveloper connects to Oracle
Hi,
Can anybody please answer me how does a standalone program running in JDeveloper10G is getting connected to Oracle ? Normally it should go and check the host address and DB service name in TNSNames.ora file and go ahead. With JDeveloper10 ever after changing the TNSNames.ora file name to some other name the program running in Jdeveloper is getting connected to database. Seems weird ? I was actually doing some testing with that. Anybody please tell me how does JDeveloper handles such situations...
Regards
CTR
Edited by: user8325217 on Oct 9, 2008 2:54 PMYes, it depends on the type of JDBC driver you are using. Oracle has two JDBC drivers for Java clients. The oci driver requires an installation of Oracle Client on each machine running the Java app, and has the potential to use the tnsnames.ora entries. The thin driver is pure Java, does not require Oracle Client, and therefore is not aware of tnsnames.ora files.
You want to look in your code for the part that's establishing a connection to the db, and look at the URL, which will tell you the type of driver being used, for example "jdbc:oracle:thin" or "jdbc:oracle:ociX".
You might want to check out the following FAQ on JDBC:
http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm
Brian
Product Manager, JDeveloper -
Jdeveloper connecting with SQL Server Express
Hi i am trying to connect jdeveloper with SQL Server Express. At the moment i am getting a TCP/IP connection to the host error message.
My connection string is as follows:
Class.forName("com.micorosoft.sqlserver.jdbc.SQLServerDriver")
Connection conn = DriverManager.getConnection("jdbc:sqlserver://mustang/sqlexpress; database = matt1; Uid = matt; Pwd = matt1")
Can someone please help me!Enable TCP/IP protocol. Select Microsoft SQL Server 2005>Configuration Tools>SQL Server Configuration Manager. In the SQL Server Configuration Manager select the node SQL Server 2005 Network Configuration>Protocols for SQLEXPRESS. Right-click on the TCP/IP node and select Enable. Restart the SQL Server (SQLEXPRESS) service. In Adminstrative Tools>Services, right-click on the SQL Server (SQLEXPRESS) service and select Restart.
To configure a JDBC connection with SQL Server 2005 Express, add SQL Server 2005 JDBC driver JAR file <Microsoft SQL Server 2005 JDBC Driver>/sqljdbc_1.0/enu/sqljdbc.jar to classpath. <Microsoft SQL Server 2005 JDBC Driver> is the directory in which SQL Server 2005 JDBC Driver zip file is installed.
Driver class for SQL Server 2005 database is com.microsoft.sqlserver.jdbc.SQLServerDriver. Connection URL for the default SQL Server 2005 database is jdbc:sqlserver://localhost:<port>.
In the connection URL, <port> is obtained from the SQL Server configuration Manager. When the SQL Server 2005 SQLEXPRESS is restarted the port number changes.
To obtain the <port> in the SQL Server Configuration Manager, select the node SQL Server 2005 Network Configuration>Protocols for SQLEXPRESS. Right-click on TCP/IP node and select Properties. Select the IP Addresses tab. In IP ALL, the TCP Dynamic Ports specifies the <port> value. The connection URL format for another database name is shown in following listing.
Maybe you are looking for
-
How can I make sure the the modify date of files are not updated to the date the file was uploaded or downloaded. There are multiple people working on my sites and I am the only one that uses Dreamweaver. The problem this presents is when one of my
-
I have been trying to resolve an issue where my central admin site which was assigned the reporting services role stopped working. SSRS was operating but there seemed to be a problem with the reporting user account. I did all sorts of stuff including
-
CP 5 text to speech--purchased voices integrated directly?
Hi, I am hoping someone from Adobe will answer this question definitively for me (or someone who has figured this out and tested it). Let's say I have to add text-to-speech to a software demo and provide the demo in, say, five different languages. I
-
when I add a new contact number to my iphone 5c and I try to select the iphone choice is not showing up; and it was working fine the day before. ?Also when I try to send an imessage is not going trough as an imessage, it makes me send it as a messag
-
my apple TV works for everything except Hulu an Netfix. When I try to open them I always get the message that they are not available and to try again later