-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Casting issue in PropertyUtil #94
Comments
Do you think #96 will resolve this? |
Deleted a dumb response that I had earlier, hopefully that didn't bug you too much. Yes, that seems like it would solve the issue. Thanks so much for the prompt response! |
excellent, when/if the tests pass, i'll merge into wip-4.5 so you can test locally. if that works, I can push a 4.5.1 release into maven. |
try this release |
What maven repository can I find these wip releases in? |
All wip releases are hosted by Github. it's a real pain, but I think i'd be violating sonatype rules if I published wips there, haven't looked at publishing to sonatype snapshot repo. #85 |
I added the following to the pom file for my project:
And I get a
|
This is expected. This is the resolution |
@cwensel The proposed change fixed the issue that I was having. Thanks for your patience and sharing that documentation. Let me know when the 4.5.1 release is public. Thanks so much! |
@conrosebraugh 4.5.1 was published |
I am encountering an issue when running unit tests in a custom library that has Cadence as a dependency. This block of code has an issue when casting a Class to a String. The call to the PropertyUtil function is coming from AppProps.getApplicationJarClass. Here is the stack trace:
java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.String at cascading.property.AppProps.getApplicationJarClass(AppProps.java:113) at cascading.flow.hadoop.planner.HadoopPlanner.initialize(HadoopPlanner.java:166) at com.anon.cascading_ext.flow.LoggingHadoopPlanner.initialize(LoggingHadoopPlanner.java:75) at com.anon.cascading_ext.flow.LoggingFlowConnector.connect(LoggingFlowConnector.java:68) at cascading.flow.FlowConnector.connect(FlowConnector.java:421) at cascading.flow.FlowConnector.connect(FlowConnector.java:270) at cascading.flow.FlowConnector.connect(FlowConnector.java:215) at cascading.flow.FlowConnector.connect(FlowConnector.java:197) at com.anon.formats.mapred.inputformat.TestDirectoryLineInputFormat.testGetCurrentTapSourcePath(TestDirectoryLineInputFormat.java:61)
This could be solved by checking if defaultValue is an instance of String and using the Class.toString function. My org is in the process of upgrading from a very old version of Cascading to Cascading 4.5.0. In the version that we are using, AppProp.getApplicationJarClass actually passes a null Class object as the default value.
Is there a recommended method of fixing this casting issue?
Running into this on JDK 8, Cascading 4.5.0
The text was updated successfully, but these errors were encountered: