Help in JSP : Only a type can be imported x.y resolves to a package

I have a strange problem,
I have two domains
http://client.spry-forms.com (login using demo/demo)
http://spry-forms.com/ClientAdmin (login using demo/demo)
The server is setup with only tomcat 6.0.18.0
Both the above domains are mapped to tomcat/webapps/ClientAdmin.
When some one logs in from the second url, the link CREATE NEW FORM at page http://www.spry-forms.com/ClientAdmin/forms.jsp works fine but
when some one logs in from the first url (client.spry-forms.com) the link 'CREATE NEW FORM' at page http://client.spry-forms.com/forms.jsp produces this error
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 7 in the generated java file
Only a type can be imported. view.DemoConnection resolves to a package
An error occurred at line: 12 in the jsp file: /formeditor.jsp
DemoConnection cannot be resolved to a type
9: response.sendRedirect("../Authenticate.do?status=logoff");
10: return;
11: }
12: DemoConnection con = (DemoConnection) request.getSession().getAttribute("dbconnection");
13: String formid = request.getParameter("formid");
14: String grpid[] = (String[]) request.getAttribute("groupArray");
15: //String groupArry [] = (String[])request.getAttribute("groupArr");
Can anyone give me a hint as to what is happening??

evnafets wrote:
http://spry-forms.com/ClientAdminThe "/ClientAdmin" bit is not part of a domain. Are you sure it is what you think it is?
So do you import this class DemoConnection?
What is the layout of your web application?
How do you do the multiple domain config -> web application?Thank you for your reply and
Sorry for my late response
Ok the /ClientAdmin is not a domain, but it is a directory in the spry-forms.com
I import the DemoConnection.java like this
<%@ page import="java.sql.*,view.DemoConnection,java.util.*"%>I did not do the domain config, as I am not the administrator, The admin wants me to resolve this.
I think the problem is caused because tomcat cannot find the DemoConnection.class.
By layout I think you are asking about the direcotry tree structure
It is like this
Tomcat
    webapps
        ClientAdmin
            jsp files
            WEB_INF
                web.xml
                lib
                classes
                    poolman.xml
                    folders
                    view
                        DemoConnection.class
                        some more classesDo you think the problem is with the domain configuration....?
Edited by: Sonu611 on Feb 26, 2009 9:53 PM

