Hi folks,
I'm trying to add one more database/schema/persistenceUnit in my project and I'm receiving the error:
No unique bean of type [javax.persistence.EntityManagerFactory] is defined: expected single bean but found 2
I google/api allot and could not found why spring is complaining about my configuration.
Here is part of my appl...
I am getting Access Denied exception when I am calling a Java Script Function from Java Applet only in IE. ( modified my original question with updated information.)
Here is my HTML code
<script type="text/javascript">
function uploadComplete() {
alert("in Upload Complete");
ju.doneUpload(true);
}
</script>
ju is ...
I'm trying to get a GWT 1.7 project to run using the new development mode. Pointing Safari (with the Development Mode plugin installed) to the given URL just shows the latest compiled version. No changes are reflected when I refresh.
A clean 'hello world' project brings up the development mode which works how the old hosted mode used to...
This question may seem stupid, but, so be it! I have a stupid problem then :-). Well, my problem is this : using this code
//PDF generation
PdfWriter.getInstance(document,
new FileOutputStream("PDFFile.pdf"));
//RTF generation
RtfWriter2.getInstance(document,
new FileOutputStream("RTFFile.rtf"));
//HTM generation
HtmlWriter.getIns...
In last few months I have been making a transition from Java to Groovy and I can appreciate many of the benefits it brings: less code, closures, builders, MOP that in the end makes framework like Grails possible, ease with mocking when writing tests etc.
However, I have been “accused” by my coworkers that my code is not groovy enough. ...
I am part of a new team attempting to develop a new Java software system out of a legacy code base (also written in Java) that's rotten to the core. For company political reasons we can't ditch the old Java code and start from fresh. A rewrite would be tantamount to an admission that the system they spent 2 years developing is complete r...
I'm running into problems using AWT classes on OSX (10.5.8) with Java 6 (1.6.0_17 JVM: 14.3-b01-101).
Trying to load java.awt.Dimension the code just freezes, this happens in Eclipse or from the command line. Anyone experiencing same problems ?
The class is used by JAI in the following code:
public static byte[] resizeAsJPG(byte[] imag...
We have a asp.net app that talks to a pretty complex JEE 5 web service. Everything works fine except when we throw an exception. We throw a simple exception without any inner/orig exception, but we get this message on the .Net side.
Additional XML content is present in the fault detail element. Only a single element is allowed.
Work...
In NetBeans, there is an object called a JFileChooser.
I wanted to ask how you can set up a filter in order to just show files that have a .wds extension.
.wds is an extension I use in my program.
...
I have a JAVA application that launches (using ProcessBuilder) another JAVA application like this:
String val = "something";
ProcessBuilder processBuilder = new ProcessBuilder("java", "-classpath", dir, appName, val);
Process p = processBuilder.start();
Now, this works fine, appName is launched with the parameter val and it runs and w...
I have been struggling with a problem trying to get PLJava to work on PostgreSQL on RHEL.
Here is what I have (based off of this: PL/Java README)
.cshrc
setenv JAVA_HOME /opt/jdk1.6.0_17/
setenv LD_LIBRARY_PATH ${JAVA_HOME}/jre/lib/i386
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${JAVA_HOME}/jre/lib/i386/client
setenv LD_LIBRARY_PATH ...
Hi, I'm working on an OpenGL project in which I want to draw a star. It doesn't necessarily have to be a 3d looking star (2d looking is fine). I have the xyz coordinates for the center of the star and I know the size I'd like it to be. I don't do much OpenGL/3d math programming, so any help here would be much appreciated.
EDIT: More det...
Implement a method
public void search (String searchString) { }
to iterate through the notes ArrayList until it
finds a note that contains the searchString.
It should then print either the item found or
the message "String not found".
So far, I have:
import java.util.ArrayList;
import java.util.Iterator;
/**
* A clas...
I have an wrapping object array -in fact a matrix- which includes a checkbox, I want to detect this object's position in array when included checkbox's state changes
public class visualCell implements ItemSelectable{
private JCheckBox checkBox;
private int row;
private int col;
}
when a checkbox changes it's state, I want ...
I am trying to write a program to find the largest prime factor of a very large number, and have tried several methods with varying success. All of the ones I have found so far have been unbelievably slow. I had a thought, and am wondering if this is a valid approach:
long number = input;
while(notPrime(number))
{
number = number /...
I'm using GraniteDS Actionscript code generation templates that let's me take a Java object and convert it to an Actionscript class.
It's mainly used for BlazeDS Java to Flash communication but I'm adapting it to work with JSON webservices using XStream/JETTISON JSON.
Is it possible to use the Granite DS Groovy templates to inspect an...
I ran into some similar questions on StackOverflow, tried the solutions, but did not find an answer.
I am using a fairly common JPA strategy to set last modified times on some entities. Set up the columns and the fields, then tag a method with @PreUpdate and let it set them equal to the current time.
The problem is that I can see in t...
I have an Eclipse plugin for which I create the OSGi bundle JARs with Ant. I would like to sign them with the Ant task, but that overwrites the MANIFEST.MF contents with the class signatures, making the OSGi bundles unusable. The JDK jarsigner tool has the same behavior. The Eclipse PDE seems to have that functionality, but as far as I ...
So this is a really strange problem. I have a Java app that acts as a server, listens for and accepts incoming client connections, and then read data (XML) off of the socket. Using my Java client driver, everything works great. I receive messages as expected. However, using my C++ client driver on the first message only, the very first c...
This is what I have so far but I don't now what to do next. The question is as follows (sorry the coding is not all appearing in one box):
Implement a method
public void search (String searchString) { }
to iterate through the notes ArrayList until it finds a note that contains the searchString. It should then print either the item fou...