Re: Maven error with Karaf Pax-exam
OK, I've just rechecked the code. The default host is: m_host = InetAddress.getLocalHost().getHostName(); The default port is the first free port between: 21413 and 21511 you can set custom ports or host by adding a systemProperty to the options array during configuration setting org.ops4j.pax.exam.rbc.Constants.RMI_PORT_PROPERTY org.ops4j.pax.exam.rbc.Constants.RMI_HOST_PROPERTY org.ops4j.pax.exam.rbc.Constants.RMI_NAME_PROPERTY or simply setting a real system property for them. I hope this helps. Kind regards, Andreas On Mon, Jun 10, 2013 at 10:06 PM, Charles Moulliard ch0...@gmail.comwrote: Code using it -- http://grepcode.com/file/repo1.maven.org/maven2/org.apache.karaf.tooling.exam/org.apache.karaf.tooling.exam.container/2.3.0/org/apache/karaf/tooling/exam/container/internal/KarafTestContainer.java On Mon, Jun 10, 2013 at 9:52 PM, Andreas Pieber anpie...@gmail.comwrote: I don't know by heart but iirc this var is directly set in the pax exam code. I've never thought that someone would like to overwrite it :-) you can check the paxexam - karaf code directly or hope that I (or someone else jb?) find the time within the week to check. On Jun 10, 2013 9:48 PM, Charles Moulliard ch0...@gmail.com wrote: Find the issue. The bundle was not deployed ;-) Is it possible to find which port number or host should be used by pax exam rbc. I tried that without success -- systemProperty(org.ops4j.pax.exam.rbc.rmi.host).value(127.0.0.1), On Mon, Jun 10, 2013 at 9:43 PM, Andreas Pieber anpie...@gmail.comwrote: Based on what does spring defines its search path? I don't know what I could possibly done wrong while writing the framework which could invoke such errors. Basically pax exam karaf does almost the same as u do when you start it via the shell. Kind regards, Andreas On Jun 10, 2013 7:04 PM, Charles Moulliard ch0...@gmail.com wrote: How can we this issue where the schema is searched at the root of where pax exam has unpack the project and not inside org.kie/kie-spring bundle ? java.io.FileNotFoundException: /Users/chmoulli/JBoss/Code/droolsjbpm-oss/droolsjbpm-integration/drools-osgi/drools-karaf-itest/target/exam/unpack/69bbc140-6a26-4c31-a694-6e9c0987556f/org/kie/spring/kie-spring-2.0.0.xsd (No such file or directory) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)[:1.7.0_04] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:99)[:1.7.0_04] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:433)[:1.7.0_04] ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:kie=http://drools.org/schema/kie-spring; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://drools.org/schema/kie-spring org/kie/spring/kie-spring-2.0.0.xsd On Mon, Jun 10, 2013 at 6:54 PM, Charles Moulliard ch0...@gmail.comwrote: Thx for the trick JB. Work now. Here is what I did @RunWith(JUnit4TestRunner.class) public class KieSpringOnKarafTest { protected static final transient Logger LOG = LoggerFactory.getLogger(KieSpringOnKarafTest.class); protected static final String DroolsVersion = 6.0.0-SNAPSHOT; protected OsgiBundleXmlApplicationContext applicationContext; @Inject protected BundleContext bc; @Before public void init() { applicationContext = createApplicationContext(); assertNotNull(Should have created a valid spring context, applicationContext); } protected void refresh() { applicationContext.setBundleContext(bc); applicationContext.refresh(); } protected OsgiBundleXmlApplicationContext createApplicationContext() { return new OsgiBundleXmlApplicationContext(new String[]{org/kie/spring/kie-beans.xml}); } @Test public void testKContainer() throws Exception { refresh(); KieContainer kieContainer = (KieContainer) applicationContext.getBean(defaultContainer); assertNotNull(kieContainer); System.out.println(kieContainer.getReleaseId() == +kieContainer.getReleaseId()); } On Mon, Jun 10, 2013 at 6:39 PM, Jean-Baptiste Onofré j...@nanthrax.net wrote: Try to put @Before to init and call the method before the test. Regards JB On 06/10/2013 06:30 PM, Charles Moulliard wrote: Been able to figure out the issue. Thx for your help. I get now another exception with this code. The BundleContext object is null when I tried to add it to the applicationContext. According to Pax Exam, it should be injected automatically. Is it process after calling the constructor of the class ? I use pax exam 2.6.0
Error during karaf startup
Hello, I am getting below error during karaf startup. Karaf can't startup, make sure the log file can be accessed and written by the user starting Karaf : /tmp/srikanth/cumulocity-cep-karaf-1.0.0-SNAPSHOT/system/org/apache/felix/org.apache.felix.framework/3.0.9/org.apache.felix.framework-3.0.9.jar Please let me know what could be the problem. I tried to give 755 permission to log, but still the same problem. Thanks. Srikanth -- View this message in context: http://karaf.922171.n3.nabble.com/Error-during-karaf-startup-tp4029069.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Error during karaf startup
Is your karaf.data directory writeable by the user starting karaf? Kind regards, Andreas On Wed, Jun 19, 2013 at 2:09 PM, Srikanth srikanth.hu...@gmail.com wrote: Hello, I am getting below error during karaf startup. Karaf can't startup, make sure the log file can be accessed and written by the user starting Karaf : /tmp/srikanth/cumulocity-cep-karaf-1.0.0-SNAPSHOT/system/org/apache/felix/org.apache.felix.framework/3.0.9/org.apache.felix.framework-3.0.9.jar Please let me know what could be the problem. I tried to give 755 permission to log, but still the same problem. Thanks. Srikanth -- View this message in context: http://karaf.922171.n3.nabble.com/Error-during-karaf-startup-tp4029069.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Error during karaf startup
Thanks for quick reply. Yes, user starting the karaf can write in karaf/data directory. Any idea why message shows as org/apache/felix/org.apache.felix.framework/3.0.9/org.apache.felix.framework-3.0.9.jar Since in my karaf artifact is org/apache/felix/org.apache.felix.framework/4.0.3/org.apache.felix.framework-4.0.3.jar and i am using 2.3.1 version of karaf Srikanth -- View this message in context: http://karaf.922171.n3.nabble.com/Error-during-karaf-startup-tp4029069p4029071.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Error during karaf startup
I would need to check the code for this. But one question up front. Have you changed anything? Are you simply downloading Karaf? Do you start Karaf by using ./bin/karaf or cd bin/ and then executing karaf by using karaf? Is it possible that another karaf instance is on your path? I assume that your user has permission to write to ~ too? Kind regards, Andreas On Wed, Jun 19, 2013 at 2:23 PM, Srikanth srikanth.hu...@gmail.com wrote: Thanks for quick reply. Yes, user starting the karaf can write in karaf/data directory. Any idea why message shows as org/apache/felix/org.apache.felix.framework/3.0.9/org.apache.felix.framework-3.0.9.jar Since in my karaf artifact is org/apache/felix/org.apache.felix.framework/4.0.3/org.apache.felix.framework-4.0.3.jar and i am using 2.3.1 version of karaf Srikanth -- View this message in context: http://karaf.922171.n3.nabble.com/Error-during-karaf-startup-tp4029069p4029071.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Error during karaf startup
I tried by both ./bin/karaf and cd bin/, same problem in both cases. I am not downloading th karaf, i am building using maven by plugins and features. We have only one karaf instance, that too its not running :-( yes, user has permission to write to directory. -- View this message in context: http://karaf.922171.n3.nabble.com/Error-during-karaf-startup-tp4029069p4029073.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Error during karaf startup
oh... ok, the error message is simply shown on every IO error during the main.launch method. Please chck your etc/config.properties and see if it points to the correct felix version. Kind regards, Andreas On Wed, Jun 19, 2013 at 2:40 PM, Srikanth srikanth.hu...@gmail.com wrote: I tried by both ./bin/karaf and cd bin/, same problem in both cases. I am not downloading th karaf, i am building using maven by plugins and features. We have only one karaf instance, that too its not running :-( yes, user has permission to write to directory. -- View this message in context: http://karaf.922171.n3.nabble.com/Error-during-karaf-startup-tp4029069p4029073.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Cellar 3.0.0-SNAPSHOT
Awesome, thanks!! :) -- View this message in context: http://karaf.922171.n3.nabble.com/Cellar-3-0-0-SNAPSHOT-tp4028863p4029075.html Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Cellar 3.0.0-SNAPSHOT
Good call! I just assumed it would use whatever followed as the command and just didn't care about quotes. So I'm guessing by the s at the end of features? I think I almost finished up the work I wanted to do on that fork. One quick fix to make and check in which should fix a random error I see with Hazelcast 3.0. I think think the blueprint files in 3.0 might have had some cyclical type dependencies and a lot of unnecessary service references. It feels much faster to me. I slimmed down a lot of stuff and have been diffing against the latest code, luckily for me it hasn't changed much, to make sure I'm not losing anything that is needed by accident. -- View this message in context: http://karaf.922171.n3.nabble.com/Cellar-3-0-0-SNAPSHOT-tp4028863p4029076.html Sent from the Karaf - User mailing list archive at Nabble.com.