-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provider_url tag in JMSSouceConnector.xml file for JMSSource operator not correctly parsed #89
Comments
Hi christianIreland, Can you let me know the absolute path to the .bindings file. Are you able to provide the absolute path to this parameter in connections.xml file? Can you also elaborate why you want to use file://../binding/, the content of the URL is pointing at binding/ directory under / instead of a directory relative to current working directory. Thanks Cong |
Hi Connglisc, I want to use the path ../binding/ because I need to place the binding file inside the package of my project, so that no hard coded path will be needed to point to a specific location, and the installer can be coded with no issues. As I reported in the description of this post, it is exactly in the connection.xml document where I am trying to provide the location to the binding. The format of the path is correct since it the SPL file of the JMS operator I have provided the following path to the Connection.xml file and it is correctly resolved: getSubmissionTimeValue("connectionDoc","../binding/JMSSourceConnection.xml") ; From the examples I found on line in the connection.xml document it is not needed to specify the bindings file name in the connection.xml. When the relative path provided is correctly resolved this is how it looks like: /home/streamsadmin/worspace/iit_idm_incident_fusion_engine/binding At the moment the path I need to provide to make the things work is the following: "file:///home/streamsadmin/worspace/iit_idm_incident_fusion_engine/binding" please notice that we have 3 back splashes at the beginning which should be needed to Java to accept the / from the path as part of the string. We have now a string that starts with .. how would the relative path I am trying to provide as parameter look like? Thank you |
Hi christianIreland, Thank you for providing the details. Because The provider_URL needs to conform to the URL format, in your case, please set the provider_url string in the connections.xml file to provider_url = "file:../binding/" Let me know if this helps. You have specified this string to be provider_url = "file://../binding/", this value is interpreted as a absolute path i.e /binding/ Thank you. |
Thank you consglisc, |
For Streams 3.2.2, how do we interpret this relative path? Where is it relative to? |
In 3.2.2, relative provider_url will not work due to appBundle. We are simply passing this value to InitialContext. If relative path is specified, then it will be relative to the current working directory and in 3.2.2, this working dir is determined for each instance of application with the domain property applicationCurrentWorkingPath something like /homes/hny4/user/.streams/var/Streams.sab_DLZ-domain-instance/d51dd2d6-43c4-485c-87cf-2cd4c72ecaed/currentWorkingDir/0 I think we can support relative provider_url path in 3.2.2 by making it relative to application directory. |
So for 3.2.1, if path is relative, this path is relative to the data directory. In Streams 3.2.2, the current behavior is that the relative path is interpreted against the current working directory, which is in the application landing zone. This is not the right behavior for 3.2.2. |
Just want to list few sample provider_url and show how they are interpreted. file:///a/b/ // absolute path pointing at local file system /a/b |
…w must take a valid form of URL value, it can be only either absolute (file:///a/b/c) or relative (file:etc/) value, which must include the scheme.
Fixed. |
Hi,
I am using the JMSSource operator from Github. Streams version is 3.2.1. In my connector document I am setting the following provider_url value:
provider_url = "file://../binding/"
However while trying to start the operator the following error is returned:
javax.naming.NameNotFoundException; remaining name '"/binding"'
com.sun.jndi.fscontext.FSContext.checkExists(FSContext.java:850)
com.sun.jndi.fscontext.FSContext.checkIsDirectory(FSContext.java:883)
com.sun.jndi.fscontext.FSContext.(FSContext.java:108)
com.sun.jndi.fscontext.FSContext.(FSContext.java:81)
com.sun.jndi.fscontext.RefFSContext.(RefFSContext.java:97)
com.sun.jndi.fscontext.RefFSContextFactory.createContext(RefFSContextFactory.java:42)
com.sun.jndi.fscontext.RefFSContextFactory.createContextAux(RefFSContextFactory.java:47)
....
it looks like the .. are trimmed and so the relative path cannot be set.
Any suggestion to workaround?
Thank you
The text was updated successfully, but these errors were encountered: