Java DB connectivity problems

I need troubleshooting techniques how to deal with database connectivity problems.
I am using netbean6m10, Java6.0_1b6 and my program reads these properties before opening the database.
lsfbvol.db.url="jdbc:derby:/etsdDB/ds8300DB;create=yes"
lsfbvol.db.driver=org.apache.derby.jdbc.EmbeddedDriver
For debugging purposes, I printed the driver to ensure it was read properly and it was.
DB Driver=org.apache.derby.jdbc.EmbeddedDriver
Below is the captured exception. Please advice.
Thanks
Arsi
java.sql.SQLException: No suitable driver found for "jdbc:derby:/etsdDB/ds8300DB;create=yes
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
---SQLException Caught---
SQLState: 08001
Severity: 0
Message: No suitable driver found for "jdbc:derby:/etsdDB/ds8300DB;create=yes
at loadDB.MatchGroup.dbConnect(MatchGroup.java:458)
at loadDB.RxProps.dbCreateTable(RxProps.java:308)
at loadDB.RxProps.init(RxProps.java:122)
at loadDB.RxProps.<init>(RxProps.java:97)
at loadDB.File2DB.<init>(File2DB.java:58)
at ds8300.Main.main(Main.java:33)
Java Result: 1
BUILD SUCCESSFUL (total time: 3 seconds)

Thanks for the response.
This is a working program under MySQL and modified for a good practice to learn the new Java DB included in jdk6. Actually, all I changed was my property file which contained all the properties for URL and Driver for the DB.
My URL was pointing to my working-directory which happend to be my flash-card. I changed it to my C drive but still is having same problem.
About my driver not being loaded. My understanding was under jdk6 there was no need to load the driver for embeded Java DB because was already included into the system.
Not sure what to try next. Please advice.
Thanks. Arsi

Similar Messages

  • Java.sql.connection problems

    Hi, I hav got this problem:
    PRB 1
    I have got the JDBC connection established with the OracleDataSource instance on my java application
    I wonder if there is a way to check the connection if it is still alive. any hint? i tried connection.isClosed() but that doesn't help.
    PRB 2
    I am in this scenario:
    The connection is established during application start and something goes wrong say like the DB server goes offline in the middle of no where and I do a commit / rollback. I will get a SQLExeption called. But right after the db comes back online.. i tried to do a commit / rollback, the SQLExeption is still persist.
    Q1. Does this mean that when the exception is caught, my connection would no longer be valid and I need to restart the application?
    Q2. could i reinitialize the connection after the exception to avoid the restart?
    Thank you.

    Hi, I hav got this problem:
    PRB 1
    I have got the JDBC connection established with the
    OracleDataSource instance on my java application
    I wonder if there is a way to check the connection if
    it is still alive. any hint? i tried
    connection.isClosed() but that doesn't help.From Java APIs reg. isClosed():This method is guaranteed to return true only when it is called after the method Connection.close has been called.
    This method generally cannot be called to determine whether a connection to a database is valid or invalid. A typical client can determine that a connection is invalid by catching any exceptions that might be thrown when an operation is attempted.
    PRB 2
    I am in this scenario:
    The connection is established during application start
    and something goes wrong say like the DB server goes
    offline in the middle of no where and I do a commit /
    rollback. I will get a SQLExeption called. But right
    after the db comes back online.. i tried to do a
    commit / rollback, the SQLExeption is still persist.
    Q1. Does this mean that when the exception is caught,
    my connection would no longer be valid and I need to
    restart the application?
    Q2. could i reinitialize the connection after the
    exception to avoid the restart?Once your DB goes down, your connection is broken. You cannot do anything with that connection...like Rollback, commit etc. You need to re-establish the connection. You don't need to restart the application, but you might want to check if the connection is null. If it is, you might have to try a new connection. Probably, your application can quit trying for a connection after 'x' number of attempts.
    Kumar

  • Immediate HELP in Tomcat 5 to Postgresql 7.4 database connectivity problem

    Hi,
    I failed to connect Tomcat 5.0.24 with Postgresql
    7.4.2. The files created by me and the changes i had
    made in the existing files are rates.jsp,
    conversionDAO.java, web.xml and server.xml. The error
    message on the top of the rest of it was "The value of
    useBean class attribute converter.conversionDAO is
    invalid". So far I found out that the coding for
    database connectivity purpose in conversionDAO.java
    cause the error. Another thing is Postgresql jdbc
    driver is required to set in the CLASSPATH for the
    java file to access the Postgresql database. I don't
    know where should I put it in Tomcat for web
    application. Anyway, I put it in
    $CATALINA_HOME/shared/lib according the book i
    refered. I do the database connectivity coding refer
    to the Tomcat Kick Start book from Sams Publishing.
    Below are the coding involved, please show me the
    mistake i had made. Thank you.
    ----server.xml----
    <Context path="/database"
    docBase="${catalina.home}/webapps/database" debug="0"
    reload="true">
    <ResourceParams name="jdbc/conversion">
    <parameter>
    <name>username</name>
    <value>myusername</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>mypassword</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>org.postgresql.Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:postgresql://localhost/conversion</value>
    </parameter>
    </ResourceParams>
    </Context>
    ----web.xml----
    <servlet>
    <servlet-name>conversionDAO</servlet-name>
    <servlet-class>converters.conversionDAO</servlet-class>
    </servlet>
    <resource-ref>
    <res-ref-name>jdbc/conversion</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    ----conversionDAO.java----
    public conversionDAO() throws SQLException,
    NamingException
    Context init = new InitialContext();
    Context ctx = (Context)
    init.lookup("java:comp/env");
    DataSource ds = (DataSource)
    ctx.lookup("jdbc/conversion");
    con = ds.getConnection();
    select = con.prepareStatement(
    "SELECT rate FROM Exchange WHERE src= ? AND dst =

    Immediate HELP in Tomcat 5 to Postgresql 7.4 database connectivity problem (cont.)
    Errors log
    2004-06-06 01:07:53 StandardContext[servlets-examples]SessionListener: contextDestroyed()
    2004-06-06 01:07:53 StandardContext[servlets-examples]ContextListener: contextDestroyed()
    2004-06-06 01:07:53 StandardContext[jsp-examples]SessionListener: contextDestroyed()
    2004-06-06 01:07:53 StandardContext[jsp-examples]ContextListener: contextDestroyed()
    2004-06-06 01:07:59 StandardContext[balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
    2004-06-06 01:08:00 StandardContext[jsp-examples]ContextListener: contextInitialized()
    2004-06-06 01:08:00 StandardContext[jsp-examples]SessionListener: contextInitialized()
    2004-06-06 01:08:00 StandardContext[servlets-examples]ContextListener: contextInitialized()
    2004-06-06 01:08:00 StandardContext[servlets-examples]SessionListener: contextInitialized()
    2004-06-06 01:08:01 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: /rates/rates.jsp(5,0) The value for the useBean class attribute converters.conversionDAO is invalid.
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:357)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:141)
         at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1217)
         at org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         at org.apache.jasper.compiler.Generator.generate(Generator.java:3261)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:422)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:507)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    ----more----

  • DATABASE CONNECTIVITY PROBLEM IN JSP

    Hello Friends .
    I am facing problem in database connectivity with JSP . Following is the code .
    <%
    String accessDBURLPrefix = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
    String accessDBURLSuffix = ";DriverID=22;READONLY=false}";
    String databaseURL = accessDBURLPrefix + "db1.mdb" + accessDBURLSuffix;
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    java.sql.Connection con = java.sql.DriverManager.getConnection(databaseURL, "", "");
    out.println("Connection created sucessfully");
    catch(Exception e)
    out.println(e);
    %>
    It gives following output :
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Could not find file '(unknown)'.
    If I run the code in core java application then it works sucessfully .
    Plz help me to find the solution .
    I am using sun studio Enterprise 8.1
    have stored the access file in web direcotry in the project.
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Please use CODE tags when posting code. You are losing some of the plus signs of string concatenation to the forum's formatting beast.
    Preferred solution: Don't use Access as a database. The JDBC-ODBC bridge is always troublesome.
    If you must use Access...
    Well the message is easy enough to understand: it can't find the database db1.mdb.
    You say you put db1.mdb in the web directory. Obviously the computer is not looking there (silly computer for not looking where you put the file)
    So it is up to you to be smart and tell the computer exactly where to go.
    Using application.getRealPath("/db1.mdb") in place of "db1.mdb" will probably work in a JSP.
    String databaseURL = accessDBURLPrefix  + application.getRealPath("/db1.mdb") +  accessDBURLSuffix;cheers,
    evnafets

  • Java Applets connecting to Oracle DB thru OAS (JNDI)

    i am developing an application, like i said before, i am using three applets, one controls a webcam, (records an image to disk and oracle), another controls a Electronic signature pad (records an image to disk and oracle), and finally a finger print reader (the same with this), at the beginning i didnt have any problem at all connecting this applet to the database, but top management wants to do things in another way, not allowing me to connect the applet directly to the database for security reason, My app resides on Oracle Application Server, and i use DataSource and Connection Pooling,
    I want that this applets use the available datasource on OAS to connect to the Database, due that the DataBase IP Address wont be public but OAS IP address will, I know that i must use JNDI to accomplish this, but i didnt have any results at all
    Message was edited by:
    efebo_abel2002

    i retrieved all the datasources from my app and i got this, i show my code and the returned errors, I can't connect my applet to the DB thru OAS datasources, any suggestions?
    package rdf.struts.ajax;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.Statement;
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NameClassPair;
    import javax.naming.NamingEnumeration;
    import javax.naming.NamingException;
    import javax.sql.DataSource;
    public class ConductoresClient2 {
    public static void main(String [] args) {
    try {
    final Context ctx = getInitialContext();
    System.out.println(ctx!=null?"ctx no es null":"ctx es null");
    NamingEnumeration nenum=ctx.list("jdbc");
    while (nenum.hasMore()) {               
    NameClassPair entry = (NameClassPair)nenum.next();
    System.out.println("entry:="+entry.getName());
    try {
    DataSource ds=(DataSource)ctx.lookup("jdbc/"+entry.getName());
    Connection conn=ds.getConnection();
    Statement stm=conn.createStatement();
    ResultSet rs=stm.executeQuery("SELECT * FROM palic_ow.conductores");
    while(rs.next())
    System.out.println("rs.getString(1):="+rs.getString(1));
    System.out.println("rs.getString(2):="+rs.getString(2));
    System.out.println("rs.getString(3):="+rs.getString(3));
    catch (Exception e) {
    System.out.println("Exception conectando a la base :"+e);
    //java:comp/env/
    }catch (Exception e) {
    System.out.println("Exception obteniendo Context "+e);
    private static Context getInitialContext() throws NamingException {
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"oracle.j2ee.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL,"oc4jadmin");
    env.put(Context.SECURITY_CREDENTIALS,"admin");
    env.put(Context.PROVIDER_URL,"ormi://localhost:23791/sertracen");
    return new InitialContext( env );
    ctx no es null
    entry:=OracleDS
    Exception conectando a la base :javax.naming.NamingException: Lookup error: javax.naming.NamingException: javax/resource/Referenceable [Root exception is java.lang.NoClassDefFoundError: javax/resource/Referenceable]; nested exception is:
         javax.naming.NamingException: javax/resource/Referenceable [Root exception is java.lang.NoClassDefFoundError: javax/resource/Referenceable] [Root exception is javax.naming.NamingException: javax/resource/Referenceable [Root exception is java.lang.NoClassDefFoundError: javax/resource/Referenceable]]
    entry:=v8PooledDS
    Exception conectando a la base :javax.naming.NamingException: Disconnected: java.lang.NoClassDefFoundError: javax/resource/Referenceable
    entry:=caom
    Exception conectando a la base :javax.naming.NamingException: Lookup error: javax.naming.NamingException: javax/resource/Referenceable [Root exception is java.lang.NoClassDefFoundError: javax/resource/Referenceable]; nested exception is:
         javax.naming.NamingException: javax/resource/Referenceable [Root exception is java.lang.NoClassDefFoundError: javax/resource/Referenceable] [Root exception is javax.naming.NamingException: javax/resource/Referenceable [Root exception is java.lang.NoClassDefFoundError: javax/resource/Referenceable]]
    entry:=v8DS
    Exception conectando a la base :javax.naming.NamingException: Lookup error: javax.naming.NamingException: javax/resource/Referenceable [Root exception is java.lang.NoClassDefFoundError: javax/resource/Referenceable]; nested exception is:
         javax.naming.NamingException: javax/resource/Referenceable [Root exception is java.lang.NoClassDefFoundError: javax/resource/Referenceable] [Root exception is javax.naming.NamingException: javax/resource/Referenceable [Root exception is java.lang.NoClassDefFoundError: javax/resource/Referenceable]]
    entry:=v8CoreDS
    Exception conectando a la base :javax.naming.NamingException: Lookup error: javax.naming.NamingException: javax/resource/Referenceable [Root exception is java.lang.NoClassDefFoundError: javax/resource/Referenceable]; nested exception is:
         javax.naming.NamingException: javax/resource/Referenceable [Root exception is java.lang.NoClassDefFoundError: javax/resource/Referenceable] [Root exception is javax.naming.NamingException: javax/resource/Referenceable [Root exception is java.lang.NoClassDefFoundError: javax/resource/Referenceable]]
    Process exited with exit code 0.
    null

  • MSSQLServer jdbc connect problem on ODI 11G R2

    I have a MS SQL Server jdbc connect problem on ODI 11G R2 / Windows server 2008 64 bits.
    Tried, one by one, all versions of Microsoft drivers.
    Sqljdbc4.jar copied to : %appdata%\odi\oracledi\userlib\
    The Topology connect syntax is :
    driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
    URL : jdbc:sqlserver://<host>:1433
    => All the topology tests end with time-outs.
    Installed 10G ODI.
    Works with 1.4 java and sqljdbc.jar version 2 jdbc driver.
    Times out with version 3 and/or Sqljdbc4.jar + JAVA_HOME & ODI_JAVA_HOME set to 1.6 path.
    also tried, with no success (time-outs) on either 10g or 11g :
    com.inet.tds.TdsDriver
    jdbc:inetdae7://<host>:1433?database=<DB>
    same results for :
    net.sourceforge.jtds.jdbc.Driver
    jdbc:jtds:sqlserver://<host>:1433
    Any suggestions for a fix?
    Many thanks in advance.

    Hello,
    ODI (11g) Studio is certified on Windows 32 bit only, not on 64bit.
    However you may still install it and configure ODI Studio to run with a 32 bit java.
    Details pls see Master Note For ODI 11g Install Issues And Questions (Doc ID 1214428.1).
    To connect to SQL Server:
    # Check and make sure the authentication mode of your Microsoft SQL Server Server is set to "SQL Server and Windows" or "Mixed", otherwise Oracle Data Integrator (ODI) is unable to connect to the database.
    # Before you create the Oracle Data Integrator (ODI) Dataserver in Topology Manager > Physical Architecture, stop all ODI processes, and place the JDBC Driver file in the ODI's userlib and "/drivers" folder.
    For ODI Studio (Local No Agent)
    %APPDATA%\odi\oracledi\userlib
    %APPDATA% is the Windows Application Data directory for the user (usually C:\Documents and Settings\<user>\Application Data).
    Standalone Agent
    ODI_HOME\oracledi\agent\drivers
    Note: If you decide to use the DataDirect driver that comes with ODI 11g install/ embedded in ODI 11g
    weblogic.jdbc.sqlserver.SQLServerDriver
    Then you don't need to worry about this step.
    # Make sure that the database is the default database of the user account employed by ODI for connection, and that the password is correct.
    # Verify (in your Microsoft SQL Server Server network configuration) that TCP/IP has been enabled on port 1433.
    For more details see How To Set Up JDBC Driver Connections For The Microsoft SQL Server For ODI (Doc ID 423914.1)
    If you try sqljdbc.jar, you need to configure ODI_JAVA_HOME to jdk1.5
    sqljdbc4.jar, jdk1.6 (since ODI 11g requires jdk1.6, I'd suggest sqljdbc4.jar)
    More see Compatibility Matrix For Java Machines And JDBC Drivers Used With ODI (Doc ID 807235.1)
    Hope that helps other people who run into this,
    Edited by: user742480 on Apr 4, 2011 12:06 PM

  • Database connection problem when i try store the values in JTable

    Hi Sir,
    I have a database connection problem when i try to store the data's in a JTable.I think the problem is with in the database connection.I have used 3 vectors here.The database which i have used is
    Access.Where the program is compiling well.But when i run it only the first column heading is printed and error message showing that
    "Invalid Cursor State".I need to solve this problem.pls. do help me.
    I will provide u with the code.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.util.*;
    import java.sql.*;
    public class DataBaseVector extends JPanel
    //Container contentPane=getContentPane();
    JScrollBar jsb = new JScrollBar(JScrollBar.HORIZONTAL);
    JScrollBar jsb1 = new JScrollBar(JScrollBar.VERTICAL);
    Image i1;
    String url="jdbc:odbc:Ananth";
    Vector col=new Vector();
    Vector rows=new Vector();
    Vector rdata=new Vector();
    Connection conn;
    public DataBaseVector()
    //super("JTable With ScrollBars");
    this.setLayout(new BorderLayout());
    UIManager.put("ScrollBar.track",Color.red);
    UIManager.put("ScrollBar.thumb",Color.blue);
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    conn=DriverManager.getConnection(url); // Is there any problem here?
    Statement st=conn.createStatement();
    ResultSet rs=st.executeQuery("Select * from AccountMaster");
    // rs is the result set obtained
    ResultSetMetaData rsmd=rs.getMetaData();
    int cols=rsmd.getColumnCount();
    for(int i=1;i<=cols;i++)
    col.addElement(rsmd.getColumnName(i));
    rdata.addElement(rs.getString(i));
    rows.addElement(rdata);
    }catch(Exception e)
         System.out.println("The Error Message was:"+e.getMessage());
    JTable jt=new JTable(rows,col);
    int v=ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
    int h=ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
    JScrollPane jsp=new JScrollPane(jt,v,h);
    this.add(jsp,BorderLayout.CENTER);
    this.add(jsb, BorderLayout.SOUTH);
    this.add(jsb1, BorderLayout.EAST);
    public static void main(String args[])
    JFrame jf=new JFrame();
    JPanel frame=new DataBaseVector();
    jf.getContentPane().add(frame);
    jf.setSize(800,600);
    jf.setVisible(true);
    Thanx,
    m.ananthu

    The problem is ResultSet.next() is not called.
    Try this and modify the table creation as you need.
    ResultSetMetaData rsmd=rs.getMetaData();
    int cols=rsmd.getColumnCount();
         while(rs.next()) {
              for(int i=1;i<=cols;i++)
                        col.addElement(rsmd.getColumnName(i));
                        rdata.addElement(rs.getString(i));
              rows.addElement(rdata);
    Hope this helps

  • EJB3: JNDI connection problem managed server

    Hi all,
    In a JUnit test, I tried to look up a Session EJB from a remote managed server:
    Hashtable<String, String> props = new Hashtable<String, String>();
    props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    props.put(javax.naming.Context.PROVIDER_URL, "t3://server1.ux.yucom.es:1751");
    props.put(javax.naming.Context.SECURITY_PRINCIPAL, "userName");
    props.put(javax.naming.Context.SECURITY_CREDENTIALS, "pwd");
    props.put(weblogic.jndi.WLContext.ALLOW_EXTERNAL_APP_LOOKUP, "true");
    InitialContext context = new InitialContext(props);
    Command command = (Command) context.lookup(jndiName);
    But the code already fails while instantiating the InitialContext, because of a connection problem:
    Caused by: java.net.ConnectException: t3://server1.ux.yucom.es:1751: Destination unreachable; nested exception is:
         java.net.ConnectException: Connection timed out: connect; No available router to destination
         at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:203)
         at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:352)
         ... 34 more
    Caused by: java.rmi.ConnectException: Destination unreachable; nested exception is:
         java.net.ConnectException: Connection timed out: connect; No available router to destination
         at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:464)
         at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:315)
         at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:251)
         at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:194)
         at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:225)
         at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:188)
         ... 36 more
    I'm able to connect to the the Admin server... In this case I receive a javax.naming.NameNotFoundException, obviously, since the remote EJB is only targetted on the managed server and not on the admin.
    This is confirmed by following little test on the command line:
    java -cp %WL_HOME%\server\lib\weblogic.jar weblogic.Admin -url t3://server1.ux.yucom.es:1700 -username <user> -password <pwd> PING
    => OK, packets received
    java -cp %WL_HOME%\server\lib\weblogic.jar weblogic.Admin -url t3://server1.ux.yucom.es:1751 -username <user> -password <pwd> PING
    => Failure:
    Failed to connect to server1.ux.yucom.es:1751: Destination unreachable; nested exception is:
    java.net.ConnectException: Connection timed out: connect; No available router to destination
    Does anyone has an idea why the connection to the managed server fails??
    Is it a configuration problem in WebLogic?
    Thx a lot!
    Wim.

    Hi,
    Are you able to Remotely Access any Simple Web Application deployed on "server1.ux.yucom.es:1751".
    Example: http://server1.ux.yucom.es:1751/TestApp/index.jsp
    If NOT: Means Some where there is a problem with the Port...Just for testing Try Changin Manged Server port to Default HTTP Port (80).
    If Yes: Then there are chances that Your Box is not allowing any t3-Protocol Traffic on 1751 Port. Just for Testing Enable HTTP Tunneling on this Server from Admin Console
    AdminConsole --> Home-->Summary Of Servers --->ManagedServer1 ---> Protocol (Tab) ---> HTTP (SubTab) --->Enable Tunneling (Check This Check Box)    Save the changes.
    And then After restarting your Server ... Try to ping your Server using:
    java -cp %WL_HOME%\server\lib\weblogic.jar weblogic.Admin -url http://server1.ux.yucom.es:1751 -username <user> -password <pwd> PING
    In the Above command Use HTTP protocol instead of T3. If Now u are able to Ping the Server means Your Port 1751 was not allowing any other Protocol except HTTP.
    Thanks
    Jay SenSharma
    http://middlewaremagic.com/weblogic  (Middleware magic Is Here)

  • Java bean connectivity -

    Hi,
    There are some issues while I am using webservice connection from crystal report.(I am using webservice with ws security but my cr doesn't support this. This create problem while I am calling cr from my java application).
    I tried Java bean connectivity .. but facing some problems - I would like to write a java bean which will retrieve data from my webservice and need to return to cr. Webservice return data as "soap xml", how can I convert this to resultset. Can I add my data directly to the xml before passing to the cr? Or can I use any other return type from my java bean.
    Could I provide a struts application url(action url) as a datasorce to the cr? If so how can I achieve this and what should be the return type.  Please advise the better datasource connection to resolve this issue?
    I want to call the report from java application and need to deploy the same in the Crystal enterprise server
    Thanks in advance
    Thomas

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with your directly

  • Trying to get my java program connected to MySQL

    This works perfectly in the Eclipse IDE area that I have but when I run the same program on the Net Beans 3.6 IDE area it gives me a 'not suitable driver' error. To note these are both on the same computer. I would really like to get the Net Beans 3.6 IDE working because that is what I am most familiar with using. If you know of the problem why one IDE area recognizes the driver where the next does not I would sure like to know. Somebody passed the idea that when the 3.6 area is executed there are multiple instances running and it resets the ClassPath(I think they where shooting in the dark but it is a lead none the less). Anyway if anybody has had this problem please enlighten me, Thank-You.
    The ClassPath is set to the following:
    ClassPath = C:\Program Files\Java\jdk1.5.0_02\lib;C:\unzipped\mysql-connector- java-3.1.7\mysql-connector-java-3.1.7;C:\Program Files
    \Java\jdk1.5.0_02\jre\lib\ext;
    This is the code:
    import java.sql.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class Connect2 {
         public static void main(String[] args) {
              try {
                   // The newInstance() call is a work around for some
                   // broken Java implementations
                   Class.forName("com.mysql.jdbc.Driver");
              } catch (Exception ex) {
                   System.out.println("HERE");
              try {
                   String url = "jdbc:mysql://localhost/test";
                   String username = "root";
                   String password = "password";
                   Connection conn = DriverManager.getConnection(
                             "jdbc:mysql://localhost/test", "root", "password");
                   Statement c = conn.createStatement();
                   c.execute("insert into green values('richmond')");
                   c.execute("select * from green");
                   ResultSet rs = c.getResultSet();
                   while (rs.next()) {
                        System.out.println(rs.getString(1));
                   // Do something with the Connection
              } catch (SQLException ex) {
                   // handle any errors
                   System.out.println("SQLException: " + ex.getMessage());
                   System.out.println("SQLState: " + ex.getSQLState());
                   System.out.println("VendorError: " + ex.getErrorCode());
    }

    There are some oddities with the DriverManager when it comes to registering drivers taken from a different ClassLoader, though I don't see how that would apply here, unless the IDE itself is loading one of the classes.
    There's a facility in DriverManager to enumerate the registered drivers. It might be worth doing that and seeing their class names.

  • Connection Problem with Interbase6. HELP PLEASE

    hi every one
    i am having a problem to connect with Interbase6. I am enclosing code & errors. it manage to get the driver but does not connect. I have found that this exception means that jdk is not consistant or their is security problem. But i have tried this code with jdk1.3 and jdk1.22 but having same error. I am not using JBuilder or any other Borland's product. If it is not possible to connect then how to use ODBC to connect to the Interbase.
    Code ***********
    public class InterbaseTest{
         public static void main (String args[]){
    String databaseURL = "jdbc:interbase://localhost/c:/Akram/databases/INTERBASETEST.gdb";
    String user = "SYSDBA";
    String password = "masterkey";
         try {
         Class.forName ("interbase.interclient.Driver");
         System.out.println("Driver class found");
         }catch (java.lang.ClassNotFoundException e) {
         System.out.println ("InterClient not found in class path");
         System.out.println (e.getMessage ());
         return;
         try {
              System.out.println("making connection");
              java.sql.Connection c = java.sql.DriverManager.getConnection (databaseURL, user, password);
              System.out.println ("Connection established.");
         }catch (java.sql.SQLException e) {
              System.out.println ("Unable to establish a connection through the driver manager.");
              System.out.println("Exception test2: "+e.getMessage());
              return;
         }catch (Exception e){
              System.out.println("Exception123: "+e.getMessage());
    ************************************* Exceptions I get follows**************************************
    making connection
    java.lang.VerifyError: (class: interbase/interclient/ErrorKey, method: <clinit> signature: ()V) Expecting to find object/array on stack
         at interbase.interclient.JDBCNet._$125439(JDBCNet.java:92)
         at interbase.interclient.JDBCNet.<init>(JDBCNet.java:74)
         at interbase.interclient.Connection._$45044(Connection.java:317)
         at interbase.interclient.Connection.<init>(Connection.java:285)
         at interbase.interclient.Driver.connect(Driver.java:204)
         at java.sql.DriverManager.getConnection(DriverManager.java:450)
         at java.sql.DriverManager.getConnection(DriverManager.java:130)
         at InterbaseTest.main(InterbaseTest.java:21)
    Exception in thread "main" Exit code: 1
    There were errors

    Interbase Connection Problem solved
    There was a bug int the InterclientClient.jar File I have downloaded file from the following site.
    http://www.kpi.com.au/interbase/index.jsp
    copy this new Interclient.jar file into the directory depends upone the individuals path.
    C:\Program Files\InterBase Corp\InterClient.

  • UDP Connection Problem caused by Trojan

    Hi, there is a connection Problem with infected Computers.
    20-25% of average User Computers are infected with hijacking
    Trojans which making connections to UDP Protocolls difficult.
    The new Shockwave Player bundles a Anti-Virus Software -
    thats fine.
    I hope the udp protcoll could continue cause its much better
    than the Flash TCP stuff.
    And for realtime games UPD is the first choice -of cause.
    I hope Adobe could modify the Flash Communication Server for
    the UDP Protocoll and could supply a framework for professional
    Network-Code in shockwave. Open source and/or interfaces for Java
    and/or Own Servers would empower the promulgation of shockwave
    cause i think everybody know that chiefs suffer from stinginess.
    The fault is not the developer

    Hi
    I am sorry to see you are having problems
    I suggest you contact the forum mods they should be able to get this problem sorted for you this is a link to them http://bt.custhelp.com/app/contact_email/c/4951
    They normally reply by email or phone directly to you within 3 working days they will take personal ownership of your problem until resolved and will keep you informed of progress
    They are a UK based BT specialist team who have a good record at getting problems solved
    This is a customer to customer self help forum the only BT presence here are the forum moderators
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

  • JDBC Connection problem in Oracle 11g

    Hello Everyone,
    Recently we have upgraded our Oracle server from 9.2 to 11g. Since then our Java program scheduled in a shell script (on the Sun Unix server) is not working
    and is giving below error
    "java.sql.SQLException: ORA-12154: TNS:could not resolve the connect identifier specified"
    What is strange is that our Web application which is on the same server (application server is iPlanets) is able to connect successfully. Also I ran the same program on
    my local machine and it is able to connect to the 11g database. It is only on unix server (where the app server resides) that is giving problem. FYI the unix server
    does not have Oracle client installed so we are using the below in db.properties file (used by application for connection details).
    URL=jdbc:oracle:thin:@59.90.26.156:1521:LDPR
    The Web application and the stand alone java program (giving problem) call the same program to db connection and also share the same environment (class folder/library files etc).
    Also the program was working perfectly fine with Oracle 9.2. Please suggest the solution as I have tried everything that came to my mind.
    Regards,
    Sid.

    Hi ...
    Yeah BPEL connect from the back end rather than using weblogic, but to change it ... we need to change the code from BPEL side to connect from the weblogic JDBC services.

  • OTNDeptEmpStub example: connection problem

    I installed JDEV902 on W2000. No database/no application server: I just want to connect to the webservice.
    I did everything (moretimes) according to the OTN Tutorial.
    When I run the Class I get this message:
    [SOAPException: faultCode=SOAP-ENV:IOException; msg=Connection refused: connect; targetException=java.net.ConnectException: Connection refused: connect]
         void org.apache.soap.SOAPException.<init>(java.lang.String, java.lang.String, java.lang.Throwable)
         void oracle.soap.transport.http.OracleSOAPHTTPConnection.send(java.net.URL, java.lang.String, java.util.Hashtable, org.apache.soap.Envelope, org.apache.soap.encoding.SOAPMappingRegistry, org.apache.soap.rpc.SOAPContext)
         org.apache.soap.rpc.Response org.apache.soap.rpc.Call.invoke(java.net.URL, java.lang.String)
         java.lang.String[] OTNDeptEmpStub.getDeptNoArray()
         void Class1.main(java.lang.String[])
    Process exited with exit code 0.
    =======================================
    Please help!!

    Sounds as if you are working with the OC4J-Stand-Alone service (vice connecting to a 9iAS instance). The JDeveloper QuickStart discusses how to set this up.
    I had similar problems. The OC4J service needs to be running. There is a batch file that starts the service; look under "\jdev\bin\start_oc4j.bat" (JDeveloper 9.0.3).
    A DOS window will stay open. Closing this window kills the OC4J service and will result in a connection problem.
    You must manually ensure the service is started before you run your web service consumer.

  • Connectivity problem

    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import java.sql.*;
    public class TestDataSource extends Action
    public ActionForward execute(
    ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response) throws Exception{
    javax.sql.DataSource dataSource;
    java.sql.Connection myConnection=null;
    try {
    dataSource = getDataSource(request);
    myConnection = dataSource.getConnection();
    Statement stmt=myConnection.createStatement();
    ResultSet rst=stmt.executeQuery("select username from test");
    System.out.println("******************************************");
    System.out.println("********Out Put from TestDataSource ******");
    while(rst.next()){
    System.out.println("User Name is: " + rst.getString("username"));
    System.out.println("******************************************");
    rst.close();
    stmt.close();
    // do what you wish with myConnection
    } catch (SQLException sqle) {
    getServlet().log("Connection.process", sqle);
    } finally {
    //enclose this in a finally block to make
    //sure the connection is closed
    try {
    myConnection.close();
    } catch (SQLException e) {
    getServlet().log("Connection.close", e);
    return mapping.findForward("success");
    this is the connectivity program of strut with MYSQL. it gives error while
    compiling the program. i set strut.jar, servlet.jar. mysqlconnector.jar file before compiling.
    it gives this type error.
    TestDataSource.java:23: cannot resolve symbol
    symbol : method getDataSource (javax.servlet.http.HttpServletRequest)
    location: class TestDataSource
    dataSource = getDataSource(request);
    ^
    1 error
    pls solve my problem

    ... And I've checked the javax.sql package and
    found out that DataSource is an interface, and
    not a class.That should not matter.. as getDataSource returns an object of type javax.sql.DataSource.
    To the OP
    As i see the java API for Action class there is a method getDataSource. But when i tried to run your code I found that the method is not present in the Action class of the struts library. I hope this is some version mismatch of the struts library. As a result your class is not extending the method from the base class.
    I found that if you use struts 2.0.8 (I hope you are using it since it is the latest) you will face this problem because in this the lib the Action class does not contain the getDataSource method. But if you use old struts (I checked with 1.2.7 available at http://archive.apache.org/dist/struts/struts-1.2.7/struts-1.2.7-lib.zip) this problem will not occure as in this libraries the Action class contains the getDataSource method. This is a peculiar problem as the newer version has removed the method from the class. This is not correct as I think.
    By the way if you use the struts 1.2.7 (available at the above url) then your problem will be solved.
    Hope it helps :)
    Message was edited by:
    diptaPB
    Message was edited by:
    diptaPB

Maybe you are looking for

  • When downloading the new software none of my apps or music went back onto my phone how do i get it back onto my phone?

    last night when i downloaded the new ios5 software for my ipone 3gs.  when it was syncing after the software was done downloading, there was a error, and my apps or music were not transfered back onto my phone.  how do i get that stuff back on my pho

  • Connecting to Digital TV receiver?

    Hi, This is a bit of a random question... My ISP (Shaw Cable - Canada) gave me free digital cable with my wireless. However, I dont have a TV and would like to watch TV through my computer. I have no idea what connectors I need to plug the receiver i

  • Reinstalling the correct OS

    If I replace my hard drive on my macbook pro mid 2011, how can I reinstall the correct OS for my mbp? I am unable to backup nor log into my mbp due to a hard drive malfunction - It will not boot. Every time I restart, I am stuck on the grey screen wi

  • I cannot click on "next page" or any other than the first page on Music Wishlist

    Music>My Wishlist I cannot click on "Page 2" or "Page ..." or "Next" Is this a problem with the current version? Anyone else having this problem? Thanks, digisound

  • SAP Easy Access CRM 2007 menu

    Dear friends, Pls let me know one thing abt CRM 2007: Can we do all transactions ( T-Code ) on SAP Easy Access CRM menu or just some on the menu and the others on web? To make u understand clearly abt my situations: I have one IDES CRM 2007 server bu