AnsweredAssumed Answered

Error en el puerto RMI 50501

Question asked by pablo.zapico on Jun 25, 2009
Latest reply on Jun 25, 2009 by dacedos
Buenos dias

Al ejecutar el ejemplo sdkJCRFirstClient y estar corriendo al mismo tiempo el servidor de alfresco me genera el siguiente error


Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avmRemoteService' defined in class path resource [alfresco/remote-services-context.xml]: Invocation of init method failed; nested exception is java.rmi.server.ExportException: Port already in use: 50501; nested exception is:
   java.net.BindException: Address already in use: JVM_Bind
Caused by: java.rmi.server.ExportException: Port already in use: 50501; nested exception is:
   java.net.BindException: Address already in use: JVM_Bind
   at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:249)
   at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:184)
   at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:382)
   at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:116)
   at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:180)
   at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:293)
   at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:235)
   at org.springframework.remoting.rmi.RmiServiceExporter.prepare(RmiServiceExporter.java:280)
   at org.springframework.remoting.rmi.RmiServiceExporter.afterPropertiesSet(RmiServiceExporter.java:227)
   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 org.alfresco.sample.FirstJCRClient.main(FirstJCRClient.java:64)
Caused by: java.net.BindException: Address already in use: JVM_Bind
   at java.net.PlainSocketImpl.socketBind(Native Method)
   at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
   at java.net.ServerSocket.bind(ServerSocket.java:319)
   at java.net.ServerSocket.<init>(ServerSocket.java:185)
   at java.net.ServerSocket.<init>(ServerSocket.java:97)
   at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:27)
   at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:333)
   at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:622)
   at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:237)

Si paro el servidor de alfresco todo va perfecto, la cosa es que necesito añadir contenidos mediante JCR sin detener el servidor y no me sirve hacerlo con un webService… He probado lo q ponen en este post para poder correr una aplicacion de consola y el servidor de alfresco al mismo tiempo, pero sigo igual

http://forums.alfresco.com/en/viewtopic.php?f=28&t=16420&p=57106&hilit=rmi#p57106

Esto que he probado al ejecutar una jsp de test me devuelve


JCR RMI Test

RMI Registery Server Name :localhost
RMI Registery Server Name :localhost
Remote JCR reference binding name:javaContentRepository

Connection String://localhost:50500/javaContentRepository

Testing…

looking up remote reference at [//localhost:50500/javaContentRepository]
creating local adapter for remotereference [ServerRepository_Stub[UnicastRef [liveRef: [endpoint:[*.*.*.*:1563](remote),objID:[8]]]]]
logging in as admin admin to default workspace
looking up workspace root node
root node UUID [b3fe57bb-9474-4ab9-895a-eda09b438736]
logging out

No se si alguien puede ayudarme, lo unico que quiero es poder hacer una carga de contenidos masiva sin utilzar webService.

Gracias

Outcomes