Tina Ljuslin

Greenhorn
+ Follow
since Jun 08, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tina Ljuslin

Hi everyone and thanks for all your suggestions. I have now found out why it wasn't working.
On my computer i have jdk1.4.0 and on the other computer the registry was running on jre1.1.7, when we changed that to jre1.4.0 it works fine.
I am now really happy and uploading on monday, taking the test on tuesday.
Wish me luck!
// tina
Hi,
have tried that, doesn't work.
Anyone else?
// tina
Hi
i'm not hardcoding anything, the drive letters in the command depends on where the user installs the program (all in the readme so that should be ok).
My _Stub's are in a jar file and i don't think i have to set a classpath to the jar file, that should be automatic.
I have tried to set the classpath on the other computer but it still doesn't work. On my computer, where it works, I set the classpath to nothing and it still works.
Any more ideas?
// tina
Hi,
double checked everything and nothing is hardcoded.
Any other ideas?
// tina
Hi,
I'm just getting ready to upload my assignment and everything works fine on my computer, BUT when i try it on another computer i get exceptions.
I first set the classpath to nothing, start the rmiregistry and then run the command:
java -jar -Djava.rmi.server.codebase=file:/c:\scjd\classes/ -Djava.security.policy=java.policy server.jar c:\scjd\db.db localhost 1099
(have tried both localhost and dns name)
As i said, it works fine on my own computer but on another computer i get the exception:
FBNServer exception: Server RemoteException; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
java.lang.ClassNotFoundException: suncertify.server.FBNServer_Stub
java.rmi.ServerException: Server RemoteException; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
java.lang.ClassNotFoundException: suncertify.server.FBNServer_Stub
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: suncertify.server.FBNServer_Stub
java.lang.ClassNotFoundException: suncertify.server.FBNServer_Stub
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknow
n Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Unknown Source)
at suncertify.server.FBNServer.main(FBNServer.java:46)
All files are where they should be (server.jar, db.db ...), and the _stub files are in the jar file.
Has anyone got any ideas why it's not working?
PLEASE HELP ME!
Tina
Yes, i got it to work, stupid mistake.
But why is it better to use inner classes then having the method actionPerformed(..) and in there check what happened?
Hi, can anyone please help me with this
I have a controller class that looks like this:
public class FBNController implements ActionListener{
private FBNInterface data;
private FBNClientGUI gui;

public FBNController(FBNInterface fbn){
data = fbn;
gui = new FBNClientGUI(this);
.......
public void actionPerformed(ActionEvent ae){
...
and a GUI class:
public class FBNClientGUI extends JFrame{
private ActionListener al;
public FBNClientGUI(ActionListener al) {
this.al = al;
......
findMenuItem.addActionListener(al);
....
and all the actions are performed twice. does anyone know why?
And is it a good way to have the controller as an listener to the GUI?
Please help me!
// tina
What? You expect me to pay for everything???
[ February 17, 2002: Message edited by: Tina Ljuslin ]
22 years ago
Hi,
item_cd is a varchar2 and the commit works fine.
I have now solved this by not using a prepared statement, but I still don't understand why it's not working with a prepared statement.
Thanks anyway
// tina
22 years ago
Hi,
I'm going desperate now and need HELP!
Im trying to do a batchUpdate with a prepared statement:
"INSERT INTO WEB_CLOSET "
+ "(ITEM_CD, MAT_CD, COLOR_CD, SIZE_CD, LOCATION_CD, CUST_ID, LAST_UPDT_DATE) "
+ "(SELECT ?, ?, ?, ?, ?, ?, SYSDATE "
+ "FROM DUAL "
+ "WHERE NOT EXISTS "
+ "(SELECT * FROM WEB_CLOSET W2 "
+ "WHERE W2.ITEM_CD = ? ))"
and:
prepStatement.setString(1, "A");
prepStatement.setString(2, "A");
prepStatement.setString(3, "A");
prepStatement.setString(4, "A");
prepStatement.setString(5, "001" );
prepStatement.setLong(6, 1);
prepStatement.setString(7, "A");
prepStatement.addBatch();
but i can't get parameter 7 to work. This insert should happen if the data is not already there, but not if the data is already in teh database. But i get a
ORA-00001: unique constraint violated
the second time I run it (when the data is already in there)
If i convert parameter 7 and use 1 instead of "A" it works...
Has anyone got any ideas on how to solve this?
// tina
22 years ago
I was totally wrong and know how to do it now.
call = con.prepareCall( "{call udcts_pkg.sp_checkUpdateStatusUser( ?, ?, ?)}" );
call.setString( 1, 'inparam1');
call.setString( 2, 'inparam2' );
call.registerOutParameter( 3, Types.VARCHAR );
thanks anyway
//tina
22 years ago
Hi,
I'm trying to make a call from a servlet to an oracle stored procedure. The first two parameters in the sp are IN parameters and works fine, but the third one is an OUT parameter and doesn't work.
I have tried:
String sql = "{call udcts_pkg.sp_checkUpdateStatusUser('INparam1', 'INparam2', outparam)}";
but get the exception:
java.sql.SQLException: ORA-06550: line 1, column 56: PLS-00201: identifier 'OUTPARAM' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored
if I try:
String sql = "{call udcts_pkg.sp_checkUpdateStatusUser('INparam1', 'INparam2', utparam)}";
I get the exception:
java.sql.SQLException: ORA-01008: not all variables bound }
Does anyone know how to make the call correct?
//tina
22 years ago
Hi all,
I'm creating a servlet that has to connect to another server (a vb program) the vb program wants a normal HttpRequest, but I'm stuck, I don't know how to call it.
I read about RequestDispatcher, do that work with an url to another server?
RequestDispatcher rd = getServletContext().getRequestDispatcher
("/servlet/itso.servjsp.servletapi.DispatcherInclude");
rd.include(req, res);
Can anybody please help me?
//tina
22 years ago
Hi all,
I'm creating a servlet that has to connect to another server (a vb program) the vb program wants a normal HttpRequest, but I'm stuck, I don't know how to call it.
Can anybody help me?
//tina
22 years ago
Hi Mohamed,
thanks for your replies.
I'm using websphere 3.5 on windows2000.
The class is where it is supposed to be and the classpath is properly set.
Every other servlet I write works fine, its just those two methods that doesn't work.
Could it be that the earlier methods are supported by this server and not the new ones? (maybe silly question?)
Very thankfull for your help!!!
//tina
22 years ago