SQL exception from servlet

Can anyone suggest why i get an sql expection from my servlet? Or suggest another way performing this. I just get a my table but no results becuase of an sql exception in tomcat server console. degree id is the parameter from the html page
try{
     conn = DriverManager.getConnection(url, user, password);
     String selectSQL = "SELECT * from book2readinglist WHERE readinglist = " + degreeid + ""; // change * to book_id or whatever it is
     System.err.println("DEBUG: Query: " + selectSQL);
     Statement stmt = conn.createStatement();
     ResultSet rs1 = stmt.executeQuery(selectSQL);
     //print out html head element
     out.println("<head>"+
          "<meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\">" +
          "<title>books</title>" +
          "</head>");
     // print out table header
     out.println("<table border=\"1\" cellspacing=\"0\" cellpadding=\"3\">" +
          "<tr><th><h4>Title</th></h4><th><h4>Author</th></h4><th><h4>Category</th></h4><th><h4>Cover</th></h4><th><h4>Publisher</th></h4><th><h4>Price</th></h4><th></th></tr>");
     //print out table rows one for each row returned in rs1
     while(rs1.next()){
          String selectSQL2 = "SELECT book from book2readinglist WHERE readinglist = " + degreeid + "";
          System.err.println("DEBUG: Query: " + selectSQL2);
Statement stmt2 = conn.createStatement();
ResultSet rs2 = stmt2.executeQuery(selectSQL2);
          while(rs2.next()){
          String selectSQL3 = "SELECT * from books WHERE idcol = " + rs2.getString("book") + ""; /
          System.err.println("DEBUG: Query: " + selectSQL3);
Statement stmt3 = conn.createStatement();
ResultSet rs3 = stmt3.executeQuery(selectSQL3);
     out.print("<tr>");
     out.print("<td><h5>" + rs3.getString("title") + "</td>");
     out.print("<td><h5>" + rs3.getString("author") + "</td>");
     out.print("<td><h5>" + rs3.getString("category") + "</td>");
     out.print("<td><img src=\"/assignment1/img/" + rs3.getString("cover") + "\" /></td>");
     out.print("<td><h5>" + rs3.getString("publisher") + "</td>");
     out.print("<td><h5>" + rs3.getString("price") + "</td></h5>");
Thanks
Nick

i am afraid, exception stack trace would help us a lot in identifiyin wat, where, why an exception occured...

Similar Messages

  • How to execute sql file from servlet

    Hi,
    I am using JSP, Servlets and Oracle 8i in my application. I want to execute .sql file from java code. Is it possible to do that,
    as we execute .sql file from sql plus prompt.
    Suppose I have abc.sql file and I want to execute it from java code.
    If any body have the solution then pl. reply with sample code.
    Thanks,
    Rajesh

    If any body have the solution then pl. reply with
    sample code.No, no, dec - s/he doesn't want the actual solution, but the full code!
    /k1

  • Problems witth sql query from servlet

    hi,
    I have a servlet that accesses a MySql database to get the ID of an employee based on employee name (grabbed from session). My problem is that :
    empName contains a whitespace (String empName ="abc xyz")
    When I try to give this to the query:
    String query ="select id from user where eName =" +empName;
    Now I keep getting a "SQL syntax error:please check your syntax to use near 'xyz' at line 1." here which I think is because of the white space in the empName. ( I tried dummy empName without spaces).
    How do I get around this ..I cannot keep the names in the database without any space since they are being dislpayed in other pages. I tried doing a trim() on the empName before passing it to the sql query but I keep getting the same error.
    Is there any way I could query the DB with a white space in the empName?
    Thanks,
    G.
    Is there any way to

    Second of all: Use prepared statements:
    like:
    insertStatement = "SELECT ? FROM ? WHERE name=?";                    
    stmnt = _sql_connection.prepareStatement(insertStatement);
    stmnt.setString(1, "name");
    stmnt.setString(2, "table");
    stmnt.setString(3, "test");This is more secure. If you do it the above way i could enter some thing like
    *; DROP TABLE *; --
    You dont want a user to kill your whole db, dont you?
    so your querry String query ="select  id from user where eName = '" +empName +"'"; will end up:
    select  id from user where eName = '*'; DROP TABLE *; -- 'where everything after -- is ignored because this is a comment flag.

  • Sql exception from java

    Hi,
    When running the below query from sqlyog it works OK but when running from java I got exception.
    What can cause this difference ?
    The query :
    create temporary table TempTable1 SELECT salaries.salary AS `salary`,salaries.emp_no AS `emp_no`,salaries.from_date AS `from_date`,MAX(salaries.salary) AS `func` FROM `salaries` WHERE salaries.to_date = '9999-01-01'
    The exception:
    com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'salary' cannot be null
    Thanks

    Below is the code.
    When run from sqlyog is works OK.
    Thanks
    The code :
    package client;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class test {
         * @param args
         * @throws ClassNotFoundException
         * @throws IllegalAccessException
         * @throws InstantiationException
         * @throws SQLException
         public static void main(String[] args) throws InstantiationException,
                   IllegalAccessException, ClassNotFoundException, SQLException {
              String username = "root";
              String password = "";
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              java.sql.Connection connection = DriverManager.getConnection(
                        "jdbc:mysql://localhost:3306/employees-thin", username,
                        password);
              Statement statement = connection.createStatement();
              statement
                        .execute("create temporary table TempTable1 SELECT salaries.salary AS `salary`,salaries.emp_no AS `emp_no`,salaries.from_date AS `from_date`,MAX(salaries.salary) AS `func` FROM `salaries` WHERE salaries.to_date = '9999-01-01'");
    Exception in thread "main" com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'salary' cannot be null
         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)

  • SQL Exception from simple query

    java.sql.sqlexception: [microsoft][odbc microsoft access driver] Too few parameters. Expected 1.
    I dont understand why im getting this because i think my sql statement is correct but here it is
    String query = "SELECT User FROM Users WHERE Password = pass";
    and the exception also points out this line
    ResultSet result = stat.executeQuery(query);

    I see no parameters, and in the abstract that SQL ought to work.
    However, I halfway suspect that either User, Users, Password, or pass is a reserved word and somebody is getting confused. Try renaming your columns and table...

  • Unable to connect the SQL database from servlet

    Hi!
    My servlet connects with an SQL server on some other machine.
    I have create the servlet and deploy it on tomcat.
    I first create this servlet on eclipse that I deploy it on tomcat manually.
    While using it form eclipse it gave no error in connecting with the server.
    But when I deploy the same code on tomcat manually and access the page it gave me an error saying
    [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'
    I used the following code for cenneting the server
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   out.println("Calling For Class Name success Now calling database <br>");
                   jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=MyServerName;Database=MyDatabaseName","","");
    Message was edited by:
    nitin403

    Hi!
    Sorry for not formating my previous message properly.
    My servlet connects with an SQL server on some remote machine.
    I have create the servlet and deploy it on tomcat.
    I first create this servlet on eclipse that I deploy it on tomcat manually.
    While using it form eclipse it gave no error in connecting with the server.
    But when I deploy the same code on tomcat manually and access the page it gave me an error saying
    [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'
    I used the following code for connecting the server
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=MyServerName;Database=MyDatabaseName","","");
    Thanx for your help in advance
    Message was edited by:
    nitin403

  • Server caught unhandled exception from servlet [jsp]

    pls click on url
    http://210.239.141.154/evweb/taikaikakunin.jsp
    email : [email protected]
    password : 1111
    click the button of continue below to textboxes in yellow color.
    error comes http://210.239.141.154/evweb/taikaikakunin.jsp.
    is anybody can tell me why this is coming.
    it is very very urgent as i have to submit this very soon to the client.
    thanks.

    thanks for reply.
    rebooted applications server but still same error is coming pls help

  • Unknown SQL Exception 208 occurred. Additional error information from SQL Server is included below.Invalid object name 'Webs'.

    SP 2013 Server + Dec 2013 CU. Upgrading from SharePoint 2010.
    We have a web application that is distributed over 7-8 content databases from SharePoint 2010. All but one database are upgradable. However, one database gives:
    Invalid object name 'Webs'.
    while running Test-SPContentDatabase or Mount-SPContentDatabase.
    EventViewer has the following reporting 5586 event Id:
    Unknown SQL Exception 208 occurred. Additional error information from SQL Server is included below.Invalid object name 'Webs'.
    After searching a bit, these links do not help:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/fd020a41-51e6-4a89-9d16-38bff9201241/invalid-object-name-webs?forum=sharepointadmin
    we are trying PowerShell only.
    http://blog.thefullcircle.com/2013/06/mount-spcontentdatabase-and-test-spcontentdatabase-fail-with-either-invalid-object-name-sites-or-webs/
    In our case, these are content databases. This is validated from Central Admin.
    http://sharepointjotter.blogspot.com/2012/08/sharepoint-2010-exception-invalid.html
    Our's is SharePoint 2013
    http://zimmergren.net/technical/findbestcontentdatabaseforsitecreation-problem-after-upgrading-to-sharepoint-2013-solution
    Does not seem like the same exact problem.
    Any additional input?
    Thanks, Soumya | MCITP, SharePoint 2010

    Hi,
    “All but one database are upgradable. However, one database gives:
    Invalid object name 'Webs'.”
    Did the sentence you mean only one database not upgrade to SharePoint 2013 and given the error?
    One or more of the following might be the cause:
    Insufficient SQL Server database permissions
    SQL Server database is full
    Incorrect MDAC version
    SQL Server database not found
    Incorrect version of SQL Server
    SQL Server collation is not supported
    Database is read-only
    To resolve the issue, you can refer to the following article which contains the causes and resolutions.
    http://technet.microsoft.com/en-us/library/ee513056(v=office.14).aspx
    Thanks,
    Jason
    Forum Support
    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 Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Exception during receive an array bytes from servlet

    Hi! I have some problem with receive my array bytes. When I want to recive my array bytes at application site from servlet, I have an exception java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source) near ObjectInputStream. I don't know what it's make. All looks good. Strings send I recive without any problems. Problem is with array bytes.
    URL url = new URL("http://127.0.0.1/App/servlet/Serwlet");
             URLConnection connect = url.openConnection();
            connect.setUseCaches(false);
             connect.setDefaultUseCaches(false);
             connect.setDoOutput(true);
         connect.setDoInput(true);    
    connect.setRequestProperty("Content-Type","application/x-java-serialized-object");
    ObjectOutputStream out = new sdfgObjectOutputStream(connect.getOutputStream());
              out.writeObject(arrayBytes);
              out.flush();
              out.close();
    //Here during debug is an exception
    ObjectInputStream in = new ObjectInputStream(connect.getInputStream());
              byte[] tmp = (byte[])in.readObject();
              in.close();
    System.out.println("Send array: "+arrayBytes);    
    System.out.println("Receive array: "+tmp);
    Servlet site :
    ObjectInputStream in = new ObjectInputStream(request.getInputStream());
                   byte[] tmp = (byte[])in.readObject();
                   in.close();
    response.setContentType("application/octet-stream");
                   ObjectOutputStream out = new ObjectOutputStream(response.getOutputStream());
                   out.writeObject(tmp);
                   out.flush();
                   out.close();Any ideas? :]

    All this exception looks that :
    java.io.EOFException
         at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
         at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
         at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
         at java.io.ObjectInputStream.<init>(Unknown Source)
         at Klient.OdbiorcaButton.polaczenie(OdbiorcaButton.java:151)
         at Klient.OdbiorcaButton.actionPerformed(OdbiorcaButton.java:124)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)

  • Very Urgent !!! Exception in looking up Local EJB from Servlet in WSAD 5.1

    Hi,
    I have a servlet and a local EJB. The servlet and EJB are deployed on same application server but in different J2EE applications i.e. different EAR files.
    When I lookup an EJB with remote interfaces from servlet everything works fine. But when I try to lookup EJB with local interfaces from
    Servlet I get following Exception.
    Exception Stack: -
    ========================================================
    avax.naming.NameNotFoundException: Context: localhost/nodes/localhost/servers/server1, name: TestLocalHome: First component in name TestLocalHome not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_resolve_complete_info(WsnOptimizedNamingImpl.java:968)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:1399)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(Unknown Source)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:3491)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1519)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1480)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1187)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1067)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at javax.naming.InitialContext.lookup(InitialContext.java:360)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at org.apache.jsp._DomainClient._jspService(_DomainClient.java:95)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:669)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:767)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
    [12/8/05 14:14:05:047 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
    [12/8/05 14:14:05:062 IST] 7debf35b SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
    ========================================================
    Please help asap.
    Regds
    VJ.

    The ejb spec only defines local ejb access within the same application. It's possible some app servers support access from a different application but it wouldn't be portable, nor would it work within the J2EE SDK or Sun Java System App Servers. To access a local ejb from a web component or ejb , define an ejb-local-ref in the client component's standard .xml file (web.xml or ejb-jar.xml) and use the ejb-link element to specify the ejb-name of the target ejb.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Unknown SQL Exception 0 occurred. Additional error information from SQL Server is included below.

    Log Name:      Application
    Source:        Microsoft-SharePoint Products-SharePoint Foundation
    Event ID:      5586
    Task Category: Database
    Level:         Error
    Keywords:     
    User:          DOMAIN\SA account
    Unknown SQL Exception 0 occurred. Additional error information from SQL Server is included below.
    The target principal name is incorrect.  Cannot generate SSPI context.
    This is the error, if often find in my WFE's. I googled for the error and granted DB owner roles for the service account as specified in TechNet, but no luck.
     Even same error logs generated on SharePoint logs.
    SqlError: 'The target principal name is incorrect.  Cannot generate SSPI context.'   
    Source: '.Net SqlClient Data Provider' Number: 0 State: 0 Class: 11 Procedure: 'GenClientContext' LineNumber: 0 Server: 'servername\SHAREPOINT,4101'       
    f2cbcc9c-ac65-7084-fcab-4d2943cdfdea
    Unknown SQL Exception 0 occurred. Additional error information from SQL Server is included below. 
    The target principal name is incorrect.  Cannot generate SSPI context.         
    f2cbcc9c-ac65-7084-fcab-4d2943cdfdea
    System.Data.SqlClient.SqlException (0x80131904): The target principal name is incorrect. 
    Cannot generate SSPI context.     at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions
    userOptions, DbConnectionInternal& connection)    
    at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)    
    at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)    
    at System.Data.ProviderBase.DbConnecti...            
    f2cbcc9c-ac65-7084-fcab-4d2943cdfdea
    Thanks.
    Badri

    For SharePoint to recognize the SQL server name we provide its name and instance while installing SharePoint. When we are using SQL alias to connect to SQL, we need to configure the same alias on SharePoint server so that SharePoint recognize alias over
    the network. 
    Having SharePoint connect to a SQL Alias instead of the NetBIOS name is always a good idea. The main benefit is, if you ever have to switch the SQL Server or connect to a SQL Cluster VIP address, you just change the Alias to point to the SQL Cluster name
    on the SharePoint Server and restart the SharePoint Timer Service and you are good to go.
    Please check this blog.
    http://blogs.msdn.com/b/priyo/archive/2013/09/13/sql-alias-for-sharepoint.aspx
    http://technet.microsoft.com/en-us/library/hh292622(v=office.15).aspx
    Thank You, Pallav S. Srivastav ----- If this helped you resolve your issue, please mark it Answered.

  • Installing SQL 2012 SP2 - The specified module could not be found. (Exception from HRESULT: 0x8007007E)

    Hi,
    I am trying to install the SQL 2012 SP2 in one of the servers. I am getting the error as :
    TITLE: SQL Server Setup failure.
    SQL Server Setup has encountered the following error:
    The specified module could not be found. (Exception from HRESULT: 0x8007007E)
    Error code 0x84B10001.
    The same setup is working in other servers, but on a particular server I am getting this error.
    Server configuration: Windows server 2008 r2 standard edition, servvice pack 1 , 64 bit OS
    How to fix this?
    Thanks

    Hi Venkatzeus,
    Based on my research, the issue is caused by that some .dll files are corrupt or missing during the installing of SQL Server 2012 SP2.
    In order to troubleshoot this issue, please view the detail error message in SQL Server Setup Log Files. We can read the Summary text under %programfiles%\Microsoft SQL Server\110\Setup Bootstrap\Log\, and the Detail text in the place %programfiles%\Microsoft
    SQL Server\110\Setup Bootstrap\Log\<YYYYMMDD_HHMM>\Detail.txt. For more details, please see:
    View and Read SQL Server Setup Log Files
    Besides, here are some similar issues for your references:
    https://social.technet.microsoft.com/Forums/en-US/29e3cef1-4699-4710-9aa5-d56cf4a279c5/the-specified-module-could-not-be-found-exception-from-hresult-0x8007007e-systemwindowsforms?forum=sqlanalysisservices
    https://social.technet.microsoft.com/Forums/en-US/b2faae67-19af-4f50-88c6-5a427556df3e/error-encountered-when-creating-new-integration-services-project-0x8007007e?forum=sqlintegrationservices
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • SQL Exception: Invalid column index while calling stored proc from CO.java

    Hello all,
    I am getting a "SQL Exception: Invalid column index" error while calling stored proc from CO.java
    # I am trying to call this proc from controller instead of AM
    # PL/SQL Proc has 4 IN params and 1 Out param.
    Code I am using is pasted below
    ==============================================
              OAApplicationModule am = (OAApplicationModule)oapagecontext.getApplicationModule(oawebbean);
    OADBTransaction txn = (OADBTransaction)am.getOADBTransaction();
    OracleCallableStatement cs = null;
    cs = (OracleCallableStatement)txn.createCallableStatement("begin MY_PACKAGE.SEND_EMAIL_ON_PASSWORD_CHANGE(:1, :2, :3, :4, :5); end;", 1);
         try
    cs.registerOutParameter(5, Types.VARCHAR, 0, 2000);
                        cs.setString(1, "[email protected]");
                             cs.setString(2, s10);
    //Debug
    System.out.println(s10);
                             cs.setString (3, "p_subject " );
                             cs.setString (4, "clob_html_message - WPTEST" );
                   outParamValue = cs.getString(1);
    cs.executeQuery();
    txn.commit();
    catch(SQLException ex)
    throw new OAException("SQL Exception: "+ex.getMessage());
    =========================================
    Can you help please.
    Thanks,
    Vinod

    You may refer below URL
    http://oracleanil.blogspot.com/2009/04/itemqueryvoxml.html
    Thanks
    AJ

  • SQL Exception while connecting MS SQL DB from Weblogic - URGENT

    We are getting lot of errors like this in our server logs.
    Let us know how to resolve these errors.
    <Dec 11, 2013 3:05:01 AM EST> <Error> <Lease> <BEA-403302> <An unexpected SQL exception occured java.sql.SQLException: [BEA][SQLServer JDBC Driver][SQLServer]Violation of PRIMARY KEY constraint 'PK_LEASE'. Cannot insert duplicate key in object 'dbo.P13N_LEASE'. The duplicate key value is (JobManagerImpl)..
    java.sql.SQLException: [BEA][SQLServer JDBC Driver][SQLServer]Violation of PRIMARY KEY constraint 'PK_LEASE'. Cannot insert duplicate key in object 'dbo.P13N_LEASE'. The duplicate key value is (JobManagerImpl).

    Hello,
    WLP Version ?
    Emmanuel

  • Getting error while calling ejb business methods from servlet

    Hi
    Iam getting error when i try to call a ejb method from servlet.Error is
    "com.netscape.server.eb.UncheckedException: unchecked exception nested exception is:java.lang.NullPointerException".
    I build the application and deployed it successfully.Iam using IAS 6.O with windows NT 4.0.
    This is just a method which takes values from database and return as an array of bean to servlet.
    Any help on this.Thanks Shank

    Hi
    I was using the session bean.Your suggestion helped me a lot.Perfect.
    I debug my program and found that from ejbCreate()exception is getting.
    I was getting the datasource object thro ejb create() initialisation.
    Somehow the look up jndi which i mentioned was not interpretting from ejb-jar.xml ias-ejb-jar.xml and datasource ref .Due to this iam getting jndi Namenotfound exception which in turns to null pointer as datasource is getting null.
    when i hardcoded in the ejb the the jndi name for datasource it is working fine.Bit worried all the existing ejbs working with the xml referenced datasource and jndi,but when i added a new ejb with same properties it is failing to get the jndi name.
    Piece of code from ias-ejb-jar.xml
    <resource-ref>
              <res-ref-name>myDataSource</res-ref-name>
              <jndi-name>jdbc/nb/myData</jndi-name>
    </resource-ref>
    Piece of code from ejb-jar.xml
    <resource-ref>
              <res-ref-name>myDataSource</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
    </resource-ref>
    Thanks a lot meka

