留言板

https://issues.liferay.com/browse/LPS-67483

Ken Butler,修改在7 年前。

https://issues.liferay.com/browse/LPS-67483

New Member 帖子: 3 加入日期: 17-1-4 最近的帖子
I am having this issue (https://issues.liferay.com/browse/LPS-67483), what is the best way for me to patch this in the community edition?

Thanks
thumbnail
Jamie Sammons,修改在7 年前。

RE: https://issues.liferay.com/browse/LPS-67483 (答复)

Expert 帖子: 301 加入日期: 14-9-5 最近的帖子
You can try changing the plugins sdk to use a newer version of the service builder module since that’s where the fix seems to be.

For example you can edit:

com.liferay.portal.plugins.sdk-7.0-ga3/dependencies/com.liferay.portal.tools.service.builder/ivy.xml 


and change the service builder module version as follows:

<dependency name="com.liferay.portal.tools.service.builder" org="com.liferay" rev="1.0.123" />


It seems to work okay for me assuming I haven’t already ran into the issue described in the ticket.

-Jamie
Ken Butler,修改在7 年前。

RE: https://issues.liferay.com/browse/LPS-67483

New Member 帖子: 3 加入日期: 17-1-4 最近的帖子
Worked like a charm thanks!

I did have to use a fresh plugins sdk without the dependency jars downloaded and without /.ivy dir. Is there a way to update it after changing a module version number?
Ken Butler,修改在7 年前。

RE: https://issues.liferay.com/browse/LPS-67483

New Member 帖子: 3 加入日期: 17-1-4 最近的帖子
Actually spoke to soon, looks like it is still throwing the exception from Files.move here is the de-compiled method

    private static void _move(File sourceFile, File destinationFile) throws IOException {
        File parentFile = destinationFile.getParentFile();
        Path parentPath = parentFile.toPath();
        if(!Files.exists(parentPath, new LinkOption[0])) {
            Files.createDirectories(parentPath, new FileAttribute[0]);
        }

[b]        Files.move(sourceFile.toPath(), destinationFile.toPath(), new CopyOption[0]);[/b]
    }


EDIT: Here is the full stack trace should have added this...

    [echo] Exception in thread "main" java.nio.file.FileAlreadyExistsException: REDACTED_PATH\service\persistence\impl\AchAccountFinderImpl.java
     [echo] 	at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:342)
     [echo] 	at sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:287)
     [echo] 	at java.nio.file.Files.move(Files.java:1347)
     [echo] 	at com.liferay.portal.tools.service.builder.ServiceBuilder._move(ServiceBuilder.java:1782)
     [echo] 	at com.liferay.portal.tools.service.builder.ServiceBuilder._parseEntity(ServiceBuilder.java:4861)
     [echo] 	at com.liferay.portal.tools.service.builder.ServiceBuilder.<init>(ServiceBuilder.java:632)
     [echo] 	at com.liferay.portal.tools.service.builder.ServiceBuilder.main(ServiceBuilder.java:219)</init>


EDIT2: Looks to be working now, I'm not sure how it happened but somehow REDACTED_PATH\service\persistence\impl\AchAccountFinderImpl.java\ was generated as a directory. After I deleted that service builder was working correctly.