I installed crystal reports XI for the reports of my java application. When I tried to create a new mysql connection via the JDBC(JNDI) I got an error "Failed to open the connection. Details: JDBC Driver not found." So I followed the tutorials on the internet and edit CRConfig.xml to path my mysql driver. I placed it under the same directory where the other jar files were located but still I got the same error message. I also placed it on my environment variables but still no luck. Please help! I need this done by tomorrow.
edit: btw Im doing this in crystal reports. Im trying to create a report to preview on my application.
Something to check, if you have folder or filenames with spaces in them you should enclose them within quotation marks. If that's not the problem, copy your CRconfig classpath into your question, it might be some other issue.
Related
I am following the eclipse set up from MIT's software construction course1. The installation yields an error and I am not sure how to fix this (pictured below)2. The URL yielding an error returns a 404 error, so I don't know if their site is down or an issue with the package I'm using from MIT. Any advice is appreciated!
Error Message From Eclipse
It seems the update site recently moved to a new location.
If you don't want to contact the course staff directly, you could raise an issue against the relevant GitHub project, suggesting they update the setup file.
In the short term, you should be able to download the file to disk, change the URL (look for a line like <repository url="https://checkstyle.github.io/eclipse-cs/update"/> and change the URL to https://checkstyle.org/eclipse-cs-update-site/) and use the "Browse File System" button in the Eclipse installer instead of pasting the remote URL.
I installed NetBeans 8.0.2 with glassfish-4.1. The sample folder is present under C:\Users\Username.netbeans-derby. When I bring up NetBeans and go to the Services tab the connection to sample is present: jdbc:derby://localhost:1527/sample [app on APP] but sample is not listed under Java DB so when I try to connect to sample I get the following error "Unable to connect. Cannot establish a connection to jdbc:derby://localhost1527/sample using org.apache.derby.jdbc.ClientDriver (The connection was refused becuase the database sample was not found)."
Right click on Java DB select Create Database.
use as Database Name 'sample'
use as User Name 'app'
leave the password empty
edit
Seems there is a broken database or maybe one from an earlier Netbeans installation. Remove the sample connection in Netbeans and remove the directory %USERPROFILE%\.netbeans-derby\sample. Recreate the sample database as described above.
I had a broken database from an earlier version too, and then couldn't connect to the sample db.
I simply had to delete the .netbeans-derby directory,
then reinstalled Netbeans,
and is was ok, then.
The same thing happened to me and re-installing NetBeans did not help. After poking around the databases for a bit, I finally got mine working using the following process.
Create a new database with any properties (i.e. name, user, pw)
Navigate to your user directory \.netbeans-derby\{name}\
Copy service.properties file and paste in \.netbeans-derby\sample\
Reconnect to sample database in NetBeans
A couple extra notes:
If you configured your NetBeans database to a different location, use that location in step 2.
You may need to delete and re-create the existing sample database connection in NetBeans for it to pickup the new service.properties file.
I downloaded the zip file of dotCMS two days ago from http://dotcms.com/download/. I followed exactly step by step the instructions of dotCMS documentation and I managed to connect correctly the dotCMS with mySQL (http://dotcms.com/docs/latest/DatabaseConfiguration).
The problem is that when I am running the Apache tomcat (by executing the startup.bat file), a blank page appears on localhost:8080/ and sometimes a page appears containing the number 500(of course in the ROOT folder in webapps I have the dotCMS files). Also in catalina.log I see the following error:
ERROR org.apache.jsp.portal._500_jsp - cms500Page
Any idea about how to fix this?
Most likely your database is not connecting or is misconfigured. Make sure that you point dotCMS to an existing, though empty, db. Also insure that your username/passwords work using the exact same ip/hostname as your connection string.
You will find more information about your db error in the log files, either the tomcat/logs/catalina.out or the tomcat/webapps/ROOT/dotsecure/log/dotcms.log
See this page for more information on how to install dotCMS
http://dotcms.com/docs/latest/installation
I had the same issue few weeks back and managed to resolve it.
The issue might be because you didn't use terminal command to extract the package as mentioned here.
Try using :
tar -zxvf dotcms_X.X.tar.gz
I haven't worked with Java in about 10 years, so it's very probable I'm doing something elementary wrong here...
I am writing a "server-side extension" for SmartFoxServer (SFS). In my login script, I need to make a connection to MS SQL Server, which I am attempting to do using JDBC. I have tested the JDBC code in my debug environment, and it works fine.
BUT
When I put the server-side extension in the SFS "extensions" folder (as per spec), I'm getting a NoClassDefFoundError thrown - clearly SFS can't find the required JAR (sqljdbc4.jar). I have tried putting this JAR in my classpath; I tried including it in my Eclipse project - but for some reason, SFS adamantly refuses to accept the existence of this JAR.
What am I doing wrong?
I have no experience with the product you mention but many years of Java experience.
Have you tried putting the sqljdbc4.jar in the same location as your server-side extension (the extensions 'directory') ? You will likely have to restart SFS after this.
I am writing a Java applet and embedding it in a web page.
It used to run Mac and Windows in different browsers without problem.
I was using NetBeans on the Mac to build the .jar file the applet used.
For some reason or another I decided to load the project on the Windows' NetBeans - I started getting the following error on the Windows machine when accessing the web page from any browser:
java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file
Fearing that it must have been my decision to open the project on Windows that caused this error - I tried to build from the Mac's NetBeans - but the error persisted.
I started a while new project on the Mac and imported the existing source code: still same problem.
I was doing some reading about this error and it seems that the magic number expected is 0xCAFEBABE in hex which is 3405691582 in decimal, not 1008813135. So it looks like the Mac version of Java doesn't produce this file header any more? Hoe can that be? I didn't do any updates or anything.
Yes, 0xCAFEBABE is the usual first 4 bytes of a Java file.
1008813135 is <!DO in Latin encoding, which is, in all probability, the start of <!DOCTYPE....
It is therefore likely the start of a 404 error, or some other error page.
I have not experienced this problem, but Googling this error yields several possible solutions:
forum.sun.com - Java Applet Development - Incompatible magic value 1008813135 in class file MyApplet
Thanks God the problem is solved.
Its the Java cache, so the solution go to Java Control Panel, "General" tab, and under "Temporary Internet Files" click "Settings", then click "Delete Files". Try using the applet again.
"Incompatible magic value 1008813135" Error?
The problem is now solved: I found out that the website host I was using didn't support .jar files at all. I mass-uploaded the files with my ftp program and didn't notice that it ignored the .jar files completely.
Errors on java initialization
Alright, so it was an apache configuration issue, removed this line from my httpd.conf file:
# DefaultType application/x-httpd-php
Fixed the issue.
If you are using Spring security or some sort of custom Servlet Filters, make sure, that the archive or codebase location is in "permitAll" access. This was to problem in my case
I was facing the same problem.The reason in my case was all dependency library that Applet uses was not signed and also applet not able to locate them.
So i Have added all the dependent library along with main applet in jsp file like below :
app.archive = '/esense/resources/lib/Applet.jar, /esense/resources/lib/jasypt-1.7.jar, /esense/resources/lib/mysql-connector-java-5.1.30.jar, /esense/resources/lib/runtime-api-1.0.jar';
I have also signed all the jar.
Hope this may work in your case.
The incompatible magic number is the first four bytes of a html file that has some error message in it, probably a message that the file isn't found.
I encountered this phenomenon when I didn't take case sensitivity into account in the codebase element of the applet tag. Things worked well on Windows, but the internet server I was using was running UNIX where filename case sensitivity is important. Making the case of all file and directory names in the code and codebase elements solved the problem.
I just clicked on maven->update project->include snapshot release in my spring boot and it worked.