Similar Messages

  • Only a type can be imported. package.Class resolves to a package

    Hi,
    I made a class for database connection named ConnectionClass.class.
    The JSPs in public_html directory working fine with import and session variables.
    but JSPs under public_html/subdirectory are unable to import this Class and also unable to access session variables.
    I have deploy this class under public_html/WEB-INF/classes/ directory.
    and also in a jar file vidyabharti.jar under public_html/WEB-INF/lib directory
    I am importing it in JSPs like
    <%@ page import="vidyabharti.ConnectionClass, java.sql.*" %>
    but i am getting following error
    An error occurred at line: 6 in the generated java file
    Only a type can be imported. vidyabharti.ConnectionClass resolves to a package
    An error occurred at line: 110 in the jsp file: /welcome.jsp
    ConnectionClass cannot be resolved to a type
    109: <%
    110: ConnectionClass cs=null;
    An error occurred at line: 115 in the jsp file: /welcome.jsp
    ConnectionClass cannot be resolved to a type
    cs=new ConnectionClass();
    i am using Tomcat 5.5.28.
    please help me.

    Hello,
    It's a possible issue whith the JDT compiler version of your tomcat distribution.
    You know that jasper is the engine that transform jsp to classes and to achive this goal uses a jdt compiler or the ant task javac compiler.
    First check that the JDT compiler class is present in the trace of the exception you have.
    If this is the case follow the steps of the tomcat documentation in order to use the ant compiler.
    http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html
    Apache Ant, which was used in previous Tomcat releases, can be used instead instead of the new compiler by simply removing the common/lib/jasper-compiler-jdt.jar file, and placing the ant.jar file from the latest Ant distribution in the common/lib folder. If you do this, you also need to use the "javac" argument to catalina.sh.
    If you check the code of the tomcat compilation context seems that you can do the same, without removing any file, by setting the compile parameter of the JspServlet to an arbitrary value diferent from null.
    Try this other alternative by editing the file %TOMCAT_HOME%\conf\web.xml
    and set the compiler attribute as follow
        <servlet>
            <servlet-name>jsp</servlet-name>
            <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
            <init-param>
                <param-name>fork</param-name>
                <param-value>false</param-value>
            </init-param>
            <init-param>
                <param-name>xpoweredBy</param-name>
                <param-value>false</param-value>
            </init-param>
            <init-param>
                <param-name>compiler</param-name>
                <param-value>Ant</param-value>
            </init-param>
            <load-on-startup>3</load-on-startup>
        </servlet>If this works for your problem we can check the jdt code and perhaps make a patch.
    Best reggards,

  • Getting error message "Only a type can be imported-" when trying to execute jsp page

    I get the error: "Only a type can be imported. com.adobe.cq.TestServiceImpl resolves to a package in adobe day cq5
    I have created one bundle and installed in felix console. The status of the bundle is also Active. And also it is available in both service and component console.
    Here is my TestServiceImpl class in com.adobe.cq bundle
    package com.adobe.cq;
    import org.apache.felix.scr.annotations.Component;
    import org.apache.felix.scr.annotations.Service;
    import org.osgi.framework.BundleContext;
    import org.osgi.service.component.ComponentContext;
    import javax.jcr.RepositoryException;
    import org.apache.felix.scr.annotations.Property;
    import org.apache.felix.scr.annotations.Properties;
    //src.component
    //declares the class component. This will provide a wrapped ManagedService component in the OSGI container.
    //src.service interface="SampleService"
    //declares the service we are offering. Actually, the interface attribute is superflous, as by default, all implemented Interfaces are used.
    @scr.component
    @scr.service interface="testService"
    @Component(immediate = true, metatype = true)
    @Service
    @Properties( {
    @Property(name = "service.description", value = "abcd"),
    @Property(name = "label", value = "myLabel") })
    public class TestServiceImpl implements TestService {
    public String sayHello() {
         return "Hello World!";
    Here is my jsp code
    <%@include file="/libs/foundation/global.jsp"%><%
    %><%@include file="/apps/mine/includes/functions.jsp"%><%
    %><%@ page import="com.adobe.cq.TestServiceImpl,
    org.apache.sling.api.SlingHttpServletRequest,
                    java.util.List"%><%
    %><%
    SlingHttpServletRequest r = (SlingHttpServletRequest)request;   
                    TestServiceImpl testService = sling.getService(TestServiceImpl.class);
                    out.println("testService:::"+testService);
    %>
    <div id="te-nav" style="display:block !important;">
    </div>
    Is it because of am using annotation in TestServiceImpl class?
    Could you please tell me how to fix it?
    Regards,
    Anderson

    Hi Pawan,
    Thanks for your information. It was problem with my pom.xml It started to work after changing my POM.xml
    I am not able to get sling service for TestServiceImpl. But I am only able to create TestService which is my interface. I need to get reference for TestServiceImpl class not for TestService interface. Please help me to make it.
    i have created TestServiceImpl and TestService class for testing whether my bubdle is crating all the folder structure or not.
    But my requirement is like assume class A has some methods like getMenuLink, setMenuLink.. And In class B i am calling some methods in class A and doing some manipulation in createLink method.
    Here class B does not have any interface. Not implementing  any interface. But I need to get class B refererence via sling.getService.
    I know that if we are using maven SCR plugin..we need to have @component, @service. And All java classes are not services. Will it work if I add activate, deactivate method in class B?
    Could you please tell me how to proceed next?
    Thanks,
    Anderson

  • Only a type can be imported. x.y.z.Utility resolves to a package.. HELP!!!

    anyone help me.. pls..
    the class exists properly in the package folder.
    No error found as I compiled it.
    Tomcat5.5 + JDK-1.5.0_06 + JBoss-4.0.2...with a Struts framework.
    the error is really special for me. I tried all opinions to sort it out.
    I changed import file to the other at 1 line. the same error occurred, though.
    ex) <@ page import="x.y.z.Test" %> or <@ page import="x.y.z.AnyClass" %> --> ERROR: Only a type ~~~
    if delete that line, 404 error is showed. stuck~~~~~
    other jsp pages are good. Only the type's page below causes the error. weird~
    what's problem? Had anyone had a same problem?
    aa.jsp---------------------------------------------------------
    <@ page import="x.y.z.Utility" %>
    <jsp:forward page="/servlet/MypageManager">
    <jsp:param name="ACT" value="main">
    </jsp:forward>
    2009. 5. 6 ¿ÀÈÄ 2:03:59 org.apache.catalina.core.StandardWrapperValve invoke
    ½É°¢: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Only a type can be imported. x.y.z.Utility resolves to a package
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:833)
         at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
         at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
         at java.lang.Thread.run(Thread.java:595)

    aaa.jsp
    <%@ page contentType="text/html; charset=euc-kr" import = "kr.co.gen128.common.Utility" %>
    <jsp:forward page="/servlet/MypageManager">
        <jsp:param name="ACT_TP" value="MYPAGE_MAIN" />
        <jsp:param name="TOP_MENU" value="MYPAGE" />
        <jsp:param name="CENTER_TITLE" value="MYPAGE_MAIN" />
    </jsp:forward>aaa_jsp.java
    package org.apache.jsp.mypage;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.jsp.*;
    import kr.co.gen128.common.Utility;         
    public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase
        implements org.apache.jasper.runtime.JspSourceDependent {
      private static java.util.List _jspx_dependants;
      public Object getDependants() {
        return _jspx_dependants;
      public void _jspService(HttpServletRequest request, HttpServletResponse response)
            throws java.io.IOException, ServletException {
        JspFactory _jspxFactory = null;
        PageContext pageContext = null;
        HttpSession session = null;
        ServletContext application = null;
        ServletConfig config = null;
        JspWriter out = null;
        Object page = this;
        JspWriter _jspx_out = null;
        PageContext _jspx_page_context = null;
        try {
          _jspxFactory = JspFactory.getDefaultFactory();
          response.setContentType("text/html; charset=euc-kr");
          pageContext = _jspxFactory.getPageContext(this, request, response,
                         null, true, 8192, true);
          _jspx_page_context = pageContext;
          application = pageContext.getServletContext();
          config = pageContext.getServletConfig();
          session = pageContext.getSession();
          out = pageContext.getOut();
          _jspx_out = out;
          out.write('\r');
          out.write('\r');
          out.write('\n');
          if (true) {
            _jspx_page_context.forward("/servlet/MypageManager" + (("/servlet/MypageManager").indexOf('?')>0? '&': '?') + org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("ACT_TP", request.getCharacterEncoding())+ "=" + org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("MYPAGE_MAIN", request.getCharacterEncoding()) + "&" + org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("TOP_MENU", request.getCharacterEncoding())+ "=" + org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("MYPAGE", request.getCharacterEncoding()) + "&" + org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("CENTER_TITLE", request.getCharacterEncoding())+ "=" + org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("MYPAGE_MAIN", request.getCharacterEncoding()));
            return;
        } catch (Throwable t) {
          if (!(t instanceof SkipPageException)){
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
              out.clearBuffer();
            if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        } finally {
          if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }Two types of error occurred randomly.
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Only a type can be imported. kr.co.gen128.common.Utility resolves to a package
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Only a type can be imported. kr.co.gen128.common.Utility resolves to a package
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to load class for JSP
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.apache.jasper.JasperException: Unable to load class for JSP
         org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:598)
         org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.ClassNotFoundException: org.apache.jsp.mypage.index_jsp
         java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         java.security.AccessController.doPrivileged(Native Method)
         java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133)
         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
         org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596)
         org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.Thanks a lot.
    Any other you need to see?

  • Only a type can be imported. MyClass.anyclass resolves to a package error

    I know there's been many posts with this problem, however, I haven't been able to fix mine.
    I have an app that uses JSP's, java libraries with Tomcat and MySQL. The app works fine, however, since I migrate to a new server, I start getting this error.
    The funny thing here is that JSP's that are located in the root directory (public_html) works fine, while all the other JSP's throw this exception:
    "Only a type can be imported. MyClass.anyclass resolves to a package error"
    If I move any JSP from "public_html/any_directory" to "public_html", then that very same JSP works fine.
    The java libraries are located in a jar file, in WEB-INF/lib, and it's classpath is perfectly written.
    Altough, I know there's nothing wrong with the code of the JSP's, here it is, in case that helps. I'm sure that this error is caused by some Tomcat's configuration, however, I haven't been able to find it.
    <%@ page import="Solutio.AdminRH.Entity.ICatalogosAdminDB" %>
    <%!
         private ICatalogosAdminDB theObj = null;
         public void jspInit() {
              try {
                   theObj = new ICatalogosAdminDB();
              } catch (Exception ex) {
                   System.out.println(ex);
         public void jspDestroy() {
              theObj = null;
    %>
    <html>
    Any help will be really appreciated.
    Thank you.

    I haven't solved this problem yet. Here's some extra information about the same problem:
    1 - As you know, Tomcat compiles JSP's the first time they're executed, so I checked the java code generated for:
    /public_html/my_JSP.jsp
    and
    /public_html/any_folder/my_JSP.jsp
    both codes are exactly the same, however, as I mentioned before, only the one located in /public_html/ works.
    It seems to be a problem with Tomcat's classpath, but I haven't been able to fix it yet.
    2 - In the Tomcat's conf file "server.xml", I found this, and it looks just fine, in the older server, I had exactly the same conf and it used to work.
    <Host name="axtl.com" appBase="/home/axtlccom/public_html">
    <Alias>www.axtl.com</Alias>
    <Context path="" reloadable="true" docBase="/home/axtlccom/public_html" debug="1"/>
    <Context path="/manager" debug="0" privileged="true"
    docBase="/usr/local/jakarta/tomcat/server/webapps/manager">
    </Context>
    </Host>
    have anyone experieced something like this, PLEASE HELP !!!

  • Is 4/4 time the only time signiture available and what audio file type can will import using the media browser?

    Is 4/4 time the only time signiture available and what audio file type can will import using the media browser?

    latela33 wrote:
    Is 4/4 time the only time signiture available
    so far, yes, if you want more, be sure to let Apple know:
    http://www.bulletsandbones.com/GB/GBFAQ.html#sendfeedback
    (Let the page FULLY load. The link to your answer is at the top of your screen)
    latela33 wrote:
    what audio file type can will import using the media browser?
    44.1k/16-bit AIFF, WAV, or Caf files

  • What video types can be imported and played on my iPhone?

    I was able to import videos to i Tunes however I was unable to sync them. I received an error message stating that the video will not sync because it cannot be played on my iPhone. Most of the videos I tried to sync are Quicktime videos so I am wondering if there is a certain type or types that can only be played on iPhone

    i convert my videos into the mp4 format and have no problems uploading them to the phone.

  • Help Need-All of a sudden can't import/open .OMF file without Logic quit

    Hi all. Been a looong time since I posted but I'm back with a serious dilemma. I'm working on a short film with a deadline that's coming at me fast and furious. I just picked up an updated version of the .omf file and all of a sudden it won't load without logic quitting on me. What's going on? My Logic beahavior has seemed a little off but not noticibly disfunctional lately. do I need to toss my prefs? How do I do this if so? I'm always worried I'll delete something I can't recover...
    I think that's about it. Let me know if I need to clarify the situation. This all worked fine a couple weeks ago. I'm using the powerbook 15" template video for NTSC. I'm clueless now and really need help. THANKS!

    Nobody has any idea why this might be happening? Can anybody at least cue me in on how I should go about dumping my LP7 prefs and then replacing them or updating them again?
    thanks!

  • What Clip File Types can be imported??

    I have some clips I imported on a windows machine (AVI, MPEG2, etc.) Which ones are documented as supported on iMovie??

    read Jon's reply in this thread ..
    https://discussions.apple.com/thread/1891778?start=0&tstart=0
    keep in mind: avi nor mov are 'formats', just media wrappers = box of chocolate, you'lll never know ...
    stay within normal video standards, such as 1080i or 720p, 25/29.97fps ... mov encoded with h264 should be fine.
    and avoid fancy stuff such as surround, Dolby 5.1., 3D ........

  • Can you import video from a DVD?  If so how

    Can you import video from a DVD? I have some home DVD's made on my PC. My PC program (Roxio) allowed me to pull clips off of a DVD, but I can not seem to figure out how to do it with iMovie on my Mac.
    Any help would be greatly appreciated!!!

    Hi, I'll see if I can help. The only way I know of importing directly from iMovie off of a DVD is with a converter box hooked up to an external DVD player. However there are a few freeware programs you could try. One is Handbrake, with it you can convert your DVD into a MPEG-4 file, this is incredibly easy however the quality will be a little lower than that of a DVD. Another program is MactheRipper which will rip the entire DVD onto your hard drive but you will have to hunt through all the files to find the ones you want. I hope this helps.

  • I forgot my Apple ID security question answers and cannot contact iTunes support by phone. The only way I can ask for help is via email. How can I make that happen?             Thanks

    Hi! So I haven't used iTunes in a few months but I just got an iTunes gift card and want to make a purchase. iTunes redeemed it just fine but now that I want to make a purchase I am having problems. I can't remember my security question answers and iTunes is requesting them. I have two other verified emails but the are NOT rescue emails. I can't contact iTunes over the phone because my phone lines are out and are going to be out for a long time. The only way I can contact them is by email. How can I do this? Is there an easy way to just reset all my security questions? Please help a girl out. I just want my music!
    Thanks so much

    Alternatives to Reset Security Questions and Rescue Mail
         1. Apple ID- All about Apple ID security questions.
         2. Rescue email address and how to reset Apple ID security questions
         3. Start here to find your country, and how you can contact Apple:
             Apple ID- Contacting Apple for help with Apple ID account security.
         4. Fill out and submit this form. Select the topic, Account Security.
         5.  Call Apple Support in your country and ask to speak to Account Security.
              Customer Service: Contacting Apple for support.
    How to Manage your Apple ID: Manage My Apple ID

  • TS1297 My numbers / symbols 1-9 / !-(  do not work on my wireless key pad.  I have tried the resolution information but, still no response with those keys only.  I can only type these keys with the keyboard viewer.  Any suggestions?

    My numbers & symbols 1-9 / !-(  do not work on my wireless key pad.  I have tried the resolution information but, still no response with those keys only.  I can type these keys with the keyboard viewer, thankfully.  Any suggestions?

    Unable to type while Mouse Keys is enabled in OS X

  • Help on locking MySQL tables (many can read, but only one can write) Java

    Hi there,
    I have a question regarding locking of tables so that only one person can write to the file, but many are able to read the files (or tables entities).
    I am not sure if I need to lock the tables in my Java code or do I lock the tables within the MySQL syntax. I'm just a little confused on the matter.
    This java code is a working prototype of inserting a customer data into the database and that works fine. I just don't know how to implement it so that only one person can update the table at a time.
    Here is the Customer.java code that I have written.
    Help would be greatly appreciated, thanks so much.
    package business;
    //~--- non-JDK imports --------------------------------------------------------
    import shared.info.CustomerInfo;
    //~--- JDK imports ------------------------------------------------------------
    import java.sql.*;
    * @author
    public class Customer {
        static Connection    con  = DBConnection.getConnection();
        private CustomerInfo info = new CustomerInfo();
        private String               customerID;
        private String               firstName;
        private String               lastName;
        private String               email;
        private String               addressID;
        private String               homePhone;
        private String               workPhone;
        private String               unitNum;
        private String               streetNum;
        private String               streetName;
        private String               city;
        private String               provinceState;
        private String               country;
        private String               zipPostalCode;
        public Customer(String id) {
            try {
                PreparedStatement pstmt = con.prepareStatement("SELECT * FROM " +
                        "Customer NATURAL JOIN Address WHERE CustomerID = ?");
                pstmt.setString(1, id);
                ResultSet rs = pstmt.executeQuery();
                while (rs.next()) {
                    customerID    = rs.getString("CustomerID");
                    firstName     = rs.getString("FirstName");
                    lastName      = rs.getString("LastName");
                    homePhone     = rs.getString("HomePhone");
                    workPhone     = rs.getString("WorkPhone");
                    email         = rs.getString("Email");
                    city          = rs.getString("City");
                    provinceState = rs.getString("ProvinceState");
                    country       = rs.getString("Country");
                    zipPostalCode = rs.getString("ZipPostalCode");
                    unitNum       = rs.getString("UnitNum");
                    streetNum     = rs.getString("StreetNum");
                    streetName    = rs.getString("StreetName");
                    addressID     = rs.getString("AddressId");
            } catch (SQLException e) {
                e.printStackTrace();
            info.setCustomerID(customerID);
            info.setFirstName(firstName);
            info.setLastName(lastName);
            info.setHomePhone(homePhone);
            info.setWorkPhone(workPhone);
            info.setEmail(email);
            info.setCity(city);
            info.setProvinceState(provinceState);
            info.setCountry(country);
            info.setZipPostalCode(zipPostalCode);
            info.setUnitNum(unitNum);
            info.setStreetNum(streetNum);
            info.setStreetName(streetName);
            info.setAddressID(addressID);
        public static void addCustomer(CustomerInfo cust) {
            try {
                int id = -1;
                PreparedStatement pstmt = con.prepareStatement("INSERT INTO Address" +
                        "(UnitNum, StreetNum, StreetName, City, ProvinceState, Country," +
                        " ZipPostalCode) VALUES(?, ?, ?, ?, ?, ?, ?)");
                pstmt.setString(1, cust.getUnitNum());
                pstmt.setString(2, cust.getStreetNum());
                pstmt.setString(3, cust.getStreetName());
                pstmt.setString(4, cust.getCity());
                pstmt.setString(5, cust.getProvinceState());
                pstmt.setString(6, cust.getCountry());
                pstmt.setString(7, cust.getZipPostalCode());
                pstmt.executeUpdate();
                ResultSet rs = pstmt.getGeneratedKeys();
                rs.next();
                id = rs.getInt(1);
                pstmt = con.prepareStatement("INSERT INTO Customer" +
                        "(FirstName, LastName, HomePhone, WorkPhone, Email, AddressID)"
                        + "VALUES(?, ?, ?, ?, ?, ?)");
                pstmt.setString(1, cust.getFirstName());
                pstmt.setString(2, cust.getLastName());
                pstmt.setString(3, cust.getHomePhone());
                pstmt.setString(4, cust.getWorkPhone());
                pstmt.setString(5, cust.getEmail());
                pstmt.setInt(6, id);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
        public void setFirstName(String newName) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET FirstName = ? WHERE CustomerID = ?");
                pstmt.setString(1, newName);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            firstName = newName;
        public void setLastName(String newName) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET LastName = ? WHERE CustomerID = ?");
                pstmt.setString(1, newName);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            lastName = newName;
        public String getFirstName() {
            return firstName;
        public String getLastName() {
            return lastName;
        public void setHomePhone(String number) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET HomePhone = ? WHERE CustomerID = ?");
                pstmt.setString(1, number);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            homePhone = number;
        public String getHomePhone() {
            return homePhone;
        public void setWorkPhone(String number) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET WorkPhone = ? WHERE CustomerID = ?");
                pstmt.setString(1, number);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            workPhone = number;
        public String getWorkPhone() {
            return workPhone;
        public void setEmail(String email) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer" + " SET Email = ? WHERE CustomerID = ?");
                pstmt.setString(1, email);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            this.email = email;
        public String getEmail() {
            return email;
        public void setUnitNum(String num) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address" + " SET UnitNum = ? WHERE AddressId = ?");
                pstmt.setString(1, num);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            unitNum = num;
        public String getUnitNum() {
            return unitNum;
        public void setCity(String city) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address" + " SET City = ? WHERE AddressId = ?");
                pstmt.setString(1, city);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            this.city = city;
        public String getCity() {
            return city;
        public void setStreetNum(String num) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address" + " SET StreetNum = ? WHERE AddressId = ?");
                pstmt.setString(1, num);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            streetNum = num;
        public String getStreetNum() {
            return streetNum;
        public void setStreetName(String name) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address"
                                              + " SET StreetName = ? WHERE AddressId = ?");
                pstmt.setString(1, name);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            streetName = name;
        public String getStreetName() {
            return streetName;
        public void setZipPostalCode(String code) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address"
                                              + " SET ZipPostalCode = ? WHERE AddressId = ?");
                pstmt.setString(1, code);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            zipPostalCode = code;
        public String getZipPostalCode() {
            return zipPostalCode;
        public CustomerInfo getInfo(){
            return info;
        static void deleteCustomer(String customerId) {
            try{
                PreparedStatement pstmt = con.prepareStatement("DELETE FROM Customer" +
                        " WHERE CustomerId = ?");
                pstmt.setString(1, customerId);
                pstmt.executeUpdate();
            }catch(SQLException e){
                e.printStackTrace();
        static void updateCustomer(CustomerInfo custInf) {
            try{
                PreparedStatement pstmt = con.prepareStatement("UPDATE customer" +
                        " SET firstName = ?, SET lastName = ?," +
                        " SET homePhone = ?, SET workPhone = ?, SET email = ?" +
                        " WHERE CustomerId = ?");
                pstmt.setString(1, custInf.getFirstName());
                pstmt.setString(2, custInf.getLastName());
                pstmt.setString(3, custInf.getHomePhone());
                pstmt.setString(4, custInf.getWorkPhone());
                pstmt.setString(5, custInf.getEmail());
                pstmt.setString(6, custInf.getCustomerID());
                pstmt.executeUpdate();
                pstmt = con.prepareStatement("UPDATE address" +
                        " SET unitNum = ?, SET StreetNum = ?, SET StreetName = ?," +
                        " SET city = ?,SET Province = ?,SET country = ?,SET ZipPostalCode = ?" +
                        " WHERE AddressId = ?");
                pstmt.setString(1, custInf.getUnitNum());
                pstmt.setString(2, custInf.getStreetNum());
                pstmt.setString(3, custInf.getStreetName());
                pstmt.setString(4, custInf.getCity());
                pstmt.setString(5, custInf.getProvinceState());
                pstmt.setString(6, custInf.getCountry());
                pstmt.setString(7, custInf.getZipPostalCode());
                pstmt.setString(8, custInf.getAddressID());
                pstmt.executeUpdate();
            }catch(SQLException e){
                e.printStackTrace();
    }In addition, here is my customer sql table.
    -- Table structure for table `customer`
    DROP TABLE IF EXISTS `customer`;
    CREATE TABLE `customer` (
    `CustomerID` mediumint(9) NOT NULL auto_increment,
    `FirstName` varchar(20) NOT NULL,
    `LastName` varchar(20) NOT NULL,
    `HomePhone` varchar(11) NOT NULL,
    `WorkPhone` varchar(11) default NULL,
    `Email` varchar(20) NOT NULL,
    `AddressID` mediumint(9) default NULL,
    PRIMARY KEY (`CustomerID`),
    KEY `AddressID` (`AddressID`),
    CONSTRAINT `customer_ibfk_1` FOREIGN KEY (`AddressID`) REFERENCES `address` (`AddressID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    -- Dumping data for table `customer`
    LOCK TABLES `customer` WRITE;
    /*!40000 ALTER TABLE `customer` DISABLE KEYS */;
    /*!40000 ALTER TABLE `customer` ENABLE KEYS */;
    UNLOCK TABLES;

    to the best of my knowledge, this is something related to the database and not the programming. If you'd want to be the only user to read and edit the table, speicify only one user with that privilege and make it password protected. User must enter the password to write to the tables.

  • My old computer crashed and I am trying to download Adobe X Pro on my computer. I have tried to download and the only download I can find is the Adobe XI Pro. Any help would be appreciated. I have the product key but it's not deactivated on my old compute

    My old computer crashed and I am trying to download Adobe X Pro on my computer. I have tried to download and the only download I can find is the Adobe XI Pro. Any help would be appreciated. I have the product key but it's not deactivated on my old computer.

    if you need to deactivate, contact adobe support
    https://helpx.adobe.com/contact.html
    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 |12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7
    Lightroom:  5.6| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.
    window using the Lightroom 3 link to see those 'Important Instructions'.

  • Sometimes I cannot bring up iTunes when I click on the icon. Have even gone to the START Menu and clicked on that icon but it still wont work. The only way I can fix it.....sometimes.....is if I reboot. Please help me 8-) Thanks

    Sometimes I cannot bring up iTunes when I click on the icon. Have even gone to the START Menu and clicked on that icon but it still wont work. The only way I can fix it.....sometimes.....is if I reboot. Please help me 8-) Thanks

    I understand that Firefox is no longer working on your Windows Tablet. The development of Metro did stop and has been discontinued. However what version were you on before this started to happen?

Maybe you are looking for

  • Reading a XML file in ORACLE 8i

    I hv a XML file something like this.... <?xml version="1.0" ?> - <ROWSET> - <ROW num="1"> <COD001_VEK4>2</COD001_VEK4> <NUM040_VEKT>2</NUM040_VEKT> <COD467_VEKT>2</COD467_VEKT> <COD459_LVIO>5</COD459_LVIO> <NUM258_INDI>InfoSys</NUM258_INDI> - <RELATI

  • Blanket PO - Invoice Verification

    Dear Gurus, I am facing a problem while posting IV against a Blanket PO. I have created a PO with document Type FO and used account assignment K and Item category B. Put the Overall Limit 1000 and expected limit as 2000, it showed me 2000 as the net

  • Please send me fm regarding to get purchase order and change purchase order

    Hi, Please send me fm regarding to get purchase order and change purchase order . Regards, Gurprit Bhatia

  • Check box showing double when PDF opened in Preview

    I'm setting up a simple check box functionality on a PDF my company sends out. I noticed the check boxes look strange when the PDF is opened up in Preview on Mac. Not sure about PC as we don't have one here. It appears to look fine in Acrobat but I b

  • InDesign black actually 91%K

    Hi all, I've seen this discussed in many forums, but I have yet to come across a satisfying solution, so I thought I'd try to find an answer. The problem seems simple: For the sake of discussion let's imagine a single page in inDesign with one word o