claudiazanabria / matlabcontrol

Automatically exported from code.google.com/p/matlabcontrol
0 stars 0 forks source link

Support code location could not be determined #26

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What version of matlabcontrol are you using?
4.1.0

What version of MATLAB are you using?
R2014B

What operating system are you using?
OSx Yosemite

Are you using matlabcontrol from inside MATLAB or outside MATLAB?
Outside Matlab (from java code)

What steps will reproduce the problem?
Simply calling MatlabProxy proxy = factory.getProxy();

What did you expect to happen? What happened instead?
Expected to be able to run Matlab code from a java program. Could not do this.

If there was a stack trace, please copy it here.
matlabcontrol.MatlabConnectionException: Support code location could not be 
determined. Could not get URL from CodeSource.
Code Source: (null <no signer certificates>)
Protection Domain: ProtectionDomain  (null <no signer certificates>)
 edu.rice.cs.plt.reflect.PathClassLoader@2df95165
 <no principals>
 null

Class Loader: edu.rice.cs.plt.reflect.PathClassLoader@2df95165
Class Loader Class: class edu.rice.cs.plt.reflect.PathClassLoader
    at matlabcontrol.Configuration.getSupportCodeLocation(Configuration.java:322)
    at matlabcontrol.RemoteMatlabProxyFactory.createProcess(RemoteMatlabProxyFactory.java:289)
    at matlabcontrol.RemoteMatlabProxyFactory.requestProxy(RemoteMatlabProxyFactory.java:125)
    at matlabcontrol.RemoteMatlabProxyFactory.getProxy(RemoteMatlabProxyFactory.java:144)
    at matlabcontrol.MatlabProxyFactory.getProxy(MatlabProxyFactory.java:81)
    at PolygonAssembly.configure(PolygonAssembly.java:62)
    at TestPolygonAssembly.main(TestPolygonAssembly.java:90)

Please provide any additional information below.

Original issue reported on code.google.com by hbha...@gmail.com on 9 Dec 2014 at 12:01

GoogleCodeExporter commented 8 years ago
Not sure, whether this is a similar problem.
I got this error-message until I realized that fixing the space in the path 
resolves the problem (I replaced irrelevant parts of the path with ...):

matlabcontrol.MatlabConnectionException: Support code location could not be 
determined. Could not convert from URL to URI location.
URL Location: file:/Users/ ... /KNIME 
2.11.2/configuration/org.eclipse.osgi/bundles/224/1/.cp/lib/matlabcontrol-4.1.0.
jar
Code Source: (file:/Users/ ... /KNIME 
2.11.2/configuration/org.eclipse.osgi/bundles/224/1/.cp/lib/matlabcontrol-4.1.0.
jar <no signer certificates>)
Protection Domain: ProtectionDomain  (file:/Users/ ... /KNIME 
2.11.2/configuration/org.eclipse.osgi/bundles/224/1/.cp/lib/matlabcontrol-4.1.0.
jar <no signer certificates>)
 null
 <no principals>
 java.security.AllPermissionCollection@f7dc93f (
 ("java.security.AllPermission" "<all permissions>" "<all actions>")
)

Class Loader: org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@6a738cf5
Class Loader Class: class 
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader
    at matlabcontrol.Configuration.getSupportCodeLocation(Configuration.java:309)
    at matlabcontrol.RemoteMatlabProxyFactory.createProcess(RemoteMatlabProxyFactory.java:289)
    at matlabcontrol.RemoteMatlabProxyFactory.requestProxy(RemoteMatlabProxyFactory.java:125)
    at matlabcontrol.MatlabProxyFactory.requestProxy(MatlabProxyFactory.java:92)
    at ...

Caused by: java.net.URISyntaxException: Illegal character in path at index 46: 
file:/Users/ ... /KNIME 
2.11.2/configuration/org.eclipse.osgi/bundles/224/1/.cp/lib/matlabcontrol-4.1.0.
jar
    at java.net.URI$Parser.fail(URI.java:2829)
    at java.net.URI$Parser.checkChars(URI.java:3002)
    at java.net.URI$Parser.parseHierarchical(URI.java:3086)
    at java.net.URI$Parser.parse(URI.java:3034)
    at java.net.URI.<init>(URI.java:595)
    at java.net.URL.toURI(URL.java:938)
    at matlabcontrol.Configuration.getSupportCodeLocation(Configuration.java:248)

Original comment by antje.ni...@googlemail.com on 7 May 2015 at 1:21