Error using Replace funciton in java

hi, i need to replace my ' in sql string with '' so that no problem will occur when i execute the sql statement. i tried strName.replace('\'','\'\'') and recieved an error message when i compile, saying that i have unclosed character literal. anyone can tell me what's wrong? thanks...

the replace function will only replace one character.
It can not swap one character for two,
If you have Java 1.4 you can do a replaceAll() function
However, I would recommend you look at using prepared statements rather than escaping yourself manually. It is less error prone in the long run.
ie
Instead of
String sql = "Select * from person where name = '" + person.getName() + "'";
Statement stmt = connection.createStatement();
stmt.executeQuery(sql);
do
String sql = "Select * from person where name = ?";
PreparedStatement stmt = connection.prepareStatement(sql);
stmt.setString(1, person.getName());

Similar Messages

  • Error using DOS Command from Java

    Hi,
    I am using the following code to execute the DOS command to delete a file from Java.
    cmd = "del " + fileName;
    Runtime run = Runtime.getRuntime();
    Process proc = run.exec(cmd);
    Getting the following exception during runt time.
    Exception = java.io.IOException: CreateProcess: del D:\LAWDOCS\P50074\12\3\36857.3  error=2 --
    Can some body throw light on this?.
    Thanks,
    Jeyaraman R

    "del" is not an actual executable file, but instead a command in the command interpreter. So you can't just execute del like that, you have to run the command interpreter and tell it to execute the del command.
    If you are on windows NT, 2000 or XP, replace your command with "cmd /C del " + filename.
    If you are on Windows 95, 98 or ME, use "command /C del " + filename. (I am not quite sure if the switch for this is called /C on old windows version.)
    (But why not use File.delete()?)

  • ERROR USING HTML textarea with Java String

    I have a form in HTML that has a textarea for input messages.
    When user press submit, a java servlet gets the information and stores it in a Database as a String.
    Later, I have a JSP thata retrieves that information from the database and put it as the value propertie of another textarea in the page so user can modify it if wanted, but I am having a hard time finding how to do so , because when I do the line:
    <textarea .....bla bla.... value=
    <%=some_string%>
    .....bla >
    and the some_string has more than one line ( e.g "\n" or "\r" caracteres ), I got an error when displaying the page. Can anyone help me with that please ???
    Thanks.

    here's my codes again for reference. hope it helps to rectify the matter
    // edit.jsp
    String search = (String)request.getParameter("txtSearch");
    String parameter = (String)"%"+search+"%";
    String sSQL = "select * from tblArticle where Title LIKE '"+parameter+"'";
    <%
    try {
    while(Rs.next()) {
    %>
    <tr>
    <td width="16%" height="157" align="center">Article:</td>
    <td width="88%" height="157"><textarea rows="15" name="txtArt" cols="86" value="<%= txtArt %>"></textarea></td>
    </tr>
    </table>
    <%
    // .....

  • Re: Error using JMF within a Java Application

    I found the solution. I needed to add the DLLs included by JMF in the Windows\System32 folder to my application's classpath.
    For those who might not know, the DLLs are:
    windows\system32\jmacm.dll
    windows\system32\jmam.dll
    windows\system32\jmcvid.dll
    windows\system32\jmdaud.dll
    windows\system32\jmdaudc.dll
    windows\system32\jmddraw.dll
    windows\system32\jmfjawt.dll
    windows\system32\jmg723.dll
    windows\system32\jmgdi.dll
    windows\system32\jmgsm.dll
    windows\system32\jmh261.dll
    windows\system32\jmh263enc.dll
    windows\system32\jmjpeg.dll
    windows\system32\jmmci.dll
    windows\system32\jmmpa.dll
    windows\system32\jmmpegv.dll
    windows\system32\jmutil.dll
    windows\system32\jmvcm.dll
    windows\system32\jmvfw.dll
    windows\system32\jmvh263.dll
    windows\system32\jsound.dll
    Edited by: alvarocavalcanti on Jul 9, 2008 12:07 PM

    There's a way, take a look at the javax.swing API documentation.

  • Error Using java command. Please help!

    Ok, I'm having problems running my java programs. I use the javac command, and it compiles it right, and makes the class file. But if I type
    java anything
    It won't work. It comes up with the error message:
    Exception in thread "main" java.lang.NoClassDefFoundError: BigDebt
    With BigDebt as the class file. That error message comes up if I type:
    java anything
    java blah.class
    I have version 1.3.
    It would be GREATLY appreciated if someone could help.

    It appears you are using the right command, "java BigDebt" if your class is called BigDebt and the compiler produced a file named BigDebt.class. (This assumes that your source code doesn't start with a "package xxx;" line.) Your problem is likely a Classpath problem. Make sure you have CD'd to the directory where BigDebt is located. Then try:
    java -classpath . BigDebt

  • FATAL ERROR in native method: Wrong method ID used to invoke a Java method

    When calling the same method second time , I get message ::
    <FATAL ERROR in native method: Wrong method ID used to invoke a Java method>
    void myFunction(int myVal)
    JNIEnv *env = NULL;
    jclass odbcconnls;
    jint res;
    printf("\nInitilaizing class ");
    res = (jvm)->AttachCurrentThread((void **)&env,NULL);
    if (res < 0) {
    fprintf(stderr, "Can't get Env \n");
    (jvm)->DestroyJavaVM();
    return SQL_ERROR;          
    if(res == JNI_OK)
    printf("\nThe env is initialized ");
    if(*(&env) == NULL)
    printf(" the env is NULL ");
    printf("\nenv :::::: %s ", env);     
    // the jobject (dbc->actualConn) is a global reference
    odbcconnls = (env)->GetObjectClass(dbc->actualConn);
    if (odbcconnls == NULL) {
    goto destroy;
    switch(myVal){
    case 1:
    jmethodID methodId ;
    jboolean jbool;
    SQLINTEGER Val = (SQLINTEGER )Value;
    SQLINTEGER val1 = *Val;
    methodId = (env)->GetMethodID( odbcconnls,"myFun1","(Z)V");
    if(methodId == NULL){
    goto destroy;
    if(val1 == SQL_FALSE )
    jbool = 0;
    else
    jbool =1;
    env->CallVoidMethod(dbc->actualConn,methodId,jbool);
    env->DeleteLocalRef((jobject)res);
    env->DeleteLocalRef((jobject)odbcconnls);
    env->DeleteLocalRef((jobject)methodId);
    jvm->DetachCurrentThread();
    return ;
    case 2 :
    jmethodID methodId1 ;
    SQLUINTEGER* Level;
    methodId1 = (env)->GetMethodID( odbcconnls,"myFun2","(I)V");
    if(methodId1 == NULL){
    goto destroy;
    Level = (SQLUINTEGER *)Value;
    env->CallVoidMethod(dbc->actualConn,methodId1,(int)*Level);
    dbc->txn_isolation = (SQLUINTEGER)Value;
    env->DeleteLocalRef((jobject)res);
    env->DeleteLocalRef((jobject)odbcconnls);
    env->DeleteLocalRef((jobject)methodId1);
    jvm->DetachCurrentThread();
    return ;
    case 3 :
    SQLCHAR* Cate;
    jmethodID methodId2 ;
    jstring jStrCat;
    methodId2 = (env)->GetMethodID(odbcconnls,"myFun3","(Ljava/lang/String;)V");
    if(methodId2 == NULL){
    goto destroy;
    Cate = new SQLCHAR[20];
    strcpy((char *)CCatalog,(char *)Value);
    jStrCat = env->NewStringUTF((char *) Cate);
    printf("\n got jSTring ");
    env->CallVoidMethod(dbc->actualConn,methodId2,jStrCat);
    printf("\n after called method ");
    int len = strlen((char *)Cate);
    dbc->Cate = new SQLCHAR[len+1];
    strcpy((char *)dbc->Cate,(char *)Cate);
    printf("\n copied result ");
    env->DeleteLocalRef((jobject)res);
    env->DeleteLocalRef((jobject)odbcconnls);
    env->DeleteLocalRef((jobject)methodId2);
    jvm->DetachCurrentThread();
    return ;
    destroy:
    if ((env)->ExceptionOccurred()) {
    (env)->ExceptionDescribe();
    jvm->DetachCurrentThread();
    (jvm)->DestroyJavaVM();
    return SQL_ERROR;
    When case 1 is called second time this error is thrown..
    plz help me..
    Thanx
    MittalSunita.

    When calling the same method second time , I get
    message ::
    <FATAL ERROR in native method: Wrong method ID used
    d to invoke a Java method>
    void myFunction(int myVal)
    JNIEnv *env = NULL;
    jclass odbcconnls;
    jint res;
    printf("\nInitilaizing class ");
    res = (jvm)->AttachCurrentThread((void **)&env,NULL);
    if (res < 0) {
    fprintf(stderr, "Can't get Env \n");
    (jvm)->DestroyJavaVM();
    return SQL_ERROR;          
    if(res == JNI_OK)
    printf("\nThe env is initialized ");
    if(*(&env) == NULL)
    printf(" the env is NULL ");
    printf("\nenv :::::: %s ", env);     
    // the jobject (dbc->actualConn) is a global
    reference
    odbcconnls = (env)->GetObjectClass(dbc->actualConn);
    if (odbcconnls == NULL) {
    goto destroy;
    switch(myVal){
    case 1:
    jmethodID methodId ;
    jboolean jbool;
    SQLINTEGER Val = (SQLINTEGER )Value;
    SQLINTEGER val1 = *Val;
    methodId = (env)->GetMethodID(
    ( odbcconnls,"myFun1","(Z)V");
    if(methodId == NULL){
    goto destroy;
    if(val1 == SQL_FALSE )
    jbool = 0;
    else
    jbool =1;
    env->CallVoidMethod(dbc->actualConn,methodId,jbool);
    env->DeleteLocalRef((jobject)res);
    env->DeleteLocalRef((jobject)odbcconnls);
    env->DeleteLocalRef((jobject)methodId);
    jvm->DetachCurrentThread();
    return ;Why do you delete a local reference???
    Did you ever call the get local reference?
    case 2 :
    jmethodID methodId1 ;
    SQLUINTEGER* Level;
    methodId1 = (env)->GetMethodID(
    ( odbcconnls,"myFun2","(I)V");
    if(methodId1 == NULL){
    goto destroy;
    Level = (SQLUINTEGER *)Value;
    env->CallVoidMethod(dbc->actualConn,methodId1,(int)*Le
    el);
    dbc->txn_isolation = (SQLUINTEGER)Value;
    env->DeleteLocalRef((jobject)res);
    env->DeleteLocalRef((jobject)odbcconnls);
    env->DeleteLocalRef((jobject)methodId1);
    jvm->DetachCurrentThread();
    return ;
    case 3 :
    SQLCHAR* Cate;
    jmethodID methodId2 ;
    jstring jStrCat;
    methodId2 =
    (env)->GetMethodID(odbcconnls,"myFun3","(Ljava/lang/St
    ing;)V");
    if(methodId2 == NULL){
    goto destroy;
    Cate = new SQLCHAR[20];
    strcpy((char *)CCatalog,(char *)Value);
    jStrCat = env->NewStringUTF((char *) Cate);
    printf("\n got jSTring ");
    env->CallVoidMethod(dbc->actualConn,methodId2,jStrCat)
    printf("\n after called method ");
    int len = strlen((char *)Cate);
    dbc->Cate = new SQLCHAR[len+1];
    strcpy((char *)dbc->Cate,(char *)Cate);
    printf("\n copied result ");
    env->DeleteLocalRef((jobject)res);
    env->DeleteLocalRef((jobject)odbcconnls);
    env->DeleteLocalRef((jobject)methodId2);
    jvm->DetachCurrentThread();
    return ;
    destroy:
    if ((env)->ExceptionOccurred()) {
    (env)->ExceptionDescribe();
    jvm->DetachCurrentThread();
    (jvm)->DestroyJavaVM();
    return SQL_ERROR;
    When case 1 is called second time this error is
    thrown..
    plz help me..
    Thanx
    MittalSunita.

  • Error using JAVA SAP GUI

    Hi All,
    I have installed and configured SAP JAVA GUI and its working fine but when i am creating a Transactional IView and using SAP GUI for Java it is not working,
    While clicking on Preview there is the following error comes up.
    Java Plug-in 1.6.0_07
    Using JRE version 1.6.0_07 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\gauravma
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    l:   dump classloader list
    m:   print memory usage
    o:   trigger logging
    p:   reload proxy configuration
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment properties
    t:   dump thread list
    v:   dump thread stack
    x:   clear classloader cache
    0-5: set trace level to <n>
    java.net.URISyntaxException: Illegal character in path at index 18: file:/C:/Documents and Settings/gauravma/Desktop/gui_for_JAVA on 172.17.90.115/NW_7.0_Presentation/PRES2/GUI/JAVA/PlatinGUINT_6/platin.jnlp
         at java.net.URI$Parser.fail(Unknown Source)
         at java.net.URI$Parser.checkChars(Unknown Source)
         at java.net.URI$Parser.parseHierarchical(Unknown Source)
         at java.net.URI$Parser.parse(Unknown Source)
         at java.net.URI.<init>(Unknown Source)
         at java.net.URL.toURI(Unknown Source)
         at com.sap.platin.GuiAppletBase2.findJNLPFile(GuiAppletBase2.java:336)
         at com.sap.platin.GuiAppletBase2.findProductType(GuiAppletBase2.java:322)
         at com.sap.platin.GuiApplet2.getProductType(GuiApplet2.java:18)
         at com.sap.platin.GuiAppletBase2.<init>(GuiAppletBase2.java:54)
         at com.sap.platin.GuiApplet2.<init>(GuiApplet2.java:14)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    java.lang.ExceptionInInitializerError
         at com.sap.platin.GuiAppletBase2.<init>(GuiAppletBase2.java:57)
         at com.sap.platin.GuiApplet2.<init>(GuiApplet2.java:14)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission user.home read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at com.sap.platin.trace.T.raceGetDefaults(T.java:188)
         at com.sap.platin.trace.T.<clinit>(T.java:98)
         ... 13 more
    java.net.URISyntaxException: Illegal character in path at index 18: file:/C:/Documents and Settings/gauravma/Desktop/gui_for_JAVA on 172.17.90.115/NW_7.0_Presentation/PRES2/GUI/JAVA/PlatinGUINT_6/platin.jnlp
         at java.net.URI$Parser.fail(Unknown Source)
         at java.net.URI$Parser.checkChars(Unknown Source)
         at java.net.URI$Parser.parseHierarchical(Unknown Source)
         at java.net.URI$Parser.parse(Unknown Source)
         at java.net.URI.<init>(Unknown Source)
         at java.net.URL.toURI(Unknown Source)
         at com.sap.platin.GuiAppletBase2.findJNLPFile(GuiAppletBase2.java:336)
         at com.sap.platin.GuiAppletBase2.findProductType(GuiAppletBase2.java:322)
         at com.sap.platin.GuiApplet2.getProductType(GuiApplet2.java:18)
         at com.sap.platin.GuiAppletBase2.<init>(GuiAppletBase2.java:54)
         at com.sap.platin.GuiApplet2.<init>(GuiApplet2.java:14)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    java.lang.NoClassDefFoundError: Could not initialize class com.sap.platin.trace.T
         at com.sap.platin.GuiAppletBase2.<init>(GuiAppletBase2.java:57)
         at com.sap.platin.GuiApplet2.<init>(GuiApplet2.java:14)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    load: class com.sap.platin.GuiApplet2 not found.
    java.lang.ClassNotFoundException: com.sap.platin.GuiApplet2
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    load: class com.sap.platin.GuiApplet2 not found.
    java.lang.ClassNotFoundException: com.sap.platin.GuiApplet2
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    load: class com.sap.platin.GuiApplet2 not found.
    java.lang.ClassNotFoundException: com.sap.platin.GuiApplet2
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    load: class com.sap.platin.GuiApplet2 not found.
    java.lang.ClassNotFoundException: com.sap.platin.GuiApplet2
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    load: class com.sap.platin.GuiApplet2 not found.
    java.lang.ClassNotFoundException: com.sap.platin.GuiApplet2
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    load: class com.sap.platin.GuiApplet2 not found.
    java.lang.ClassNotFoundException: com.sap.platin.GuiApplet2
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    load: class com.sap.platin.GuiApplet2 not found.
    java.lang.ClassNotFoundException: com.sap.platin.GuiApplet2
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    load: class com.sap.platin.GuiApplet2 not found.
    java.lang.ClassNotFoundException: com.sap.platin.GuiApplet2
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    load: class com.sap.platin.GuiApplet2 not found.
    java.lang.ClassNotFoundException: com.sap.platin.GuiApplet2
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    load: class com.sap.platin.GuiApplet2 not found.
    java.lang.ClassNotFoundException: com.sap.platin.GuiApplet2
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    PLease help in this regard.
    Gaurav Makin

    Hello,
    shorthand the error message indeed comes from the unquoted blanks in the file-url.
    However the whole usage scenario seems to be different than how it is intended to be.
    I would expect the PlatinGUI*.jar installer extracted on the web server, not locally on your desktop and the codebase parameter in the html page should point to the folder on the web server containing all the jars.
    You might want to have a look at chapter "8. Web Server Configuration" of the manual part of SAP GUI for Java.
    Best regards
    Rolf-Martin

  • Portal rendering errors using IE10

    Hi,
    We've recently patched all of our SAP systems (portal and backend) and checked we're at the requisite level for IE10 support in the PAM.
    We're currently in the process of testing all of our applications for IE10 compliance and have identified two issues which someone may have experienced or can advise upon:
    Issue 1) SAP Transaction iView (ITS) raising following error in popup dialog box 'The application was stopped due to a critical rendering error.  The IE compatibility view is not supported (Note 1586993).'
    This iView connects from our portal (EP 7.0 EHP2 SP14) to a backend SAP ERP (ECC) system patched to NW EHP3 (SP09).
    Note 1586993 is not particularly helpful as it simply states 'The administrator must assure, that IE frame content is compatible and correctly configured'.
    Additional research identified note 1970427 which I have applied to the backend system - subsequently I added application parameter 'sap-ie=EmulateIE8' to the iView (both within the iView config and at runtime) but this made no difference to the behaviour.
    I checked the user's framework page and the 'Browser Document Mode' iView is linked in and has it's property set to 'IE=EmulateIE7'.  I tried moving this iView further up the order sequence (i.e. putting it first) as well as changing it's setting to 'IE=EmulateIE8' but once again this had no effect on the behaviour.
    I notice when logging into the portal, at first the F12 console shows Browser Mode = 'IE10', Document Mode = 'IE5 quirks' but when the problematic iView renders, the Document Mode changes to 'Quirks' which I'm assuming is why the error occurs.
    I'm not sure what I can do to make the iView render in 'IE5 quirks' mode?
    This iView is called dynamically at runtime with some URL parameters that are passed to the backend transaction so I cannot follow the advice in note 1590563.
    Issue 2) BSP iView for 'CRM Web Interaction Centre' - all F4 dialog popups are displaying empty with no content, e.g. Inbox search help for classification field
    This iView connects from our portal (EP 7.0 EHP2 SP14) to a backend SAP CRM system patched to NW EHP2 (SP04).
    I tried setting my user parameter CRM_THTMLB_IE_COMP to 'IE8' but this had no effect.
    Note, if I set the IE10 property 'Display intranet sites in Compatibility View' both issues above are resolved.  We're trying to avoid this as we've had this setting in place for a number of years and it affects the correct operation of non-SAP applications.  Given there are numerous ways of making SAP operate by emulating older compatible IE versions, I expected we could work around needing to do this but it may be a last resort.
    Please offer any advice you can as it will be much appreciated.
    Thanks,
    Alan

    Hi Lawrence,
    We have a mixture of custom and SAP standard portal applications developed over the past 10 years.
    UI technologies include: Java Server Pages, Web Dynpro Java, ITS, BSP, Web Dynpro ABAP and BEx.
    Quite honestly, the portal hasn't proved to be the best SAP product in our experience, and we've tried hard to keep it patched up-to-date. OK, it offers integration and navigation but that capability is offered by the Fiori Launchpad, albeit presenting new challenges and possibly some limitations on the integration of existing applications.
    We could have opted to integrate the Fiori Launchpad with the portal but decided it was cleaner to perform a standalone installation on our newly built NetWeaver Gateway server.
    We're starting our Fiori journey by implementing selected SAP delivered apps for the first pilot projects then plan to replace or migrate existing portal applications.
    We'll replace any custom Java apps with UI5 apps built in-house as we need to rationalise UI technologies and this one is a prime candidate given the lack of in-house skills and SAP direction. 
    Our expenses application is currently an SAP ITS transaction iView in the portal but will be replaced with the My Travel and Expenses Fiori app this year.
    CRM Transaction Launch isn't used often so we may kill it off.
    BSP's are solely in the CRM area and I read they're not supported yet in the launchpad - hopefully they will be in a future version (?).
    We have quite a few Web Dynpro ABAP applications so these will take some time to rewrite if required (assuming we cannot port them).
    BEx may be replaced with Business Objects or taken out of the portal in favour of the Excel version we also run (portal offers little value for massive reports so users download to Excel in any case).
    My understanding is that the Fiori Launchpad does support integration of legacy SAP technologies so we'll need to gauge if and when we each a tipping point where any remaining portal applications can either be integrated with the launchpad or replaced with alternative new applications. Obviously all of the above will take time.
    We're working on developing a custom Fiori/UI5 theme and have hit a few snags. We've just patched to SP09 on our development Gateway system but the UI Theme Designer is still a bit flaky (we run the tool there but could also do this on our portal). My colleague is now trying the cloud version to see if that proves a more viable route. In either case we'll be seeking SAP assistance as we really want our UI5 apps to adopt recently developed corporate branding rules. Our portal currently uses a copy of Gold Reflection with simply the SAP logo replaced for our company's logo.
    If you have any further queries just let me know, or similarly advice/experience on the above.
    Hope this helps.
    Alan

  • Error using a tag query

    We have a tag query that works in our sandbox environment, but not in dev.  I loaded the same JDBC drivers on both systems.
    The project was exported from the sandbox, and imported into dev.
    I have verified the Data Server set up is identical in both environments.  Connection status in both environments is identical - running, same number of connections, etc.
    When I try to run the query on sandbox in workbench, the query returns data.  I get this error on the dev system -
    SQL error has occurred on query java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'tag'.
    Detailed error -
    java.lang.Exception: SQL error has occurred on query [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'publicgrouptag'.
         at com.sap.xmii.Illuminator.gui.workbench.populators.IlluminatorPopulator.get(IlluminatorPopulator.java:114)
         at com.sap.xmii.Illuminator.gui.workbench.populators.TagListPopulator.get(TagListPopulator.java:47)
         at com.sap.xmii.Illuminator.gui.workbench.components.desktop.custom.TagQueryBuilderPanel$6.construct(TagQueryBuilderPanel.java:723)
         at com.sap.lhcommon.gui.ThreadCreator$2.run(ThreadCreator.java:94)
         at java.lang.Thread.run(Unknown Source)
    Any suggestions??

    One of your included JDBC driver archives has a class that matches the path provided by the JDBCDriver setting for the data server (likely the sqljdbc.jar file).
    If you take the JDBCDriver setting: 
    com.microsoft.sqlserver.jdbc.SQLServerDriver
    and replace the periods for sub directories and add a .class on the end you'll have:
    com\microsoft\sqlserver\jdbc\SQLServerDriver.class
    So if you unpacked the jar file you'd find this java class (and the other ones included with the driver).
    Do you get the same error about 'publicgrouptag' and 'tag' objects when you test a tag query request for GroupList mode?  These tables/views would be used by the underlying queries used to populate the tag details tab in the WB.  Do you see these tables or view within the SQL Server?  Does the sa user have appropriate permissions?

  • Problem with JDK 6 update 5 - Error Message says cant find java compiler

    Hi i am a complete beginner to programming and i am having trouble with the latest java development kit. jdk 6 update 5.
    The problem is i have set the path and the program cant find my compiler.
    I have installed the latest java development kit 6 update 5 on my windows xp machine.
    I have created a simple program as shown below:
    class Hello
         public static void main(String[] args)
                   System.out.println("Hello from java");
    saved the file to my desktop as Hello.java
    I have set the path variable like so:
    Go to control panel then click system icon then click advanced tab then click environmental variables.
    Now in system variables the path is shown as this - %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.6.0_05\bin;C:\Program Files\QuickTime\QTSystem\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\
    I then add this to the end;C:\Program Files\Java\jdk1.6.0_05\bin
    This is the location to the things like compiler, applet viewer etc.
    No in the command prompt i type javac Hello.java and i get this error message:
    C:\> javac Hello.java
    javac: file not found: Hello.java
    Usage: javac <options> <source files>
    use -help for a list of possible options
    The jdk is installed properly im sure but it can find my compiler.
    What mistake have i made in setting the path because im guessing that is related to the problem?
    Could someone out there please help me?
    Thank You
    Rafeeq

    saved the file to my desktop as Hello.java
    C:\> javac Hello.javaC:\ is not the desktop!
    The jdk is installed properly im sure but it can find my compiler.Of course it can! It just can't find the file you are trying to compile, because that's not in the root directory.
    I suggest you make a directory C:\java and save your source file there rather than on the desktop. In the command prompt, enter cd \java to make it the current working directory and then enter javac Hello.java.
    @Pravin: The question is about compiling, not running. CLASSPATH has nothing to do with this problem.
    db

  • Unable to Print Purchase order automatically using SAP GUI for JAVA

    Hi SAP gurus,
    Some of the PC's in our company use windows and some LINUX. Therefore we use two types of SAP GUI. One for windows and the other one JAVA. PO approval was set to print automatically. In a windows setting, there are no problems with this setup. But in SAP GUI for JAVA, no print outs are produced and no error messages are displayed. I am using SAP GUI for JAVA version 7.10 ver 6. and I use Front end printing for linux access method G.
    please help,
    gungertz

    hi gungertz,
    You can use U type access method for printing SAP document using linux desktop.
    Please refer to my blog posting here (http://sapbasis.wordpress.com/2007/08/23/print-sap-documents-using-linux/)
    ardhian
    http://ardhian.kioslinux.com
    http://sapbasis.wordpress.com

  • HELP Needed with this error:   Exception in thread "main" java.lang.NoClass

    Folks,
    I am having a problem connecting to my MSDE SQL 2000 DB on a WindowsXP pro. environment. I am learning Java and writing a small test prgm to connect the the database. The code compiles ok, but when I try to execute it i keep getting this error:
    "Exception in thread "main" java.lang.NoClassDefFoundError: Test1"
    I am using the Microsoft jdbc driver and my CLASSPATH is setup correctly, I've also noticed that several people have complained about this error, but have not seen any solutions....can someone help ?
    Here is the one of the test programs that I am using:
    import java.sql.*;
    * Microsoft SQL Server JDBC test program
    public class Test1 {
    public Test1() throws Exception {
    // Get connection
    DriverManager.registerDriver(new
    com.microsoft.jdbc.sqlserver.SQLServerDriver());
    Connection connection = DriverManager.getConnection(
    "jdbc:microsoft:sqlserver://LAPTOP01:1433","sa","sqladmin");
    if (connection != null) {
    System.out.println();
    System.out.println("Successfully connected");
    System.out.println();
    // Meta data
    DatabaseMetaData meta = connection.getMetaData();
    System.out.println("\nDriver Information");
    System.out.println("Driver Name: "
    + meta.getDriverName());
    System.out.println("Driver Version: "
    + meta.getDriverVersion());
    System.out.println("\nDatabase Information ");
    System.out.println("Database Name: "
    + meta.getDatabaseProductName());
    System.out.println("Database Version: "+
    meta.getDatabaseProductVersion());
    } // Test
    public static void main (String args[]) throws Exception {
    Test1 test = new Test1();

    I want to say that there was nothing wrong
    with my classpath config., I am still not sure why
    that didn't work, there is what I did to resolved
    this issue.You can say that all you like but if you are getting NoClassDefFound errors, that's because the class associated with the error is not in your classpath.
    (For future reference: you will find it easier to solve problems if you assume that the problem is your fault, instead of trying to blame something else. It almost always is your fault -- at least that's been my experience.)
    1. I had to set my DB connection protocol to TCP/IP
    (this was not the default), this was done by running
    the
    file "svrnetcn.exe" and then in the SQL Server Network
    Utility window, enable TCP/IP and set the port to
    1433.Irrelevant to the classpath problem.
    2. I then copied all three of the Microsoft JDBC
    driver files to the ..\jre\lib\ext dir of my jdk
    installed dir.The classpath always includes all jar files in this directory. That's why doing that fixed your problem. My bet is that you didn't have the jar file containing the driver in your classpath before, you just had the directory containing that jar file.
    3. Updated my OS path to located these files
    and....BINGO! (that simple)Unnecessary for solving classpath problems.
    4. Took a crash course on JDBC & basic Java and now I
    have created my database, all tables, scripts,
    stored procedures and can read/write and do all kinds
    of neat stuff.All's well that ends well. After a few months you'll wonder what all the fuss was about.

  • Error while performing SSO with java application

    hi ALL ,
    I got rhe following error when i call a java application in portal  using ticket logon sso
    Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    com.sap.test.TicketVerifierException: Request does not contain cookies
         at com.sap.test.TicketVerifierServlet.getSSOCookie(TicketVerifierServlet.java:149)
         at com.sap.test.TicketVerifierServlet.getUserFromRequest(TicketVerifierServlet.java:94)
         at com.sap.test.TicketVerifierServlet.doPost(TicketVerifierServlet.java:80)
         at com.sap.test.TicketVerifierServlet.doGet(TicketVerifierServlet.java:68)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:484)

    Hi Sarang,
    It seems you are following the two basic pre-req.
    It may be now possible that your browser might be not allowing cookies. Which browser are u using? Version etc?
    Right now u can try two things:
    1) When you have logged into portal, type the following command in the adress bar "javascript:alert(document.cookie)". This will give u a popup displaying the cookies formed when logged into portal
    2) Use some software like HTTPWatch or ieHeaders and find out the details. It will give you all the cookie details etc.
    You should be able to see the JSESSIONID, MYSAPSSO2 cookies...Let me know the result of above..
    Regards
    Gaurav

  • An unexpected error has been detected by Java Runtime Environment

    Hi there,
    I am trying to run my application in java and suddenly java started giving me the bellow error:
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d81bd10, pid=1500, tid=3624
    # Java VM: Java HotSpot(TM) Client VM (10.0-b22 mixed mode windows-x86)
    # Problematic frame:
    # V [jvm.dll+0x5bd10]
    # An error report file with more information is saved as:
    # G:\My Documents\UCY\Graduate\Final Year Project\Persona\Testing\hs_err_pid1500.log
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    I do not believe that this is a problem in my code as this was working before.
    Also the system works fine for about 20 iterations of the same code and then displays this error
    I also try to uninstall and reinstall java but with no luck.
    I am also attaching the log file that java has saved some information.
    Thanks a lot for your help in advance.
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d81bd10, pid=1500, tid=3624
    # Java VM: Java HotSpot(TM) Client VM (10.0-b22 mixed mode windows-x86)
    # Problematic frame:
    # V [jvm.dll+0x5bd10]
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    --------------- T H R E A D ---------------
    Current thread (0x0aaa0c00): VMThread [stack: 0x0ab30000,0x0ab80000] [id=3624]
    siginfo: ExceptionCode=0xc0000005, reading address 0x00000050
    Registers:
    EAX=0x00000000, EBX=0x003abcec, ECX=0x072d0106, EDX=0x00000000
    ESP=0x0ab7f5bc, EBP=0x003abc60, ESI=0x06b29bc8, EDI=0x06b29bc8
    EIP=0x6d81bd10, EFLAGS=0x00010246
    Top of Stack: (sp=0x0ab7f5bc)
    0x0ab7f5bc: 06b29bc8 06b29bc8 00000000 6d940820
    0x0ab7f5cc: 6d7dcc8b 06b29bc8 0ab7f618 0ab7f618
    0x0ab7f5dc: 00000002 003aa9f8 6d86cd11 06b29c45
    0x0ab7f5ec: 003abab8 6d86cae1 003abcb0 6d83c5a3
    0x0ab7f5fc: 0ab7f618 00000000 003aaa50 06b29c45
    0x0ab7f60c: 6d86c927 0ab7f618 00000000 6d99f718
    0x0ab7f61c: 06b29c45 00000000 6d8676c3 06b29c45
    0x0ab7f62c: 06b29c45 00000000 0ab7f748 00000000
    Instructions: (pc=0x6d81bd10)
    0x6d81bd00: 08 07 c1 e8 02 25 fe ff ff 3f 5e 59 c3 8b 11 56
    0x6d81bd10: ff 52 50 5e 59 c3 cc cc cc cc cc cc cc cc cc cc
    Stack: [0x0ab30000,0x0ab80000], sp=0x0ab7f5bc, free space=317k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [jvm.dll+0x5bd10]
    VM_Operation (0x0090f410): GenCollectForAllocation, mode: safepoint, requested by thread 0x003a6400
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x0aade000 JavaThread "&#1281;&#49164; &#4944;&#1689;&#23520;&#1689;&#1088;&#1689;&#28936;&#1690;&#23520;&#1689;&#1072;&#1689;&#752;&#1689;&#1041;&#32768;&#27880;&#1690;&#65535;&#32767;&#23224;&#1689;&#21840;&#1689;&#22128;&#1689;&#21992;&#1689;&#22312;&#1689;&#600;&#1689;&#18011;&#480;&#1689;&#26688;&#28059;&#1538;&#49164; &#4944;&#1689;&#23520;&#1689;&#1424;&#1689;&#29032;&#1690;&#23520;&#1689;&#1408;&#1689;&#1088;&#1689;&#1041;&#32768;&#27496;&#1690;&#65530;&#32767;&#23224;&#1689;&#21840;&#1689;&#22128;&#1689;&#21992;&#1689;&#22312;&#1689;&#600;&#1689;&#17499;&#480;&#1689;&#26688;&#28059;&#1795;&#49168; &#4944;&#1689;&#23520;&#1689;&#1760;&#1689;&#29128;&#1690;&#23520;&#1689;&#1744;&#1689;&#1424;&#1689;&#1041;&#32768;&#27592;&#1690;&#65532;&#16383;&#23224;&#1689;&#21840;&#1689;&#22128;&#1689;&#21992;&#1689;&#22312;&#1689;&#600;&#1689;&#16987;&#480;&#1689;&#26688;&#28059;&#2048;&#49164; &#4944;&#1689;&#23520;&#1689;&#2096;&#1689;&#29224;&#1690;&#23520;&#1689;&#2080;&#1689;&#1760;&#1689;&#1041;&#32768;&#18512;&#1730;&#27688;&#1690;&#65535;&#32767;&#23224;&#1689;&#21840;&#1689;&#22128;&#1689;&#21992;&#1689;&#22312;&#1689;&#600;&#1689;&#21339;&#480;&#1689;&#26688;&#28059;&#2305;&#49164; &#4944;&#1689;&#23520;&#1689;&#2432;&#1689;&#29320;&#1690;&#23520;&#1689;&#2416;&#1689;&#2096;&#1689;&#1041;&#32768;&#31408;&#1722;&#28072;&#1690;&#65535;&#32767;&#23224;&#1689;&#21840;&#1689;&#22128;&#1689;&#21992;&#1689;&#22312;&#1689;&#600;&#1689;&#18779;&#480;&#1689;&#26688;&#28059;&#2562;&#49164; &#4944;&#1689;&#23520;&#1689;&#2768;&#1689;&#29416;&#1690;&#23520;&#1689;&#2752;&#1689;&#2432;&#1689;&#1041;&#32768;&#27640;&#1729;&#27400;&#1690;&#65530;&#32767; daemon [_thread_blocked, id=3244, stack(0x0ae00000,0x0ae50000)]
    0x0aad4400 JavaThread "" [_thread_blocked, id=1788, stack(0x0adb0000,0x0ae00000)]
    0x0aac6c00
    [error occurred during error reporting (printing all threads), id 0xc0000005]
    VM state:at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
    [0x003a5ab0/0x00002710] Threads_lock - owner thread: 0x0aaa0c00
    [0x003a5c50/0x000026d0] Heap_lock - owner thread: 0x003a6400
    Heap
    def new generation total 960K, used 64K [0x02990000, 0x02a90000, 0x02e70000)
    eden space 896K, 0% used [0x02990000, 0x02990000, 0x02a70000)
    from space 64K, 100% used [0x02a70000, 0x02a80000, 0x02a80000)
    to space 64K, 0% used [0x02a80000, 0x02a80000, 0x02a90000)
    tenured generation total 4224K, used 4223K [0x02e70000, 0x03290000, 0x06990000)
    the space 4224K, 99% used [0x02e70000, 0x0328fc38, 0x031a2200, 0x03290000)
    compacting perm gen total 12288K, used 4879K [0x06990000, 0x07590000, 0x0a990000)
    the space 12288K, 39% used [0x06990000, 0x06e53cc0, 0x06e51200, 0x07590000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x00423000      C:\Program Files\Java\jre1.6.0_06\bin\javaw.exe
    0x7c900000 - 0x7c9b0000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c8f5000      C:\WINDOWS\system32\kernel32.dll
    0x77dd0000 - 0x77e6b000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e70000 - 0x77f02000      C:\WINDOWS\system32\RPCRT4.dll
    0x77fe0000 - 0x77ff1000      C:\WINDOWS\system32\Secur32.dll
    0x7e410000 - 0x7e4a0000      C:\WINDOWS\system32\USER32.dll
    0x77f10000 - 0x77f57000      C:\WINDOWS\system32\GDI32.dll
    0x629c0000 - 0x629c9000      C:\WINDOWS\system32\LPK.DLL
    0x74d90000 - 0x74dfb000      C:\WINDOWS\system32\USP10.dll
    0x77c10000 - 0x77c68000      C:\WINDOWS\system32\msvcrt.dll
    0x7c340000 - 0x7c396000      C:\Program Files\Java\jre1.6.0_06\bin\msvcr71.dll
    0x6d7c0000 - 0x6da10000      C:\Program Files\Java\jre1.6.0_06\bin\client\jvm.dll
    0x76b40000 - 0x76b6d000      C:\WINDOWS\system32\WINMM.dll
    0x6bd00000 - 0x6bd0d000      C:\WINDOWS\system32\SYNCOR11.DLL
    0x6d270000 - 0x6d278000      C:\Program Files\Java\jre1.6.0_06\bin\hpi.dll
    0x76bf0000 - 0x76bfb000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d360000 - 0x6d389000      C:\Program Files\Java\jre1.6.0_06\bin\jdwp.dll
    0x6d6c0000 - 0x6d6c6000      C:\Program Files\Java\jre1.6.0_06\bin\npt.dll
    0x6d770000 - 0x6d77c000      C:\Program Files\Java\jre1.6.0_06\bin\verify.dll
    0x6d310000 - 0x6d32f000      C:\Program Files\Java\jre1.6.0_06\bin\java.dll
    0x6d7b0000 - 0x6d7bf000      C:\Program Files\Java\jre1.6.0_06\bin\zip.dll
    0x6d1e0000 - 0x6d1e7000      C:\Program Files\Java\jre1.6.0_06\bin\dt_socket.dll
    0x71ab0000 - 0x71ac7000      C:\WINDOWS\system32\WS2_32.dll
    0x71aa0000 - 0x71aa8000      C:\WINDOWS\system32\WS2HELP.dll
    0x71a50000 - 0x71a8f000      C:\WINDOWS\System32\mswsock.dll
    0x76f20000 - 0x76f47000      C:\WINDOWS\system32\DNSAPI.dll
    0x76fb0000 - 0x76fb8000      C:\WINDOWS\System32\winrnr.dll
    0x76f60000 - 0x76f8c000      C:\WINDOWS\system32\WLDAP32.dll
    0x76fc0000 - 0x76fc6000      C:\WINDOWS\system32\rasadhlp.dll
    0x662b0000 - 0x66308000      C:\WINDOWS\system32\hnetcfg.dll
    0x71a90000 - 0x71a98000      C:\WINDOWS\System32\wshtcpip.dll
    VM Arguments:
    jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:1578
    java_command: TestingResults
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=C:\Program Files\j2sdk_nb\j2sdk1.4.2
    CLASSPATH=.;C:\TomCat\webapps\Profiling;C:\TomCat\common\lib\servlet-api.jar;C:\TomCat\common\lib\jsp-api.jar;c:\program files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar;c:\program files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar;c:\program files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar;C:\Program Files\Java\jre1.5.0_03\lib\ext\QTJava.zip
    PATH=C:\Program Files\Java\jre1.6.0_06\bin\client;C:\Program Files\Java\jre1.6.0_06\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\jwsdp-1.3\jwsdp-shared\bin;C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin
    USERNAME=maria
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 13 Stepping 6, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 1 (1 cores per cpu, 1 threads per core) family 6 model 13 stepping 6, cmov, cx8, fxsr, mmx, sse, sse2
    Memory: 4k page, physical 523632k(50496k free), swap 882224k(299028k free)
    vm_info: Java HotSpot(TM) Client VM (10.0-b22) for windows-x86 JRE (1.6.0_06-b02), built on Mar 25 2008 01:22:05 by "java_re" with MS VC++ 7.1
    time: Sun Jun 15 19:09:27 2008
    elapsed time: 105 seconds
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Hi there,
    I am trying to run my application in java and suddenly java started giving me the bellow error:
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d81bd10, pid=1500, tid=3624
    # Java VM: Java HotSpot(TM) Client VM (10.0-b22 mixed mode windows-x86)
    # Problematic frame:
    # V [jvm.dll+0x5bd10]
    # An error report file with more information is saved as:
    # G:\My Documents\UCY\Graduate\Final Year Project\Persona\Testing\hs_err_pid1500.log
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    I do not believe that this is a problem in my code as this was working before.
    Also the system works fine for about 20 iterations of the same code and then displays this error
    I also try to uninstall and reinstall java but with no luck.
    I am also attaching the log file that java has saved some information.
    Thanks a lot for your help in advance.
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d81bd10, pid=1500, tid=3624
    # Java VM: Java HotSpot(TM) Client VM (10.0-b22 mixed mode windows-x86)
    # Problematic frame:
    # V [jvm.dll+0x5bd10]
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    --------------- T H R E A D ---------------
    Current thread (0x0aaa0c00): VMThread [stack: 0x0ab30000,0x0ab80000] [id=3624]
    siginfo: ExceptionCode=0xc0000005, reading address 0x00000050
    Registers:
    EAX=0x00000000, EBX=0x003abcec, ECX=0x072d0106, EDX=0x00000000
    ESP=0x0ab7f5bc, EBP=0x003abc60, ESI=0x06b29bc8, EDI=0x06b29bc8
    EIP=0x6d81bd10, EFLAGS=0x00010246
    Top of Stack: (sp=0x0ab7f5bc)
    0x0ab7f5bc: 06b29bc8 06b29bc8 00000000 6d940820
    0x0ab7f5cc: 6d7dcc8b 06b29bc8 0ab7f618 0ab7f618
    0x0ab7f5dc: 00000002 003aa9f8 6d86cd11 06b29c45
    0x0ab7f5ec: 003abab8 6d86cae1 003abcb0 6d83c5a3
    0x0ab7f5fc: 0ab7f618 00000000 003aaa50 06b29c45
    0x0ab7f60c: 6d86c927 0ab7f618 00000000 6d99f718
    0x0ab7f61c: 06b29c45 00000000 6d8676c3 06b29c45
    0x0ab7f62c: 06b29c45 00000000 0ab7f748 00000000
    Instructions: (pc=0x6d81bd10)
    0x6d81bd00: 08 07 c1 e8 02 25 fe ff ff 3f 5e 59 c3 8b 11 56
    0x6d81bd10: ff 52 50 5e 59 c3 cc cc cc cc cc cc cc cc cc cc
    Stack: [0x0ab30000,0x0ab80000], sp=0x0ab7f5bc, free space=317k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [jvm.dll+0x5bd10]
    VM_Operation (0x0090f410): GenCollectForAllocation, mode: safepoint, requested by thread 0x003a6400
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x0aade000 JavaThread "&#1281;&#49164; &#4944;&#1689;&#23520;&#1689;&#1088;&#1689;&#28936;&#1690;&#23520;&#1689;&#1072;&#1689;&#752;&#1689;&#1041;&#32768;&#27880;&#1690;&#65535;&#32767;&#23224;&#1689;&#21840;&#1689;&#22128;&#1689;&#21992;&#1689;&#22312;&#1689;&#600;&#1689;&#18011;&#480;&#1689;&#26688;&#28059;&#1538;&#49164; &#4944;&#1689;&#23520;&#1689;&#1424;&#1689;&#29032;&#1690;&#23520;&#1689;&#1408;&#1689;&#1088;&#1689;&#1041;&#32768;&#27496;&#1690;&#65530;&#32767;&#23224;&#1689;&#21840;&#1689;&#22128;&#1689;&#21992;&#1689;&#22312;&#1689;&#600;&#1689;&#17499;&#480;&#1689;&#26688;&#28059;&#1795;&#49168; &#4944;&#1689;&#23520;&#1689;&#1760;&#1689;&#29128;&#1690;&#23520;&#1689;&#1744;&#1689;&#1424;&#1689;&#1041;&#32768;&#27592;&#1690;&#65532;&#16383;&#23224;&#1689;&#21840;&#1689;&#22128;&#1689;&#21992;&#1689;&#22312;&#1689;&#600;&#1689;&#16987;&#480;&#1689;&#26688;&#28059;&#2048;&#49164; &#4944;&#1689;&#23520;&#1689;&#2096;&#1689;&#29224;&#1690;&#23520;&#1689;&#2080;&#1689;&#1760;&#1689;&#1041;&#32768;&#18512;&#1730;&#27688;&#1690;&#65535;&#32767;&#23224;&#1689;&#21840;&#1689;&#22128;&#1689;&#21992;&#1689;&#22312;&#1689;&#600;&#1689;&#21339;&#480;&#1689;&#26688;&#28059;&#2305;&#49164; &#4944;&#1689;&#23520;&#1689;&#2432;&#1689;&#29320;&#1690;&#23520;&#1689;&#2416;&#1689;&#2096;&#1689;&#1041;&#32768;&#31408;&#1722;&#28072;&#1690;&#65535;&#32767;&#23224;&#1689;&#21840;&#1689;&#22128;&#1689;&#21992;&#1689;&#22312;&#1689;&#600;&#1689;&#18779;&#480;&#1689;&#26688;&#28059;&#2562;&#49164; &#4944;&#1689;&#23520;&#1689;&#2768;&#1689;&#29416;&#1690;&#23520;&#1689;&#2752;&#1689;&#2432;&#1689;&#1041;&#32768;&#27640;&#1729;&#27400;&#1690;&#65530;&#32767; daemon [_thread_blocked, id=3244, stack(0x0ae00000,0x0ae50000)]
    0x0aad4400 JavaThread "" [_thread_blocked, id=1788, stack(0x0adb0000,0x0ae00000)]
    0x0aac6c00
    [error occurred during error reporting (printing all threads), id 0xc0000005]
    VM state:at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
    [0x003a5ab0/0x00002710] Threads_lock - owner thread: 0x0aaa0c00
    [0x003a5c50/0x000026d0] Heap_lock - owner thread: 0x003a6400
    Heap
    def new generation total 960K, used 64K [0x02990000, 0x02a90000, 0x02e70000)
    eden space 896K, 0% used [0x02990000, 0x02990000, 0x02a70000)
    from space 64K, 100% used [0x02a70000, 0x02a80000, 0x02a80000)
    to space 64K, 0% used [0x02a80000, 0x02a80000, 0x02a90000)
    tenured generation total 4224K, used 4223K [0x02e70000, 0x03290000, 0x06990000)
    the space 4224K, 99% used [0x02e70000, 0x0328fc38, 0x031a2200, 0x03290000)
    compacting perm gen total 12288K, used 4879K [0x06990000, 0x07590000, 0x0a990000)
    the space 12288K, 39% used [0x06990000, 0x06e53cc0, 0x06e51200, 0x07590000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x00423000      C:\Program Files\Java\jre1.6.0_06\bin\javaw.exe
    0x7c900000 - 0x7c9b0000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c8f5000      C:\WINDOWS\system32\kernel32.dll
    0x77dd0000 - 0x77e6b000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e70000 - 0x77f02000      C:\WINDOWS\system32\RPCRT4.dll
    0x77fe0000 - 0x77ff1000      C:\WINDOWS\system32\Secur32.dll
    0x7e410000 - 0x7e4a0000      C:\WINDOWS\system32\USER32.dll
    0x77f10000 - 0x77f57000      C:\WINDOWS\system32\GDI32.dll
    0x629c0000 - 0x629c9000      C:\WINDOWS\system32\LPK.DLL
    0x74d90000 - 0x74dfb000      C:\WINDOWS\system32\USP10.dll
    0x77c10000 - 0x77c68000      C:\WINDOWS\system32\msvcrt.dll
    0x7c340000 - 0x7c396000      C:\Program Files\Java\jre1.6.0_06\bin\msvcr71.dll
    0x6d7c0000 - 0x6da10000      C:\Program Files\Java\jre1.6.0_06\bin\client\jvm.dll
    0x76b40000 - 0x76b6d000      C:\WINDOWS\system32\WINMM.dll
    0x6bd00000 - 0x6bd0d000      C:\WINDOWS\system32\SYNCOR11.DLL
    0x6d270000 - 0x6d278000      C:\Program Files\Java\jre1.6.0_06\bin\hpi.dll
    0x76bf0000 - 0x76bfb000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d360000 - 0x6d389000      C:\Program Files\Java\jre1.6.0_06\bin\jdwp.dll
    0x6d6c0000 - 0x6d6c6000      C:\Program Files\Java\jre1.6.0_06\bin\npt.dll
    0x6d770000 - 0x6d77c000      C:\Program Files\Java\jre1.6.0_06\bin\verify.dll
    0x6d310000 - 0x6d32f000      C:\Program Files\Java\jre1.6.0_06\bin\java.dll
    0x6d7b0000 - 0x6d7bf000      C:\Program Files\Java\jre1.6.0_06\bin\zip.dll
    0x6d1e0000 - 0x6d1e7000      C:\Program Files\Java\jre1.6.0_06\bin\dt_socket.dll
    0x71ab0000 - 0x71ac7000      C:\WINDOWS\system32\WS2_32.dll
    0x71aa0000 - 0x71aa8000      C:\WINDOWS\system32\WS2HELP.dll
    0x71a50000 - 0x71a8f000      C:\WINDOWS\System32\mswsock.dll
    0x76f20000 - 0x76f47000      C:\WINDOWS\system32\DNSAPI.dll
    0x76fb0000 - 0x76fb8000      C:\WINDOWS\System32\winrnr.dll
    0x76f60000 - 0x76f8c000      C:\WINDOWS\system32\WLDAP32.dll
    0x76fc0000 - 0x76fc6000      C:\WINDOWS\system32\rasadhlp.dll
    0x662b0000 - 0x66308000      C:\WINDOWS\system32\hnetcfg.dll
    0x71a90000 - 0x71a98000      C:\WINDOWS\System32\wshtcpip.dll
    VM Arguments:
    jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:1578
    java_command: TestingResults
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=C:\Program Files\j2sdk_nb\j2sdk1.4.2
    CLASSPATH=.;C:\TomCat\webapps\Profiling;C:\TomCat\common\lib\servlet-api.jar;C:\TomCat\common\lib\jsp-api.jar;c:\program files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar;c:\program files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar;c:\program files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar;C:\Program Files\Java\jre1.5.0_03\lib\ext\QTJava.zip
    PATH=C:\Program Files\Java\jre1.6.0_06\bin\client;C:\Program Files\Java\jre1.6.0_06\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\jwsdp-1.3\jwsdp-shared\bin;C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin
    USERNAME=maria
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 13 Stepping 6, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 1 (1 cores per cpu, 1 threads per core) family 6 model 13 stepping 6, cmov, cx8, fxsr, mmx, sse, sse2
    Memory: 4k page, physical 523632k(50496k free), swap 882224k(299028k free)
    vm_info: Java HotSpot(TM) Client VM (10.0-b22) for windows-x86 JRE (1.6.0_06-b02), built on Mar 25 2008 01:22:05 by "java_re" with MS VC++ 7.1
    time: Sun Jun 15 19:09:27 2008
    elapsed time: 105 seconds
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • Error in executing servlet JSPRunner: java.lang.NullPointerException

    I have some problems with my jsp files.
    I am using iAS6sp4 and iWS 6 on W2K.
    I created a EJB jar file and an empty WAR file (No JSP, Servlet, just web.xml & ias-web.xml) and pack them into a ear file for deployment. It was successful.
    Then I copy some jsp files to <iasinstall>/ias6/ias/APPS/<app name>/<war name>
    and restart the ias and iws server.
    When I try the URL: "http://myserver/NASApp/<app name>/myjsp.jsp", I got this error message from kjs.
    JSPRunner: init
    Exception: SERVLET-execution_failed: Error in executing servlet JSPRunner: java.lang.NullPointerException
    My jsp didn't include any java code, just pure htm code. I want to give it a test. But even though I tried with a proper jsp i still got this message. pls advise.
    Alan

    Hi,
    I got this working. Here are the steps that I followed and the output...
    Steps
    1. Deployed the helloworld application
    2. Invoked the application to see if it works fine
    3. Copied the myjsp.jsp to the C:\iPlanet\ias6\ias\APPS\helloworld\helloworld directory
    4. Shutdown the iAS and iWS and started again
    5. Invoked the .jsp file by typing http://sundts2.india.sun.com:81/NASApp/helloworld/myjsp.jsp in the browser.
    Output of KJS
    [16/Mar/2002 14:46:06:5] info: ENGINE-ready: ready: 10819
    **********Registered ebnls interceptor ...!
    [16/Mar/2002 14:46:22:4] info: --------------------------------------
    [16/Mar/2002 14:46:22:4] info: JSPRunner: init
    [16/Mar/2002 14:46:22:4] info: --------------------------------------
    [16/Mar/2002 14:46:26:4] info: --------------------------------------
    [16/Mar/2002 14:46:26:4] info: jsp.APPS.helloworld.myjsp: init
    [16/Mar/2002 14:46:26:4] info: --------------------------------------
    The myjsp.jsp coding is...
    <HTML>
    <BODY>
    <H1>This is a .jsp file for testing</H1>
    </BODY>
    </HTML>
    I believe the problem in your case must be that the .jsp file has been placed in a directory where iAS is not able to recognise. I'm sure this will help. Please feel free to raise questions on this.
    Regards
    Ganesh .R
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support

Maybe you are looking for