I downloaded one custom Talend component from Talend exchange. When I tried to run a job using this component, it gives org.talend cannot be resolved error. The component has required jars along with custComponent_message.properties, custComponent_begin.jet, custComponent_java.xml, custComponent.png files inside it. The CODEGENERATION part of custComponent_java.xml looks like this
<CODEGENERATION>
<IMPORTS>
<IMPORT NAME="bcprovider" MODULE="bcprov-jdk16-143.jar" REQUIRED="true" />
<IMPORT NAME="bcpg" MODULE="bcpg-jdk16-143.jar" REQUIRED="true" />
<IMPORT NAME="PGPEncrypt" MODULE="PGPEncrypt.jar" REQUIRED="true" />
</IMPORTS>
</CODEGENERATION>
Inside custComponent_begin.javajet there is this line that's where I am getting org.talend cannot be resolved error.
org.talend.pgp.PGPEncrypt.encryptFile(<%=source%>,<%=destination%>,<%=publicKey%>,<%=remove%>);
What am I doing wrong here? Do I need to save the jars in some other location too? Please help
The procedure for installing custom components is described here: https://help.talend.com/display/KB/How+to+install+external+modules+in+the+Talend+products
In essence, you should go to the Modules view (Window > Show views > Talend > Modules) and download and install needed modules from there.
Related
Goal
I'm trying to make my maven project use the IntelliJ builder when I'm editing code because the IDE offers fast rebuild and hot deployment features that could speed up my work. However I'm running into a roadblock due to how my maven project is set up.
Constraints
I have to use maven the way it's being used. The solution must be in IntelliJ
Note that creating an IntelliJ plugin is an option. I realize this may be necessary due to the limitations of IntelliJ build configuration.
The problem
My project depends on 2 libraries, SharedLibA and SharedLibB, which contain package com.shared. SharedLibA is a new library, and sharedLibB is and old legacy one. SharedLibA and SharedLibB contain packages that are not contained in the other, which are needed by my project. The package they both have, com.shared is needed by the project too. However SharedLibB is legacy/old so we always want Tomcat to prioritize the implementation of classes in com.shared from SharedLibA, not the implementations of those classes in SharedLibB. We accomplish this by having a maven goal that extracts classes under package com.shared from SharedLibA to WEB-INF/classes when the WAR is packaged.
When I try to build my project in IntelliJ, it picks up the wrong implementation of classes in com.shared.* and spews out compilation errors despite compilation working perfectly via maven. I'm stuck with this inflexible maven hackjob but I still want to find a way to make IntelliJ understand that I want SharedLibA's com.shared.* classes to be used in compilation not SharedLibB's. I can't remove SharedLibB from consideration because I need the other classes in SharedLibB to compile my project.
Desired Solution
I'm looking for some kind of logic like "when com.shared.* classes are considered, choose SharedLibA" or "when any package conflict happens in classpath resolution, prioritize ShareLibA" because I'm pretty sure SharedLibA should be prioritized in any package conflict.
Thanks
I hope that explains it well enough, thank you in advance to anyone who chimes in here.
IDE builds the classpath and buildpath based on the dependencies which are configured for the module. It also considers their order - the 1st dependency that match given class will be used.
For Maven-based projects the dependencies list and their order IDE takes from the Maven pom.xml file of the module. So you can set the order in pom.xml file.
Another mentioned option is to exclude the library items. But the better solution would be to configure Maven build properly.
You should try to go to your project ".IML" file and there :
you can create or modify a module.
In there you can include or exclude the libs or defining its use priority
you could use this snippet to inspire
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="8">
<component name="SharedB" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
...
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
...
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
...
</component>
</module>
if you are not confortable with this solution you could use the module settings of Intellij
https://www.jetbrains.com/help/idea/library.html#excluded_lib_items
Good morning,
I've been working on a project where I'm supposed to:
upgrade the application from JRockit 1.6 to Java 7
upgrade the application to run in a WebLogic 10.3.5 environment to run in a WebLogic 12 environment
I'm sure this doesn't help but I'm new to the Java/Spring/WebLogic world.
I was able to upgrade from JRockit 1.6 to Java 7 but when it comes to the WebLogic part, I've been having issues starting the application.
Every time I do, I get the following error
org.jibx.runtime.JiBXException: Missing required attribute "a" (line 1, col 71)
at org.jibx.runtime.impl.UnmarshallingContext.attributeText(UnmarshallingContext.java:975)
at com.mydomain.JiBX_rule_def_bindingMungeAdapter.JiBX_rule_def_binding_unmarshalAttr_1_0()
at com.mydomain.JiBX_rule_def_bindingMutableRuleDefinition_access.unmarshal()
at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2757)
at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2900)
and have been trying to debug it for a while now. What's really weird is that when I take out the code from a Spring/WebLogic environment and execute it, it works fine (ie, unmarshalls the data).
When it was in the WebLogic 10.3.5 environment w/ JRockit 1.6 and JiBX 1.2.1 jars, I had zero issues.
Here's what I've tried
upgraded JiBX jars from 1.2.1 to 1.2.5
upgraded xpp3 jars to 1.1.3.4.O
upgraded Spring jars from 2.5.5 to 3.2.11
tried including a weblogic.xml file (didn't have one before) and try to used the
<preferred-web-inf>true</preferred-web-inf>
but no luck
tried including a weblogic-application.xml file and an APP-INF folder (didn't have one before) and tried to used the JiBX as my preffered class for unmarshalling
Here is some more information about the environment I'm working in
Non Maven Environment (had to upgrade .jars manually)
Used Java 1.7.0.45 and .71
WebLogic 1.2.1.2
Spring 3.2.11
JiBX 1.2.5
using MyEclipse Version: 2014 Build id: 12.0.0-20131202
no xsd file just a .xml binding file
<binding>
<mapping name="rule"
class="com.mydomain.MutableRuleDefinition">
<value name="a" field="a" style="attribute" />
<value name="b" field="b" style="attribute" />
<collection field="ruleElements">
<structure name="ruleElement"
type="com.mydomain.MutableRuleElement">
<value name="c" field="c" style="attribute" />
<value name="d" field="d" style="attribute" />
<collection field="values" item-type="java.lang.String"
usage="optional">
<value name="value" />
</collection>
</structure>
</collection>
</mapping>
</binding>
Here is the unmarshalling code:
private MutableRuleDefinition unmarshalXMLRuleDef(String _xmlRuleDef) {
MutableRuleDefinition mruleDef = null;
try {
IBindingFactory bfact = BindingDirectory
.getFactory(MutableRuleDefinition.class);
IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
mruleDef = (MutableRuleDefinition) uctx.unmarshalDocument(
new ByteArrayInputStream(_xmlRuleDef.getBytes()), null);
} catch (JiBXException e) {
logger.error("Could not un-marshalling the XML rule definition:["
+ _xmlRuleDef + "]", e);
}
Apparently this was an issue back in JiBX 1.2.1 but was fixed in 1.2.2 :
https://www.mail-archive.com/jibx-users#lists.sourceforge.net/msg04200.html
Any help appreciated. Please let me know if you need more info...
Update #1
I have tried
<value name="a" field="a" style="attribute" usage=optional />
on all the attribute flags and the unmarshalling will work, however, these fields aren't optional so I can't use that as a fix.
Update #2
fwiw, here is an example that would come into be unmarshalled
<rule a="dataForA" b="dataForB">
<ruleElement c="dataForC1" d="dataForD1" />
<ruleElement c="dataForC2" d="dataForD2" />
<ruleElement c="dataForC3" d="dataForD3" />
<ruleElement c="dataForC4" d="dataForD3" />
</rule>
R Hanna,
I would suggest looking at the JiBX dependencies and making sure all of the Jars are the exact same version as the ones used by JiBX. We use some eclipse libraries that often conflict with web server jars.
Also, remember that JiBX is open source. You may want to step through the code and see what is causing JiBX to fail.
One more thing. I can't see your schema definition, but it is strange that the error seems to say that you are missing an attriburte. Are you sure the 'source' attribute is not required.
Good Luck!
Don Corley
JiBX contributor
R Hanna,
I got this resolved for me after using 1.2.5 version of jibx however i made sure all the related jars also updated to 1.2.5 and made sure there are no stale class files present in my war which were created by the previous jars that did the trick for me hope its helps you .
How can I add android native code to a Cordova based project without creating a plugin? what are the entries to put in config.xml?
I'm asking because I have native code that I want to add which is specific to my project and I don't want to always have to remove and re-add the plugin, it will also make svn cycles more complicated.
Is it even possible?
The only part in config.xml that I see that might be related are-
<feature name="NiceNativeFeature">
<param name="android-package" value="com.mycomp.plugins.YourClass"/>
<param name="onload" value="true" />
</feature>
Thanks.
My build begins by defining 2 properties files, importing another build XML, and then commencing with all my other targets & tasks:
build.main.xml:
<project name="${proj.name}" default="assemble" basedir=".">
<!-- BASIC CONFIGURATIONS -->
<!-- Define build properties. -->
<property file="build.main.properties"/>
<property file="build.app.properties"/>
<!-- Imports. -->
<import file="${alt.build.file}"/>
<!-- Rest of buildscript omitted for brevity... -->
</project>
build.app.properties:
proj.name=test-proj
alt.build.file=build.app.xml
It seems that build.main.xml cannot seem to see/find any properties defined inside build.app.properties; specifically:
It cannot resolve ${proj.name}, and when I add the build.main.xml file to the Eclipse Ant view, the name of the build shows up as ${proj.name}
It cannot find build.app.xml imported from build.main.xml
What's going on here? Do ant builds only get to import one properties file or something?!? Where could I start troubleshooting?
Edit: using Eclipse editor my buildscript does not have any red/highlighted syntax errors that might be causing the ant plugin to work incorrectly, etc.
Edit: I am noticing issues with properties defined inside the build.main.properties to. If I try to echo them they don't get noticed by Ant either...
The Ant project name cannot be itself a property for the reason Jochen mentioned in his comment.
Try running your script with the -v option to see more logging. I have used a technique very similar to your <import file="${alt.build.file}"/> to branch my script based on the db platform, so there should be no problem with it.
I wondered if your property files are in the same directory then your build script is.
I am trying to create a custom panel for an IzPack installer. This means that I have to extend IzPanel. However, it appears that if I do this, the extended panel needs to be in the com.izforge.izpack.panels package.
Then I found this post, which stipulates that:
As such, you must include installer.jar from the lib folder of IzPack in the build path of your custom panel project.
Your custom panel /must/ extend com.izforge.izpack.installer.IzPanel.
Furthermore, it /must/ reside in the com.izforge.izpack.panels package.
On top of it all, your build jar's name /must/ be the same as the
unqualified name of your custom panel class.
I take issue with the 1st and 4th points. They imply that I have to create an additional JAR file for each custom IzPanel that I create. Also, I would have to modify the IzPack installation by adding these JARs to one of its subdirectories.
Is this article outdated (2008) and can it be safely ignored, or is this still true?
If not how can I avoid this and simply have the extended IzPanel on the classpath instead?
Thank you!
Okay, I take it you want to have your panels in a single jar within your own package.
This is how you do it:
Create your jar with all of your custom panels
Copy that jar to the IzPackStagingFolder\bin\panels
Edit the installer descriptor and under the panels sections reference your CustomPanels.jar
Then inside your install.xml you define your panels sections similar to:
...
<panels>
<panel classname="HTMLInfoPanel" id="infopanel" encoding="ISO-8859-1" />
<panel classname="TargetPanel" id="targetpanel" />
<panel classname="com.myCompany.installer.panels.MyCustomPanelOne" id="customPanelOne" jar="bin/panels/CustomPanels.jar" />
<panel classname="UserInputPanel" id="userInputPanel" />
<panel classname="InstallPanel" id="installPanel" />
<panel classname="ProcessPanel" id="processPanel" />
<panel classname="com.myCompany.installer.panels.MyCustomPanelTwo" id="customPanelTwo" jar="bin/panels/CustomPanels.jar" />
<panel classname="FinishPanel" id="finishPanel" />
</panels>
...
Where CustomPanels.jar can be a single maven project with your own panels in your own package with two classes CustomPanelOne and CustomPanelTwo both extending IzPanel.
For more info see IzPack's older 4.x documentation at https://izpack.atlassian.net/wiki/spaces/IZPACK/pages/491534/Creating+Panels. As of right now the newer IzPack 5.x doc wiki is missing this section.
Also reffer to the XML DTD at https://github.com/izpack/izpack/blob/4.3/src/dtd/installation.dtd
One more point in addition to Paul Bors answer here.
IzPacks 4.x needed only installer.jar as dependency. When i first tried to compile the custom panel with installer.jar (izpack-installer-5.0.0-beta11.jar), found many compilation errors. Izpack 5.0 adds additional dependency on IzPack api (izpack-api-5.0.0-beta11.jar) and Izpack gui(izpack-gui-5.0.0-beta11.jar).
Enjoy creating custom panels.