AnsweredAssumed Answered

Unit Tests on Linux: Conversion Error

Question asked by ianpriest on Dec 7, 2005
Latest reply on Jan 3, 2006 by derek
Hi,

I get an error when running a unit test on Linux - specifically test org.alfresco.repo.content.transform.ContentTransformerRegistryTest. It runs a superclass method - AbstractContentTransformerTest.testAllConversions() - that fails.

The output from the test is shown below. First the stack trace, then the console output. I'm running Alfresco 1.1.0 and Open Office 2.0 on Linux.

Stack trace from test:

org.alfresco.service.cmr.repository.ContentIOException: Content conversion failed:
   reader: ContentAccessor[ contentUrl=store:///home/autobuild/update-alfresco/alfresco-current/projects/repository/source/test-resources/quick/quick.txt, mimetype=text/plain, size=43, encoding=UTF-8]
   writer: ContentAccessor[ contentUrl=store:///tmp/Alfresco/ContentTransformerRegistryTest_testAllConversions_txt_30730.html, mimetype=text/html, size=0, encoding=UTF-8]
   options: {}
   transformer: UnoContentTransformer[ average=0ms]
   at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:159)
   at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:120)
   at org.alfresco.repo.content.transform.AbstractContentTransformerTest.testAllConversions(AbstractContentTransformerTest.java:172)
   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:585)
   at junit.framework.TestCase.runTest(TestCase.java:154)
   at junit.framework.TestCase.runBare(TestCase.java:127)
   at junit.framework.TestResult$1.protect(TestResult.java:106)
   at junit.framework.TestResult.runProtected(TestResult.java:124)
   at junit.framework.TestResult.run(TestResult.java:109)
   at junit.framework.TestCase.run(TestCase.java:118)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: net.sf.joott.uno.UnoException: conversion failed
   at net.sf.joott.uno.DocumentConverter.convert(DocumentConverter.java:107)
   at net.sf.joott.uno.DocumentConverter.convert(DocumentConverter.java:79)
   at org.alfresco.repo.content.transform.UnoContentTransformer$DocumentFormatWrapper.execute(UnoContentTransformer.java:291)
   at org.alfresco.repo.content.transform.UnoContentTransformer.transformInternal(UnoContentTransformer.java:236)
   at org.alfresco.repo.content.transform.AbstractContentTransformer.transform(AbstractContentTransformer.java:155)
   … 15 more
Caused by: com.sun.star.lang.DisposedException: java_remote_bridge com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge@1b31fd9 is disposed
   at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.checkDisposed(java_remote_bridge.java:967)
   at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:886)
   at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:870)
   at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:177)
   at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:163)
   at $Proxy62.dispose(Unknown Source)
   at net.sf.joott.uno.DocumentConverter.convert(DocumentConverter.java:96)
   … 19 more


Console output. The connect errors for other protocols are because they don't have permission. Also changed the class a little to correct the debug output…


07-Dec-2005 14:36:23 net.sf.joott.uno.UnoConnection connect
INFO: connecting using "socket,host=localhost,port=8100,tcpNoDelay=1"…
07-Dec-2005 14:36:23 net.sf.joott.uno.UnoConnection connect
INFO: connected
07-Dec-2005 14:36:25 net.sf.joott.uno.UnoConnection connect
INFO: connecting using "socket,host=localhost,port=8100,tcpNoDelay=1"…
07-Dec-2005 14:36:25 net.sf.joott.uno.UnoConnection connect
INFO: connected
14:36:26,295 ERROR [smb.protocol.netbios] NetBIOSNameServer setup error:
java.net.BindException: Permission denied
   at java.net.PlainDatagramSocketImpl.bind0(Native Method)
   at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
   at java.net.DatagramSocket.bind(DatagramSocket.java:368)
   at java.net.DatagramSocket.<init>(DatagramSocket.java:210)
   at java.net.DatagramSocket.<init>(DatagramSocket.java:261)
   at java.net.DatagramSocket.<init>(DatagramSocket.java:234)
   at org.alfresco.filesys.netbios.server.NetBIOSNameServer.openSocket(NetBIOSNameServer.java:1080)
   at org.alfresco.filesys.netbios.server.NetBIOSNameServer.run(NetBIOSNameServer.java:1489)
   at java.lang.Thread.run(Thread.java:595)
14:36:26,302 ERROR [alfresco.smb.protocol] [SMB] Server error :
java.net.BindException: Permission denied
   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:141)
   at org.alfresco.filesys.smb.server.SessionSocketHandler.initialize(SessionSocketHandler.java:249)
   at org.alfresco.filesys.smb.server.NetBIOSSessionSocketHandler.createSessionHandlers(NetBIOSSessionSocketHandler.java:157)
   at org.alfresco.filesys.smb.server.SMBServer.run(SMBServer.java:522)
   at java.lang.Thread.run(Thread.java:595)
14:36:26,318 ERROR [alfresco.ftp.protocol] FTP Socket error
java.net.BindException: Permission denied
   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:141)
   at org.alfresco.filesys.ftp.FTPNetworkServer.run(FTPNetworkServer.java:377)
   at java.lang.Thread.run(Thread.java:595)
14:36:26,360 INFO  [service.descriptor.DescriptorService] Alfresco started (Open Source) - v1.1.0 (dev); repository v1.1.0 (dev)
Transformation performed 5 time: text/plain –> text/plain
   source: ContentAccessor[ contentUrl=store:///home/autobuild/update-alfresco/alfresco-current/projects/repository/source/test-resources/quick/quick.txt, mimetype=text/plain, size=43, encoding=UTF-8]
   target: ContentAccessor[ contentUrl=store:///tmp/Alfresco/ContentTransformerRegistryTest_testAllConversions_txt_30729.txt, mimetype=text/plain, size=43, encoding=UTF-8]
   transformer: StringExtractingContentTransformer[ average=0ms]
07-Dec-2005 14:36:26 net.sf.joott.uno.UnoConnection disposing
WARNING: closing unexpectedly
07-Dec-2005 14:36:26 net.sf.joott.uno.DocumentConverter convert
SEVERE: conversion failed; source = "file:///tmp/Alfresco/UnoContentTransformer30731.txt"; destination = "file:///tmp/Alfresco/UnoContentTransformer30732.html"; filterProperties = "{FilterName=HTML (StarWriter)}"com.sun.star.lang.DisposedException: java_remote_bridge com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge@1b31fd9 is disposed
Can you help?

Regards,
Ian.

Outcomes