{"action":"created","issue":{"url":"https://api.github.com/repos/andrewgaul/s3proxy/issues/148","repository_url":"https://api.github.com/repos/andrewgaul/s3proxy","labels_url":"https://api.github.com/repos/andrewgaul/s3proxy/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/andrewgaul/s3proxy/issues/148/comments","events_url":"https://api.github.com/repos/andrewgaul/s3proxy/issues/148/events","html_url":"https://github.com/andrewgaul/s3proxy/issues/148","id":173478768,"number":148,"title":"Cannot create embedded S3 Java","user":{"login":"ptimsonbbc","id":17474629,"avatar_url":"https://avatars.githubusercontent.com/u/17474629?v=3","gravatar_id":"","url":"https://api.github.com/users/ptimsonbbc","html_url":"https://github.com/ptimsonbbc","followers_url":"https://api.github.com/users/ptimsonbbc/followers","following_url":"https://api.github.com/users/ptimsonbbc/following{/other_user}","gists_url":"https://api.github.com/users/ptimsonbbc/gists{/gist_id}","starred_url":"https://api.github.com/users/ptimsonbbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptimsonbbc/subscriptions","organizations_url":"https://api.github.com/users/ptimsonbbc/orgs","repos_url":"https://api.github.com/users/ptimsonbbc/repos","events_url":"https://api.github.com/users/ptimsonbbc/events{/privacy}","received_events_url":"https://api.github.com/users/ptimsonbbc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-26T15:22:12Z","updated_at":"2016-08-26T17:53:05Z","closed_at":null,"body":"Hello, \r\n\r\nSorry this isn't really as much of an issue as an lack of competence from me to set it up.\r\n\r\nI'm trying to use the S3Proxy library to setup a local S3 mock to run some Integration Tests on. I don't want to use a config file. I want to do it all programmatically.\r\n\r\nI have come up with the following code from your examples but am getting the following error:\r\n`\r\njava.lang.NoSuchMethodError: com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.<init>(Lcom/google/gson/internal/ConstructorConstructor;Lcom/google/gson/FieldNamingStrategy;Lcom/google/gson/internal/Excluder;)V`\r\n\r\nThis is the code.\r\n\r\n```\r\nString endpoint = \"http://127.0.0.1:8085\";\r\nURI uri = URI.create(endpoint);\r\nProperties properties = new Properties();\r\nproperties.setProperty(\"s3proxy.authorization\", \"none\");\r\nproperties.setProperty(\"s3proxy.endpoint\", endpoint);\r\nproperties.setProperty(\"jclouds.provider\", \"filesystem\");\r\nproperties.setProperty(\"jclouds.filesystem.basedir\", \"/tmp/s3proxy\");\r\n\r\nContextBuilder builder = ContextBuilder\r\n        .newBuilder(\"filesystem\")\r\n        .credentials(\"x\", \"x\")\r\n        .modules(ImmutableList.<Module>of(new SLF4JLoggingModule()))\r\n        .overrides(properties);\r\nBlobStoreContext context = builder.build(BlobStoreContext.class);\r\nBlobStore blobStore = context.getBlobStore();\r\n\r\nS3Proxy s3Proxy = S3Proxy.builder().awsAuthentication(\"x\", \"x\").endpoint(uri).keyStore(\"\", \"\").blobStore(blobStore).build();\r\ns3Proxy.start();\r\n\r\nBasicAWSCredentials awsCredentials = new BasicAWSCredentials(\"x\", \"x\");\r\n\r\nAmazonS3Client client = new AmazonS3Client(awsCredentials, new ClientConfiguration());\r\nclient.setEndpoint(endpoint);\r\nGetObjectRequest objectRequest = new GetObjectRequest(\"bucket\", \"key\");\r\nS3Object object = client.getObject(objectRequest);\r\n\r\ns3Proxy.stop();\r\n```\r\n\r\nI'm sure loads of people need this! Would be so greatful if you could help.\r\n\r\nCheers, \r\nPeter"},"comment":{"url":"https://api.github.com/repos/andrewgaul/s3proxy/issues/comments/242804891","html_url":"https://github.com/andrewgaul/s3proxy/issues/148#issuecomment-242804891","issue_url":"https://api.github.com/repos/andrewgaul/s3proxy/issues/148","id":242804891,"user":{"login":"ptimsonbbc","id":17474629,"avatar_url":"https://avatars.githubusercontent.com/u/17474629?v=3","gravatar_id":"","url":"https://api.github.com/users/ptimsonbbc","html_url":"https://github.com/ptimsonbbc","followers_url":"https://api.github.com/users/ptimsonbbc/followers","following_url":"https://api.github.com/users/ptimsonbbc/following{/other_user}","gists_url":"https://api.github.com/users/ptimsonbbc/gists{/gist_id}","starred_url":"https://api.github.com/users/ptimsonbbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptimsonbbc/subscriptions","organizations_url":"https://api.github.com/users/ptimsonbbc/orgs","repos_url":"https://api.github.com/users/ptimsonbbc/repos","events_url":"https://api.github.com/users/ptimsonbbc/events{/privacy}","received_events_url":"https://api.github.com/users/ptimsonbbc/received_events","type":"User","site_admin":false},"created_at":"2016-08-26T17:53:05Z","updated_at":"2016-08-26T17:53:05Z","body":"Removing Spring Boot Dependency makes it work\r\n\r\n```\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\r\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\r\n    <modelVersion>4.0.0</modelVersion>\r\n\r\n    <groupId>com.example</groupId>\r\n    <artifactId>example</artifactId>\r\n    <version>1.0-SNAPSHOT</version>\r\n\r\n    <parent>\r\n        <groupId>org.springframework.boot</groupId>\r\n        <artifactId>spring-boot-starter-parent</artifactId>\r\n        <version>1.4.0.RELEASE</version>\r\n        <relativePath/> <!-- lookup parent from repository -->\r\n    </parent>\r\n\r\n    <properties>\r\n        <java.version>1.8</java.version>\r\n    </properties>\r\n\r\n    <dependencies>\r\n\r\n        <dependency>\r\n            <artifactId>aws-java-sdk-core</artifactId>\r\n            <groupId>com.amazonaws</groupId>\r\n            <version>1.11.28</version>\r\n        </dependency>\r\n        <dependency>\r\n            <artifactId>aws-java-sdk-s3</artifactId>\r\n            <groupId>com.amazonaws</groupId>\r\n            <version>1.11.28</version>\r\n        </dependency>\r\n        <dependency>\r\n            <groupId>org.gaul</groupId>\r\n            <artifactId>s3proxy</artifactId>\r\n            <version>1.4.0</version>\r\n            <scope>test</scope>\r\n        </dependency>\r\n        <dependency>\r\n            <groupId>junit</groupId>\r\n            <artifactId>junit</artifactId>\r\n            <version>4.12</version>\r\n            <scope>test</scope>\r\n        </dependency>\r\n\r\n    </dependencies>\r\n\r\n</project>\r\n```"}}
{"actor":{"display_login":"ptimsonbbc"}}