Hi team!
I've found cause of Exception.
class = org.apache.servicemix.jbi.container.DeploySupport
In smx 3.2.1:
protected String getFilePrefix() {
return isFileUrlFormat() ? "file://" : "";
}
In smx 3.2.2-SNAPSHOT:
protected String getFilePrefix() {
String filePrefix = "file://";
String os = System.getProperty("os.name");
if (os.startsWith("Windows")) {
filePrefix = "file:///";
}
return isFileUrlFormat() ? filePrefix : "";
}
So, I need to work with version 3.2.2-SNAPSHOT in camel-sa-itest
(http://svn.apache.org/repos/asf/servicemix/smx3/trunk/samples/camel/camel-sa-itest).
How can I do it?
Thanks!
Truly yours, Ivan Pryvalov.
ivan пишет:
Hi again!
I've made some research....
2008-05-23 13:54:49,343 [main ] INFO InstallSharedLibrary
- Deploying shared library: file://C:\Documents and
Settings\Ivan/.m2/repository/org/apache/servicemix/servicemix-shared/3.2.1/servicemix-shared-3.2.1-installer.zip
So, if we replace
String location =
file://C:\Documents and
Settings\Ivan/.m2/repository/org/apache/servicemix/servicemix-shared/3.2.1/servicemix-shared-3.2.1-installer.zip
on
String location =
file:///C:\Documents and
Settings\Ivan/.m2/repository/org/apache/servicemix/servicemix-shared/3.2.1/servicemix-shared-3.2.1-installer.zip
(3 slashes instead of 2)
it would be OK...
It is possible to do some fix of it? Now I will try to find this "thing"
place.
Ivan
ivan пишет:
Hi Guilaume!
Lets follow log file and smx 3.2.2 code.
String location =
file://C:\Documents and
Settings\Ivan/.m2/repository/org/apache/servicemix/servicemix-shared/3.2.1/servicemix-shared-3.2.1-installer.zip
The reason is, it is good string for creating "file".
In method AutoDeploymentService.unpackLocation in code:
if (location.startsWith(filePrefix)) {
URI uri = new URI(location);
file = new File(uri);
} else {
file = new File(location);
}
File file = new File(location) - returns correct object.
and next time code works with "file".
Btw, I didn't find way to change \ on /. May be it is Eclipse's issue
(I setted M2_REPO with / but it is displayed with \). Also in Windows
env variables it is setted M2_REPO with /.
As for stacktrace,
2008-05-22 15:04:37,000 [main ] ERROR InstallationService
- Deployment failed
javax.jbi.management.DeploymentException:
java.net.UnknownHostException: C
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.unpackLocation(AutoDeploymentService.java:595)
at
org.apache.servicemix.jbi.framework.InstallationService.installSharedLibrary(InstallationService.java:213)
at
org.apache.servicemix.jbi.framework.AdminCommandsService.installSharedLibrary(AdminCommandsService.java:104)
at
org.apache.servicemix.jbi.container.InstallSharedLibrary.doDeploy(InstallSharedLibrary.java:37)
at
org.apache.servicemix.jbi.container.DeploySupport.deploy(DeploySupport.java:58)
at
org.apache.servicemix.jbi.container.SpringJBIContainer.afterPropertiesSet(SpringJBIContainer.java:111)
in file
org.apache.servicemix.jbi.framework.AutoDeploymentService.unpackLocation(AutoDeploymentService.java:595)
595 line has no code (I mean, in 3.2.2-SNAPSHOT sources). May be there
is difference between actual version of sources servicemix and
ServicexMix 3.2.1 used in Spring. How can I look at file
AutoDeploymentService 3.2.1 sm-version?
Again question:
2008-05-23 12:20:38,500 [main ] INFO JBIContainer -
ServiceMix 3.2.1 JBI Container (ServiceMix) is starting
Where I can set sm's version used in Spring?
Thanks,
Truly yours,
Ivan Pryvalov.
Guillaume Nodet пишет:
Try switching from backslashes to slashes ?
On Thu, May 22, 2008 at 1:51 PM, ivan <[EMAIL PROTECTED]> wrote:
Hi!
I tried to use camel-sa-itest
But I got following:
2008-05-22 14:40:08,343 [main ] INFO
InstallSharedLibrary -
Deploying shared library: file://C:\Documents and
Settings\Ivan/.m2/repository/org/apache/servicemix/servicemix-shared/3.2.1/servicemix-shared-3.2.1-installer.zip
2008-05-22 14:40:19,593 [main ] ERROR
InstallationService -
Deployment failed
javax.jbi.management.DeploymentException:
java.net.UnknownHostException: C
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.unpackLocation(AutoDeploymentService.java:595)
at
org.apache.servicemix.jbi.framework.InstallationService.installSharedLibrary(InstallationService.java:213)
at
org.apache.servicemix.jbi.framework.AdminCommandsService.installSharedLibrary(AdminCommandsService.java:104)
at
org.apache.servicemix.jbi.container.InstallSharedLibrary.doDeploy(InstallSharedLibrary.java:37)
at
org.apache.servicemix.jbi.container.DeploySupport.deploy(DeploySupport.java:58)
at
org.apache.servicemix.jbi.container.SpringJBIContainer.afterPropertiesSet(SpringJBIContainer.java:111)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:91)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:75)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65)
at
com.oxseed.services.octpodwek.IntegrateOCTPODWEKServiceTest.createApplicationContext(IntegrateOCTPODWEKServiceTest.java:44)
at
com.oxseed.services.octpodwek.IntegrateOCTPODWEKServiceTest.setUp(IntegrateOCTPODWEKServiceTest.java:30)
at junit.framework.TestCase.runBare(TestCase.java:132)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.net.UnknownHostException: C
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.NetworkClient.openServer(Unknown Source)
at sun.net.ftp.FtpClient.openServer(Unknown Source)
at sun.net.ftp.FtpClient.openServer(Unknown Source)
at sun.net.www.protocol.ftp.FtpURLConnection.connect(Unknown
Source)
at
sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(Unknown
Source)
at java.net.URL.openStream(Unknown Source)
at
org.apache.servicemix.jbi.util.FileUtil.unpackArchive(FileUtil.java:154)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.unpackLocation(AutoDeploymentService.java:582)
... 33 more
I saw comment about this, but I didnt find answer - what cause of it
and how
can I fix problem? In spaces in path? Do I need to move my M2_REPO
location?
Thanks!
Truly yours, Ivan Privalov.
Guillaume Nodet пишет:
Another way to do integration test (so using the packaged service
assemblies)
is to do the same thing as:
http://svn.apache.org/repos/asf/servicemix/smx3/trunk/samples/camel/camel-sa-itest
For example, you can deploy SA using the following:
http://svn.apache.org/repos/asf/servicemix/smx3/trunk/samples/camel/camel-sa-itest/src/test/resources/test1.xml
On Wed, May 21, 2008 at 5:05 PM, Bruce Snyder <[EMAIL PROTECTED]>
wrote:
On Wed, May 21, 2008 at 8:57 AM, ivan <[EMAIL PROTECTED]> wrote:
Hi!!
How can I test existing SA?
I mean, I already have Service Assembly (*.zip) in maven repository.
There are two methods for testing:
1) Integration testing with Spring is the easiest way to test:
http://servicemix.apache.org/integration-testing-in-spring.html
2) Writing a plain old JUnit test and constructing everything
manually. There are many unit tests throughout the ServiceMix
codebase
that demonstrate how to go about this.
Bruce
--
perl -e 'print
unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/
Blog: http://bruceblog.org/