Almost the same question as here.
Class.forName("com.mysql.jdbc.Driver");
conection = DriverManager.getConnection("jdbc:mysql://"+server+"/"+bd, user, password);
So I get the wonderful and fantastic XML when I run it. I used it before (with another server) and it Works ok.
My server it's ok because I tested it with another PC.
I'd say I have update java so I guess there could be the problem, but I have no idea. Could be related with enviroment variables? That specific java version? Btw I have 1.8u45.
I need mysql.
Well, finally I solve it. It wasn't java, nor mysql. It was so easy to see... It was Eclipse:
I have EE Luna version and I don't really know why whenever I clicked run (doesn't matter the Project), it always ran a DocsBlahBlah... file related with mysql ConnectionProperties.
So I deleted that from "Run Config..." and apparently all works fine.
However I'm afraid that will be happening more simply the 1st run config it's the one I need now.
Related
When i specify the directory of Glassfish 5.0, i get this message in the IDE :
No usable default domain. Use Next to create a personal domain.
But, there is already a domain (domain1) and i don't want to create another one.
My question is : How to solve this problem ?! Or how can i make Netbeans find the existing domain ?
After a lot of research, it turned out, that, to be able to perform such task, you have to run NetBeans 8.2 as Administrator (under Windows). If you do so, the "No usable default domain. Use Next to create a personal domain." will not be displayed.
I hope it can help other people.
Run your NetBeans 8.2 as administrator then this problem will be solved..
I just wonder something about java applet with awt. I quite disappointed with this problem and want to throw it away sometimes. Below are my descriptions:
I already created one application using java applet with awt controls on my own computer, let's say computerA using Window 7 32bit Operating System. To up and running this application, I update java version to the latest one.
Application is working fine with computerA. However, this application also need to run on the others as well. As my own situation, I run with another computer, let's say computerB using Window 7 64bits Operation System. I knew that the application created with 32bits java version, thus I decided to install this java version on computerB. However, when I run the application it can only display interface on browswer, but some of its function did not work.
Yet I didn't throw it away, I decided to configure in the last computer, let's say computerC. This computer use Window 8 32bits Operating System. I did configure as I did with computerA and computerB. The result is still exact as computerB.
I also checked up this solution on here, but it is not fit my problem.
Here are my questions:
What is the exact problem on here?
Where does the problem come from?
Is it solvable?
How can I solve this kind of problem? Any helps?
Update:
PostgreSQL Database also install in other local computers as well.
I noticed that If I convert my code into eclipse project, it worked fine. No problem at all.
Thanks in Advance.
I was working this afternoon in my project without problems. Before come home I did a commit to my svn to continues it in home, but now when I try to run it shows a code error that hadn't shown before. The Following code it's supposed to initiate new scene using controllers and passing parameters. Error:
Someone knows what is happening? If you say "The code is wrong" it's not possible cause I was using the exactily same code in my work.
Detail, in the afternoon i was using Mac OS and now I'm using Windows. And IDE is Netbeans in booth places
My problem was not about code, actually the code is right.
The problem ocurred because my Netbeans was pointing to a old version of JavaFX. The way to fix it was to uninstall everything about java from my computer and after reinstall with the newer versions of JDK, JavaFx and Netbeans.
Cast your loaders to their appropriate types. For the first cast it to the Login Controller and for the second cast it to the MainViewController.
NetBeans only see's an abstract Object being returned, even though what is actually being returned is a little more specific. I'm not sure why this happened when you moved from one platform to the next (I assume you have the same version and everything), but some compliers will catch this as an error and others will not. Technically there is no error, just questionable results.
I found that Derby database is installed with the jdk automatically. I wanted to use bu I encountered a problem for which I could not find the solution in google.
I have a russian version of windows. Derby seems to be installed correctly, but when i start the database itself or sysinfo - it gives me out some info but in some unknown symbols - actually its a mess in cyrillic symbols instead of plain english. When i try to create a database - it throws an exception so I cant connect, but I cant read the message because of the mess in the symbols.
Has anyone had the same problem?
If I dont find the solution, how can I uninstall Derby from the jdk-release and install it locally into another directory?
You can install derby separately by going to http://db.apache.org/derby and downloading the JAR files and adding it to your project class path. I always do this instead of using the default derby that comes with the JDK.
by the way, if you do this and still get those weird symbols, your problem might be elsewhere. Hope you solve this, derby is a cool embedded db :)
You can also use derby as a filesystem DB. Download from here Then in your code, you need to change driver name and connection string accordingly.
For in memory
driver=org.apache.derby.jdbc.EmbeddedDriver
url=jdbc:derby:memory:myDB;create=true
For fileSystem ,
driver=org.apache.derby.jdbc.ClientDriver
url=jdbc:derby://localhost:1527/schema_name;create=true
I am in a very very upset situation. My program worked 100% fine when it is in netbeans, but when I build it it has some issues. That is, in my program, there is an one interface and 10 implementation classes. Program calls correct correct implementation class based on how the user save the file (eg: if user save it as game.yellow, it will call "YellowImpl.java", if saved as game.red, then "RedImpl.java" likewise).
But when it is built, it is calling everything fine, instead YellowImpl!! Which means, if the user saves it as game.red, it will call "RedImpl" correctly and same to all other implementations instead YellowImpl. When the user save the file as game.yellow, the program do nothing!!! But this is not happening when it is inside the netbeans! I tried clean and build too, still not good! What is causing this ? Please help!
However, I am unable to provide the code, because it has lot of codings
PS: I am using some libs too
It's difficult to understand exactly what issue you are having with your explaination and no code. However I assume you are having issue with implementation naming conventions.
Perhaps the below link can help.
Java Interfaces/Implementation naming convention
I am agree with #Rhys: it is hard to understand what happens in your application. Just let me give you an advice: do not think (even for 1 second) that there is a bug in java compiler, JVM etc. It is definitely your bug.
How to find it? I suggest you to use remote debugging.
Run your application outside IDE (NetBeans in your case) with enabled remote debugger, connect to it with net beans and debug your application. I believe you will fined the problem within minutes.
How to enable remote debugging? Add the following long string to your java execution command line:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
If something happens in very beginning of your program execution use suspend=y.
Now connect to this application from NetBeans. It is simple, just configure it to port 8000 according to the configuration of your application.
That's it. Good luck.
Thanks a lot for the replies guys. However, I managed to find the issue. That was a simple, capital case!! I have a package called "kolor" and all the implementations are inside that. In my "YelloImpl" class, I have mentioned the package as "Kolor" (Note that "K" is capital). It was fine in netbeans, but outside it wasn't. After clearing this out, everything went fine. Thanks all for the replies again.