Maybe you are looking for

  • Can I share iTunes purchases on same computer, different apple ID?

    If I purchase an album from iTunes, can I share it with my daughter, who lives at home and uses the same computer, but has a different apple ID and separate user account in Windows 7?  Our computer would presumably be authorized already by each of us

  • Creating bad DVDs

    My daughter got new MacBook for graduation and loves it very much. Everything works fine except that if copying or creating video DVDs they come out bad. Sound is there but picture is vertical colored lines or some kind of heavy pixelation that is un

  • How to check the ALE settings in SAP

    Hello everybody, I have a question about ALE setups. Through ALE,a lot of data flows from one SAP system to another.Hence all these various SAP systems are maintained as logical systems and the appropriate RFC destinations are in place. 1.Now,if I wi

  • QSM Architectu​re

    Hi Guys, Please, I would like to know about LabVIEW Queued State Machine - Producer/Consumer Architecture. This is like event structure in the producer loop and state machine in the consumer loop. Any representation vi may helps. Sasi. Certified LabV

  • How to group this query

    hi all, how do i group this statement correctly... i'm getting an error when running the following. SELECT empno, dept, DECODE(position, 'HR', DECODE(job_id, (SELECT job_id FROM jobs WHERE job_name = 'Intern' ),'Interns', position), position) dept FR