"exception in thread main" error while running "dbca"

Hi,
i am getting following kind of error while trying to run dbca in linux.
"exception in thread main"
i have the dispaly env var set. and xhost+ set too. but still dbca is not working.
i have pasted the contents of dbca file below. can someone have a look at the file and help me find the error.
it would be great if someone can paste their dbca file content, so i can compare and fix the error.
#!/bin/sh -f
# $Header: dbca.sh 12-may-2005.11:05:03 xuliu Exp $
# dbca.sh
# Copyright (c) 1997, 2005, Oracle. All rights reserved.
# NAME
# dbassist - Shell script to run Database Creation Assistant
# DESCRIPTION
# Runs Database Creation Assistion java application
# Run this script with -h or -help option to get the help.
# MODIFIED (MMDD/YY)
# npamnani 10/23/02 - add 1.3.1. java flag
# npamnani 10/09/02 - run with java instead jre
# dkapoor 07/05/2000 - Created
# Variables set by Oracle Universal Installer for dependent components.
# Define ORACLE_HOME -> OH
OH=/home/oracle/oracle/product/10.2.0/db_1
PLATFORM=Linux
ORACLE_HOME=$OH
export ORACLE_HOME;
# Version specific JAR files
JRE_FILE=rt.jar
I18_FILE=i18n.jar
EWT_FILE=ewt3.jar
JEWT_FILE=jewt4.jar
EWT_COMP_FILE=ewtcompat-3_3_15.jar
SHARE_FILE=share.jar
HELP_FILE=help4.jar
#ICE_BROWSER_FILE=oracle_ice5.jar
ICE_BROWSER5_FILE=oracle_ice5.jar
KODIAK_FILE=kodiak.jar
SWING_FILE=swingall-1_1_1.jar
XMLPARSER_FILE=xmlparserv2.jar
JDBC_FILE=classes12.zip
GDK_FILE1=orai18n.jar
GDK_FILE2=orai18n-mapping.jar
GDK_FILE3=orai18n-utility.jar
GDK_FILE4=orai18n-collation.jar
NETCFG_FILE=netcfg.jar
OJMISC_FILE=ojmisc.jar
PKI_FILE=oraclepki103.jar
LDAP_FILE=ldapjclnt10.jar
OPM_FILE=opm.jar
SRVM_FILE=srvm.jar
SRVMHAS_FILE=srvmhas.jar
SRVMASM_FILE=srvmasm.jar
ASSISTANTS_COMMON_FILE=assistantsCommon.jar
DBCA_FILE=dbca.jar
EMLITE_JAR=oemlt-10_1_0.jar
INSTALLER_FILE=OraInstaller.jar
PREREQ_JAR_FILE=OraPrereq.jar
PREREQ_CHECKS_JAR_FILE=OraPrereqChecks.jar
# Directory Variables
SRVM_JLIB_DIR=/home/oracle/oracle/product/10.2.0/db_1/jlib
JRE_DIR=/home/oracle/oracle/product/10.2.0/db_1/jdk/jre
LIB_DIR=$OH/lib
LIB32_DIR=$OH/lib32
JLIB_DIR=$OH/jlib
DBCA_JLIB_DIR=$OH/assistants/dbca/jlib
ASSISTANTS_JLIB_DIR=$OH/assistants/jlib
INSTALLER_JLIB_DIR=/home/oracle/oracle/product/10.2.0/db_1/oui/jlib
# Classpath
JRE_CLASSPATH=$JRE_DIR/lib/$JRE_FILE
I18_CLASSPATH=$JRE_DIR/lib/$I18_FILE
EWT_CLASSPATH=$JLIB_DIR/$EWT_FILE:$JLIB_DIR/$EWT_COMP_FILE
SHARE_CLASSPATH=$JLIB_DIR/$SHARE_FILE
HELP_CLASSPATH=$JLIB_DIR/$HELP_FILE:$JLIB_DIR/$JEWT_FILE
ICE_BROWSER_CLASSPATH=$JLIB_DIR/$ICE_BROWSER5_FILE
KODIAK_CLASSPATH=$JLIB_DIR/$KODIAK_FILE
SWING_CLASSPATH=$JLIB_DIR/$SWING_FILE
XMLPARSER_CLASSPATH=/home/oracle/oracle/product/10.2.0/db_1/lib/$XMLPARSER_FILE
JDBC_CLASSPATH=$OH/jdbc/lib/$JDBC_FILE
GDK_CLASSPATH=$JLIB_DIR/$GDK_FILE1:$JLIB_DIR/$GDK_FILE2:$JLIB_DIR/$GDK_FILE3:$JLIB_DIR/$GDK_FILE4
NETCFG_CLASSPATH=$JLIB_DIR/$NETCFG_FILE:$JLIB_DIR/$OJMISC_FILE:$JLIB_DIR/$PKI_FILE:$JLIB_DIR/$LDAP_FILE:$JLIB_DIR/$OPM_FILE
SRVM_CLASSPATH=$SRVM_JLIB_DIR/$SRVM_FILE:$SRVM_JLIB_DIR/$SRVMHAS_FILE:$SRVM_JLIB_DIR/$SRVMASM_FILE
EM_CLASSPATH=$OH/classes:$JLIB_DIR/$EMLITE_JAR:$JLIB_DIR/emca.jar:$OH/sysman/jlib/emCORE.jar:$OH/oc4j/j2ee/home/oc4j.jar:$OH/oc4j/j2ee/home/db_oc4j_deploy.jar:$JLIB_DIR/emConfigInstall.jar
ASSISTANTS_COMMON_CLASSPATH=$ASSISTANTS_JLIB_DIR/$ASSISTANTS_COMMON_FILE
DBCA_CLASSPATH=$DBCA_JLIB_DIR/$DBCA_FILE
INSTALLER_CLASSPATH=$INSTALLER_JLIB_DIR/$INSTALLER_FILE:$INSTALLER_JLIB_DIR/$PREREQ_JAR_FILE:$OH/inventory/prereqs/oui/$PREREQ_CHECKS_JAR_FILE:$INSTALLER_JLIB_DIR/$PREREQ_CHECKS_JAR_FILE
# Check for silent or help
SILENT="false"
for i in $*
do
if [ $i = "-silent"  ] || [ $i = "-help"  ] || [ $i = "-h"  ]; then
SILENT="true"
break
fi
done
# Check for DISPLAY
if [ $SILENT = "false"  ]; then
case $DISPLAY in
echo "DISPLAY not set."
echo "Set DISPLAY environment variable, then re-run."
exit;
esac
fi
# make sure others can not read/write any files created
umask 27
# The environment variable $TWO_TASK cannot be set during the installation
unset TWO_TASK
# The environment variable $JAVA_HOME cannot be set during the installation
unset JAVA_HOME
# Basic error checking
case $OH in
"") echo "*** ORACLE_HOME Not Set!"
echo " Set and export ORACLE_HOME, then re-run"
echo " ORACLE_HOME points to the main directory that"
echo " contains all Oracle products."
exit 1;;
esac
# Set the LD_LIBRARY_PATH to set the path for shared objects
# Do not set it on AIX
if [ $PLATFORM != IBM_AIX ]; then
LD_LIBRARY_PATH=$LIB32_DIR:$OH/network/lib32:$LIB_DIR:$OH/network/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH;
fi
# Set SHLIB_PATH for HP to use 32bit native libraries
SHLIB_PATH=$LIB32_DIR:$ORACLE_HOME/network/lib32:$SHLIB_PATH
export SHLIB_PATH;
# Set LIBPATH for AIX to use 32bit native libraries
LIBPATH=$LIB32_DIR:$ORACLE_HOME/network/lib32:$LIBPATH
export LIBPATH;
# Set Classpath for Database Creation Assistant
CLASSPATH=$JRE_CLASSPATH:$I18_CLASSPATH:$DBCA_CLASSPATH:$ASSISTANTS_COMMON_CLASSPATH:$EWT_CLASSPATH:$SHARE_CLASSPATH:$HELP_CLASSPATH:$ICE_BROWSER_CLASSPATH:$KODIAK_CLASSPATH:$SWING_CLASSPATH:$XMLPARSER_CLASSPATH:$GDK_CLASSPATH:$NETCFG_CLASSPATH:$JDBC_CLASSPATH:$SRVM_CLASSPATH:$EM_CLASSPATH:$INSTALLER_CLASSPATH
ARGUMENTS=""
NUMBER_OF_ARGUMENTS=$#
if [ $NUMBER_OF_ARGUMENTS -gt 0 ]; then
ARGUMENTS=$*
fi
# Run DBCA
$JRE_DIR/bin/java -Dsun.java2d.font.DisableAlgorithmicStyles=true -DORACLE_HOME=$OH -DDISPLAY=$DISPLAY -DJDBC_PROTOCOL=thin -mx128m -classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS
Thanks,
Philip.

