The trick here is changing the package name in multiple places. It is easiest to let Eclipse handle most of it (via Refactor->Rename).
...
Code Block | ||
---|---|---|
| ||
<dependencySet> <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping> <unpack>false</unpack> <useTransitiveDependencies>false</useTransitiveDependencies> <outputDirectory>bundles/aspire</outputDirectory> <includes> <include>com.newgroupid:*</include> </includes> </dependencySet> |
Things to try:
(within Eclipse)
The error is:
...
Check out the Subversion Console and the Maven Console for more details.
Try to avoid using metadata tags which start with "<rss" or "<feed", e.g., <feederLabel>.
...
IE may then report that the XML file can not be parsed as an RSS feed (or some such error).
When running under just the component test bench, everything worked fine, but when running under the application test bench, a third-party JAR is unable to locate its own properties file.
...
Code Block | ||||
---|---|---|---|---|
| ||||
// Reset the classloader for this thread to prevent issues finding the ROME properties file // and classes if (!Thread.currentThread().getContextClassLoader().equals(SyndFeedInput.class.getClassLoader())) { System.out.println("Setting ClassLoader"); Thread.currentThread().setContextClassLoader(SyndFeedInput.class.getClassLoader()); } else { System.out.println("!!! ClassLoader equal"); } |
You need to create a classloader containing the current classloader and the JAR file you wish to use. Try the following code:
...
Code Block | ||||
---|---|---|---|---|
| ||||
// Add the jars in to the classloader for this thread if (_queueClassLoader != null) { debug("Adding jars to classloader"); Thread.currentThread().setContextClassLoader(_queueClassLoader); } |
I ran into a subtle infinite loop, which I'd like to share with you.
...
And so, it started all of the components, which meant that it started another copy of itself! (When it then went again to /config/components/component, got the top-level components again, and then started another copy if itself again, etc. etc.)
When accessing your configuration elements with XPATH, do not use a leading "/". If you do, you will access the configuration of the system manager all the way at the top.
...
Note there is no need to prefix it with "config", since we are already "inside" the config node.
This will create unnecessary and destructive <parent> tags inside your stage's pom.xml file. If you discover these, just delete the entire <parent> tag.
It is best to use the archetype to create the stage directly inside your Eclipse project.
Under certain circumstances, the bundles copied to the output directoy are named with a timestamp:
...
Code Block | ||
---|---|---|
| ||
<dependencySet> <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}</outputFileNameMapping> <unpack>false</unpack> <useTransitiveDependencies>false</useTransitiveDependencies> <outputDirectory>bundles/aspire</outputDirectory> <includes> <include>com.searchtechnologies:*</include> </includes> </dependencySet> |
Call job.terminate(). This will set a flag which causes the job to be terminated once the current stage completes. See Terminating Jobs for more details.
I got a stange class loadeder issue when loading a component
...
Again, this was a missing import. I cleaned up the pom and added javax.xml.namespace to the <Import-Package>
One error not caused by the pom:
Code Block | ||
---|---|---|
| ||
ERROR: Unable to start system bundle. (java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.CommentImpl cannot be cast to org.w3c.dom.Element) java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.CommentImpl cannot be cast to org.w3c.dom.Element at com.searchtechnologies.aspire.distributed.discovery.DiscoveryManager.initialize(DiscoveryManager.java:106) at com.searchtechnologies.aspire.distributed.DistributedCommunicationsManager.initialize(DistributedCommunicationsManager.java:137) at com.searchtechnologies.aspire.application.AspireApplicationImpl.doAdditionalInitialization(AspireApplicationImpl.java:69) |
...
The only solution at the moment is to remove the comment.
Info |
---|
See Accessing Other Components for details on how to programatically access one component from another. |
...
When creating components, you'll often need to reference other Aspire components or third-party JAR files. In order to do this, you'll end up with one or more dependencies in the pom file, similar to this:
...
In versions 0.3 and earlier, you need to ensure that a dependent bundle is loaded first by ensuring the file appears first in you <bundles> tag. Again, third-party JAR files must be included in your component (as a compile-time dependency).
If you experience memory issues or JVM core dumps you can enable JMX on Felix and then connect using JConsole.
...
Restart Aspire and then use JConsole to connect to port 9999.
The permgen is where the JVM keeps the actual classes (not the instances, just the "boiler plates"), including fields, method names, etc.
...
Note |
---|
Given its nature, permgen nor metaspace is garbage collected. |
In some rare cases, an error in the configuration of pipeline managers and branches can cause a deadlock. To prevent that, be sure that you are not branching sub-jobs to the same pipeline manager doing the branching.
Pipeline Manager A: XMLSubjobExtractor -> PrintToFile
Where XMLSubjobExtractor branch is configured to send jobs to Pipeline Manager A. This will almost certainly cause a deadlock.
Pipeline Manager A (parent jobs): XMLSubjobExtractor
...