I have a hive action in oozie and when this action runs along with the jars from shared lib it also loads the my application jar from ${workflowpath}/lib folder which causes jar conflicts and causes hive action to fail some times.
Is there a way to disable loading of jars from lib folder at action level.
Related
How do you change the classpath to a jar file or a different directory?
Go to File-> Project Structure-> Libraries and click green "+" to add the directory folder that has the JARs to CLASSPATH. Everything in that folder will be added to CLASSPATH. Update: It's 2018. It's a better idea to use a dependency manager like Maven and externalize your dependencies. Don't add JAR files to your project in a /lib folder anymore.
I am attempting to add an external jar to my module's build path. I've added the jar as a module dependency and as a library, and the compiler is still unable to find the jar. I'm using intelliJ 14.1. I have verified that the jar is intact and not corrupt.
JAR manifest: IntelliJ IDEA will pass a long classpath via a temporary classpath.jar. The original classpath is defined in the manifest file as a class-path attribute in classpath.jar . You will be able to preview the full command line if it was shortened using this method, not just the classpath of the temporary classpath.jar .
I have created a new Intellij project. But I can't use the third party jars in my project. I have the jars in a directory structure as follows:
repository/commons-logging/commons-logging-1.0.4.jar
repository/commons-lang/commons-lang-2.1.jar
etc.
I want to add them just by pointing to the repository directory, but couldn't find any ways to add them.
But when I am using classes or API from that jars, the editor can't resolve the classes.
I have tried from Project Structure but can't configure it.
Go to File-> Project Structure-> Libraries and click green "+" to add the directory folder that has the JARs to CLASSPATH. Everything in that folder will be added to CLASSPATH.
Update:
It's 2018. It's a better idea to use a dependency manager like Maven and externalize your dependencies. Don't add JAR files to your project in a /lib folder anymore.
If, as I just encountered, you happen to have a jar file listed in the Project Structures->Libraries that is not in your classpath, the correct answer can be found by following the link given by #CrazyCoder above: Look here http://www.jetbrains.com/idea/webhelp/configuring-module-dependencies-and-libraries.html
This says that to add the jar file as a module dependency within the Project Structure dialog:
Open Project Structure
Select Modules, then click on the module for which you want the dependency
Choose the Dependencies tab
Click the '+' at the bottom of the page and choose the appropriate way to connect to the library file. If the jar file is already listed in Libraries, then select 'Library'.
On the Mac version I was getting the error when trying to run JSON-Clojure.json.clj, which is the script to export a database table to JSON. To get it to work I had to download the latest Clojure JAR from http://clojure.org/ and then right-click on PHPStorm app in the Finder and "Show Package Contents". Then go to Contents in there. Then open the lib folder, and see a bunch of .jar files. Copy the clojure-1.8.0.jar file from the unzipped archive I downloaded from clojure.org into the aforementioned lib folder inside the PHPStorm.app/Contents/lib. Restart the app. Now it freaking works.
EDIT: You also have to put the JSR-223 script engine into PHPStorm.app/Contents/lib. It can be built from https://github.com/ato/clojure-jsr223 or downloaded from https://www.dropbox.com/s/jg7s0c41t5ceu7o/clojure-jsr223-1.5.1.jar?dl=0 .
I have a project that uses IVY. My build script resolves the dependencies well.
I have a library (lets call it Project_libs) configured in IntelliJ iml file so that when I deploy the application the jars get published to the server.
I have an ant task ide-setup which copies the necessary jars from Ivy local repo to Project_libs so these jars are available to IDEA during deployement.
Lets say I make changes to a common library like utils.
Build the common library.
Go to the projects that declared this common library as a dependency and run ide-setup
Then start the server.
Is there a direct way in which I can configure IDEA to read the dependencies from the ivy.xml file instead of doing this convoluted process of setting up the whole thing.
I don't know anything about InelliJ IDEA, but I believe you could accomplish what you want using ant and IVY. From the IVY documentation
<ivy:buildlist reference="build-path" ivyfilepath="ivy/ivy.xml" leaf="mymodule">
<fileset dir="projects" includes="**/build.xml"/>
</ivy:buildlist>
Builds a list of build.xml files sorted according to the ivy.xml files found in an
ivy directory relative to those build files. Only build.xml files of modules which
have dependencies (direct or transitive) on mymodule are put in the result list.
So if you set leaf equal to utils, it could return you a list of build.xml files that depend on utils in dependency order. Then all you would have to do is go through those build.xml files in order and invode their build process (probably through a subant call)
I have successfully created an IntelliJ IDEA Groovy + Vaadin project that works great until I try to reference another jar that I wrote. I've added the jar to lib/ and web/WEB-INF/lib/ and included both in my Modules/Dependencies:
I even promoted the lib/ instance to be a "global library" so I could add it to my Artifacts like so:
IntelliJ builds fine and launches Tomcat, but when I try to view my app in a browser, I receive HTTP Status 500 with the error:
The server encountered an internal error that prevented it from fulfilling this request
...and my Tomcat logs state:
javax.servlet.ServletException: Failed to load application class: com.qview.client.QueueViewApplication
Is there any way that I can gain insight into why QueueViewApplication failed to load? Any ideas on a fix?
The issue dealt with how I was building my custom jar.
In IntelliJ IDEA, under Project Structure » Artifacts » [+] » Jar » From modules with dependencies... I was selecting extract to the target jar
This bundles QueueUpdater.jar's dependency jars into one massive QueueUpdater.jar for convenient import.
But, when I changed my selection to copy to the output directory and link via manifest, I was able to add the individual jars to web/WEB-INF/lib/ and run the Vaadin application without error.
I am using drools for processing rules. Web-service calls a method in a class which is in jar included in lib directory of web-service. And this method in turn uses drools. Now the problem is web-service is able to find jar that is using drools but not the drools-compiler jar which is residing in same lib directory. And it gives Unable to load dialect 'org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration:mvel' error. It works if I copy all jars in web-service.aar/lib to axis2/WEB_INF/lib. I also tried to set classpath in a way to take web-service.aar/lib jars first then the one's in axis2/WEB_INF/lib by setting classpath in setenv.sh and catalina configurations. But that didn't help either.
What can be the reason/solution?
You probably need to add a newer version of the mvel jar. I added the mvel-1.3.3-java1.5.jar and it did the trick for me, but just remember to restart your IDE.