I got this error also,.
After restart the computer, it runs ok.

Similar Messages

  • Program Compiles, but Exception in thread "main" error is thrown

    Hello everybody,
    I am getting the following error when I try to run my program. It compiles fine, but a Exception in thread "main" error is given when I try to run the program. This is the full error:
    Exception in thread "main" java.lang.Error: Do not use KonnectHelpdeskFrame.add(
    ) use KonnectHelpdeskFrame.getContentPane().add() instead
            at javax.swing.JFrame.createRootPaneException(JFrame.java:446)
            at javax.swing.JFrame.addImpl(JFrame.java:472)
            at java.awt.Container.add(Container.java:298)
            at KonnectHelpdesk.main(KonnectHelpdesk.java:15)
    Press any key to continue . . .The code that I beleive contributes to the error is below. I'm not sure what is causing the problem, so any help will be greatly appreciated. Thanks.
    class VoiceMailEntryDialog extends JDialog
         public VoiceMailEntryDialog(JFrame owner)
              super(owner, "New Voicemail Entry", true);
              Container contentPane = getContentPane();
              GridBagLayout layout = new GridBagLayout();
              contentPane.setLayout(layout);
              JLabel numberLabel = new JLabel("Phone Number: ");
              JLabel dayCalledLabel = new JLabel("Day Customer Called: ");
              JLabel timeCalledLabel = new JLabel("Time Customer Called: ");
              JLabel firstNameLabel = new JLabel("First Name: ");
              JLabel lastNameLabel = new JLabel("Last Name: ");
              JLabel messageLabel = new JLabel("Message: ");
              JTextField phoneNumber = new JTextField(20);
              JTextField firstName = new JTextField(20);
              JTextField lastName = new JTextField(30);
              JTextArea message = new JTextArea(8, 30);
              message.setLineWrap(true);
              message.setBorder(BorderFactory.createEtchedBorder());
              JComboBox dayCalled = new JComboBox(new String[]
                   "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday"
              JComboBox timeCalled = new JComboBox(new String[]
                   "9:30am - 9:59am", "10:00am - 10:59am", "11:00am - 11:59am", "12:00pm - 12:59pm",
                   "1:00pm - 1:59pm", "2:00pm - 2:59pm", "3:00pm - 3:59pm", "4:00pm - 4:59pm",
                   "5:00pm - 5:59pm", "6:00pm - 6:59pm", "7:00pm - 7:59pm", "8:00pm - 8:59pm",
                   "9:00pm - 9:59pm", "10:00pm - 9:29am"
              ActionListener noMsgListener = new NoMessageChecked();
              JCheckBox noMessageCheckbox = new JCheckBox("Left no message");
              noMessageCheckbox.addActionListener(noMsgListener);
              JButton ok = new JButton("OK");
              ok.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent evt)
                        setVisible(false);
              JButton cancel = new JButton("Cancel");
              cancel.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent evt)
                        setVisible(false);
              GridBagConstraints constraints = new GridBagConstraints();
              constraints.fill = GridBagConstraints.NONE;
              constraints.anchor = GridBagConstraints.EAST;
              constraints.weightx = 0;
              constraints.weighty = 0;
              add(numberLabel, constraints, 0, 0, 1, 1);
              add(dayCalledLabel, constraints, 0, 2, 1, 1);
              add(timeCalledLabel, constraints, 0, 4, 1, 1);
              setSize(400, 700);
         public void add(Component c, GridBagConstraints constraints, int x, int y, int w, int h)
              constraints.gridx = x;
              constraints.gridy = y;
              constraints.gridwidth = w;
              constraints.gridheight = h;
              getContentPane().add(c, constraints);
         private class NoMessageChecked implements ActionListener
              public void actionPerformed(ActionEvent event)
    }

    atmguy,
    Thanks. It turns out the the line that was causing the problem was in the error message. I guess it helps to pay attention. You are correct in what the line says and changing it made the program run, but caused some other minor problems that I'll work out later. Thanks again for you help.
    jerryrika

  • Error while running dbca

    While installing Oracle 9i Release 2 on HP-UX 11.11 I got the error "Thrown when the IP address of a host cannot be determined". On refering to documents I tried the hostname and nslookup commands both of which were successful. I ignored the error untill the installation and linking was successful but when running the database configuration assistant (dbca) I got the errors:
    oracle@primback-/home/oracle $ dbca
    java.lang.NullPointerException
    at oracle.sysman.assistants.util.NetworkUtils.getOneLocalListenerProtoc)
    at oracle.sysman.assistants.util.NetworkUtils.getOneLocalListenerProtoc)
    at oracle.sysman.assistants.util.NetworkUtils.getOneLocalListenerProtoc)
    at oracle.sysman.assistants.util.NetworkUtils.getOneLocalListenerProtoc)
    at oracle.sysman.assistants.util.NetworkUtils.getOneLocalListenerProtoc)
    at oracle.sysman.assistants.util.NetworkUtils.getLocalListenerAddress(N)
    at oracle.sysman.assistants.util.NetworkUtils.getLocalListenerAddresses)
    at oracle.sysman.assistants.util.NetworkUtils.needLocalListener(Network)
    at oracle.sysman.assistants.util.step.StepContext.setListenersToUpdate()
    at oracle.sysman.assistants.util.step.StepContext.<init>(StepContext.ja)
    at oracle.sysman.assistants.dbca.backend.Host.<init>(Host.java:454)
    at oracle.sysman.assistants.dbca.ui.UIHost.<init>(UIHost.java:185)
    at oracle.sysman.assistants.dbca.ui.InteractiveHost.<init>(InteractiveH)
    at oracle.sysman.assistants.dbca.Dbca.getHost(Dbca.java:141)
    at oracle.sysman.assistants.dbca.Dbca.execute(Dbca.java:85)
    at oracle.sysman.assistants.dbca.Dbca.main(Dbca.java:161)
    Exception in thread "main" oracle@primback-/home/oracle $
    Could someone please help me with this error.
    Thanks in advance,
    EDWIN

    I've already found the solution to the problem. I changed the permissions on the /etc/hosts file to (a+rwx) as advised on another public forum but forgot to reconfigure the listener so the problem was recurring but after reconfiguring the listener, my problems were solved.

  • Exception in thread "main" - error: Please help

    I installed the Java 1.4.0 beta on my machine. I configured the JRE and the javac and java commands are responding well. Now I have written very simple classes which are compiling without errors. But now, if I use the java command to run the classes, I am getting the following message:
    Exception in thread "main" java.lang.NoClassFoundError: ForTick/class ;
    where ForTick is the name of my class for example. Where am I going wrong? Also, where do I find documentation for error messages like this - I have toured almost the whole java website and even the documentation that I downloaded -but I couldn't find it.
    Please help me coz I am just stuck.

    Did you try
    java ForTick.class ?
    If so, please try
    java ForTickHope this helps

  • Exception in thread "main" error

    I have a real problem. I am trying to write a hello world program in java using native code. my java code is as follow :
    class HelloWorld {
    static {
    System.loadLibrary("Hello.so");
    private native void print();
    public static void main(String[] args) {
    new HelloWorld().print();
    System.out.println("Good bye Hello World!!");
    my native c code is as follow :
    #include <jni.h>
    #include <stdio.h>
    #include "HelloWorld.h"
    JNIEXPORT void JNICALL
    print(JNIEnv *env,jobject obj) {
    printf("Hello cruel world. Hope you can live through the Human Phase!.\n");
    return ;
    I use javac HelloWorld.java to get my HelloWorld.class file.
    I use javah HelloWorld to het my HelloWorld.h file
    i set my LD_LOBRARY_PATH to where my native code is.
    i compile the c code using "
    gcc -c -I /usr/java/j2sdk1.4.0/include -I /usr/java/j2sdk1.4.0/include/linux HelloWorld.c -o Hello.so
    everything is good up to this point. But when i call java HelloWorld, i get the following error : "
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no Hello.so in java.library.path     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1370)
         at java.lang.Runtime.loadLibrary0(Runtime.java:773)
         at java.lang.System.loadLibrary(System.java:835)
         at HelloWorld.<clinit>(HelloWorld.java:3)
    Can any one help. I am using RedHat 7.2, kernel 2.4.10-17.
    Thank you
    Shafi Jourabchi [email protected]

    Thank you all who have responded. The solution to my problem was with the compile options. I was not using the right option to compile the shared lib object file.
    the command i used ( and it worked ) was :
    gcc -o libHello.so -shared -Wl, -soname,libHello.so -I /usr/java/j2sdk/include -I /usr/java/j2sdk/include/linux HelloWorldImp.c -static -Lc
    Shafi jourabchi

  • Doubt in AXIS-Exception in thread "main" . how can i run this program

    hi
    I am new to axis., I done few webservice program using Jwsdp
    i can't resolve the reason for this exception.
    I have set all the classpath and other path variable that is necessary for axis .,
    I got this example from http://javaboutique.internet.com/tutorials/Axis/index.html
    Can any one help to solve this problem.,
    **************Code***************
    import java.util.*;
    public class NHLService {
      HashMap standings = new HashMap();
      public NHLService() {
        // NHL - part of the standings as per 04/07/2002
        standings.put("atlantic/philadelphia", "1");
        standings.put("atlantic/ny islanders", "2");
        standings.put("atlantic/new jersey", "3");
        standings.put("central/detroit", "1");
        standings.put("central/chicago", "2");
        standings.put("central/st.louis", "3");
      public String getCurrentPosition(String division, String team) {
        String p = (String)standings.get(division + '/' + team);
        return (p == null) ? "Team not found" : p;
    package hansen.playground;
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import javax.xml.rpc.namespace.QName;
    import java.net.*;
    public class NHLServiceClient {
       public static void main(String [] args) throws Exception {
           Service service = new Service();
           Call call = (Call)service.createCall();
           String endpoint = "http://localhost:8081/axis/NHLService.jws";
           call.setTargetEndpointAddress(new URL(endpoint));
           call.setOperationName(new QName("getCurrentPosition"));
           String division = args[0];
           String team = args[1];
           String position =
             (String)call.invoke(new Object [] {new String(division), new String(team)});
           System.out.println("Got result : " + position);
    }************ classpath***************
    :/home/sujithkr/webservices/xml-axis/java:
    /home/sujithkr/webservices/xml-axis/webapps/axis/WEB-INF/lib/axis.jar
    /home/sujithkr/webservices/xml-axis/lib/activation.jar
    :/home/sujithkr/webservices/xml-axis/webapps/axis/WEB-INF/lib/clutil.jar
    :/home/sujithkr/webservices/xml-axis/webapps/axis/WEB-INF/lib/commons-logging.jar
    :/home/sujithkr/webservices/xml-axis/webapps/axis/WEB-INF/lib/jaxrpc.jar
    :/home/sujithkr/webservices/xml-axis/webapps/axis/WEB-INF/lib/log4j-core.jar
    :/home/sujithkr/webservices/xml-axis/webapps/axis/WEB-INF/lib/tt-bytecode.jar
    ********************Error Report*******************************
    java hansen.playground.NHLServiceClient atlantic philadelphia
    Exception in thread "main" Error while compiling: /usr/local/tomcat/webapps/axis//NHLService.java
    at org.apache.axis.message.SOAPFaultBuilder.endElement(Unknown Source)
    at org.apache.axis.encoding.DeserializationContextImpl.endElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
    at org.apache.axis.encoding.DeserializationContextImpl.parse(Unknown Source)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(Unknown Source)
    at org.apache.axis.client.Call.invoke(Unknown Source)
    at org.apache.axis.client.Call.invoke(Unknown Source)
    at org.apache.axis.client.Call.invoke(Unknown Source)
    at org.apache.axis.client.Call.invoke(Unknown Source)
    at hansen.playground.NHLServiceClient.main(NHLServiceClient.java:21)
    suse-1:/home/sujithkr/webservices # clear
    suse-1:/home/sujithkr/webservices # java hansen.playground.NHLServiceClient atlantic philadelphia
    Exception in thread "main" Error while compiling: /usr/local/tomcat/webapps/axis//NHLService.java
    at org.apache.axis.message.SOAPFaultBuilder.endElement(Unknown Source)
    at org.apache.axis.encoding.DeserializationContextImpl.endElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
    at org.apache.axis.encoding.DeserializationContextImpl.parse(Unknown Source)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(Unknown Source)
    at org.apache.axis.client.Call.invoke(Unknown Source)
    at org.apache.axis.client.Call.invoke(Unknown Source)
    at org.apache.axis.client.Call.invoke(Unknown Source)
    at org.apache.axis.client.Call.invoke(Unknown Source)
    at hansen.playground.NHLServiceClient.main(NHLServiceClient.java:21)
    thank you for helping me in your hectic schedule....

    Please post your code using code tags.
    When I try to compile or build i cant.What is your question? Exactly what error message do you get?

  • Exception in thread "main" dbca OEL 4.7

    Hallo!I am a newbie in Oracle 10g having installed Oracle 10g in Oracle Enterprise Linux version 4 update 7.
    While installing Oracle 10g (I installed it on my Laptop the server and not remotely),I configured xhost + display parameters via the commands below
    [root@joey-oel ~]# xhost +
    access control disabled, clients can connect from any host
    [root@joey-oel ~]# su - oracle
    [oracle@joey-oel ~]$ DISPLAY=10.0.0.1:0.0
    [oracle@joey-oel ~]$ export DISPLAY
    IP address 10.0.0.1 is the IP address of the server from where I am installing Oracle.When I try to launch the DBCA via the command below,
    [oracle@joey-oel ~]$ dbca
    I get the following error
    Exception in thread "main" [oracle@joey-oel ~]$ dbca
    Thus,I tried to reconfigure the display parameters as below but the errors shown below appear
    [root@joey-oel ~]# xhost +
    xhost: unable to open display "10.0.0.1:0.0"
    [root@joey-oel ~]# su - oracle
    [oracle@joey-oel ~]$ DISPLAY=10.0.0.1:0.0
    [oracle@joey-oel ~]$ export DISPLAY
    [oracle@joey-oel ~]$ xhost +
    xhost: unable to open display "10.0.0.1:0.0"
    [oracle@joey-oel ~]$ dbca
    Exception in thread "main" [oracle@joey-oel ~]$
    How do I resolve this?
    Thanks.

    What happens when you close the terminal , open a new terminal , issue as Root user xhost+ and then fire up dbca in Oralce user? Don't set again the display variable in the Oracle user if you have given xhost+ as Root.
    HTH
    Aman....

  • Error While Running the Mobile Application.

    Hi friends,
    In SAP MI 7.1 I have Successfully done the following steps:-
    1. Created and build the service.
    2. Created and build the UI.
    3. Created and Build the application.
    as per the tutorial available in the link
    http://help.sap.com/saphelp_nwmobile71/helpdata/en/45/e5f99c6f472e98e10000000a155369/frameset.htm
    After deploying , When I am trying to run the mobile application . I am getting the below shown error.
    java.lang.IllegalStateException: com/sap/sdb/minDB/DriverEmbeddedMinDB (Unsupported major.minor version 48.0)
         at com.sap.tc.mobile.cfs.compat.Context.getPersistenceManager(Context.java:41)
         at com.sap.tc.mobile.cfs.compat.Context.getPersistenceManager(Context.java:28)
         at com.sap.tc.mobile.cfs.init.FrameworkInitializer.init(FrameworkInitializer.java:76)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.sap.tc.mobile.cfs.startup.pda.Startup.main(Unknown Source)
    Error starting the framework
    java.lang.reflect.InvocationTargetException: java.lang.IllegalStateException: Cannot initialize framework
         at com.sap.tc.mobile.cfs.init.FrameworkInitializer.init(FrameworkInitializer.java:146)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.sap.tc.mobile.cfs.startup.pda.Startup.main(Unknown Source)
    Also in the Netweaver prefrences /Mobile/handhelds/runtime settings/ when I click on launch simulator . It gives the same error.
    Please Suggest.
    Regards
    Nitesh.

    <br>Thanks a lot Alen . The reply was usefull. <br><br>
    Now after deploying when I am running the application in mobile handheld Simulator . It gives the below shown exception<br><br>
    2009-11-04 13:39:40 ...  (com.sap.tc.mobile.wdlite.renderer.exception.OCAExceptionLocalizeHelper:) Thread: main Error: <br>Resourcebundle sap.comtcmobilewdlitecontainer could not be found. Trying to use the default bundle.<br>
    2009-11-04 13:39:40 ...  (com.sap.tc.mobile.cfs.pers.PersistenceManager:release resultset) Thread: Finalizer Error: <br>java.sql.SQLException: Result set is closed<br>
    2009-11-04 13:39:40 ...  Thread: main Error: Internal Error. Please check the log file. --> <br>
    2009-11-04 13:39:40 ...  (com.sap.tc.mobile.wdlite.renderer.exception.OCAExceptionHandler:) Thread: main Error: Internal <br>Error. Please check the log file.<br>
    2009-11-04 13:39:40 ...  (com.sap.tc.mobile.wdlite.renderer.exception.OCAExceptionLocalizeHelper:) Thread: main Error: <br>Resourcebundle sap.comtcmobilewdlitecontainer could not be found. Trying to use the default bundle.<br>
    2009-11-04 13:39:40 ...  Thread: main Error: Internal Error. Please check the log file. --> <br>
    2009-11-04 13:39:40 ...  (com.sap.tc.mobile.wdlite.renderer.exception.OCAExceptionHandler:) Thread: main Error: Internal <br>Error. Please check the log file.<br>
    2009-11-04 13:39:40 ...  (com.sap.tc.mobile.wdlite.renderer.exception.OCAExceptionLocalizeHelper:) Thread: main Error: <br>Resourcebundle sap.comtcmobilewdlitecontainer could not be found. Trying to use the default bundle.
    java.lang.NullPointerException<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.launchApplication(WDLite.java:77)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.launchApplication(WDLite.java:85)<br>
         at com.sap.tc.mobile.wdlite.container.AppMenuView.startApp(AppMenuView.java:561)<br>
         at com.sap.tc.mobile.wdlite.container.AppMenuView.onActionLaunchApp(AppMenuView.java:325)<br>
         at com.sap.tc.mobile.wdlite.container.AppMenuView.invokeEventHandler(AppMenuView.java:368)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.AbstractViewElement.doHandleEvent(AbstractViewElement.java:199)<br>
         at com.sap.tc.mobile.wdlite.renderer.api.UIElement.doHandleEvent(UIElement.java:353)<br>
         at com.sap.tc.mobile.wdlite.renderer.api.UIImageButton.mouseReleased(UIImageButton.java:152)<br>
         at com.sap.tc.mobile.wdlite.renderer.api.UIElement.dispatchMouseReleasedWidgetEvent(UIElement.java:396)<br>
         at com.sap.tc.mobile.wdlite.renderer.api.UIElement$1.mouseReleased(UIElement.java:439)<br>
         at com.sap.tc.mobile.wdlite.renderer.swt.MouseEventDispatcher.mouseUp(SWTControl.java:372)<br>
         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:137)<br>
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)<br>
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)<br>
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)<br>
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)<br>
         at com.sap.tc.mobile.wdlite.renderer.swt.container.WorkingArea.refresh(WorkingArea.java:129)<br>
         at com.sap.tc.mobile.wdlite.renderer.api.RenderingManager.refresh(RenderingManager.java:231)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.refresh(Application.java:24)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.navigate(Application.java:176)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.enter(Application.java:19)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.setCurrentApplication(WDLite.java:148)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.launchApplication(WDLite.java:80)<br>
         at com.sap.tc.mobile.wdlite.framework.ApplicationLauncher.start(ApplicationLauncher.java:101)<br>
         at com.sap.tc.mobile.wdlite.framework.Start.runOnContext(Start.java:576)<br>
         at com.sap.tc.mobile.wdlite.framework.Start.startApplication(Start.java:600)<br>
         at com.sap.tc.mobile.wdlite.framework.Start.startContainer(Start.java:637)<br>
         at com.sap.tc.mobile.cfs.framework.spi.FrameworkManager.startContainer(FrameworkManager.java:261)<br>
         at com.sap.tc.mobile.cfs.init.FrameworkInitializer.init(FrameworkInitializer.java:139)<br>
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
         at java.lang.reflect.Method.invoke(Method.java:324)<br>
         at com.sap.tc.mobile.cfs.startup.pda.Startup.main(Unknown Source)<br>
    2009-11-04 13:39:40 ...  (com.sap.tc.mobile.wdlite.renderer.exception.OCAExceptionLocalizeHelper:) Thread: main Error: <br>Resourcebundle sap.comtcmobilewdlitecontainer could not be found. Trying to use the default bundle.<br>
    2009-11-04 13:39:40 ...  Thread: main Error: Application launch failed. --> <br>
    2009-11-04 13:39:40 ...  (com.sap.tc.mobile.wdlite.renderer.exception.OCAExceptionHandler:) Thread: main Error: Application <br>launch failed.<br>
    2009-11-04 13:39:40 ...  (com.sap.tc.mobile.wdlite.renderer.exception.OCAExceptionLocalizeHelper:) Thread: main Error: <br>Resourcebundle sap.comtcmobilewdlitecontainer could not be found. Trying to use the default bundle.<br>
    java.lang.ClassCastException<br>
         at com.sap.demo.order_sv.service.impl.OrderService.generateTestData(OrderService.java:52)<br>
         at com.sap.orderapp.comp.OrderComp.generateTestData(OrderComp.java:175)<br>
         at com.sap.orderapp.comp.OrderComp.wdDoInit(OrderComp.java:73)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.Controller.enter(Controller.java:21)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.Component.enter(Component.java:24)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.setCurrentComponent(Application.java:125)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.navigate(Application.java:155)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.enter(Application.java:19)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.setCurrentApplication(WDLite.java:148)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.launchApplication(WDLite.java:80)<br>
         at com.sap.tc.mobile.wdlite.container.AppMenuView.startApp(AppMenuView.java:561)<br>
         at com.sap.tc.mobile.wdlite.container.AppMenuView.onActionLaunchApp(AppMenuView.java:325)<br>
         at com.sap.tc.mobile.wdlite.container.AppMenuView.invokeEventHandler(AppMenuView.java:368)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.AbstractViewElement.doHandleEvent(AbstractViewElement.java:199)<br>
         at com.sap.tc.mobile.wdlite.renderer.api.UIElement.doHandleEvent(UIElement.java:353)<br>
         at com.sap.tc.mobile.wdlite.renderer.api.UIImageButton.mouseReleased(UIImageButton.java:152)<br>
         at com.sap.tc.mobile.wdlite.renderer.api.UIElement.dispatchMouseReleasedWidgetEvent(UIElement.java:396)<br>
         at com.sap.tc.mobile.wdlite.renderer.api.UIElement$1.mouseReleased(UIElement.java:439)<br>
         at com.sap.tc.mobile.wdlite.renderer.swt.MouseEventDispatcher.mouseUp(SWTControl.java:372)<br>
         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:137)<br>
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)<br>
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)<br>
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)<br>
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)<br>
         at com.sap.tc.mobile.wdlite.renderer.swt.container.WorkingArea.refresh(WorkingArea.java:129)<br>
         at com.sap.tc.mobile.wdlite.renderer.api.RenderingManager.refresh(RenderingManager.java:231)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.refresh(Application.java:24)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.navigate(Application.java:176)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.enter(Application.java:19)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.setCurrentApplication(WDLite.java:148)<br>
         at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.launchApplication(WDLite.java:80)<br>
         at com.sap.tc.mobile.wdlite.framework.ApplicationLauncher.start(ApplicationLauncher.java:101)<br>
         at com.sap.tc.mobile.wdlite.framework.Start.runOnContext(Start.java:576)<br>
         at com.sap.tc.mobile.wdlite.framework.Start.startApplication(Start.java:600)<br>
         at com.sap.tc.mobile.wdlite.framework.Start.startContainer(Start.java:637)<br>
         at com.sap.tc.mobile.cfs.framework.spi.FrameworkManager.startContainer(FrameworkManager.java:261)<br>
         at com.sap.tc.mobile.cfs.init.FrameworkInitializer.init(FrameworkInitializer.java:139)<br>
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
         at java.lang.reflect.Method.invoke(Method.java:324)<br>
         at com.sap.tc.mobile.cfs.startup.pda.Startup.main(Unknown Source)<br>
    Please Suggest<br>
    <br>
    <br>
    It will be a great help.<br>
    Regards
    Nitesh.
    Edited by: Nitesh Harit on Nov 4, 2009 2:22 PM

  • Exception in thread "main" during  WL6.0SP1 update on AIX4.3.3

    We are getting an Exception in thread "main" when trying to update
    wlserver6.0 on AIX 4.3.3 with SP1 file.
    We have tried with IBM or BEA JDK - same problem.
    Can someone help please? Thank you in advance,
    Jerome
    PS:
    java -cp wls60sp1_upgrade_generic.zip install -i console.....
    Choose BEA Home Directory
    1- Create a New BEA Home
    2- Use Existing BEA Home
    Enter a number: 2
    1- /dcm/bea
    Existing BEA Home: 1
    Installing...
    [==================|==================|==================|==================
    [Exception in thread "main"
    JAVA:
      Java130.adt.debug          1.3.0.4  COMMITTED  Java Application
    Development
      Java130.adt.includes       1.3.0.2  COMMITTED  Java Application
    Development
      Java130.ext.commapi        1.3.0.0  COMMITTED  Java Comm API Extension
      Java130.ext.jaas           1.3.0.3  COMMITTED  JAAS (Java Authentication &
      Java130.ext.plugin         1.3.0.4  COMMITTED  Java Plugin for Netscape
      Java130.rte.bin            1.3.0.4  COMMITTED  Java Runtime Environment
      Java130.rte.lib            1.3.0.4  COMMITTED  Java Runtime Environment
      Java130.samples.demos      1.3.0.1  COMMITTED  Java Sample Demos
    MP KERNEL:
    bos.mp                    4.3.3.26  COMMITTED  Base Operating System
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi Luis
    This can be a problem with the CLASSPATH. Have you checked the CLASSPATH. Do
    you have your working directory in the classpath?
    Anant
    <Luis Martins> wrote in message news:[email protected]..
    Has anyone resolved this? I have the exact same problem. No one on the web
    seems to know the solution though a efw people have this problem. I'm
    running Redhat 9 and installing Weblogic 6.1 in the same manner as Jerome.
    I get the exact same "Exception in thread "main"" error...I installed JDK
    1.3.1 and included the JDK_HOME/bin as the first entry in my $PATH
    variable.
    Can anyone please please help...this has been doing my head in. Thanks in
    advance...:)

  • Run time error - Exception in thread "main" java.lang.NoClassDefFoundError:

    Can can one help me with this error:
    Exception in thread "main" java.lang.NoClassDefFoundError: TestEnv
    The program is a simple one
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import java.lang.String.*;
    //A Very Simple Example
    class TestEnv {
    public static void main(String[] args){
    System.out.println("Env is fine");
    Compile the program:
    javac TestEnv.java
    Run the program:
    java TestEnv
    Error: Exception in thread "main" java.lang.NoClassDefFoundError: TestEnv

    Try setting the classpath properly. It seems the runtime evironment is unable to find the compiled class files. Nothing else is wrong.
    --Anil                                                                                                                                                                                                                                                                                           

  • JMS error- Exception in thread "Main Thread" java.lang.NoClassDefFoundError

    Hi guys,
    I am new to JMS programming and i'm have the following error...I have set up a simple weblogic server on my local machine and i am trying to send a message to a queue i've created on a JMS server. I am trying to manually run an example provided by BEA WebLogic... the code follows.
    //package examples.jms.queue;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.Hashtable;
    import javax.jms.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    /** This example shows how to establish a connection
    * and send messages to the JMS queue. The classes in this
    * package operate on the same JMS queue. Run the classes together to
    * witness messages being sent and received, and to browse the queue
    * for messages. The class is used to send messages to the queue.
    * @author Copyright (c) 1999-2006 by BEA Systems, Inc. All Rights Reserved.
    public class QueueSend
      // Defines the JNDI context factory.
      public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
      // Defines the JMS context factory.
      public final static String JMS_FACTORY="weblogic.examples.jms.QueueConnectionFactory";
      // Defines the queue.
      public final static String QUEUE="weblogic.examples.jms.exampleQueue";
      private QueueConnectionFactory qconFactory;
      private QueueConnection qcon;
      private QueueSession qsession;
      private QueueSender qsender;
      private Queue queue;
      private TextMessage msg;
       * Creates all the necessary objects for sending
       * messages to a JMS queue.
       * @param ctx JNDI initial context
       * @param queueName name of queue
       * @exception NamingException if operation cannot be performed
       * @exception JMSException if JMS fails to initialize due to internal error
      public void init(Context ctx, String queueName)
        throws NamingException, JMSException
        qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
        qcon = qconFactory.createQueueConnection();
        qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
        queue = (Queue) ctx.lookup(queueName);
        qsender = qsession.createSender(queue);
        msg = qsession.createTextMessage();
        qcon.start();
       * Sends a message to a JMS queue.
       * @param message  message to be sent
       * @exception JMSException if JMS fails to send message due to internal error
      public void send(String message) throws JMSException {
        msg.setText(message);
        qsender.send(msg);
       * Closes JMS objects.
       * @exception JMSException if JMS fails to close objects due to internal error
      public void close() throws JMSException {
        qsender.close();
        qsession.close();
        qcon.close();
    /** main() method.
      * @param args WebLogic Server URL
      * @exception Exception if operation fails
      public static void main(String[] args) throws Exception {
        if (args.length != 1) {
          System.out.println("Usage: java examples.jms.queue.QueueSend WebLogicURL");
          return;
        System.out.println(args[0]);
        InitialContext ic = getInitialContext(args[0]);
        QueueSend qs = new QueueSend();
        qs.init(ic, QUEUE);
        readAndSend(qs);
        qs.close();
      private static void readAndSend(QueueSend qs)
        throws IOException, JMSException
        BufferedReader msgStream = new BufferedReader(new InputStreamReader(System.in));
        String line=null;
        boolean quitNow = false;
        do {
          System.out.print("Enter message (\"quit\" to quit): \n");
          line = msgStream.readLine();
          if (line != null && line.trim().length() != 0) {
            qs.send(line);
            System.out.println("JMS Message Sent: "+line+"\n");
            quitNow = line.equalsIgnoreCase("quit");
        } while (! quitNow);
      private static InitialContext getInitialContext(String url)
        throws NamingException
        Hashtable<String,String> env = new Hashtable<String,String>();
        env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
        env.put(Context.PROVIDER_URL, url);
        return new InitialContext(env);
    }when i run the main method with args[0] = "t3://localhost:7001", i get the following errors:
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/security/subject/AbstractSubject
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at QueueSend.getInitialContext(QueueSend.java:122)
    at QueueSend.main(QueueSend.java:91)
    Could someone please help. thanks.

    when i run the main method with args[0] = "t3://localhost:7001", i get the following errors:
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/security/subject/AbstractSubject
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at QueueSend.getInitialContext(QueueSend.java:122)
    at QueueSend.main(QueueSend.java:91)
    Could someone please help. thanks.This is Java 101:
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rtrb_classload_viewer.html
    You've got to have the WebLogic JAR that contains the necessary .class files in your CLASSPATH when you run.
    Don't use a CLASSPATH environment variable; use the -classpath option when you run.
    %

  • Exception in thread "main" java.lang.NullPointerException error JDeveloper 12c

    Hello,
    I am trying to call a java stored procedure in java application. I am using ORACLE database and JDeveloper.
    I am getting error "Exception in thread "main" java.lang.NullPointerException. I have no idea what have I been doing wrong.
    I have a table "Beer" and I want to select all the data out with a stored procedure which I call out of Java app.
    I have a java.class file Store_A.java which I have loaded into the ORACLE database with LOADJAVA :
        import java.sql.*;
        import java.io.*;
        public class Store_a {
          public static void apskatit ()
            throws SQLException
            { String sql =
              "SELECT * FROM Beer";
            try { Connection conn = DriverManager.getConnection("jdbc:default:connection:");
              PreparedStatement pstmt = conn.prepareStatement(sql);
              ResultSet rset = pstmt.executeQuery();
              rset.close();
              pstmt.close();
            catch (SQLException e) {System.err.println(e.getMessage());
    Then I have created a procedure which I plan to call out in java:
        CREATE OR REPLACE PACKAGE Store_a AS
        PROCEDURE apskatit;
        END Store_a;
        CREATE OR REPLACE PACKAGE BODY Store_a AS
        PROCEDURE apskatit AS LANGUAGE JAVA
        NAME 'Store_a.apskatit()';
        END Store_a;
    And I have a java file that I have created with JDeveloper 12c:
        import java.sql.Connection;
        import java.sql.DriverManager;
        import java.sql.ResultSet;
        import java.sql.SQLException;
        public class Class1 {
             * @param args
            public static void main(String[] args) throws SQLException {
                Connection conn = null;
                try {
                    Class.forName("oracle.jdbc.driver.OracleDriver");
                    //Izveidojam savienojumu
                    conn = DriverManager.getConnection("jdbc.oracle.thin:@localhost:1521", "SYSTEM", "asdasd");
                    // Izveidojam callable statement
                    CallableStatement stmt = conn.prepareCall("CALL Store_a.apskatit()");
                    ResultSet resul = stmt.executeQuery();
                    while (resul.next()) {
                        System.out.println(resul.getInt(1) + "\t" + resul.getString(2));
                } catch (ClassNotFoundException e) {
                    e.printStackTrace();
                } finally {
                    try {
                        conn.close();
                    } catch (SQLException e) {
                        e.printStackTrace();
    When I try to run the java file, I get this error "Exception in thread "main" java.lang.NullPointerException at client.Class1.main(Class1.java:29).
    So the line I get error in is "conn.close();"
    How to fix this?
    Thank you very much in advance.

    I am trying to call a java stored procedure in java application. I am using ORACLE database and JDeveloper.
    I am getting error "Exception in thread "main" java.lang.NullPointerException. I have no idea what have I been doing wrong.
    Maybe you haven't read it yet but I told you in your other thread what you were doing wrong and, step by step, how to address the problem.
    https://forums.oracle.com/thread/2611124
    I'm not going to repeat everything again just this one main piece of advice:
    Until you get you code working outside the database don't even bother trying to load it into the DB and create a Java stored procedure.
    You are trying to deal with too many different issues at the same time. Unless you solve your primary Java problem by fixing the code outside the DB you will have nothing but problems loading it into the DB.
    And just get rid of this line of code - you don't need it anymore and it hasn't been done like that for many years now:
    Class.forName("oracle.jdbc.driver.OracleDriver");

  • Export Release Build error - Exception in thread "main" java.lang.Error: Unable to find named traits

    I've been developing an AIR application for Android and iOS. During development, I've run the application (in debug mode) in the desktop simulator as well as on an iPhone 4 and a Nook Tablet.
    However, I recently tried to "Export Release Build" for iOS and hit the following error: (I've stripped out the package and class information in the error message below)
    !ENTRY com.adobe.flexbuilder.project 4 43 2012-04-06 13:09:15.516
    !MESSAGE Error occurred while packaging the application:
    Exception in thread "main" java.lang.Error: Unable to find named traits: valid.package.path.here::ValidClassName
              at adobe.abc.Domain.resolveTypeName(Domain.java:231)
              at adobe.abc.Domain.resolveTypeName(Domain.java:148)
              at adobe.abc.GlobalOptimizer.sccp_eval(GlobalOptimizer.java:6665)
              at adobe.abc.GlobalOptimizer.sccp_analyze(GlobalOptimizer.java:5909)
              at adobe.abc.GlobalOptimizer.sccp(GlobalOptimizer.java:4628)
              at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:3514)
              at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:2215)
              at adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:526)
              at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:336)
              at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler.java:472)
              at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:82)
    Compilation failed while executing : ADT
    !STACK 0
    java.lang.Exception
              at com.adobe.flexbuilder.project.internal.FlexProjectCore.createErrorStatus(FlexProjectCore. java:1019)
              at com.adobe.flexbuilder.util.logging.GlobalLogImpl.log(GlobalLogImpl.java:66)
              at com.adobe.flexbuilder.util.logging.GlobalLog.log(GlobalLog.java:52)
              at com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionWizard.doPackage (ExportReleaseVersionWizard.java:283)
              at com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionWizard.performFi nish(ExportReleaseVersionWizard.java:152)
              at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
              at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
              at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
              at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
              at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
              at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
              at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
              at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
              at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
              at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
              at org.eclipse.jface.window.Window.open(Window.java:801)
              at com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionAction$1.run(Export ReleaseVersionAction.java:97)
              at com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionAction.run(ExportRe leaseVersionAction.java:103)
              at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
              at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
              at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionI tem.java:584)
              at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
              at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java :411)
              at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
              at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
              at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
              at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
              at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
              at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
              at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
              at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
              at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
              at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
              at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
              at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
              at com.adobe.flexbuilder.standalone.FlashBuilderApplication.start(FlashBuilderApplication.ja va:108)
              at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
              at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110)
              at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:79)
              at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
              at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
              at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
              at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    The class the error message is referring to is defined with a SWC that my project links to. However, I've even tried to define a class with that same name (and location) within my project and it still fails to find it.
    Why am I able to Project->Clean and run this project within the desktop AIR player (or on the device in debug mode) but unable to export it as a release build?
    I have found a couple of threads mentioning a similar error but none of them have been marked as resolved.

    At this point I feel I am talking to myself, but I will share my work-around in case it helps another who may stumble across this post.
    In my particular case, both my main AIR application and my ANE wrapper library were referencing the same external Flex library (same revision). Both projects had the library linkage set to merge. Changing the linkage to "External" on one of the 2 libraries (it doesn't seem to matter which) and leaving the other as "Merged into code" enabled the export to complete without the bizarre "Unable to find named traits" error.

  • DBCA Exception in thread "main"

    Hey guys I am new to oracle and I am having some trouble installing the database. I have installed the Oracle software, but whenever I type "DBCA" on my terminal, I get this strange error "Exception in thread "main"...
    I read about it online, and it has something to do with installing the database remotely, but actually I am on my own machine.. Any ideas?
    Thanks, I really appreciate your help.
    -andi
    Message was edited by:
    user624107

    Thanks for the reply...
    Im running Fedora Core 8 and Oracle 10.2G
    As far as the environment, this is what I have:
    # User specific environment and startup programs
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=/u01/app/oracle/product/10.2
    export ORACLE_TERM=xterm
    export ORACLE_SID=TRINITY
    export NLS_LANG=AMERICAN
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
    export LD_LIBRARY_PATH
    PATH=$PATH:$ORACLE_HOME/bin:/sbin
    PATH=$PATH:/usr/local/java/bin
    export PATH
    export JAVA_HOME=/usr/local/java
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
    CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
    export CLASSPATH
    PATH=$PATH:$HOME/bin
    export PATH
    unset USERNAME
    alias r=/u01/oracle/product/10gr2/bin/rman
    HOSTNAME=`/bin/hostname`
    export HOSTNAME

  • Error 'java.lang.NoClassDefFoundError: rn exception in thread 'main'

    I have been trying to install Full ABAP Edition-trial version of SAP Netweaver 04s on Windows XP professional SP2. I am getting the error 'java.lang.NoClassDefFoundError: run exception in thread 'main' while trying to execute 'setup.exe' in the image folder.
    i have installed 'j2sdk-1_4_2_09' on the system. still i am getting the same error. can somebody help me.
    I reinstalled the operationg system still the problem persisits.
    Thanks!

    I solved this problem by reinstalling the operating system.
    after this, I tried to start SAP MMC, it gave another error user id and password not valid.
    To avoid this problem make sure that password for administrator of the Operation system (PC or Laptop) should match the password for SAP MMC.

Maybe you are looking for