Spring-jsf: "wiring datasource"-code looks correct, yet not working...why?

The "applicationContext.xml" appears to be correctly configured to "wire" the datasource to the bean...
But, unfortunately, this simple app does not work...Error message reports "dataSource is required"...
The code/configuration I'm using reflects -- to the best of my knowledge -- the examples I've seen in books and online...
Its apparent that I am misunderstanding some fundamental concept....
Any help pointing out the critical flaw would be much appreciated!
Thanks in advance!
jw
applicationContext.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName"><value>oracle.jdbc.OracleDriver</value></property>
<property name="url"><value>jdbc:oracle:thin:@localhost:1521:ORCL</value></property>
<property name="username"><value>scott</value></property>
<property name="password"><value>tiger</value></property>
</bean>
<bean id="jsp1Bean" class="testjsf01.Jsp1Bean">
<property name="dataSource"><ref bean="dataSource"/></property>
</bean>
</beans>
Jsp1Bean class:
package testjsf01;
import org.springframework.jdbc.core.*;
import org.springframework.jdbc.core.support.JdbcDaoSupport;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.sql.DataSource;
import java.util.ArrayList;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;
public class Jsp1Bean extends JdbcDaoSupport
private JdbcTemplate template;
private DriverManagerDataSource dataSource;
public Jsp1Bean ()
public void setDataSource (DriverManagerDataSource dataSource)
this.dataSource = dataSource;
public DataModel getDataModel1() throws Exception
final ArrayList outList = new ArrayList();
template = new JdbcTemplate(dataSource);
class RowCallbackHandlerImpl implements RowCallbackHandler
public void processRow(ResultSet rs) throws SQLException
ArrayList sublist = new ArrayList();
sublist.add(rs.getString(1));
sublist.add(rs.getString(2));
sublist.add(rs.getString(3));
outList.add(sublist);
template.query("select a.empno, a.ename, a.job from scott.emp a", new RowCallbackHandlerImpl());
return new ListDataModel(outList);
web.xml:
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>/spring</taglib-uri>
<taglib-location>/WEB-INF/tlds/spring.tld</taglib-location>
</taglib>
</web-app>
faces-context.xml:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
<application>
<variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
</application>
<managed-bean>
<managed-bean-name>jsp1Bean</managed-bean-name>
<managed-bean-class>testjsf01.Jsp1Bean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
</faces-config>
Error messages:
Mar 17, 2006 1:08:10 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.el.EvaluationException: javax.faces.el.EvaluationException: Error getting property 'dataModel1' from bean of type testjsf01.Jsp1Bean: java.lang.IllegalArgumentException: dataSource is required
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
at javax.faces.component.UIData.getValue(UIData.java:527)
at javax.faces.component.UIData.getDataModel(UIData.java:856)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.el.EvaluationException: Error getting property 'dataModel1' from bean of type testjsf01.Jsp1Bean: java.lang.IllegalArgumentException: dataSource is required
at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:89)

Ok, I got this fixed. Turns out it didn't like being inside a <rich:columnGroup>. Removed that and it's working.

