org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
I have DATABASE trigger. But when I save object through hibernate session object, Its throws
above exception
I defined a property in the constructor of my class the following way:
class Step(val message:String = "")
When I try access to message value from Java code y get a visbility error. Why?
Take this Java code:
for (ContactsReduced curContact : allcontacts) {
..........
allcontacts.remove(curContact);
}
I do based on a condition a remove, will the foreach miss the next item in order, and do we need to step back(somehow)?
We're getting this random warning from JBoss.. any idea why?
It happens at random times when there are no active threads. Everything works when any processing resumes.
13:49:31,764 WARN [JBossManagedConnectionPool] [ ] Unable to fill pool
org.jboss.resource.JBossResourceException: Could not create connection; - nested
throwable: (java.sql.SQLException: Listener ref
used the connection with the following error:
ORA-12516, TNS:listener could not find available handler with matching protocol stack
The Connection descriptor used by the client was:
//localhost:1521/orcl
I've spent the last year learning and using Java in university but we didn't do much (read: anything) in terms of Threading.
We do some next year but I'm hopeful I'll be able to get a head start over the summer.
What are the best resources for learning about and getting to grips with Threading?
This question relates both to C# and Java
If you have a collection which is not modified and that collection reference is shared between two threads what happens when you iterate on each thread??
ThreadA: Collection.iterator
ThreadA: Collection.moveNext
ThreadB: Collection.iterator
ThreadB: Collection.moveNext
Will threadB see the first element?
Is the iterator always reset when it is requested? What happens if this is interleaved so movenext and item is interleaved? Is there a danger that you dont process all elements??
How would I go about determining whether a file or directory has been created in Java?
I basically want to create a data directory if one is not already present.
Thanks.
I want to use Oracle stored procedure or function via 'iBATIS 3 for Java' with annotation.
But I can't find any sample codes.
Can anyone help me? I need a simple sample code.
Hello pip`s,
I have a JTable in Java that has a custom dataMOdel and custom renderer. Now when i select some cell it has a dark blue border around it. I want the selected row to be all highlighted in some colour. How to do that?
Hi,
I need to instantiate a Spring bean in the same manner as this Java code:
MyClass foo = Mockito.mock(MyClass.class);
The XML I need will look something like:
<bean id="foo" class="Mockito" factory-method="mock">
<constructor-arg value="MyClass"/>
</bean>
I can't seem to find the correct syntax for passing a Class object as a parameter to the factory method.
Thanks,
Don
I'm getting the Cannot find symbol error from my code. Does anyone know what can cause this problem?
// Register JDBC driver Class.forName("net.sourceforge.jtds.jdbc.Driver"); method forName(java.Lang.String)
Class.forName("net.sourceforge.jtds.jdbc.Driver);
^
I'm running in to an error when I try to run my server application from Eclipse. The error is java.net.BindException: Permission denied. I think this is because I am using port 443 to set up an SSL connection. I can get around this problem if I run my code on the command line using javac and sudo. Is there a way to set up Eclipse so that when I hit the run button, my application is executed with sudo?
I want to create a simple chat application that supports voice and video (something like Skype or Google Talk). I don't want to write everything from scratch, so my question is do you know some good libraries for that?
I stumbled over libjingle (c++) and Smash (Java), both implementing the XMPP extension Jingle. Would you recommend one of those?
I have a folder with more than 2000 files and I need to index their file names on a database(MySQL) using Java, but how could I do this?
PS: The MySQL connection part I already know.
Hello.
I have a task to write a web service with use of Hessian and Spring.
Unfortunately there is not enough information so i can't make it work myself...
Please can anyone write a simple Hello World for me?
My version always shows 404 when accesing with browser... I'm new to java so if smb knows how to help tell me what files of my project to share.
Thanks a lot!
Can someone please write to me source code in Java? I have a task: create a program, that contains two dimensional array (with numbers) and the programm needs to sum zeros in each column and then get out the number of column in which the zeros are least.. thanks!
Hi,
I'd like to find out a way to enumerate all available wifi networks using Java 6.0 and any third-party API.
Unfortunately, I'm not able to find a solution to this problem, all I got is a library that I can't use because I don't have any example.
I'll be very pleased if someone could help me.
The target platform is Win XP/7.
Edit: the library I found is named jwlanscan
Rob
Guys;
How are you doing today? I have to create a dll project on Eclipse Ganymede and I don´t know where to start... (I am a C# guy with VS).
Can you please indicate me what type of project should I create to make a dll on Eclipse Ganymede so I can call the DLL from other Java Project?
Thanks in advanced :D
How does one convert an empty string to an int using Struts2. When the application encounters this parameter with no value, like from an empty text field, it throws the following exception.
java.lang.NoSuchMethodException:
com.XXXXXXXXXXXX.setID([Ljava.lang.String;)
Where ID is an integer, and the URL is:
Something.action?ID=&other=rawr
Is there a way to do this without using an Integer (class)? Do I have to write a type converter?
I m consuming java based web service with c#.net app.
I m sending soap message in xml format.
But Im receving this error message:
ns1:Client.NoSOAPAction no SOAPAction header
In VB6 there are local static variables that keep their values after the exit of procedure. It's like using public vars but on local block. For example:
sub count()
static x as integer
x = x + 1
end sub
After 10 calls, x will be 10. I tried to search the same thing in .NET (and even Java) but there was none. Why? Does it break the OOP model in some way, and is there a way to emulate that.
For a while I have been struggling to integrate scala with java methods that might return null. I came up with the following utility which helps a lot:
// produce an Option, nulls become None
object Maybe {
def apply[T](t:T) = if (t==null) None else Some(t)
}
Maybe(javaClass.getResultCouldBeNull()).map( result => doSomeWork(result) )
I have a few questions about this solution:
Is there a better or more standard pattern to use?
Am I duplicating something that already exists?
Does this functionality have hidden gotchas?