When I looked at the extracting code there seems to be a problem. We
are extracting to a directory with something like this.

new File(".").getAbsolutePath() + File.separator + "target "+
File.separator + "carbontmp" +
                File.separator + extractedCarbonDir;

But we should set the working directory to this extracting directory.
So we have a chicken and egg problem. To avoid this we should set a
system property in the pom saying the extrating directory.

Thanks,
Supun..

On Sat, Mar 19, 2011 at 9:31 AM, Supun Kamburugamuva <[email protected]> wrote:
> Actually I believe there is a bug in extracting the distribution. It
> is extracted to
>
> ${basedir}/carbontmp/wso2esb-4.0.0-SNAPSHOT
>
> instead of
>
> ${basedir}/target/carbontmp/wso2esb-4.0.0-SNAPSHOT
>
> When I changed the working directory to the first directory ESB starts
> fine. But it is not the correct way of extracting. So I'm going to
> change the extraction logic.
>
> Thanks,
> Supun..
>
> On Sat, Mar 19, 2011 at 7:50 AM, Afkham Azeez <[email protected]> wrote:
>> Did you try adding;
>> <workingDirectory>${basedir}</workingDirectory>
>> to the surefire plugin config?
>>
>> On Sat, Mar 19, 2011 at 7:49 AM, Afkham Azeez <[email protected]> wrote:
>>>
>>>
>>> On Fri, Mar 18, 2011 at 7:28 PM, Hiranya Jayathilaka <[email protected]>
>>> wrote:
>>>>
>>>> Apparently none of the relative paths work when running Carbon within
>>>> integration tests :( Senaka just mentioned to me that a similar situation
>>>> occurs with GReg as well even though that doesn't cause a total failure as
>>>> in the case of ESB.
>>>
>>> Relative paths are working. If not, even a simple Tomcat server will not
>>> start. Some other weird thing is going on where I think the user.dir is
>>> getting set to something else. I will look into this during the course of
>>> this weekend.
>>>
>>>>
>>>> I did some changes/hacks to mediation initializer and managed to get the
>>>> ESB to start up properly. But I don't feel like checking this in. Need to
>>>> look for a better alternative which does not involve code changes.
>>>>
>>>> Thanks,
>>>> Hiranya
>>>>
>>>> On Fri, Mar 18, 2011 at 5:29 PM, Kasun Indrasiri <[email protected]> wrote:
>>>>>
>>>>> Yeah. SynapseControllerFactory fails to resolve the synapse.xml from the
>>>>> path '././repository/deployment/server/synapse-configs/default'. However,
>>>>> this path exists and the very same path is resolved properly when we tried
>>>>> with a standalone distribution of esb.
>>>>>
>>>>> On Fri, Mar 18, 2011 at 2:47 PM, Hiranya Jayathilaka <[email protected]>
>>>>> wrote:
>>>>>>
>>>>>> Hi Folks,
>>>>>> We have some problems running ESB integration tests. It seems the
>>>>>> ESB/Synapse cannot read some files on startup. I get a whole bunch of
>>>>>> exceptions when the ESB starts up during tests:
>>>>>> [2011-03-18 14:33:01,648] ERROR
>>>>>> {org.apache.synapse.transport.nhttp.HttpCoreNIOSSLSender} -  Error 
>>>>>> opening
>>>>>> Keystore : repository/resources/security/wso2carbon.jks
>>>>>> java.io.FileNotFoundException:
>>>>>> repository/resources/security/wso2carbon.jks (No such file or directory)
>>>>>> at java.io.FileInputStream.open(Native Method)
>>>>>> at java.io.FileInputStream.<init>(FileInputStream.java:106)
>>>>>> at java.io.FileInputStream.<init>(FileInputStream.java:66)
>>>>>> at
>>>>>> org.apache.synapse.transport.nhttp.HttpCoreNIOSSLSender.createSSLContext(HttpCoreNIOSSLSender.java:203)
>>>>>> at
>>>>>> org.apache.synapse.transport.nhttp.HttpCoreNIOSSLSender.getSSLContext(HttpCoreNIOSSLSender.java:87)
>>>>>> at
>>>>>> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.init(HttpCoreNIOSender.java:125)
>>>>>> at
>>>>>> org.apache.axis2.context.ConfigurationContextFactory.initTransportSenders(ConfigurationContextFactory.java:300)
>>>>>> at
>>>>>> org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:231)
>>>>>> at
>>>>>> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:93)
>>>>>> at
>>>>>> org.wso2.carbon.core.CarbonConfigurationContextFactory.createNewConfigurationContext(CarbonConfigurationContextFactory.java:65)
>>>>>> at
>>>>>> org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:384)
>>>>>> at
>>>>>> org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:282)
>>>>>> at
>>>>>> org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:117)
>>>>>> at
>>>>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:916)
>>>>>> at
>>>>>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
>>>>>> at
>>>>>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:330)
>>>>>>
>>>>>>
>>>>>> [2011-03-18 14:34:56,993] FATAL
>>>>>> {org.apache.synapse.SynapseControllerFactory} -  The synapse.xml location
>>>>>> ././repository/deployment/server/synapse-configs/default doesn't exist
>>>>>> [2011-03-18 14:34:59,202] FATAL
>>>>>> {org.wso2.carbon.mediation.initializer.ServiceBusInitializer} -  Couldn't
>>>>>> initialize the ESB...
>>>>>> org.apache.synapse.SynapseException: The synapse.xml location
>>>>>> ././repository/deployment/server/synapse-configs/default doesn't exist
>>>>>> at
>>>>>> org.apache.synapse.SynapseControllerFactory.handleFatal(SynapseControllerFactory.java:121)
>>>>>> at
>>>>>> org.apache.synapse.SynapseControllerFactory.validatePath(SynapseControllerFactory.java:113)
>>>>>> at
>>>>>> org.apache.synapse.SynapseControllerFactory.validate(SynapseControllerFactory.java:88)
>>>>>> at
>>>>>> org.apache.synapse.SynapseControllerFactory.createSynapseController(SynapseControllerFactory.java:44)
>>>>>> at org.apache.synapse.ServerManager.init(ServerManager.java:102)
>>>>>> at
>>>>>> org.wso2.carbon.mediation.initializer.ServiceBusInitializer.initESB(ServiceBusInitializer.java:394)
>>>>>> at
>>>>>> org.wso2.carbon.mediation.initializer.ServiceBusInitializer.activate(ServiceBusInitializer.java:160)
>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>> at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>>>> at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>>>> at
>>>>>> org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:230)
>>>>>> at
>>>>>> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.j
>>>>>>
>>>>>> ESB does not get initialized cleanly due to these errors and as a
>>>>>> result most of the tests fail.
>>>>>> I did some remote debugging and apparently all the file paths are
>>>>>> resolved properly and those files indeed exist in the file system. But 
>>>>>> ESB
>>>>>> cannot read them in the face of recurring FileNotFoundExceptions. Any 
>>>>>> idea
>>>>>> what might be wrong?
>>>>>> Thanks
>>>>>> --
>>>>>> Hiranya Jayathilaka
>>>>>> Senior Software Engineer;
>>>>>> WSO2 Inc.;  http://wso2.org
>>>>>> E-mail: [email protected];  Mobile: +94 77 633 3491
>>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>>
>>>>>> _______________________________________________
>>>>>> Carbon-dev mailing list
>>>>>> [email protected]
>>>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Kasun Indrasiri
>>>>> Senior Software Engineer
>>>>> WSO2, Inc.; http://wso2.com
>>>>> lean.enterprise.middleware
>>>>>
>>>>> cell: +94 71 536 4128
>>>>> Blog : http://kasunpanorama.blogspot.com/
>>>>
>>>>
>>>>
>>>> --
>>>> Hiranya Jayathilaka
>>>> Senior Software Engineer;
>>>> WSO2 Inc.;  http://wso2.org
>>>> E-mail: [email protected];  Mobile: +94 77 633 3491
>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>
>>>> _______________________________________________
>>>> Carbon-dev mailing list
>>>> [email protected]
>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>
>>>
>>>
>>>
>>> --
>>> Afkham Azeez
>>> Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com,
>>>
>>> Member; Apache Software Foundation; http://www.apache.org/
>>> email: [email protected] cell: +94 77 3320919
>>> blog: http://blog.afkham.org
>>> twitter: http://twitter.com/afkham_azeez
>>> linked-in: http://lk.linkedin.com/in/afkhamazeez
>>>
>>> Lean . Enterprise . Middleware
>>
>>
>>
>> --
>> Afkham Azeez
>> Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com,
>>
>> Member; Apache Software Foundation; http://www.apache.org/
>> email: [email protected] cell: +94 77 3320919
>> blog: http://blog.afkham.org
>> twitter: http://twitter.com/afkham_azeez
>> linked-in: http://lk.linkedin.com/in/afkhamazeez
>>
>> Lean . Enterprise . Middleware
>>
>> _______________________________________________
>> Carbon-dev mailing list
>> [email protected]
>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
>
>
> --
> Supun Kamburugamuva
> Technical Lead &  Product Manager, WSO2 Inc.; http://wso2.com
> Member, Apache Software Foundation; http://www.apache.org
> WSO2 Inc.;  http://wso2.org
> E-mail: [email protected];  Mobile: +94 77 431 3585
> Blog: http://supunk.blogspot.com
>



-- 
Supun Kamburugamuva
Technical Lead &  Product Manager, WSO2 Inc.; http://wso2.com
Member, Apache Software Foundation; http://www.apache.org
WSO2 Inc.;  http://wso2.org
E-mail: [email protected];  Mobile: +94 77 431 3585
Blog: http://supunk.blogspot.com
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to