Similar Messages

  • Html snippet is not working on iweb 9. i can't write a code, Html snippet is not working on iweb 9. i can't write a code

    Html snippet is not working on iweb 9. i can't write a code, Html snippet is not working on iweb 9. i can't write a code

    You don't get this window when you insert an HTML snippet on the page?
    Click to view full size
    If you don't try the following:
    delete the iWeb preference files, com.apple.iWeb.plist and com.apple.iWeb.plist.lockfile, that resides in your Home() /Library/Preferences folder.
    go to your Home()/Library/Caches/com.apple.iWeb folder and delete its contents.
    Click to view full size
    launch iWeb and try again.
    OT

  • Lens Correction filter not working?

    I upgraded to CS5 specifically to use the auto lens correction feature (primarily for barrel and pincushion distortion on my Canon zoom lenses). Now I find that:
    Even though the camera back (5D Mark II) and lens information is included with an image, the lens correction filter requires me to manually select the back and lens.
    Several of my lenses are not even included in the data base, even though they're very popular lenses (e.g., EF16-35mm 2.8 L USM II and EF 70-300mm DO IS USM). I realize the data base is to be enlarged, but these seem like inexplicable omissions. (And I have no desire or time to create my own profiles.)
    The PDF instruction manual for CS5 offers no help, and I don't see this issue addressed in the forums. I'm hoping someone will be able to advise me on how to make this function work.

    Jeff,
       Thanks for the quick answer, but I still think the menu is misleading.
       If the body choices were in the format of "full frame, 1.3 crop, 1.6
    crop, etc.", it would be clear that the specific model didn't matter.
    However, this would create its own problems since many people wouldn't
    understand the concept of the crop factor for their camera.
       The fact that the 5D Mark II exists in the pull-down menu as a discrete
    choice in addition to the 1Ds Mark III implies that there is a difference
    between the two. Even if there is no functional difference in this context,
    it would avoid confusion if the actual body from the EXIF information could
    always be the default selection.
       Thanks.
    From: Jeff Schewe <[email protected]>
    Reply-To: <[email protected]>
    Date: Sun, 16 May 2010 23:57:46 -0600
    To: Mike Curl <[email protected]>
    Subject: Lens Correction filter not working?

  • I am a student and have received my redemption code but it will not work to get a serial number

    I am a student and have received my redemption code but it does not work to get a serial number

    What happens? How are you trying to redeem it?

  • (three-way color corrector) secondary color correction masks not working?

    Hi I'm using PP 2014 on Yosemite. Anyone notice (three-way color corrector) secondary color correction masks not working?

    strange. same stats here but im getting intermittent.... sometimes i can use the mask and the effect is only limited to the masked area. most of the time the masked area is ignored and the effect is applied to the whole image

  • Secondary Color Correction layer not working in .look file

    I needed to edit an image for continuity reasons so I exported a .dpx frame from that section of my premiere pro project and worked on it in speedgrade.  In the workflow I have set for myself, it is best to apply the look in after effects using the "apply color lut" function.  Unfortunately, the secondary color correction layer does not apply, but other layers such as primary will. 

    Hi ACD,
    After Effects and Photoshop CS6 take .Looks via the LUT engine. That indeed allows for using primaries with low mid high differentiation and should yield really good results.
    Secondaries can be expressed in a LUT as well, but I would typically not recommend using them when you want to integrate .Looks with your After Effects workflow. Here's why:
    - a LUT is never as precise as you'd want it to be for something as complex as secondary color grading - a LUT is always based on interpolation (as opposed to applying the effect in SpeedGrade - there it's all native, no interpolation at all)
    - For a good key you would typically use the denoise and the blur function in the secondaries. Both (by nature) don't translate at all into a LUT, so you'd have to give up using these 2 important tools
    - For a lot of work you'd want the LUT to be accompanied by a mask. That's something that also can't be described in a LUT.
    Think of the LUT support for .Looks you created in SpeedGrade more as a really helpful tool for matching your comps to an overall look you design, not necessarily as the tool to apply a final grade.
    Hope this is helpful.
    Pat

  • Redemption Code entered correctly does not generate serial number.

    I am having a difficult time obtaining a serial number for Adobe Acrobat XI Pro.  I purchased a boxed package from a local retailer.  Inside the box is a redemption code that upon entering, a serial number is supposed to be generated.  I made sure to be careful of ones and zeroes, to not mistake them for "I"s and "O"s .  Upon entering the Red/Cd I receive a message that the retailer has not activated the software purchase.  I go back to the retailer, tell them my issue and they exchange my s/w for a new box.  I get home and the same problem occurs.  My question:  has Adobe changed the process for obtaining a serial number from a boxed software purchase?  This is utterly frustrating.  I cannot understand why Adobe would have a process for obtaining a serial number for legitimately purchased software that does not work.  Any help would be appreciated.  Please forgive me if I posted this to the wrong forum.

    From Adobe support: "You cannot redeem the redemption code,it has to be redeemed by us".  They handled the code redemption, the serial number retrieval and the product registration during my chat session.  I asked the question what is the purpose of providing an enclosed redemption code and that question went unanswered.  At the end of the day, I was able to get my serial number and activate the software.  

  • Secondary colur correction mask not working! Help!

    I am currently working on Premier Pro CS6 editing a music video. I have edited my footage, fixed the tonality and I am now onto color grading it. I took the saturation down to take out the colour and applied RGB curves to add blue into the shadows and then another fast colour corrector to give the video a blue/black depressed feel.
    Going through my footage I wanted to take out certain colours that were too vibrant still. So I thought to make a mask. This is where my problem starts. I open up the three way colour corrector and the RGB curves and go down to secondary color correction and go to mask. When I try to take a sample from the dropper Premier doesn’t pick up the colour from where I want but selects it in other areas of the footage but never on the area I want! I have tried this on my mac book pro and the same is happening. When I have tried it on rushes it seems to work. I don’t understand why it doesn’t work when I have colour graded my footage?! I have tried many different discussions but nothing is pointing me forward. If anyone has any idea of why this is happening and how to solve my problem I would be so thankful!

    Hi ACD,
    After Effects and Photoshop CS6 take .Looks via the LUT engine. That indeed allows for using primaries with low mid high differentiation and should yield really good results.
    Secondaries can be expressed in a LUT as well, but I would typically not recommend using them when you want to integrate .Looks with your After Effects workflow. Here's why:
    - a LUT is never as precise as you'd want it to be for something as complex as secondary color grading - a LUT is always based on interpolation (as opposed to applying the effect in SpeedGrade - there it's all native, no interpolation at all)
    - For a good key you would typically use the denoise and the blur function in the secondaries. Both (by nature) don't translate at all into a LUT, so you'd have to give up using these 2 important tools
    - For a lot of work you'd want the LUT to be accompanied by a mask. That's something that also can't be described in a LUT.
    Think of the LUT support for .Looks you created in SpeedGrade more as a really helpful tool for matching your comps to an overall look you design, not necessarily as the tool to apply a final grade.
    Hope this is helpful.
    Pat

  • JSF : Dynamic link generated by commandLink does not work

    In the following code, without <f:verbatim>, it is giving "Duplicate ID in the view" Exception. But with <f:verbatim>, the links generated by commandLink does not work. Please help me to solve this problem.
    Thank you in advance.
    Regards
    Abdul
    <%-- jsf:pagecode language="java" location="/src/pagecode/eservice/DisplayMoreEServices.java" --%><%-- /jsf:pagecode --%>
    <%@ include file="/includes/g_common_include.jsp" %>
    <%@page import="java.util.Map"%>
    <%@page import="bh.com.cio.egov.EGOVConstants"%>
    <%@page import="javax.portlet.PortletSession"%>
    <%@page language="java"%>
    <%
         PortletSession ses = renderRequest.getPortletSession();
         Map eServiceCatMap = (Map) ses.getAttribute(EGOVConstants.REQ_ESERVICE_LIST_BY_CAT);
         renderRequest.setAttribute(EGOVConstants.REQ_ESERVICE_LIST_BY_CAT,eServiceCatMap);
    %>
    <%@page import="bh.com.cio.egov.vo.EServiceVO"%>
    <f:view>
         <script type="text/javascript">          
              function blinkThis(id, color, timeout)
                   var idElem = document.getElementById(id);
                   if(idElem)
                        idElem.getElementsByTagName('span')[0].style.color = color;
                        setTimeout('switchColor(\'' + id + '\', \'#8A7C5B\', ' + timeout + ')', timeout);
              function switchColor(id, color, timeout)
                   var idElem = document.getElementById(id);
                   if(idElem)
                        idElem.getElementsByTagName('span')[0].style.color = color;
                        setTimeout('blinkThis(\'' + id + '\', \'#FF3030\', ' + timeout + ')', timeout);
         </script>
    <f:loadBundle basename="nls.egovresource" var="nls"/>
    <hx:scriptCollector id="scriptCollector1">
         <h:form id="form2">     
    <f:verbatim>
              <div class="header-top">
                   <h:outputText value='#{nls["eservice_label_title"]}'></h:outputText>
              </div>
              <c:forEach items="${requestScope.REQ_ESERVICE_LIST_BY_CAT}" var="categoryVOs" varStatus="catIndex">
                   <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                             <td> </td>
                             <td class="gray1" height="30px">
                                       <c:out value="${categoryVOs.value.category.categoryName}" escapeXml="false"></c:out>
                             </td>                
                        </tr>
                        <tr>
                             <td width="2">
                                  <div align="right">           
                                       <img src='<%= imageRootDir + "dot.png"%>' width="4" height="1" />
                                  </div>
                             </td>
                             <td width="100%" >
                                  <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
                                       <c:forEach items="${categoryVOs.value.eservice}" var="service" varStatus="serviceIndex">
                                       <%
                                            EServiceVO serviceObj = (EServiceVO) pageContext.getAttribute("service");
                                            String action = null;
                                            int serviceId= -1;
                                            if(serviceObj!=null)
                                                 action = serviceObj.getServiceAction();
                                                 serviceId = serviceObj.getServiceId();
                                            if(action!=null && action.startsWith("$"))
                                       %>
                                       <c:set var="jstl_to_jsf_serviceName" value="${service.serviceName}" scope="request"/>
                                       <c:set var="jstl_to_jsf_url_en" value="${service.serviceAction}" scope="request"/>
                                       <c:set var="jstl_to_jsf_url_ar" value="${service.serviceActionAr}" scope="request"/>
                                       <tr>
                                            <td height="17">                         
                                                 <table width="100%" border="0" cellspacing="0" cellpadding="0">                              
                                                      <tr>
                                                           <td width="95%" id="extMoreCell_${catIndex.index}_${serviceIndex.index}">                                                                      
                                                                <img src='<%= imageRootDir +"arrow1.png"%>' width="15" height="16" border="0"/>
                                                                <h:commandLink styleClass="links menu-txt" action="#{pc_EServiceView.doExternalLinkAction}">
                                            <h:outputText value="#{jstl_to_jsf_serviceName}" styleClass="menu-txt"/>
                                                 <f:param name="PARAM_ESERVICE_URL_EN" value="#{jstl_to_jsf_url_en}"></f:param>
                                                 <f:param name="PARAM_ESERVICE_URL_AR" value="#{jstl_to_jsf_url_ar}"></f:param>
                                                 <f:param name="JSP_ACTION" value="ACT_EXTERNAL_ESERVICE"></f:param>
                                            </h:commandLink>
                                                           </td>
                                                      </tr>                                             
                                                 </table>
                                                 <script type="text/javascript">
                                                      <c:if test="${service.serviceId eq '53'}">
                                                           blinkThis('extMoreCell_7_3', '#FF3030', 1000);
                                                      </c:if>                                        
                                                      <c:if test="${service.serviceId eq '54'}">
                                                           blinkThis('extMoreCell_7_4', '#FF3030', 1000);
                                                      </c:if>     
                                                      <c:if test="${service.serviceId eq '55'}">
                                                           blinkThis('extMoreCell_7_5', '#FF3030', 1000);
                                                      </c:if>          
                                                      <c:if test="${service.serviceId eq '56'}">
                                                           blinkThis('extMoreCell_0_8', '#FF3030', 1000);
                                                      </c:if>     
                                                      <c:if test="${service.serviceId eq '57'}">
                                                           blinkThis('extMoreCell_8_8', '#FF3030', 1000);
                                                      </c:if>     
                                                      <c:if test="${service.serviceId eq '59'}">
                                                           blinkThis('extMoreCell_1_8', '#FF3030', 1000);
                                                      </c:if>     
                                                      <c:if test="${service.serviceId eq '58'}">
                                                           blinkThis('extMoreCell_5_6', '#FF3030', 1000);
                                                      </c:if>     
                                                           <c:if test="${service.serviceId eq '28'}">
                                                           blinkThis('extMoreCell_1_4', '#FF3030', 1000);
                                                      </c:if>     
                                                           <c:if test="${service.serviceId eq '20'}">
                                                           blinkThis('extMoreCell_5_3', '#FF3030', 1000);
                                                      </c:if>     
                                                           <c:if test="${service.serviceId eq '60'}">
                                                           blinkThis('extMoreCell_7_6', '#FF3030', 1000);
                                                      </c:if>     
                                                 </script>
                                            </td>
                                       </tr>
                                       <tr>
                                            <td bgcolor="#FAF9FA" background='<%= imageRootDir + "line-bg-eservices.png"%>'><img src='<%= imageRootDir +"line-bg-eservices.png"%>' width="2" height="1" border="0"/></td>
                                       </tr>     
                                       <%}
                                       else if(action!=null)
                                       %>                                                                                               
                                       <c:set var="jstl_to_jsf_serviceName" value="${service.serviceName}" scope="request"/>
                                       <wps:urlGeneration contentNode="${service.serviceAction}" allowRelativeURL="false" keepNavigationalState="true">
                                       <%
                                       //String urlC = "http://"+renderRequest.getServerName()+":"+renderRequest.getServerPort()+wpsURL;
                                       String urlC = "" + wpsURL;
                                       %>
                                       <c:set var="url" value="<%=urlC%>" scope="request"/>
                                  </wps:urlGeneration>
                                       <tr>
                                            <td height="17">                         
                                                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                      <tr>
                                                           <td id="intMoreCell_${catIndex.index}_${serviceIndex.index}">
                                                           <img src='<%= imageRootDir +"arrow1.png"%>' width="15" height="16" border="0"/>     
                                                           <hx:outputLinkEx styleClass="links menu-txt" value="#{url}">
                                                                <h:outputText value="#{jstl_to_jsf_serviceName}" styleClass="menu-txt"></h:outputText>
                                                           </hx:outputLinkEx>
                                                           </td>
                                                      </tr>                                                                                                                             
                                                 </table>
                                            </td>
                                       </tr>
                                       <tr>
                                            <td bgcolor="#FAF9FA" background='<%= imageRootDir + "line-bg-eservices.png"%>' ><img src='<%= imageRootDir +"line-bg-eservices.png"%>' width="2" height="1" border="0"/></td>
                                       </tr>     
                                       <%
                                            %>               
                                       </c:forEach>                                             
                                  </table>
                             </td>
                        </tr>
                   </table>                                                                                                                                                                     
              </c:forEach>
              </br>
              <h:messages styleClass="messages" id="messages1"></h:messages>
              </f:verbatim>     
              </h:form>
         </hx:scriptCollector>
    </f:view>

    1) Throw your code away and use h:dataTable instead of c:forEach to render a table of dynamic size.
    or:
    2) Hand-assign every UIInput and UICommand element inside the loop an unique ID. E.g. "commandLinkId" + loopIndex

  • TS3274 I did restore my ipad and now it is asking for a access code, previous one is not working

    I did reset my iPad and now I can't access to it, previous access code is not working, how shoud I do to fix the problem?
    Any help is welcome
    vx

    You will need to restore your iDevice from the same computer that you most recently synced to.
    Read this: http://support.apple.com/kb/ht1212
    If you can't do the restore then you will need to try recovery mode.
    Read this: http://support.apple.com/kb/ht1808

  • I have Mandirva Springs 64 bit OS. Adobe-Flash is not working?

    I recently installed Mandriva-springs 2010.1 64 bit os.
    Inspite of putting the flash player plugin so in /usr/lib64/mozilla/plugin folder it does not work. There is no folder for plugin in /usr/lib/mozilla/. How ever all other plugins are working from the folder /usr/lib64/mozilla/plugin
    Sivaraman

    At present Adobe does not have a 64bit plugin for Flash, there are 2 methods I know of to get around this:
    1) Using the nswrapper utility where it uses a translation layer between the 32bit & 64bit environments.
    2) You can use Gnash which is provided with Mandriva dvd/cd's. For this I would suggest to go to [http://easyurpmi.zarb.org] and use the utility to update your repository listings. I find more advantageous to deselect any of the cd references in the media listing. Gets rid of the constant requests for the dvd/cd media. Once you have clicked on the official medias link it will prompt for you to run the gurpmi utility, you say yes/ok. It will then prompt for the SU password. It may take a while if you are on a slow connection but worthwhile. Once the process for the official medias has completed you should see the Ok for complete, you can then click the plf repositories update button let that complete and let it do it's thing. Once everything has completed you can then go into your 'Install & Remove Software' and you should see a lot more options & the best part about it is that any dependencies it will mark for installation. How is that?!? On the search line type flash or gnash. See what comes up! I think you know the process now.
    Have fun!
    Regards,
    AusMounty

  • HT201209 Download code on Starbucks card not working- help?

    I enter the code on my starbucks tune card (Expiry date Nov 13, 2012) - I get the message "the code you entered is not a valid code."
    Double checked the code and how I entered it. Still doesn't work. Why?

    Write into support with the serial number of the card (generally starts with three letters, such as GCA) through this link here:
    http://www.apple.com/support/itunes/contact/

  • Blue Yeti not working on Mavericks

    Is there any help to get the blue yeti microphone working?
    Mavericks doesn't recognize the microphone.
    Help.

    Hey ther Tim,
    It sounds like after having updated to Mac OS X 10.9, you are no longer able to use your USB microphone.
    I found this article for you to help troubleshoot what may be happening, named:
    OS X Mavericks: Check your device’s USB connection
    http://support.apple.com/kb/PH14144
    If a USB device isn’t working properly, it might not be properly connected to your computer.
    If your computer has more than one USB port, switch the device’s cable to another port. If you still can’t use the device, contact the manufacturer for more information.If you can use the device after switching ports, connect another device to the first port. If you can’t use this device, shut down the computer and unplug it from the power outlet. Wait about a minute, then plug it into the power outlet and start up your computer. If you still can’t use a device with the port, your computer may need to be serviced.Find out how to service or repair your Mac
    If the device is connected to a USB hub, make sure the device and the hub are the same speed. For example, connect a USB 2.0 Hi-Speed device to a USB 2.0 Hi-Speed hub.
    If more than one device is connected to the USB port, disconnect all other devices. Connect a keyboard and mouse to another USB port. Do not use USB hubs or extension cords.If you can use your device now, there may be a problem with one of the other devices. Try reconnecting the other devices, one by one, to your computer. When you find the device causing the problem, review its documentation for further troubleshooting steps.
    Thank you for using Apple Support Communities.
    Regards,
    Sterling

  • Why is my update code running fine yet not actually updating the table?

    When I step through this, it runs fine - the call to Commit executes without dropping into the Rollback block. Yet, the grid (and the underlying table) are not updated.
    private void buttonUpdate_Click(object sender, EventArgs e)
    const int TICKETID_COLUMN = 0;
    String _ticketID = Convert.ToString(dataGridView1.CurrentRow.Cells[TICKETID_COLUMN].Value);
    UpdateRecord(
    _ticketID,
    textBoxTicketSource.Text,
    textBoxContactEmail.Text,
    textBoxAboutLLSID.Text,
    textBoxCategoryID.Text);
    private void UpdateRecord(string ATicketID, string ATicketSource, string AContactsEmail, string AAboutLLSID, string ACategoryID)
    try
    con = new OracleConnection(oradb);
    con.Open();
    String update = @"UPDATE LLS.INTERPRETERTICKETS
    SET TICKETSOURCE = :p_TICKETSOURCE,
    ABOUTLLSID = :p_ABOUTLLSID,
    CATEGORYID = :p_CATEGORYID,
    CONTACTEMAIL = :p_CONTACTEMAIL
    WHERE TICKETID = :p_TICKETID";
    cmd = new OracleCommand(update, con);
    cmd.CommandType = CommandType.Text;
    // TICKETSOURCE, ABOUTLLSID, CATEGORYID, CONTACTEMAIL, TICKETID
    OracleParameter p_TICKETSOURCE =
    new OracleParameter("p_TICKETSOURCE", OracleDbType.NVarchar2, ParameterDirection.Input);
    p_TICKETSOURCE.Size = 20;
    p_TICKETSOURCE.Value = ATicketSource;
    cmd.Parameters.Add(p_TICKETSOURCE);
    OracleParameter p_ABOUTLLSID =
    new OracleParameter("p_ABOUTLLSID", OracleDbType.Int32, ParameterDirection.Input);
    p_ABOUTLLSID.Value = AAboutLLSID;
    cmd.Parameters.Add(p_ABOUTLLSID);
    OracleParameter p_CATEGORYID =
    new OracleParameter("p_CATEGORYID", OracleDbType.Int32, ParameterDirection.Input);
    p_CATEGORYID.Value = ACategoryID;
    cmd.Parameters.Add(p_CATEGORYID);
    OracleParameter p_CONTACTEMAIL =
    new OracleParameter("p_CONTACTEMAIL", OracleDbType.NVarchar2, ParameterDirection.Input);
    p_CONTACTEMAIL.Size = 100;
    p_CONTACTEMAIL.Value = AContactsEmail;
    cmd.Parameters.Add(p_CONTACTEMAIL);
    OracleParameter p_TICKETID =
    new OracleParameter("p_TICKETID", OracleDbType.NVarchar2, ParameterDirection.Input);
    p_TICKETID.Size = 20;
    p_TICKETID.Value = ATicketID;
    cmd.Parameters.Add(p_TICKETID);
    try
    using (var transaction = con.BeginTransaction())
    cmd.Transaction = transaction;
    cmd.ExecuteNonQuery();
    transaction.Commit();
    catch (Exception ex)
    ot.Rollback();
    throw;
    MessageBox.Show("Apparent success");
    finally
    con.Close();
    con.Dispose();
    dataGridView1.Refresh();
    }

    It's hard to say with the limited information available. Nothing jumps out at me as being "wrong" in your code.
    What is the Records Affected return value from cmd.ExecuteQuery?
    I tested this and it worked fine for me:
    SQL
    ========
    SQL> create table interpretertickets (ticketsource nvarchar2(100),
      2  aboutllsid number,
      3  categoryid number,
      4  contactemail nvarchar2(100),
      5  ticketid nvarchar2(100));
    Table created.
    SQL>
    SQL> insert into interpretertickets values(null,null,null,null,1);
    1 row created.
    SQL> commit;
    Commit complete.
    /////////////// CODE //////////////////////
            private void button1_Click(object sender, EventArgs e)
                string constr = "data source=orcl;user id=scott;password=tiger";
                OracleConnection con = new OracleConnection(constr);
                con.Open();
                String update = @"UPDATE INTERPRETERTICKETS
    SET TICKETSOURCE = :p_TICKETSOURCE,
    ABOUTLLSID = :p_ABOUTLLSID,
    CATEGORYID = :p_CATEGORYID,
    CONTACTEMAIL = :p_CONTACTEMAIL
    WHERE TICKETID = :p_TICKETID";
                OracleCommand cmd = new OracleCommand(update, con);
                cmd.CommandType = CommandType.Text;
                // TICKETSOURCE, ABOUTLLSID, CATEGORYID, CONTACTEMAIL, TICKETID
                OracleParameter p_TICKETSOURCE =
                new OracleParameter("p_TICKETSOURCE", OracleDbType.NVarchar2, ParameterDirection.Input);
                p_TICKETSOURCE.Size = 20;
                p_TICKETSOURCE.Value = "newval1";
                cmd.Parameters.Add(p_TICKETSOURCE);
                OracleParameter p_ABOUTLLSID =
                new OracleParameter("p_ABOUTLLSID", OracleDbType.Int32, ParameterDirection.Input);
                p_ABOUTLLSID.Value = 123;
                cmd.Parameters.Add(p_ABOUTLLSID);
                OracleParameter p_CATEGORYID =
                new OracleParameter("p_CATEGORYID", OracleDbType.Int32, ParameterDirection.Input);
                p_CATEGORYID.Value = 456;
                cmd.Parameters.Add(p_CATEGORYID);
                OracleParameter p_CONTACTEMAIL =
                new OracleParameter("p_CONTACTEMAIL", OracleDbType.NVarchar2, ParameterDirection.Input);
                p_CONTACTEMAIL.Size = 100;
                p_CONTACTEMAIL.Value = "[email protected]";
                cmd.Parameters.Add(p_CONTACTEMAIL);
                OracleParameter p_TICKETID =
                new OracleParameter("p_TICKETID", OracleDbType.NVarchar2, ParameterDirection.Input);
                p_TICKETID.Size = 20;
                p_TICKETID.Value = 1;
                cmd.Parameters.Add(p_TICKETID);
                using (var transaction = con.BeginTransaction())
                    cmd.Transaction = transaction;
                    int recaff = cmd.ExecuteNonQuery();
                    MessageBox.Show("records affected: " + recaff);
                    transaction.Commit();
            }

  • Quick look for pdf not working correctly in mountain lion

    I'm running 10.8.2 and have this problem on several Macs. Many of my pdf files are not viewable with quick look. Only a large blank space is shown for the page when I hit the space bar once. If I hit the space bar to close the blank view and then hit the space bar again, the image of the PDF pops up as it should. Is this a known bug?
    Mark

    I'm running 10.8.2 and have this problem on several Macs. Many of my pdf files are not viewable with quick look. Only a large blank space is shown for the page when I hit the space bar once. If I hit the space bar to close the blank view and then hit the space bar again, the image of the PDF pops up as it should. Is this a known bug?
    Mark

Maybe you are looking for