[JNDI/Naming/Network] - javax.naming.NameNotFoundException: MySqlDS not bound
by narenderreddy
Hi
the exception is MySqlDS not bound where is the wrong ? if any one can identify please send the correct way ?
and i have one doubt ? i already placed the mysql-connector-java-5.0.4-bin.jar in client folder and server/lib folder is there any additional configuration is required for this ? the jboss server is already started and but i am getting the error
I am configuring in mysql-ds.xml file like this
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://10.0.3.155:3306/narender</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>narender</user-name>
narender
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<type-mapping>mySQL</type-mapping>
</local-tx-datasource>
and i try to get the connection from the connection pool like this
public class TestConnection {
public static void main(String[] args) {
try {
Properties env = new Properties();
env.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
env.setProperty(Context.PROVIDER_URL,"jnp://localhost:1099");
env.setProperty(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
Context ctx = new InitialContext(env);
System.out.println("Created InitialContext, env=" + env);
Object data = ctx.lookup("java:/MySqlDS");
}
catch (Exception e) {
e.printStackTrace(System.err);
}
}
}
when ever we are running the main method it gives error like this
javax.naming.NameNotFoundException: MySqlDS not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.gss.naru.TestConnection.main(TestConnection.java:46)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125001#4125001
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125001
18 years, 2 months
[JBoss Portal] - Re: Half working SSO with Portal 2.6.2
by sohil.shah@jboss.com
Soon5-
I am in the process of fixing the second browser window issue and am not being able to reproduce this. Its working fine for me in firefox
anonymous wrote :
| 2. When I logged in, and I open a second Browser Window and want to log into a second instance of the Portal, I have to type in my Username / Password again. Not realy SSO ;-). Or is it normal, that I have to log in for each Browser Window?
|
Just to be clear, you open a second browser window (I am assuming the same type of browser like Firefox opening another window of FireFox and not IE), and connect to a *different* instance of the Portal other than the one in the first window?
Are you sure the second instance is also integrated properly with the CAS valve as mentioned in the reference guide?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124996#4124996
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124996
18 years, 2 months