Best unofficial Apache Server developers community |
| |||||
| Jul 20, 2010 | |||||
|
David Bosschaert (JIRA) |
|
||||
| Tags: | |||||
Similar Threads
Getting rid of Import-Package and Export-Package
I am trying simple osgi bundle which has every dependency embedded inside my bundle. By default, bundle-plugin creates several entries in Import-Package and Export-Package . I want to get rid of them completely. I tried several ways . If I try giving empty Import-Package , it fails at build. I tried blank _exportcontents, does not work too ! Any clue ?
Updated: (AMQCPP-204) Add the ability to package the ActiveMQ-CPP Project for distribution.
[
https://issues.apache.org/activemq/br...nels:all-tabpanel
]
Timothy Bish updated AMQCPP-204:
all-in-one package distribution
We're days away from the release (It will happen this week, I promise). Our all-in-one package is jruby+buildr, using a script put together by Alex. It delivers well: we get to have tight integration with jruby which gives us a ant-like solution. However we cannot, I think, make it available from the Apache downloads, for licensing reasons. I think a minima we should make it available from the rubyforge website. Is everybody ok with that ? I also contacted the jruby maintainers to give them a heads up. Maybe they'd like to host on jruby.org ? So I'd like to open an informal vote here. I'm ok with making this all-in-one package available in both places if possible. What's your take ? Antoine
Fwd: svn commit: r964787 - in /cxf/dosgi/trunk: distribution/multi-bundle/ distribution/multi-bundl
Sorry that should have said CXF 2.2.9. The commit is good, the message has the typo. Unfortunately no svn commit --amend yet... David On 16 July 2010 13:46, <davi### @apache.org> wrote: Author: davidb Date: Fri Jul 16 12:46:10 2010 New Revision: 964787 URL: http://svn.apache.org/viewvc?rev=964787&view=rev Log: Move DOSGi to CXF 2.0.9 - This commit includes Sergey's work to pick up CXF 2.0.9 - It moves the CXF bundle to the end of the list of bundles - And adds the proper start levels to the system tests Modified: cxf/dosgi/trunk/distribution/multi-bundle/pom.xml cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml cxf/dosgi/trunk/distribution/single-bundle/pom.xml cxf/dosgi/trunk/parent/pom.xml cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportService.java cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestImportService.java Modified: cxf/dosgi/trunk/distribution/multi-bundle/pom.xml URL: http://svn.apache.org/viewvc/cxf/dosg...787&view=diff
Missing Constraint: Import-Package
I am trying to build my maven project into a bundle using the
maven-bundle-plugin with all its dependencies (it depends on
guice-2.0.jar). In my pom file I have:
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.1.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${pom.groupId}.${pom.artifactId}</Bundle-SymbolicName>
<Bundle-Name>${pom.name}</Bundle-Name>
<Bundle-Version>${pom.version}</Bundle-Version>
<Bundle-Activator>com.generator.Activator</Bundle-Activator>
<Private-Package>com.generator</Private-Package>
<Embed-Transitive>true</Embed-Transitive>
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
After building the project using mvn install I get a jar file with all
the dependencies. I then try to run it through the OSGI console after
installing it but I get the error:
osgi> start 15
org.osgi.framework.BundleException: The bundle
"com.generator_1.1.1.SNAPSHOT [15]" could not be resolved. Reason:
Missing Constraint: Import-Package:
com.google.inject.internal.asm.util; version="0.0.0"
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1317)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1301)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:319)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:276)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:252)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:156)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.runConsole(FrameworkConsole.java:141)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:105)
at java.lang.Thread.run(Unknown Source)
osgi>
The problem seems to be related to the
com.google.inject.internal.asm.util package but I have not been able
to find that package anywhere (not even in guice-2.0.jar). Any ideas
on how to solve this problem?
Created: (FELIX-2481) Renaming a package via refactoring should update any workspace package exports
Renaming a package via refactoring should update any workspace package exports/imports
Created: (CXF-2885) Wrong import package version for javax.servlet
Wrong import package version for javax.servlet
Unresolved constraint package; (&(package=org.osgi.framework)(version>=1.5.0))
hello,
i am very new to osgi so maybe my issue is something trivial, but i did
not find solution for it while googling.
i have basic webapp that works fine if i install there felix osgi log
implementation and other felix bundles. i decided to try to code my own
implementation of osgi log service. i think i did all correctly, but
when i try to start my webapp with my implementation of log service, i
get this error:
ERROR: Error starting
jndi:/localhost/webapp/WEB-INF/bundles/commons-logservice-osgi-1.0-SNAPSHOT.jar
(org.osgi.framework.BundleException: Unresolved constraint in bundle
cz.startnet.commons-logservice-osgi [2]: package;
(&(package=org.osgi.framework)(version>=1.5.0)))
org.osgi.framework.BundleException: Unresolved constraint in bundle
cz.startnet.commons-logservice-osgi [2]: package;
(&(package=org.osgi.framework)(version>=1.5.0))
at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3299)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1657)
at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1128)
at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:619)
manifest of commons-logservice-osgi contains this (and ofc other lines):
Export-Package: cz.startnet.commons.org.osgi.service.log,org.osgi.serv
ice.log;uses:="org.osgi.framework";version="1.3"
Import-Package: cz.startnet.commons.org.osgi.service.log,org.osgi.fram
ework;version="1.5",org.osgi.service.log;version="1.3"
manifest was generated by maven-bundle-plugin.
this is structure of my webapp:
target/
|-- bundles
| |-- commons-logservice-osgi-1.0-SNAPSHOT.jar
| |-- org.apache.felix.http.bridge-2.0.4.jar
| `-- org.apache.felix.webconsole-3.0.0.jar
|-- classes
| `-- cz
| `-- startnet
| `-- webapp
| |-- FrameworkService.class
| |-- ProvisionActivator.class
| `-- StartupListener.class
|-- felix-cache
| |-- bundle0
| | `-- bundle.id
| |-- bundle1
| | |-- bundle.id
| | |-- bundle.lastmodified
| | |-- bundle.location
| | |-- bundle.startlevel
| | |-- bundle.state
| | `-- version0.0
| | |-- bundle.jar
| | |-- bundle.jar-embedded
| | | |-- commons-fileupload-1.1.1.jar
| | | |-- commons-io-1.4.jar
| | | `-- json-20070829.jar
| | `-- revision.location
| |-- bundle2
| | |-- bundle.id
| | |-- bundle.lastmodified
| | |-- bundle.location
| | |-- bundle.startlevel
| | |-- bundle.state
| | `-- version0.0
| | |-- bundle.jar
| | `-- revision.location
| `-- bundle3
| |-- bundle.id
| |-- bundle.lastmodified
| |-- bundle.location
| |-- bundle.startlevel
| |-- bundle.state
| `-- version0.0
| |-- bundle.jar
| `-- revision.location
|-- maven-archiver
| `-- pom.properties
|-- war
| `-- work
| `-- webapp-cache.xml
|-- webapp
| |-- META-INF
| | `-- context.xml
| `-- WEB-INF
| |-- bundles
| | |-- commons-logservice-osgi-1.0-SNAPSHOT.jar
| | |-- org.apache.felix.http.bridge-2.0.4.jar
| | `-- org.apache.felix.webconsole-3.0.0.jar
| |-- classes
| | `-- cz
| | `-- startnet
| | `-- webapp
| | |-- FrameworkService.class
| | |-- ProvisionActivator.class
| | `-- StartupListener.class
| |-- framework.properties
| |-- lib
| | |-- org.apache.felix.framework-2.0.5.jar
| | |-- org.apache.felix.http.proxy-2.0.4.jar
| | |-- org.osgi.compendium-4.2.0.jar
| | `-- org.osgi.core-4.2.0.jar
| `-- web.xml
`-- webapp.war
26 directories, 47 files
anyone knows what i am doing wrong that commons-logservice-osgi cannot
be started? thx for any hints.
Miroslav
Updated: (DOSGI-29) Exception when stopping DOSGi bundle
[
https://issues.apache.org/jira/browse...nels:all-tabpanel
]
David Bosschaert updated DOSGI-29:
Updated: (DOSGI-27) Discovery problem when two dependent bundles export interfaces
[
https://issues.apache.org/jira/browse...nels:all-tabpanel
]
David Bosschaert updated DOSGI-27:
Updated: (CLK-690) Common ORM layer/package
[
https://issues.apache.org/jira/browse...nels:all-tabpanel
]
George Stan updated CLK-690:
jackrabbit 1.6.2 import/export
Hi everyone,
my export/import method as follow:
/**
*
* @param path node path
* @param xmlfileName xml file name eg:"systemview.xml"
*/
public void exportData(final String path, final String xmlfileName){
jcrTemplate.execute(new JcrCallback(){
public Object doInJcr(Session session) throws IOException,
RepositoryException {
File outputFile = new File(xmlfileName);
FileOutputStream out = new FileOutputStream(outputFile);
session.exportSystemView(CMSUtil.normalizedPath(path),
out, false, false);
return null;
}
});
}
/**
*
* @param path node path
* @param xmlfileName xml file name eg:"systemview.xml"
*/
public void importData(final String path, final String xmlfileName){
jcrTemplate.execute(new JcrCallback(){
public Object doInJcr(Session session) throws IOException,
RepositoryException {
File inputFile = new File(xmlfileName);
FileInputStream in = new FileInputStream(inputFile);
session.importXML
(CMSUtil.normalizedPath(path), in,
ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
return null;
}
});
jcrTemplate.save();
}
I do exportData("/","file.xml"), then changed the repository.xml of
jackrabbit 1.6.2, (add datastore, change
org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManager to
org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager ) and
drop the db tables jackrabbit use,( also the workspace.xml in repo home
directory). and I got follow error info when i importData("/", "file.xml").
org.springframework.dao.DataIntegrityViolationException: Constraint has
been violated; nested exception is
javax.jcr.nodetype.ConstraintViolationException: Unable to perform
operation. Node is protected.
at
org.springmodules.jcr.SessionFactoryUtils.translateException(SessionFactoryUtils.java:182)
at
org.springmodules.jcr.JcrAccessor.convertJcrAccessException(JcrAccessor.java:58)
at org.springmodules.jcr.JcrTemplate.execute(JcrTemplate.java:82)
at org.springmodules.jcr.JcrTemplate.execute(JcrTemplate.java:108)
at
com.tingup.cms.service.impl.JcrNodeServiceOcmImpl.importData(JcrNodeServiceOcmImpl.java:101)
[..............................]
Caused by: javax.jcr.nodetype.ConstraintViolationException: Unable to
perform operation. Node is protected.
at
org.apache.jackrabbit.core.ItemValidator.checkCondition(ItemValidator.java:300)
at
org.apache.jackrabbit.core.ItemValidator.checkModify(ItemValidator.java:274)
at
org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:805)
at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1646)
at
org.apache.jackrabbit.core.xml.SessionImporter.createNode(SessionImporter.java:95)
at
org.apache.jackrabbit.core.xml.SessionImporter.startNode(SessionImporter.java:230)
at
org.apache.jackrabbit.core.xml.SysViewImportHandler.processNode(SysViewImportHandler.java:86)
at
org.apache.jackrabbit.core.xml.SysViewImportHandler.startElement(SysViewImportHandler.java:127)
at
org.apache.jackrabbit.core.xml.ImportHandler.startElement(ImportHandler.java:166)
at
org.apache.jackrabbit.commons.xml.DefaultContentHandler.startElement(DefaultContentHandler.java:162)
[..............................]
I also tried create a new node "/test" in the jackrabbit root node, and
importData("/test", "file.xml"). get the follow error:
2010-07-12 23:27:06,019 [http-8080-1] ERROR
com.tingup.cms.portlet.CmsImportExportPortlet - Constraint has been
violated; nested exception is
javax.jcr.nodetype.ConstraintViolationException: no definition found in
parent node's node type for new node: no matching child node definition
found for {http://www.jcp.org/jcr/1.0}root:" rel="nofollow" target="_blank">http://www.jcp.org/jcr/1.0}root: no matching child node
definition found for {http://www.jcp.org/jcr/1.0}root
org.springframework.dao.DataIntegrityViolationException: Constraint has
been violated; nested exception is
javax.jcr.nodetype.ConstraintViolationException: no definition found in
parent node's node type for new node: no matching child node definition
found for {http://www.jcp.org/jcr/1.0}root:" rel="nofollow" target="_blank">http://www.jcp.org/jcr/1.0}root: no matching child node
definition found for {http://www.jcp.org/jcr/1.0}root
at
org.springmodules.jcr.SessionFactoryUtils.translateException(SessionFactoryUtils.java:182)
at
org.springmodules.jcr.JcrAccessor.convertJcrAccessException(JcrAccessor.java:58)
at org.springmodules.jcr.JcrTemplate.execute(JcrTemplate.java:82)
at org.springmodules.jcr.JcrTemplate.execute(JcrTemplate.java:108)
at
com.tingup.cms.service.impl.JcrNodeServiceOcmImpl.importData(JcrNodeServiceOcmImpl.java:101)
[..................................]
Caused by: javax.jcr.nodetype.ConstraintViolationException: no definition
found in parent node's node type for new node: no matching child node
definition found for {http://www.jcp.org/jcr/1.0}root:" rel="nofollow" target="_blank">http://www.jcp.org/jcr/1.0}root: no matching child
node definition found for {http://www.jcp.org/jcr/1.0}root
at
org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:775)
at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1646)
at
org.apache.jackrabbit.core.xml.SessionImporter.createNode(SessionImporter.java:95)
at
org.apache.jackrabbit.core.xml.SessionImporter.startNode(SessionImporter.java:230)
at
org.apache.jackrabbit.core.xml.SysViewImportHandler.processNode(SysViewImportHandler.java:86)
at
org.apache.jackrabbit.core.xml.SysViewImportHandler.startElement(SysViewImportHandler.java:127)
at
org.apache.jackrabbit.core.xml.ImportHandler.startElement(ImportHandler.java:166)
at
org.apache.jackrabbit.commons.xml.DefaultContentHandler.startElement(DefaultContentHandler.java:162)
[..................................]
Caused by: javax.jcr.nodetype.ConstraintViolationException: no matching
child node definition found for {http://www.jcp.org/jcr/1.0}root
at
org.apache.jackrabbit.core.nodetype.EffectiveNodeType.getApplicableChildNodeDef(EffectiveNodeType.java:732)
at
org.apache.jackrabbit.core.NodeImpl.getApplicableChildNodeDefinition(NodeImpl.java:886)
at
org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:771)
... 117 more
Help me! thanks very much.
Regards,
tingup
Updated: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse e
[
https://issues.apache.org/jira/browse...nels:all-tabpanel
]
Aniket Mokashi updated PIG-656:
Created: (AVRO-567) add tools for text file import and export
add tools for text file import and export
Created: (FELIX-2483) Removing an export should prompt to remove corresponding import
Removing an export should prompt to remove corresponding import
Updated: (HIVE-249) chmod u+x (or something) on build/dist/bin/hive when running "ant package
[
https://issues.apache.org/jira/browse...nels:all-tabpanel
]
Carl Steinbach updated HIVE-249:
PATCH/puppet 1/1] Minimal fix for #4205 -- incorrect Import loop messages
This patch fixes the narrow problem of #4205, wherein type_loader would
reparse
a file each time it was imported (causing the parser to incorrectly think
that
it was in a loop) by checking @imported inside the existing check on the
thread-guarded @loaded. (@imported was being set but never checked).
This works (and is thread safe) because all of this is going on inside a
giant
synchronize care of @loaded. But it, like the fix for #4208, does nothing
about the global lock.
Areas for future research:
1) Why is the looping inside of import?
2) Why are there separate @loaded and @imported tables?
3) Why is the parsing treated like a function (called deep in the
structure)
yet coded like a thread-savvy pseudo state monad (e.g. raising errors
that
presume it knows/owns what's going on outside the whole process)?
These and many other exciting questions are deferred to #4211
Signed-off-by: Markus Roberts <Mark### @reality.com>
---
lib/puppet/parser/type_loader.rb | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/puppet/parser/type_loader.rb
b/lib/puppet/parser/type_loader.rb
index 6c32f6a..cb8657f 100644
--- a/lib/puppet/parser/type_loader.rb
+++ b/lib/puppet/parser/type_loader.rb
@@ -51,8 +51,10 @@ class Puppet::Parser::TypeLoader
unless file =~ /^#{File::SEPARATOR}/
file = File.join(dir, file)
end
- @imported[file] = true
- parse_file(file)
+ unless imported? file
+ @imported[file] = true
+ parse_file(file)
+ end
end
modname
Re: ZkClient package
I use it at my job at kaChing. Generally it is just fine for the job, doing what you'd expect. My criticisms are that it is very thin on documentation (javadoc), which may have been improved, and I don't like how it makes every zk exception into a RuntimeException. But I'm thumbs up. .. Adam On Mon, Jul 12, 2010 at 4:10 PM, Jun Rao <jun### @gmail.com> wrote: Hi, ZkClient (http://github.com/sgroschupf/zkclient) provides a nice wrapper around the ZooKeeper client and handles things like retry during ConnectionLoss events, and auto reconnect. Does anyone (other than Katta) use it? Would people recommend using it? Thanks, Jun
Re: do X if package Y is installed?
On 6/25/2010 12:03 AM, Bill Weiss wrote: My problem is, in this case, there are machines that need X but not Y, Y but not X, X and Y, or neither. I can obviously write all of those cases out separately, but that means duplication of code for setting up the parts of X and Y that aren't dependant. Custom facts are probably the best way for me to do this, but I'd love to hear that there's a simpler way. If you can decide in your node source (site.pp or external) which components are needed, this is very easy: node a { include X } node b { include Y } node c { include X,Y } node d { } If you **cannot** decide in your node source, you're probably doing something wrong[1] and need to explain your problem better. Best Regards, David [1] I know, converting legacy systems is a pain, but IMHO you're still better off doing a manual survey and nailing it down instead of trying to make automatic decisions that'll backfire down the road. FB-Nr.: FN 309285 g FB-Gericht: LG Korneuburg
Package requires....
If I have a package { "foo": ensure => installed; require =>
something
} in a module, AND I also have a Package { require =>
Class['yum::client']} in site.pp, what happens in the module? Does the
package in the module require both 'something' and the yum::client
class, or does the fact I specified a package{} with a require in the
module mean that only the yum::client class is required?
Doug.
Should I get this Reseller package?
Jun 23, 2010 can I import an existing SSL certificate? Jul 26, 2010 | |||||