Errors in command prompt
I compile and run from the command prompt.
1) The following code compiles fine, but I get all kinds of strange stuff that comes up when I click the "Calculate" button. The stuff that comes up is not similar to the normal errors I get when using the command prompt.
2)Is there a software that compiles and runs programs that would make these types of errors easier to understand?
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.math.*;
public class SquareRoots extends JFrame
public static void main(String[] args)
new SquareRoots();
private JPanel upper, middle, lower;
private JTextField entry, output;
private JButton calculate, close;
private double dblSquare, result;
private String strSquare;
public SquareRoots()
super("Square Root Calculator");
ButtonListener b1 = new ButtonListener();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
upper = new JPanel();
upper.setBorder(BorderFactory.createTitledBorder("Enter a number"));
upper.setLayout(new BorderLayout());
entry = new JTextField();
upper.add(entry, BorderLayout.CENTER);
middle = new JPanel();
middle.setBorder(BorderFactory.createTitledBorder("The Square Root is "));
//middle.setLayout(new FlowLayout(FlowLayout.CENTER));
middle.setLayout(new BorderLayout());
output = new JTextField();
middle.add(output, BorderLayout.CENTER);
lower = new JPanel();
lower.setLayout(new FlowLayout(FlowLayout.RIGHT));
calculate = new JButton("Calculate");
calculate.addActionListener(b1);
lower.add(calculate);
close = new JButton("Exit");
close.addActionListener(b1);
lower.add(close);
Container cp = getContentPane();
cp.add(upper, BorderLayout.NORTH);
cp.add(middle, BorderLayout.CENTER);
cp.add(lower, BorderLayout.SOUTH);
pack();
setVisible(true);
class ButtonListener implements ActionListener
public void actionPerformed(ActionEvent e)
if (e.getSource() == calculate)
String strSquare = entry.getText();
dblSquare = Double.valueOf(strSquare.trim()).doubleValue();
if (strSquare.length() == 0)
JOptionPane.showMessageDialog(
SquareRoots.this, "You didn't enter a number.",
"OOPS!", JOptionPane.INFORMATION_MESSAGE);
else
result = Math.sqrt(dblSquare);
output.setText(" " + result);
}
2)Is there a software that compiles and runsprograms that would make these
types of errors easier to understand?A key skill of every effective Java programmer is the
ability to read stack traces. By following them,
they will show you the line number in your code where
the problem (in your case, a NullPointerException)
occurred.Clearly I am not an "effective" Java programmer, hence this question being posed to more "effective" people. Fascinating reply, but not very helpful to this particular question.
Similar Messages
-
Startscen.bat giving error on Command prompt
Hi All,
When I am executing a scenario from command promt I am getting below error. Same scenario when executed by right click It completes successfully.
E:\OraHome_1\oracledi\bin>startscen REGION_LOAD 001 DEVELOPMENT
A JDK is required to execute Web Services with OracleDI. You are currently using
a JRE.
OracleDI: Starting scenario REGION_LOAD 001 in context DEVELOPMENT ...
java.lang.IndexOutOfBoundsException: toIndex = 70
at java.util.SubList.<init>(Unknown Source)
at java.util.RandomAccessSubList.<init>(Unknown Source)
at java.util.RandomAccessSubList.subList(Unknown Source)
at com.sunopsis.d.a.g.a(g.java)
at com.sunopsis.d.a.f.b(f.java)
at com.sunopsis.tools.core.SnpsStringTools.b(SnpsStringTools.java)
at com.sunopsis.dwg.DwgObject.snpsDecypher(DwgObject.java)
at com.sunopsis.dwg.DwgJv.treatCmd(DwgJv.java)
at com.sunopsis.dwg.DwgJv.main(DwgJv.java)
at oracle.odi.Agent.main(Agent.java)
Please Help
Thanks & Regards,
Ankit RanaHi
Same error is there when I am trying to Start ot Stop Agent from Command Prompt.
I have ODI installed on windows machine and my oracle database is on Unix server. I updated the ODIPARAM file. I created a Agnet with Host=Localhost Port=20910.
agentservice.bat -i -a SCH_DEV_Agent 20910
Created successfully
agentservice.bat -i -r sch_dev_agent 20300
created successfully
But when I am trying to connect the same it is saying Connection Refused
I have previously created Agent and I can execute my Packages and Interface from that but unable to schedule the same.
Could any one help me with that. -
Error in command prompt- using jsp
What does it mean by
-package org.apache.jasper.runtime does not exist
import org.apache.jasper.runtime.*;
-package org.dom4j does not exist
import org.dom4j.Document;
-package org.dom4j does not exist
import org.dom4j.io.Element;
-package org.dom4j.io.does not exist
import org.dom4j.io.SAXReader;
Anybody can explain what it means and how mi suppose to get rid of these errors???
Thank You...You had the jars with those to your classpath.
-
Technician computer is Windows 7 HP x64.
Running latest version of WAIK.
Goal: To make a Winpe disc for each processor architecture (AMD64, x86, IA64) with an included Gimage.exe using this code for the default startnet.cmd file found in system32 directory of winpe boot.wim
wpeinit
if /i %PROCESSOR_ARCHITECTURE%==amd64 (
cd x64
start gimagex.exe
if /i %PROCESSOR_ARCHITECTURE%==ia64 (
cd x64
start gimagex.exe
if /i %PROCESSOR_ARCHITECTURE%==x86 (
cd x86
start gimagex.exe
These are the commands I have processed for the x86 variant:
copype x86 c:\pe\x86\
Dism /mount-wim /wimfile:C:\pe\x86\winpe.wim /index:1 /mountdir:C:\mount
**It is at this point I copy over my x86 folder, x64 folder, and overwrite the startnet.cmd file.
dism /unmount-wim /mountdir:C:\mount /commit
oscdimg -n bc:\pe\x86\etfsboot.com c:\pe\x86\iso c:\pe\x86.iso
^^It is at this command I receive this error:
ERROR: Could not delete existing file "c:\pe\x86\iso"
Error 5: Access is denied.
Please note that all commands before were hand-typed, no copy or pasting from any directory or .chm
One thread referred to some Application Management service, but I can report that there is no such service installed in my machine.
Thank You!
UPDATE:
I copied the winpe.wim file from the x86 root directory into the iso directory and renamed it to boot.wim Now, if I copy the contents to a flash drive and put it into a client
computer, it boots to the PE perfectly, script and all.
However, when trying to use the oscdimg command, I do get an .iso successfully, but when I burn it, I don't know what to do in the way of boot options, and if I keep defaults (imgburn)
it results in an un-bootable dvd.
Suggestions are greatly appreciated.Don't copy and paste instead type manually it will work.
[email protected]
OMG! Yes, you are correct ... but I have no idea why! I retyped the command line:
oscdimg -n -be:\winpe_amd64\etfsboot.com e:\winpe_amd64\ISO e:\winpe_amd64\winpe_amd64.iso
into Notepad, and then pasted it into the Command Prompt, and it worked!
Perhaps there must be some hidden characters included when pasting directly, even though I first pasted the command line into Notepad, and then into Command Prompt
(C:\Program Files\Windows AIK\Tools\PETools>).
I had to retype the command line in Notepad before copying and pasting, before it would work.
Wow, thanks!
Cheers, Navy Flyer -
Error when running a scenario from Command Prompt
Hi I edited the parameter file and I am trying to run an interface that joins two tables from HR schema and loads into a table in different schema. I am able to run this in the Designer, but I receive an error message when I try to run it through command prompt.
Here is the error message I get when I try to run it
09/09/2009 11:58:42 AM(main): Creating session for scenario:DEMO_INTERFACE - 001
09/09/2009 11:58:42 AM(main): Session : 88010 is running
com.sunopsis.core.SnpsInexistantObjectException: There is no connection for this
logical schema/context pair:HR / GLOBAL
at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnectByLSchemaNameAndContex
t(SnpConnect.java)
at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnect(SnpConnect.java)
at com.sunopsis.dwg.dbobj.SnpSession.getDwgConnectLst(SnpSession.java)
at com.sunopsis.dwg.dbobj.SnpSession.getConLst(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenar
io.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.e.y(e.java)
at com.sunopsis.dwg.DwgJv.treatCmd(DwgJv.java)
at com.sunopsis.dwg.DwgJv.main(DwgJv.java)
at oracle.odi.Agent.main(Agent.java)
09/09/2009 11:58:43 AM(main): Session : 88010 finished with return code : -1
com.sunopsis.core.SnpsInexistantObjectException: There is no connection for this
logical schema/context pair:HR / GLOBAL
at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnectByLSchemaNameAndContexur
t(SnpConnect.java)
at com.sunopsis.dwg.dbobj.SnpConnect.getSnpConnect(SnpConnect.java)
at com.sunopsis.dwg.dbobj.SnpSession.getDwgConnectLst(SnpSession.java)
at com.sunopsis.dwg.dbobj.SnpSession.getConLst(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenar
io.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.e.y(e.java)
at com.sunopsis.dwg.DwgJv.treatCmd(DwgJv.java)
at com.sunopsis.dwg.DwgJv.main(DwgJv.java)
at oracle.odi.Agent.main(Agent.java)
DwgJv.main: Exit. Return code:-1
Thank you for your help.
KranthiHello,
Try to remove and recreate your package and scenario, I had the same issue and solved doing it.
It seems for me that the package cannot update its contents, for example, if you change something in your interface, you must recreate your package and scenario to update the changes.
What ODI version do you use? If you use an old version, try to update to ODI 10.1.3.5
Regards,
Wallace Galvão
São Paulo - Brazil -
Error while running a ODI scenario from command prompt
Hi,
I'm trying to run a ODI scenario from command prompt. I've edited the tnsnames.ora and odiparam.bat file with exact host and port details. Even though I'm facing the below error.
command:startcmd.bat OdiStartScen -SCEN_NAME=INT.CUSTOMER_STG -SCEN_VERSION=001 -CONTEXT=ICM -AGENT_CODE=KANBAN
Error: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
localhost:1521:orcl
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:280)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:361)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:595)
at com.sunopsis.sql.SnpsConnection.u(SnpsConnection.java)
at com.sunopsis.sql.SnpsConnection.c(SnpsConnection.java)
at com.sunopsis.sql.i.run(i.java)
Please help in resolving the error...
Thanks in advance.
Edited by: 894841 on Dec 22, 2011 11:15 PMHi,
Are you able to start the Standalone Agent(KANBAN) and test it in the Topology?
Check the value of the ODI_MASTER_URL variable in odiparams file(at the path <ODI_HOME>\oracledi\agent\bin) of the agent.
Specify the full the JDBC URL properly not like localhost(until the DB is on same machine as your ODI). -
Error while Invoking SQLPLUS from Command Prompt
Hi All,
I am trying to Connect to Oracle through sqlplus from command prompt of windows and getting this Error:
C:\Documents and Settings>sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Dec 28 10:08:43 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter user-name: scott
Enter password:
ERROR:
ORA-12560: TNS:protocol adapter error
set ORACLE_SID=database_name was set
Anyone ever got this error or has any idea could you please help.
Thanks.Try
set LOCAL=<tns_name>
Regards
Kurt -
Errors while Executing a scenario thruogh command prompt...Pls help!!
hi,
i am trying to execute a scenario in my command prompt.i am using windows operating system.
i am getting the the following error when i run this command..
startscen COM_IFLEX_LIMITS 001 GLOBAL "-V=2"OracleDI: Starting scenario COM_IFLEX_LIMITS 001 in context GLOBAL ...
java.sql.SQLException: ORA-00942: table or view does not exist
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.
java:185)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPrepa
redStatement.java:503)
at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleState
ment.java:965)
at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPre
paredStatement.java:535)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:1051)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePrep
aredStatement.java:2984)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePrepare
dStatement.java:3026)
at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java)
at com.sunopsis.dwg.DwgObject.refresh(DwgObject.java)
at com.sunopsis.dwg.cmd.e.h(e.java)
at com.sunopsis.dwg.cmd.e.g(e.java)
at com.sunopsis.dwg.cmd.e.y(e.java)
at com.sunopsis.dwg.DwgJv.treatCmd(DwgJv.java)
at com.sunopsis.dwg.DwgJv.main(DwgJv.java)
at oracle.odi.Agent.main(Agent.java)
DwgJv.main: Exit. Return code:-1
Regards
AshwinSo we can understand where the error occurs, can you tell us where the processings gets up to in the log?
-
Encountering a RunTime error when I try running from command prompt
When I try to load my class from the command prompt I get the error:
Exception in thread "main" java.lang.NoClassDefFoundError: MiniTriangle
Since this seems like a pretty basic error, I'm hoping there's a black and white solution to it. Unfortunatly I don't have the slightest idea what that might be.
Any help would be appreciated, thanks in advance!!!I'm pretty new to this myself but have encountered this error before. I've found it happens when you try to run the programme and the class name isn't the same as the file name. So if you named the text file when you wrote the code MiniTriangle when you compile it you will get a file called MiniTriangle.class which is what you are trying to run. However if you inadvertently misspelled the class definition in the code and entered say
class MiniTringle {
you would get the error you are experiencing when you try to run MiniTriangle.class
Hope this helps -
Got an error while import script run in command prompt in R12
hi '
i am running the below script in command prompt in R12, but it will give an error
that error name:
'import' is not recognized as internal or external command,
operable program or batch file.
import C:\JDeveloper10g\jdevhome\jdev\myprojects\flsm\oracle\apps\po\per\webui\FlsmCreationPG.xml -rootdir C:\JDeveloper10g\jdevhome\jdev\myprojects -username XXFLS -password xxfls -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=cph-oadb-tst22.dk.flsmidth.net)(PORT=1543))(CONNECT_DATA=(SID=TST22)))"
could you please help me on this.
Regards,
MuthuMuthu,
The import file directory is not in the path,
So run the script with full path,
<JDEV_DIR>\jdevbin\jdev\bin\import
Eg.
<JDEV_DIR>\jdevbin\jdev\bin\import <JDEV_DIR>\jdevbin\jdev\myclasses\xxt\oracle\apps\pon\registration\webui\XXTSupplierRegistrationPG.xml -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<DB_HOST_NAME>)(PORT=<DB_PORT>))(CONNECT_DATA=(SID=<DB_SID>)))" -rootDir <JDEV_DIR>\jdevbin\jdev\myclasses\ -rootPackage /
For scripts check this URL,
http://apps2fusion.com/at/61-kv/331-oa-framework-scripts
Thanks,
With regards,
Kali
OSSI. -
Error to execute the script through command prompt
I tried to execute the script through command prompt. I got some following error. Could you please advice me how to rectify this.
cscript D:\JS\Test.js
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
D:\JS\Test.js(1, 1) Microsoft JScript runtime error: 'app' is undefined.
Thanks,
PrabudassI haven't use CS for quite some time and file associations may not work with the command prompt.
You can try using Windows Explorer to browse to a .js file then right click on that file. From the popup menu choose Open With. Even if you see Photoshop in the file list choose Browse at the bottom. Browse to Photoshop and make sure to check 'Always use selected program...'
If that doesn't work you will need to create an action that runs your script and make a droplet from that action. You can then use the droplet in the command prompt. You may also need to create a 'dummy' image file to launch the droplet with if you script doesn't require an open document at startup. See http://www.ps-scripts.com/bb/viewtopic.php?t=967 -
Error with "rmiregistry" in command prompt
Hello everybody.
I am experiencing something really strange. I am doing the exercices on http://java.sun.com/developer/onlineTraining/rmi/RMI.html#RMIArchitectureGoals and now am trying the second one.
When I type in "rmiregistry" in command prompt at location "C:\" it's works fine. However, when I type it in "C:\JProg\RMI" (and for another program a subdirectory) where my classes reside, command goes all funny. It keeps printing the command-line without any results.
I tried to use it anyway but then I get a "Connection refused to host: localhost" error, so it really doesn't work.
I also tried the all the above ten times at least.... it is consistent.
Does anybody have any idea what the hell command is on about ?
Thanks,
Q"rmiregistry" in command prompt is just registering
into the registry. No output or response will be
resulted. The next line cursor will be appeared. That
all. If any error has, you should check the class
again I mean related coding.I do not understand what the classes have to do with the rmiregistry command. When I create an empty directory it works, that is: it gives a blinking _ and I can succesfully start a server class. How can this problem (which occurs before calling any classes) have anything to do with the classfiles ? It is only in my RMI (and sub-) directory that the rmiregistry goes all wacky. -
Aspnet_compiler: Command Prompt error
Hello
I am getting the following error when trying to compile my ASP.NET project from the Command Prompt:
error 1001: Unexpected parameter: 'Studio'.
The compiler on my hard drive is here:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319, although I do have another folder here:
C:\Windows\Microsoft.NET\Framework\v4.0.30319
There is an aspnet_compiler.exe in both of those 'framework' folders.
Having located the compiler in command prompt on that path above, I now need to compile my files (aspx.aspx.vb, and Web.config) in accordance with the guidelines here:
http://msdn.microsoft.com/en-us/library/ms229863.aspx
I create a targetDir on my PC as follows: C:\myForm, and type in the location of my project in Command Prompt. This is a
physical path so I use '-p' and I wish the file to be updateable so I use '-u'.
C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_compiler C:\Users\Steve\Documents\Visual Studio 2013\WebSites\WebSite10 -p -u C:\myForm
This 'Visual Studio 2013' looks suspicious because of the spaces but if I right-click on the folder containing the project itself and select properties, this is what the path looks like:
C:\Users\Steve\Documents\Visual Studio 2013\WebSites
What am I doing wrong, please?
Thank you.Hi,
I'm not familiar with Aspnet_compiler.exe tool. However, I think the path must be in double quotes if you use "-p".
Like:
Aspnet_compiler -v /WebApplication1 -p "c:\Documents and Settings\Default\My Documents\MyWebApplications\WebApplication1" -keyfile "c:\Documents and Settings\Default\My Documents\Key.sn" -aptca c:\applicationTarget
What's more, it looks like you didn't post in a correct forum. You need to reopen a new thread in
asp.net forum because we can't help move this issue there.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
JDBC Driver error when working in command prompt.
I have a swing program that connects to MySql Database. When run within the Netbeans IDE, there are no errors. But when I run through the command prompt, I get the User Interface screen but does not connect to the database. I have also added the "mysql-connector-java-5.1.6-bin.jar" file in the jdk folder.
The error I get is "com.mysql.jdbc.Driver" which is the driver I have been using in Netbeans. How do I get over this problem?The error I get is "com.mysql.jdbc.Driver" which is the driver I have been using in Netbeans. How do I get over this problem?1. Fix your GUI so it reports the problem, rather than relying on command line output.
2. Fix your class path which doesn't have the driver jar.
3. There is a JDBC forum. -
How do you fix error 0x80090318 without command prompt
I am using command prompt and when i put in " netsh winsock reset" it saysthat elevation is needed and idont know my admins password. Is there another way i can do this? Please help!!!!!!!!!
Error 1004 and 1013: These errors may be the result of the connection to gs.apple.com being redirected or blocked. Follow these steps to resolve these errors:
Check security software. Ensure that communication to gs.apple.com is allowed. Follow this article for assistance with security software. iTunes for Windows: Troubleshooting security software issues.
Check the hosts file. The restore will fail if there is an active entry to redirect gs.apple.com. Follow iTunes: Advanced iTunes Store troubleshooting to edit the hosts file or revert to default on Windows. See section "Blocked by configuration: (Mac OS X/Windows) > Rebuild network information".
Try to restore from another known-good computer and network.
If the errors persist on another computer, the device may need service.
Maybe you are looking for
-
Iphone 5C stuck in Recovery Mode and will not restore
Hi there, iv'e come across what seems to be quite a common problem at the moment. I tried to update my 5C to the latest firmware this morning and apparently something went wrong. The update was fine up until about 3/4 way through and then i recived a
-
Why compilation error--when trying to access the table from itcsi schema
Hi, when querying the table from itcsi.app iam able to see the data but used in proc saying invalid table name. Whats the problem when declared p_app_i_old app.app_i%type----It is throwing pls-00201 error 1 Create or replace procedure Test_insert(p_a
-
Advice on installing 4.4 trial version, on laptop currently running 3.6
I have a laptop running LR 3.6 and want to try 4.4 to determine whether the laptop is man enough for the job. It's a Core 2 Duo T6400 2.0Ghz with 4Gb RAM and Vista Home Premium 32 bit. If I install the trial version of 4.4 how do I make sure it doesn
-
Oracle 10g Installation Craps Out - 4 Days now and still no database runnin
I'm about to give up on Oracle 10g. I have been developping and installing Oracle 8 and 9i for 4 years without any problems but I can't seem to get anywhere with 10g. I'ts one error after another. Am I the only one to have these problems. I'm running
-
Reverse transport of process chains ( Quality to Dev ) ?
HI all , i need to transport the process chains from Quality to development . i have started collecting the process chains by using only necessary objects as grouping , here i am getting all the objcets like DTP , INfopakage , infoobjces , etc and