My tomcat web app isn't loading the oracle driver any longer. I moved tomcat and messed with the server definition. Its up and running but can't connect to Oracle due to a missing driver.
I had similar problem with log4j and other libs but adding the lib into the Deployment Assembly of the web app properties solved those issues.
The Oracle lib is there as is its odbc6.jar.
I also tried copying it to WEB-INF/lib with to no avail.
I have a hunch this is a class path problem but I'm not sure how to fix it. I'm also concerned that tomcat can find other libs but not the oracle liv.
SQLException: No suitable Driver Found for jdbc:oracle:thin:#//localhost:1521/orcl
Fixed. I removed the server from the eclipse server window. Clean the project. Added the server back in. Cleaned and rebuild and it worked.
Related
I am developing an Angularjs frontend which talks to a REST backend. I am developing using Eclipse and was using a Glassfish webserver.
I had the need to create htaccess redirect for Angular routes (see here: htaccess redirect for Angular routes) but to do this I need to change my webserver from Glassfish to Apache Tomcat since the htaccess stuff doesn't exist for the Glasshfish webserver.
When I created the new apache tomcat server v8.0, upon starting the log gave multiple errors for missing JAR files. These JARs were:
avalon-framework-4.1.3.jar
batik-css-1.6-1.jar
batik-ext-1.6-1.jar
batik-gui-util-1.6-1.jar
batik-util-1.6-1.jar
commons-configuration-1.5.jar
logkit-1.0.1.jar
nekohtml-1.9.11.jar
xercesImpl-2.8.1.jar
xml-apis-1.3.03.jar
Additionally, it wants the following JAR which doesn't not seem to be around anymore:
antisamy-1.3-SNAPSHOT.jar
A lot of the JARS mentioned above are old versions of the JARS. What can I do about the missing JAR that is not around anymore?
Also, how do I know if these JARs are the most current versions I should be using? (I added all of them I could find manually in the tomcat /lib directory)
Thanks in advance - I'm quite new to all this stuff so go easy on me:)
EDIT 1: I've included the non-snapshot version of the JAR as per unwichtich's answer. However this doesn't fix the error. Why would the Apache Tomcat v8.0 require such old JAR files to work, especially a snapshot jar? Where would one look to see where these JAR's are configured? Is it possible to know which newer versions of the JARs are compatible with my setup?
antisamy-1.3-SNAPSHOT.jar
First, you should NOT depend on SNAPSHOT dependencies, they can change the programs behaviour in the same version....
Second, SNAPSHOT versions might be seen as beta steps to the final release, so you can not expect that these SNAPSHOT versions are still available online when the final version was released.
A quick googling didn't suggest any old link to antisamy-1.3-SNAPSHOT.jar, but you may try this one: https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/owaspantisamy/antisamy-bin.1.3.jar. This should be the final of 1.3 and if you are lucky it contains the same API as the SNAPSHOT version you used before. If not, you may have to update your code so that it works with the final.
There seem to be newer versions of the lib, you also may want to try them.
I am trying to run a simple Restful web service example on oracle weblogic server . but i am getting this issue while run the project on server. Publishing to Oracle Weblogic server at localhost has encountered a problem.Runtime exception occurred in publish task 'SplitsrcTargetPreparation'.
Have a look on screen sort.What i have to do ?
None of the other answers solved my problem, but I finally found a solution. I'm not claiming that this is the best or only way of resolving this issue, but it worked for me. Hope it helps others.
Open the Properties of your WebLogic server instance in Eclipse. Select Publishing. Set the publishing mode to "Publish as an exploded archive". You will no longer get a split source error.
Check the following.
Maven version – If you have imported as a maven project then make
sure that maven version is compatible to the java version you are
using.
Makes sure that you are using the java from the Middleware
which is comes bundled with weblogic.
New domain – Corrupt domain
may also cause this. Create a new domain
I have a Java project which uses Struts and Hibernate. I am using PostgreSQL as the database for the project.
I have imported the .jws file in JDeveloper. All the java and jsp files are imported to the project.
When I tried to run the project multiple errors came out. I think it's due to a database connection failure.
Do I need to configure pgsql with the project?
Thanks in advance.
You have to provide more info on what the errors are.
But some common problem in JDeveloper when using the bundled server to test is that (if you are using datasources) you have to place the driver jars in the server lib folder or declare it as a Library by going to Tools->Manage Libraries.
If you post what errors are you receiving and how are you connecting to the database we might be able to help you a little more.
You'll need to add the postgreSQL jdbc jar files to your project and to the embedded WebLogic instance.
Tell us the specific error you are getting and we'll help you more.
I have run a j2ee application in tomcat/eclipse for several months now, but suddenly (after working with changed in the css files), I get the server error:
The requested resource /appname/ is not available. I'm totally lost. I've gone through a number of posts. This one describes my problem: Eclipse is not detecting servlet libraries, but I've gone through everything in that post without finding any missing jars or servers or anything in my project.
I'm running Eclipse Java EE IDE for Web Developers.
Version: Helios Service Release 1.
Project -> Properties -> Server shows Tomcat v6.0 Server at localhost
Project -> Build path, please see attached screen dump.
Project -> Project Facets: Dynamic Web Module 2.5 and Java 1.6 is checked.
I have tried to clean and rebuild the project.
I'm running over https so I'm connecting to https://localhost:8443/appname/Start. I'm not sure if that could be the problem, but it has worked ok until now.
Can anyone give me a hint what can be wrong?
Finally got it working again, but I honestly don't know exactly what fixed it.
I started with removing some servlets/servlet mappings from the web.xml file. After having done that change, when restarting the server, the Start servlet was found, but the jsp that the servlet was forwaring to was not (and the url to the jsp page looked strange). Also the logcat property file was not found. I read in another post that the Server might need to be cleaned so I did that and then cleaned the project once again. Then restarted the Server and now it's the application is running again.
Thanks for your help anyway, Andrei.
try cleaning your tomcat from eclipse:
right click in tomcat > clean.
then restart your server
i'm new to jboss, i wish to setup a development server on my local machine to be used with netbeans, under windows xp; I need to install the oracle jdbc driver on it. I've searched the web and all the articles i found say to copy the jar in the server default folder. Will it be visible also to all and minimal folder ? there's another way to configure drivers without physically moving the jar to the folder ?
thank you in advance
No, JBOSS has to have the Oracle JDBC driver JAR in the CLASSPATH, so it has to be in the server /lib directory. It's visible to the app server and all deployed apps if the JAR is in that location.
This is necessary but not sufficient for configuration connection pools. You still have to set them up in JBOSS.