The ResultSet class is not very convenient to use
Often we need to know how many rows have been retrieved from the database before we read each row's data in order to do preparation works such as allocate appropriate memories to store the data.The ResultSet class in java.sql package does not provide a function to retrieve the total rows read from the database. We must do the follow to get the count of rows:
ResultSet rs;
rs.last();
int lastrow = rs.getRow();
rs.first();
int firstrow = rs.getRow();
int rows = lastrow - firstrow + 1;
String [] data = new String[rows];
// retrieve each row's data into the string array
It would be much more convenient if the class can provide a function like:
rs.getRows();
Often we need to know how many rows have been
retrieved from the database before we read each row's
data in order to do preparation works such as allocate
appropriate memories to store the data.But then we learn a little bit of Java and realize we can add the rows to a List (such as an ArrayList) without having to know that number in advance.
Similar Messages
-
The ResultSet.class file
Hi,
I am also having similar problems with ResultSet class. I would like the ResultSet.class file that you sent to Ashish. It would help me solve my problem very quickly. Could you sent it to me as an attachment in an email.
Thanks in advance,
Jason Mitchellstmt.executeQuery(query) will return a resultset, you are asking for an int.
resultset contains the details of the executed statement AFAIK. Bit new to this but the way I would do it is as follows:
try{
// Step 1: Load the JDBC driver.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
// Step 2: Establish the connection to the database.
String url = "jdbc:odbc:shop";
conn = DriverManager.getConnection(url);
System.out.println("Connected to shop database");
catch(Exception e){
System.err.println("Got an exception! ");
System.err.println(e.getMessage());
System.out.println("Suggestion: Perhaps your database cannot be found");
}And then to insert data I would do this, use another try catch block, that way if there is an exception u will know it is not related to database connectivity.
PreparedStatement pstmt = null;
ResultSet rs = null;
pstmt = conn.prepareStatement("INSERT INTO User (lastname,firstname) " +
"values ('" + lastname + "', " +
"'" + firstname + "')";
pstmt.execute();Oh and declare conn somewhere;
private Connection conn; //Database connection
I hope this has helped
Message was edited by:
TheSniipe -
Error in Installation--The Java class is not found: SDTGui
I am in the process of instlaling SAP in AIX machine
When i start the Startsapinst, i am getting the following error .
Pls hlep
<b>The Java class is not found: SDTGui</b>I am using humming bird software
i have set the display.
Xclock is running
Pls help -
The MBean class could not be loaded by the default loader repositor
Im trying to register a custom MBean to WebLogic 8.1 Sp5 Application Server but i get this error :
The MBean class could not be loaded by the default loader repository .
i have make a servelt that registers the Managed Bean i added the MBean jar file to the WAR file of the servelt and I added the Mbean jar file to the CLASSPATH in setEnv.cmd for the domain
the code for the servlet is this :
try
Hashtable props = new Hashtable();
props.put( Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory" );
props.put( Context.PROVIDER_URL, "t3://naiden:7001" );
props.put( Context.SECURITY_PRINCIPAL, "admin" );
props.put( Context.SECURITY_CREDENTIALS, "secret:)" );
InitialContext ctx = new InitialContext( props );
mbeanServer = ( MBeanServer )
ctx.lookup( "weblogic.management.server" );
logger.debug( "domain name e " + mbeanServer.getDefaultDomain() );
catch( NamingException ne )
error=ne.getMessage();
logger.debug( ne.getMessage() );
try {
ObjectName objName = new ObjectName("isy:Name=NaidenStandardMBean");
mbeanServer.createMBean("samplembean.Standard", objName);
catch( MalformedObjectNameException ex )
}You should use jre 1.5 or 1.6 for migmon from 7.10. It looks like your jre is 1.4.
-
"CJS-30199 The CTC classes were not found after waiting for 900 seconds."
Here's the snippet of the sapinst_dev.log
I am trying to install Central Instance on a RedHat Enterprise 4 server (32bit). But stuck at
this stage.
TRACE [iaxxejsexp.cpp:188]
EJS_Installer::writeTraceToLogBook()
2007-05-10 20:19:48.093 FSPath(/usr/sap/LN1/DVEBMGS02/j2ee/cluster/server0/apps/sap.com/tclmctcutilbasic_ear/servlet_jsp/ctc/root/WEB-INF/classes/com/sap/ctc/util/ConfigMainExt.class).isExisting() done: false
TRACE [iaxxejsexp.cpp:188]
EJS_Installer::writeTraceToLogBook()
2007-05-10 20:19:48.093 NWJavaInstance._waitForFile() - elapsed time = 910 timeout = 900
TRACE [iaxxejsexp.cpp:188]
EJS_Installer::writeTraceToLogBook()
NWException thrown: nw.usageTypes.ctcSyncWaitTimeout:
The CTC classes were not found after waiting for 900 seconds.
ERROR 2007-05-10 20:19:48
CJSlibModule::writeError_impl()
CJS-30199 The CTC classes were not found after waiting for 900 seconds.
TRACE [iaxxejsbas.hpp:460]
EJS_Base::dispatchFunctionCall()
JS Callback has thrown unknown exception. Rethrowing.
ERROR 2007-05-10 20:19:48 [iaxxgenimp.cpp:736]
showDialog()
FCO-00011 The step configCAF with step key |NW_Doublestack_CI|ind|ind|ind|ind|0|0|SAP_Software_Features_Configuration|ind|ind|ind|ind|15|0|NW_Usage_Types_Configuration_AS|ind|ind|ind|ind|0|0|NW_CONFIG_CAF|ind|ind|ind|ind|1|0|configCAF was executed with status ERROR .
Your help is much appreciated.
Thanks and Regards,
Satish/Hello Satish
Please do following checklist:
1. Check that the J2EE engine is up and running (e.g. log in with Admin)
2. Check that the following application is running:
Visual Admin => Cluster => Server => Services => Deploy
Select "Application" and look for "sap.com/tclmctcutilbasic_ear
3. Try to continue installation
It could be helpful to apply the patch for CTC as per note # 938261
before restarting.
and also try to add more memory allocation.
If issue persists,
- I'd like to know which installation DVD/CD number being using ?
- The contents of the LABEL.ASC file.
- The installation guide reference and title used for this install ?
- SAPINST version ?
- Oracle version/patch level ?
- Operating system version/patch level ?
See also:
Note # 851251 - SAP NetWeaver 2004s Installation on UNIX
Thanks
Kenny -
Hi,
I am in the midst of Installing SOLMAN on RHEL5-ORACLE
Have installed IBM JDK version 1.4.2_10
During the CREATE SECURE STORE PHASE I am getting the following error:
sapinst_dev log file O/P
WARNING[E] 2008-06-09 18:04:43.225
CJSlibModule::writeError_impl()
CJS-30050 Cannot create the secure store. SOLUTION: See output of log file SecureStoreCreate.log:
The java class is not found: com.sap.engine.offline.OfflineToolStart.
TRACE 2008-06-09 18:04:43.225 [iaxxejsbas.hpp:483]
EJS_Base::dispatchFunctionCall()
JS Callback has thrown unknown exception. Rethrowing.
TRACE 2008-06-09 18:04:43.243 [syuxctask.cpp:1382]
CSyTaskImpl::start(bool)
A child process has been started. Pid = 2529
TRACE 2008-06-09 18:04:43.281 [syuxctask.cpp:1382]
CSyTaskImpl::start(bool)
A child process has been started. Pid = 2530
ERROR 2008-06-09 18:04:43.310 [sixxcstepexecute.cpp:951]
FCO-00011 The step createSecureStore with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|2|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_SecureStore|ind|ind|ind|ind|8|0|createSecureStore was executed with status ERROR .
TRACE 2008-06-09 18:04:43.317 [iaxxgenimp.cpp:752]
CGuiEngineImp::showMessageBox
<html> <head> </head> <body> <p> An error occurred while processing service SAP Solution Manager 4.0 Support Release 4 > SAP Systems > Oracle > Central System > Central System. You may now </p> <ul> <li> choose <i>Retry</i> to repeat the current step. </li> <li> choose <i>View Log</i> to get more information about the error. </li> <li> stop the task and continue with it later. </li> </ul> <p> Log files are written to /tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS. </p> </body></html>
TRACE 2008-06-09 18:04:43.317 [iaxxgenimp.cpp:1255]
CGuiEngineImp::acceptAnswerForBlockingRequest
Waiting for an answer from GUI
SAPINST.LOG file O/P
WARNING 2008-06-09 18:04:43.224
Execution of the command "/opt/IBMJava2-amd64-142/bin/java -classpath /tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/launcher.jar -Xmx256m com.sap.engine.offline.OfflineToolStart com.sap.security.core.server.secstorefs.SecStoreFS /tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/lib:/tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/exception.jar:/tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/logging.jar:/tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/tc_sec_secstorefs.jar create -s SMD -f /sapmnt/SMD/global/security/data/SecStore.properties -k /sapmnt/SMD/global/security/data/SecStore.key -enc -p XXXXXX" finished with return code 1. Output:
The java class is not found: com.sap.engine.offline.OfflineToolStart
WARNING[E] 2008-06-09 18:04:43.225
CJS-30050 Cannot create the secure store. SOLUTION: See output of log file SecureStoreCreate.log:
The java class is not found: com.sap.engine.offline.OfflineToolStart.
ERROR 2008-06-09 18:04:43.310
FCO-00011 The step createSecureStore with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|2|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_SecureStore|ind|ind|ind|ind|8|0|createSecureStore was executed with status ERROR .
SecurStoreCreate log O/P
The java class is not found: com.sap.engine.offline.OfflineToolStart
Pls suggest how to resolve this issue
Pls help to resolve this issue
Rgds,
AbhijeetHi All,
I Found the Solution.
The SAPinst tool was somehow not able to extracte the
J2EEINSTALL.SAR files from the JAVA Components DVD.
So I manually extracted the the file in the temporary install folder which the SAPinst creates in the /tmp filesystem (on LINUX by deafult) during the installation process.
The following command is used (I used this on Red Hat LINUX 5.2) to extract the J2EEINSTALL.SAR file:-
/sapmnt/SMD/exe/SAPCAR
-xvf /dump/SR4_Java_Components/D51033521/DATA_UNITS/JAVA_J2EE_OSINDEP_J2EE_INST/J2EEINSTALL.SAR
/sapmnt/SMD/exe/SAPCAR -->source directory of the file SAPCAR which is used to extarct CAR / SAR files on UNIX
/dump/SR4_Java_Components/D51033521/DATA_UNITS/JAVA_J2EE_OSINDEP_J2EE_INST/J2EEINSTALL.SAR--> destination dir. where the SAPinst tool will read and execute the file.
Rgds,
Abhijeet K -
Could not open the editor: The editor class could not be instantiated.
Yesterday FlashBuilder was automatically updated for Adobe updater and now Flashbuilder shows an error: "Could not open the editor: The editor class could not be instantiated. This usually indicates a missing no-arg constructor or that the editor's class name was mistyped in plugin.xml."
Bellow some lines of log error:
java.lang.NoClassDefFoundError: com/adobe/flexbuilder/codemodel/common/IMXMLConstants
at com.adobe.flexbuilder.mxml.editor.MXMLEditor.<init>(MXMLEditor.java:120)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java: 39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm pl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(Re gistryStrategyOSGI.java:170)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionR egistry.java:874)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(Configu rationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(C onfigurationElementHandle.java:51)
at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:259)
What is wrong!!!
I can't work without him!!!Just had this problem occur as well.
All the workspaces seem to now have the Flash Player Icons on the menu. They were not there before.
If I create a new workspace, it seems to work fine until I switch to any existing workspace and then the new workspace is also affected.
I can import a project from the other workspaces, into a new workspace and that works as well.
My only mental history is that all was well. Then I spent some time writing a project in CS4 for a day without any need for Flex Builder. Then when I returned to FLex Builder the last opened project would not run and although I can get to the new project screen, the next and Finish button although enabled fail silently.
Eclipse Galieo, Flash 4 Builder Plugin.
Not sure what path to take. Remove Flex Builder plugin? Exclipse? Certain files or hidden folders?
Any suggestions where to explore would be nice. -
Hello all,
I am trying to run export of PI system (ABAP+JAVA) uisng inst master NWSR3
I am hit with an issue before the export_ABAP starts . the following are the error lines
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 2.3)
IBM J9 VM (build 2.3, J2RE 1.4.2 IBM J9 2.3 AIX ppc64-64 j9ap64142-20070708 (JIT enabled)
J9VM - 20070530_12820_BHdSMr
JIT - 20070529_1824_r8
GC - 20070328_AA)
The java class is not found: com.sap.inst.migmon.exp.ExportMonitor
Please share if there are any possible solutions to overcome this error & make export run smoother
thanks & regards,
rahulHello,
Please check the JVM-settings as per note
1024539 (including the environment-variables and APARS).
For some reason the 'migmon.jar' - file can no longer
be found in your installation directory
It might be sufficient to copy the archive 'MIGMON.SAR' from your
master-cd (subdirectory IM_AIX_PPC64/COMMON/INSTALL) to your
installation directory and extract the archive there by 'SAPCAR -xvf
If the problem persists
apply the latest patch as per note
784118 System Copy Java Tools
regards,
John Feely -
"The java class is not found:" post clone
Hi.
I've just cloned an 11.5.10.2 environment from one AIX5.2 server running 9.2.0.7 to another server at the same AIX and RDBMS level.
After running the clone steps, the application was automatically started and I was able to access it via Self Service, forms, run concurrent requests etc - in short, I had a working system.
Now, however, when I try to stop or start the application using adstrtal.sh/adstpall.sh, I hit the following:
"The java class is not found: oracle/apps/ad/autoconfig/ServiceControl
Check logfile /data/testcomn/admin/log/TEST_ireaix2/05011011.log for details"
On the command line, when I call the line the script is trying to execute:
/usr/java14/bin/java -classpath "${CLASSPATH}:${JAVA_TOP}:${FND_TOP}/java/3rdparty/stdalone/xmlparserv2.zip" oracle.apps.ad.autoconfig.ServiceControl -e /oracle/testappl/admin/TEST_ireaix2.xml -u apps/<PASS> -m 2 -l yadda –debug
I'm able to bypass this particular error and some of the application processes do start but not all of them and obviously I still have an underlying Java/environment issue.
Any suggestions gratefully received.
Rgds,
JesCheck logfile /data/testcomn/admin/log/TEST_ireaix2/05011011.log for details"What does the log file say?
-
"The java class is not found:" during cloning
Hi.
I've just cloned an 11.5.10.2 environment from one AIX5.2 server running 9.2.0.7 to another server at the same AIX and RDBMS level.
After running the clone steps, the application was automatically started and I was able to access it via Self Service, forms, run concurrent requests etc - in short, I had a working system.
Now, however, when I try to stop or start the application using adstrtal.sh/adstpall.sh, I hit the following:
"The java class is not found: oracle/apps/ad/autoconfig/ServiceControl
Check logfile /data/testcomn/admin/log/TEST_ireaix2/05011011.log for details"
On the command line, when I call the line the script is trying to execute:
/usr/java14/bin/java -classpath "${CLASSPATH}:${JAVA_TOP}:${FND_TOP}/java/3rdparty/stdalone/xmlparserv2.zip" oracle.apps.ad.autoconfig.ServiceControl -e /oracle/testappl/admin/TEST_ireaix2.xml -u apps/starl1ght -m 2 -l yadda –debug
I'm able to bypass this particular error and some of the application processes do start but not all of them and obviously I still have an underlying Java/environment issue.
Any suggestions gratefully received.
Rgds,
JesMay be you should try posting this on an appropriate forum to get a speedier response.
Regards -
The java class is not found: oracle/aurora/util/Wrapper
When I try and load my Java class file using 'loadjava' into Oracle I'm getting the error:
The java class is not found: oracle/aurora/util/Wrapper
What is causing this?On which machine should ORACLE_SID be set to solve this problem, server or client. I run into this error when run loadjava
-
The java class is not found: oracle.apex.APEXExport
Hi,
when i run java oracle.apex.APEXExport
i have the error
The java class is not found: oracle.apex.APEXExport
CLASSPATH=/opt/ora/admin/Apex_Backup/class/classes12.zip:/opt/ora/admin/Apex_Backup/APEXExport.class
also
CLASSPATH=/opt/ora/admin/Apex_Backup/class/classes12.zip
causes the error
Can somebody help he out of this?Hello,
Take a look at my blog post on Backing Up Your Applications, available here -
http://jes.blogs.shellprompt.net/2006/12/12/backing-up-your-applications/
I run through all the steps you need to do to get it working.
Hope this helps,
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone! -
The hostname test01 is not authorized to be used in this zone cluster
Hi,
I have problems to register a LogicalHostname to a Zone Cluster.
Here my steps:
- create the ZoneCluster
# clzc configure test01
clzc:test01> info
zonename: test01
zonepath: /export/zones/test01
autoboot: true
brand: cluster
bootargs:
pool: test
limitpriv:
scheduling-class:
ip-type: shared
enable_priv_net: true
sysid:
name_service not specified
nfs4_domain: dynamic
security_policy: NONE
system_locale: en_US.UTF-8
terminal: vt100
timezone: Europe/Berlin
node:
physical-host: farm01a
hostname: test01a
net:
address: 172.19.115.232
physical: e1000g0
node:
physical-host: farm01b
hostname: test01b
net:
address: 172.19.115.233
physical: e1000g0
- create a RG
# clrg create -Z test01 test01-rg
- create Logicalhostname (with error)
# clrslh create -g test01-rg -Z test01 -h test01 test01-ip
clrslh: farm01b:test01 - The hostname test01 is not authorized to be used in this zone cluster test01.
clrslh: farm01b:test01 - Resource contains invalid hostnames.
clrslh: (C189917) VALIDATE on resource test01-ip, resource group test01-rg, exited with non-zero exit status.
clrslh: (C720144) Validation of resource test01-ip in resource group test01-rg on node test01b failed.
clrslh: (C891200) Failed to create resource "test01:test01-ip".
Here the entries in /etc/hosts from farm01a and farm01b
172.19.115.119 farm01a # Cluster Node
172.19.115.120 farm01b loghost
172.19.115.232 test01a
172.19.115.233 test01b
172.19.115.252 test01
Hope somebody could help.
regards,
Sascha
Edited by: sbrech on 13.05.2009 11:44When I scanned my last example of a zone cluster, I spotted, that I added my logical host to the zone clusters configuration.
create -b
set zonepath=/zones/cluster
set brand=cluster
set autoboot=true
set enable_priv_net=true
set ip-type=shared
add inherit-pkg-dir
set dir=/lib
end
add inherit-pkg-dir
set dir=/platform
end
add inherit-pkg-dir
set dir=/sbin
end
add inherit-pkg-dir
set dir=/usr
end
add net
set address=applh
set physical=auto
end
add dataset
set name=applpool
end
add node
set physical-host=deulwork80
set hostname=deulclu
add net
set address=172.16.30.81
set physical=e1000g0
end
end
add sysid
set root_password=nMKsicI310jEM
set name_service=""
set nfs4_domain=dynamic
set security_policy=NONE
set system_locale=C
set terminal=vt100
set timezone=Europe/Berlin
end
I am refering to:
add net
set address=applh
set physical=auto
end
So as far as I can see this is missing from your configuration. Sorry for leading you in the wrong way.
Detlef -
I'm trying to install a cd application and I keep getting the message 'you do not have permission to use the application FSP OS X' Even after selecting always allow and entering my login details it still won't accept it. Help!!..
Please repost in the Final Cut Pro forum. Have you considered upgrading your machine, if you are still running Leopard your machine may be as old as 5 years old. While this should not matter you probably won't get the performance you want out of a demanding app like FCP.
Best of luck. -
Revision: 14357
Revision: 14357
Author: [email protected]
Date: 2010-02-23 09:41:57 -0800 (Tue, 23 Feb 2010)
Log Message:
Moved constants for namespace (also added a version number to the namespace) and the metadata key to the MASTPluginInfo class so these constants can be used from player code.
Modified Paths:
osmf/trunk/plugins/MASTPlugin/org/osmf/mast/MASTPluginInfo.as
osmf/trunk/plugins/MASTPlugin/org/osmf/mast/media/MASTProxyElement.asRevision: 14357
Revision: 14357
Author: [email protected]
Date: 2010-02-23 09:41:57 -0800 (Tue, 23 Feb 2010)
Log Message:
Moved constants for namespace (also added a version number to the namespace) and the metadata key to the MASTPluginInfo class so these constants can be used from player code.
Modified Paths:
osmf/trunk/plugins/MASTPlugin/org/osmf/mast/MASTPluginInfo.as
osmf/trunk/plugins/MASTPlugin/org/osmf/mast/media/MASTProxyElement.as
Maybe you are looking for
-
Final cut studio 2 and macbook pro 17?
I'm anxious to purchase Final Cut Studio 2, and a new MacBook Pro 17" laptop. Is FCS2 and this laptop 100% compatible? Will I be able to install and run FCS2 on this laptop successfully? Laptop specs: MacBook Pro 17" Notebook 2.33 GHz Intel Core 2 Du
-
Win 7/Office 2010 hangs periodically - Network Problem?
Hi, Our situation: We have one user (out of 60) at our company whose computer periodically goes into "spin cycle" and she must reboot it because it won't respond. This happens a couple of times a week. Generally, she always has Outlook 2010 open, a
-
Hi, I have a database cold backup. Need to open the database in a new server with that cold backup by applying the production archives on it. How to force fully apply the archives on it.???? Regards, 007
-
Error! Result code = -43 ???
Hi all, I keep getting the following message after opening certain EXS files that have opened with no problems before.. error result code = -43 Can anyone help or point me in the right direction pleeeaaassse Thanks in adv B
-
Possible to set CacheSize for the single-JVM version of the data cache?
Hi - I'm using Kodo 2.3.2. Can I set the size for the data cache when I'm using a subclass of the single-JVM version of the data cache? Or is this only a feature for the distributed version? Here are more details... I'm using a subclass of LocalCache