You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@hop.apache.org by "dave-csc (via GitHub)" <gi...@apache.org> on 2024/12/18 08:17:09 UTC

[D] Usage of Google Drive via Hop (hop)

GitHub user dave-csc created a discussion: Usage of Google Drive via Hop

Hello,

in our organization we're trying to setup a Google Drive repository to exchange files created/readable by Hop.

To do so, our Google Drive administrator gave me the JSON credential file that I linked in the Hop configuration, and activated a project that can use the Google Drive API.

With this configuration, I can log in to Google and get a token file, but when I try to access the files in "My Drive" folder [as explained in the documentation](https://hop.apache.org/manual/latest/vfs/google-drive-vfs.html#_usage_and_testing) I still get the following exception in the file browser:

```
Error browsing to location: 'googledrive://'
FileSystemException: Unknown message with code "Unable to get Google Drive file object for 'googledrive:///Foglio di lavoro senza nome'".
Root cause: ClassCastException: class com.google.api.client.auth.oauth2.StoredCredential cannot be cast to class com.google.api.client.auth.oauth2.StoredCredential (com.google.api.client.auth.oauth2.StoredCredential is in unnamed module of loader 'app'; com.google.api.client.auth.oauth2.StoredCredential is in unnamed module of loader org.apache.hop.core.plugins.HopURLClassLoader @2b6fcca1)

org.apache.commons.vfs2.FileSystemException: Unknown message with code "Unable to get Google Drive file object for 'googledrive:///Foglio di lavoro senza nome'".
	at org.apache.hop.vfs.googledrive.GoogleDriveFileSystem.processFile(GoogleDriveFileSystem.java:74)
	at org.apache.hop.vfs.googledrive.GoogleDriveFileSystem.resolveFile(GoogleDriveFileSystem.java:53)
	at org.apache.commons.vfs2.provider.AbstractFileObject.resolveFile(AbstractFileObject.java:1801)
	at org.apache.commons.vfs2.provider.AbstractFileObject.resolveFiles(AbstractFileObject.java:1839)
	at org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:1124)
	at org.apache.hop.ui.core.vfs.HopVfsFileDialog.populateFolder(HopVfsFileDialog.java:941)
	at org.apache.hop.ui.core.vfs.HopVfsFileDialog.refreshBrowser(HopVfsFileDialog.java:898)
	at org.apache.hop.ui.core.vfs.HopVfsFileDialog.enteredFilenameOrFolder(HopVfsFileDialog.java:686)
	at org.apache.hop.ui.core.vfs.HopVfsFileDialog.lambda$open$2(HopVfsFileDialog.java:331)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5855)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1617)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5065)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4517)
	at org.apache.hop.ui.core.vfs.HopVfsFileDialog.open(HopVfsFileDialog.java:584)
	at org.apache.hop.ui.core.dialog.BaseDialog.presentFileDialog(BaseDialog.java:278)
	at org.apache.hop.ui.core.dialog.BaseDialog.presentFileDialog(BaseDialog.java:128)
	at org.apache.hop.ui.hopgui.delegates.HopGuiFileDelegate.fileOpen(HopGuiFileDelegate.java:80)
	at org.apache.hop.ui.hopgui.HopGui.menuFileOpen(HopGui.java:709)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.apache.hop.ui.core.gui.BaseGuiWidgets.lambda$getListener$1(BaseGuiWidgets.java:213)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5855)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1617)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5065)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4517)
	at org.apache.hop.ui.hopgui.HopGui.open(HopGui.java:476)
	at org.apache.hop.ui.hopgui.HopGui.main(HopGui.java:354)
Caused by: org.apache.commons.vfs2.FileSystemException: Unknown message with code "class com.google.api.client.auth.oauth2.StoredCredential cannot be cast to class com.google.api.client.auth.oauth2.StoredCredential (com.google.api.client.auth.oauth2.StoredCredential is in unnamed module of loader 'app'; com.google.api.client.auth.oauth2.StoredCredential is in unnamed module of loader org.apache.hop.core.plugins.HopURLClassLoader @2b6fcca1)".
	at org.apache.hop.vfs.googledrive.GoogleDriveFileObject.<init>(GoogleDriveFileObject.java:98)
	at org.apache.hop.vfs.googledrive.GoogleDriveFileSystem.createFile(GoogleDriveFileSystem.java:39)
	at org.apache.hop.vfs.googledrive.GoogleDriveFileSystem.processFile(GoogleDriveFileSystem.java:72)
	... 30 more
Caused by: java.lang.ClassCastException: class com.google.api.client.auth.oauth2.StoredCredential cannot be cast to class com.google.api.client.auth.oauth2.StoredCredential (com.google.api.client.auth.oauth2.StoredCredential is in unnamed module of loader 'app'; com.google.api.client.auth.oauth2.StoredCredential is in unnamed module of loader org.apache.hop.core.plugins.HopURLClassLoader @2b6fcca1)
	at com.google.api.client.auth.oauth2.AuthorizationCodeFlow.loadCredential(AuthorizationCodeFlow.java:280)
	at com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp.authorize(AuthorizationCodeInstalledApp.java:101)
	at org.apache.hop.vfs.googledrive.GoogleDriveFileObject.getCredentials(GoogleDriveFileObject.java:247)
	at org.apache.hop.vfs.googledrive.GoogleDriveFileObject.getDriveService(GoogleDriveFileObject.java:251)
	at org.apache.hop.vfs.googledrive.GoogleDriveFileObject.<init>(GoogleDriveFileObject.java:95)
	... 32 more
```

Are there any other authorization that should be given by the Google Drive administrator, or there's something wrong with the configuration?

Thanks for your support

GitHub link: https://github.com/apache/hop/discussions/4724

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] Usage of Google Drive via Hop (hop)

Posted by "bamaer (via GitHub)" <gi...@apache.org>.
GitHub user bamaer added a comment to the discussion: Usage of Google Drive via Hop

this is related to the known open issue #2524 

GitHub link: https://github.com/apache/hop/discussions/4724#discussioncomment-11609392

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org