Skip to content
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

VfsResource.getFile() broken on Wildfly 14.0.1 [SPR-17563] #22095

Closed
spring-issuemaster opened this issue Dec 4, 2018 · 4 comments
Assignees

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Dec 4, 2018

Kristiaan Lenaerts opened SPR-17563 and commented

Deployment of the Apereo CAS application https://apereo.github.io/cas/5.3.x/ on wildfly 14.0.1 fails with following stacktrace:
14:58:14,539 ERROR [org.springframework.boot.SpringApplication] (ServerService Thread Pool -- 95) Application startup failed: java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.core.io.VfsUtils.invokeVfsMethod(VfsUtils.java:100)
at org.springframework.core.io.VfsUtils.getFile(VfsUtils.java:172)
at org.springframework.core.io.VfsResource.getFile(VfsResource.java:90)
at org.apereo.cas.util.CasVersion.getDateTime(CasVersion.java:59)
at org.apereo.cas.util.SystemUtils.getSystemInfo(SystemUtils.java:50)

This also affect Jboss EAP 7.1.5 and 6.4.21

This is caused by a change in the VFS layer: jbossas/jboss-vfs#28
The proposed fix jbossas/jboss-vfs#30 does not reintroduce the old behaviour, but adds a new accessor that can be used to get the undelying file.

The workaround from Drools can be found here: kiegroup/drools@2a36f67 - this should work on either version of wildfly/jboss


Affects: 4.3.19

Reference URL: https://groups.google.com/forum/#!topic/jasig-cas-user/Vk9hcFRg9Bw

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Dec 4, 2018

Juergen Hoeller commented

As far as I can tell, the fix needs to go into https://github.com/apereo/cas/blob/master/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/CasVersion.java since the VfsResource instance is being created from a getContent() call there. At the Spring Framework level, we're just expecting VfsResource to be created with a VirtualFile instance, and for all internal code paths of ours, this is still reliably the case. And for an externally created VfsResource instance, it is the calling code's responsibility to pass in a matching resource handle.

junagrole added a commit to junagrole/cas that referenced this issue Jun 12, 2019
Based on this spring framework issue:
spring-projects/spring-framework#22095
mmoayyed added a commit to apereo/cas that referenced this issue Jun 24, 2019
* Fixes for VFS layer changes

Based on this spring framework issue:
spring-projects/spring-framework#22095

* Added Timezone code

* Manual merge

* Fixed whitespace style

* Update CasVersion.java

* Documentation formatting

* Fixed whitespace
mmoayyed pushed a commit to apereo/cas that referenced this issue Jun 24, 2019
… the way Vfs Resources are retrieved (#4041)

* Fixes for VFS layer changes

Based on this spring framework issue:
spring-projects/spring-framework#22095

* Added Timezone code

* Manual merge

* Fixed whitespace style

* Update CasVersion.java

* Documentation formatting

* Fixed whitespace
@rkrishna-gembrill

This comment has been minimized.

Copy link

@rkrishna-gembrill rkrishna-gembrill commented Oct 16, 2019

I'm facing the same issue. Is it resolved

@rkrishna-gembrill

This comment has been minimized.

Copy link

@rkrishna-gembrill rkrishna-gembrill commented Oct 16, 2019

tried with cas 6x and wildfly 15. have the same issue

@rkrishna-gembrill

This comment has been minimized.

Copy link

@rkrishna-gembrill rkrishna-gembrill commented Oct 21, 2019

I'm not sure is this is a sprig fix or cas or wildlfy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.