I want to use the ehCache as 2nd level cache in my application.
I downloaded the latest version from the ehcache web site. Unfortunatly no jar file is provided, therefor I wanted to compile the code myself. I put it into a new Eclipse dynamic Web Project and added the necessary jars that came with the download to the Build Path. But now, there are still errors in my project..
e.g. this fails: import javax.transaction.TransactionManager;
Does anybody know why? Usually I have javax package available in a Eclipse Web project...
I somehow have not gotten the original javax package.
I answer my own question because an other reference was missing after adding the javaee package. This was the one to the sun. misc.Unsafe.
It does not have to be downloaded, but to be able to use it, the compiler settings have to be changed in Eclipse as described here: https://stackoverflow.com/a/5549580/1737854
Related
I'm working on a project in IBM Integration Toolkit 10.0.0.3 (formerly known as IBM Integration Bus) which is based on Eclipse. I have restructured a couple of Java libraries and part of this restructuring was to add a level in the package structure. To do this, I created a new package and moved the source files from the old package to the new. The next step is to delete the old (empty) package which has proved to be quite challenging.
It seems that the version of Eclipse that IBM Integration Toolkit is based on is quite limited.
The problems I have are:
Packages which do not contain any files are not visible in Package Explorer.
It is not possible to change this in the filter (Package Explorer -> View Menu -> Filters...).
It is not possible to delete packages which contain files, and as soon as I remove the files in the package it disappears from the Package Explorer.
If I delete the package outside of Eclipse, they don't show in Eclipse, but Eclipse still recognizes that the package exist. (I've tried creating a new package with the old name and it stops me from doing so saying that it already exists).
I've also tried installing a new version of vanilla Eclipse and deleting the packages using that, but IBM Integration Toolkit still recognizes the packages.
Does anyone have any idea of how I can remove the packages considering the limitations mentioned above? Because of 4) it leads me to believe that there is a config file somewhere which stores that there should be a package in that location. I'm thinking that I can delete the packages outside of Eclipse and then edit this config file. Is there such a file?
If anyone has an alternative way of removing the packages using Eclipse that would be even better.
A colleague found a solution. Switch to Java view and then it's possible to change the filters to show empty Java packages.
I have a class where we have to use apache river for our work and assignment and I’m trying to install it at home.
I'm fairly new to apache-river and I have installed plug-ins for eclipse before, but this seems a bit more tricky or maybe I'm doing it wrong.
I've looked at https://river.apache.org/ and I've downloaded the zip file and extracted it but I’m not sure what to do with it after that. I'm not even sure that, that is the right download I need.
Any help would be appreciated, thanks.
Please correct me if I misunderstood your question.
I believe you want to import whatever it is Apache River has to offer in Eclipse such that you can use classes in Apache River in your project. Correct?
If yes, this is what i did -
Downloaded apache-river2.2.2.bin.zip from the site you mentioned, extracted it.
Created new Java Project in Eclipse with a trial class.
Configured build path of this Eclipse project, and added all the jars from the /lib folder as 'External Jars'.
All these jars showed up in the Referenced Libraries section in my project in Eclipse.
I tried a sample line of code to see if I get classes from Apache river.
for eg -
LookupLocator locator = new LookupLocator(arg0);
And it worked - Eclipse added
import net.jini.core.discovery.LookupLocator;
automatically.
I checked and this class comes from the jini-core.jar
Of course, if you are using other build / dependency management tools like maven/ant, this eclipse process will differ a little bit.
Let me know if this worked for you.
I am developing an application in Java using Maven and Vaadin 6 for some time now.
I've come to a point where I need to add an add-on (Vaadin calendar 1.3.0 - for Vaadin6).
I've added the maven dependency and repository in my pom.xml file as suggested on the link attached, Maven did download my dependency jar file and it is in the WEB-INF/lib directory.
However, when I try to load the page with the add-on I get the following error message (in browser):
Widgetset does not contain implementation for com.vaadin.addon.calendar.ui.Calendar. Check its #ClientWidget mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions. Unrendered UIDL:
From what I understood the widget set is not compiled. But I do not know how to do this...
I tried to install the Vaadin-plugin in Eclipse. It says on their website that when the vaadin plugin detects a widgetset in the path, it is automatically compiled.
I've also tried to follow the tutorial for using vaadin addons, but still no luck: http://vaadin.com/directory/help/using-vaadin-add-ons
Did you run into similar problems? What should I do? How do I compile the widget set?
Some useful tips please? :)
Your help is very appreciated.
UPDATE: I've tried to follow the steps from this tutorial: https://vaadin.com/book/vaadin6/-/page/addons.maven.html
now whenever I try to load the application I get the following error:
Failed to load the widgetset:
/myproj/VAADIN/widgetsets/...../TheNewFileCreatedAsInTutorial.nocache.js
If you already have installed the eclipse vaadin plugin, try compiling manually as described in section 16.2.2.
I am taking over a web project from my school. I am trying to deploy the project in eclipse. The project uses a group of libraries (Namely javax.mail.* , com.sun.mail.*, org.joda.* and org.apache.*). The project can not compile because it is unable to locate these. I have them in the src folder and then added the three top level folders/packages to the build path. The import statements work. But getting the joda.time.CLASSXYZ does not work (Then I instantiate the class CLASSXYZ). (The error is "The type org.joda.time.base.BaseDateTime cannot be resolved. It is indirectly referenced from required .class files" the import was joda.time.* so the class should have been imported)
I've looked at the other threads and most of them just explain how to add folders to the build path. I have Apache tomcat set up with eclipse. It works with other projects that I have deployed.
This problem has gotten pretty frustrating as its preventing me from starting the project. Any help you be much appreciated.
Cheers
Unless you use maven you need to download additional libraries:
javax.mail: http://www.oracle.com/technetwork/java/javamail/index.html (also included in Java EE)
org.apache http://commons.apache.org/
org.joda http://joda-time.sourceforge.net/
I suggest to place them in a folder 'lib' and add the jar-files to your build class path. (context menu on your project).
The other threads you mentioned are pointing you in the right direction, and provide a good practice to get in to (especially once you start having more than one project running in your eclipse ide).
So right click project - Build Path - Configure Build Path... , then in the Libraries tab, click Add External JARs and add in the jar for org.joda from the link in the other answer here. This way you can have all your external jar libraries in one spot and reuse them across multiple projects. There's also about a dozen different ways to do the same thing in eclipse, but this is the most direct I think. I'm on version Helios (your's might be slightly different). I try not to use source files of external code libraries unless I want to play around, debugging their code - not a bad thing to do - but I never have the time to spare for that.
Also I'd double check that the other libraries you mentioned aren't being automatically linked in or included as part of the JRE system library. Especially if you are setup in a Dynamic Web Project, it would surprise me if org.apache wasn't already there... but I could easily be wrong there, have been many times before & eclipse was usually involved ;-)
I have a project which has shared functionality between three other projects and have linked these to existing projects as I normally would using the add project functionality of the libraries folder.
This all used to work however when I started up Netbeans yesterday it just wasn't working as in the other projects won't compile even though the projects are linked. It can recognise the packages - just the actual classes themselves were not recognised... and to add to the weirdness some of the classes are getting picked up fine.
I have checked the dist folder of the shared project and the Shared.jar file exists. Also I have checked the Jar and the other classes that are not being recognises are there also.
Any suggestions?
alt text http://inverse.seednet.eu/snaps/duvc6r.png
Solution
I had to reinstall netbeans to get this solution resolved
This is most likely a bug in 6.8, as I have ran into the same problem and I only solved it by recreating the project, was a fairly fast process, only had to re-import the sources and then add the JARs on which it depends.
To confirm this case you only have to see the imports that NetBeans did not find, and then go to the included JARs and see if the class really is there, if it is, then it should be able to find it.
Do you have AbstractCrawler.class compiled to its output location as well?