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.

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: <%2B94%2077%20633%203491>+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

Reply via email to