Lars Vegas

Greenhorn
+ Follow
since Dec 04, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Lars Vegas

Hi Visu,
did you ever figure out how it worked? I'm facing the same problem. request.getRemoteUser is always null but I desperately need it.
Lars
16 years ago
A tooltip onmouseover would also do if possible. But I fear that doesn't work either with selectItems!?
I can't believe that it is not possible to create a horizontal scrollbar in a SelectOneListbox. Then this element is of no use...
Any help appreciated!
Lars
16 years ago
JSF
Hi all,
I have SelectOneListBox with the tag "contentStyle="width: 200;"" to avoid a big size of the listbox in my webapp. The problem now is that the horizontal scrollbar is not rendered so I cannot see the really long values in my box. Some of the values are the same at the beginning and I need to see the whole value. The SelectOneListBox is taken from trinidad.
I tried already to set "overflow: scroll;" in css and referenced it in the tag "inlineStyle" but that didn't work.
Does anyone in here know how to get the horizontal scrollbar?
Thanks for helping,
Lars
16 years ago
JSF
Hi,
I'm facing a strange behaviour on my tomcat webserver with a servlet. I'm using Oracle 10g as the database and try to access it with my servlet.
The doPost-method throws the following exception while trying to establish the connection to the RDBMS:

"SQLException:
Connecting not possible:
Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found The Connection descriptor used by the client was: localhost:1521 BTEN"

After starting my servlet, the connection to the database for other applications blocks with the same error message
for a few minutes. After these few minutes connecting to the database is possible again!!! Restarting the database and the listener also helps...



public void doPost( HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException {

Connection conn = null;

response.setContentType( "text/html" );
PrintWriter out = response.getWriter();

String connStr = "jdbc racle:thin:@localhost:1521 BTEN";
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
}catch( ClassNotFoundException cnf ){
out.println( "CNFException: "+cnf.getMessage() );
}

//retrieve Connection
try{
conn = DriverManager.getConnection( connStr, "scott", "tiger" );
}catch( SQLException sqle ){
out.println( "SQLException: <BR> Connecting not possible: <BR> "+sqle.getMessage()+"<BR>" );
}

.....

}



When I put that part in a 'normal' main program everything is ok. I can connect to the database and access tables with select statements and everything is ok.



public static void main(String[] args) {

Connection conn = null;
//retrieve Connection
try{
String connStr = "jdbc racle:thin:@localhost:1521 BTEN";

try{
Class.forName("oracle.jdbc.driver.OracleDriver");
}catch(ClassNotFoundException cnf){
System.out.println( "CNFException: "+cnf.getMessage() );
}

conn = DriverManager.getConnection( connStr, "scott", "tiger" );

}catch( SQLException sqle ){
System.out.println( "SQLException:"+sqle.getMessage() );
}

.....

}


Does anyone have an idea what the problem is in this case?
I will also post in the Servlet forum
Regards,
Lars
19 years ago
Hi,
I'm facing a strange behaviour on my tomcat webserver with a servlet. I'm using Oracle 10g as the database and try to access it with my servlet.
The doPost-method throws the following exception while trying to establish the connection to the RDBMS:

"SQLException:
Connecting not possible:
Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found The Connection descriptor used by the client was: localhost:1521 BTEN"

After starting my servlet, the connection to the database for other applications blocks with the same error message
for a few minutes. After these few minutes connecting to the database is possible again!!! Restarting the database and the listener also helps...



public void doPost( HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException {

Connection conn = null;

response.setContentType( "text/html" );
PrintWriter out = response.getWriter();

String connStr = "jdbc racle:thin:@localhost:1521 BTEN";
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
}catch( ClassNotFoundException cnf ){
out.println( "CNFException: "+cnf.getMessage() );
}

//retrieve Connection
try{
conn = DriverManager.getConnection( connStr, "scott", "tiger" );
}catch( SQLException sqle ){
out.println( "SQLException: <BR> Connecting not possible: <BR> "+sqle.getMessage()+"<BR>" );
}

.....

}



When I put that part in a 'normal' main program everything is ok. I can connect to the database and access tables with select statements and everything is ok.



public static void main(String[] args) {

Connection conn = null;
//retrieve Connection
try{
String connStr = "jdbc racle:thin:@localhost:1521 BTEN";

try{
Class.forName("oracle.jdbc.driver.OracleDriver");
}catch(ClassNotFoundException cnf){
System.out.println( "CNFException: "+cnf.getMessage() );
}

conn = DriverManager.getConnection( connStr, "scott", "tiger" );

}catch( SQLException sqle ){
System.out.println( "SQLException:"+sqle.getMessage() );
}

.....

}


Does anyone have an idea what the problem is in this case?
I will also post in the Oracle forum
Regards,
Lars
19 years ago
Check out SimpleDateFormat Class.
There you'll find examples.
Hope this helps,
Lars
19 years ago
Try this out:

http://www.particle.kth.se/~lindsey/JavaCourse/Book/Code/Tech/Formats/CJ/com/horstmann/format/Format.java

Just change the printf-Methods, that they return the wanted value.
With this changed class you can write something like:

Format.printf( "%4d", YourLongValue );

Hope this helps
20 years ago
you need to define a return type, otherwise you have a constructor.
something like "public double finnMaks(String filnavn)"
21 years ago
hi,
i've a java application, which is quite big. sometimes the gui looses the focus, so the blue bar on top becomes grey. on click into the app it becomes blue for a moment, then grey again. but the hotkeys within the application still work and when i click into an editable textfield, the cursor is in there. but i'm not able to type letters into the cell with the keyboard. this error is not reproducable. it occurs just sometimes. maybe something with swing? any idea how to fix this problem appreciated (jdk is 1.3.1, client OS is NT and XP, server NT).
tia,
lars
21 years ago
try servlets and jsp (java server pages).
22 years ago
hello natraj,
we had a similar problem with our application. we used a program called jProbe, to find the memoryleak. it took a few days, to get the information needed, but it was worth it. in our case it was an object, that wasn't destroyed by the destructor after use. the object was built 'on the fly', so we had no chance to set it 'null'.
regards,
lars
22 years ago
by the way, this message comes along withborland. "com.borland.dx.dataset.DataSetException: I/O-Exception: Not in Streaming-Mode". but maybe someone in here can help me anyway because it has to to with the access from borland to oracle.
22 years ago
go to google and try the keyword 'GlobalHotkeyManager'. may be it's what you need, but it's with awt. i've no idea how to do it in another way.
22 years ago
hi there,
i have a big problem with my 8i database. i run a java application which is connected to 8i. sometimes, NOT always, i get an exception 'not in streaming mode'. i have no idea why this happens. but when it happens i have to start my server again.
any help appreciated.
thanx, lars
22 years ago
I think you should use the getSelectedIndex()-Method with an object. or is it inside this class?
22 years ago