'public class Main
{
public static void main(String[] args)
{
OkHttpClient httpClient = new OkHttpClient();
Instagram instagram = new Instagram(httpClient);
Tag tags;
try
{
tags = instagram.getMediasByTag("snow", 1000);
System.out.println(tags.getCount());
} catch (IOException e)
{
e.printStackTrace();
}
}
}
'
Logs:
`[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project instDBParse: An exception occured while executing the Java class. javax.xml.bind.UnmarshalException
[ERROR] - with linked exception:
[ERROR] [Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.XMLMarshalException
[ERROR] Exception Description: An error occurred unmarshalling the document
[ERROR] Internal Exception: javax.json.stream.JsonParsingException: Unexpected char 60 at (line no=1, column no=1, offset=0)]
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project instDBParse: An exception occured while executing the Java class. javax.xml.bind.UnmarshalException
with linked exception:
[Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: javax.json.stream.JsonParsingException: Unexpected char 60 at (line no=1, column no=1, offset=0)]
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. javax.xml.bind.UnmarshalException
with linked exception:
[Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: javax.json.stream.JsonParsingException: Unexpected char 60 at (line no=1, column no=1, offset=0)]
at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:339)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 21 more
Caused by: java.lang.IllegalArgumentException: javax.xml.bind.UnmarshalException
with linked exception:
[Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: javax.json.stream.JsonParsingException: Unexpected char 60 at (line no=1, column no=1, offset=0)]
at me.postaddict.instagram.scraper.mapper.ModelMapper.mapObject(ModelMapper.java:180)
at me.postaddict.instagram.scraper.mapper.ModelMapper.mapTag(ModelMapper.java:77)
at me.postaddict.instagram.scraper.request.GetMediaByTagRequest.mapResponse(GetMediaByTagRequest.java:55)
at me.postaddict.instagram.scraper.request.GetMediaByTagRequest.mapResponse(GetMediaByTagRequest.java:13)
at me.postaddict.instagram.scraper.request.PaginatedRequest.requestInstagramResult(PaginatedRequest.java:39)
at me.postaddict.instagram.scraper.Instagram.getMediasByTag(Instagram.java:147)
at Main.main(Main.java:16)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: javax.xml.bind.UnmarshalException
with linked exception:
[Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: javax.json.stream.JsonParsingException: Unexpected char 60 at (line no=1, column no=1, offset=0)]
at org.eclipse.persistence.jaxb.JAXBUnmarshaller.handleXMLMarshalException(JAXBUnmarshaller.java:1110)
at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:172)
at me.postaddict.instagram.scraper.mapper.ModelMapper.mapObject(ModelMapper.java:178)
... 12 more
Caused by: Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: javax.json.stream.JsonParsingException: Unexpected char 60 at (line no=1, column no=1, offset=0)
at org.eclipse.persistence.exceptions.XMLMarshalException.unmarshalException(XMLMarshalException.java:120)
at org.eclipse.persistence.internal.oxm.record.json.JsonStructureReader.parse(JsonStructureReader.java:146)
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:938)
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:414)
at org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:390)
at org.eclipse.persistence.internal.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:394)
at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:156)
... 13 more
Caused by: javax.json.stream.JsonParsingException: Unexpected char 60 at (line no=1, column no=1, offset=0)
at org.glassfish.json.JsonTokenizer.unexpectedChar(JsonTokenizer.java:532)
at org.glassfish.json.JsonTokenizer.nextToken(JsonTokenizer.java:415)
at org.glassfish.json.JsonParserImpl$NoneContext.getNextEvent(JsonParserImpl.java:222)
at org.glassfish.json.JsonParserImpl$StateIterator.next(JsonParserImpl.java:172)
at org.glassfish.json.JsonParserImpl.next(JsonParserImpl.java:149)
at org.glassfish.json.JsonReaderImpl.read(JsonReaderImpl.java:84)
at org.eclipse.persistence.internal.oxm.record.json.JsonStructureReader.parse(JsonStructureReader.java:138)
... 18 more`
Main: import me.postaddict.instagram.scraper.Instagram; import me.postaddict.instagram.scraper.model.Tag; import okhttp3.OkHttpClient; import java.io.IOException;
'public class Main { public static void main(String[] args) { OkHttpClient httpClient = new OkHttpClient(); Instagram instagram = new Instagram(httpClient); Tag tags; try { tags = instagram.getMediasByTag("snow", 1000); System.out.println(tags.getCount()); } catch (IOException e) { e.printStackTrace(); } } } '
Logs:
`[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project instDBParse: An exception occured while executing the Java class. javax.xml.bind.UnmarshalException [ERROR] - with linked exception: [ERROR] [Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.7.0.v20170811-d680af5): org.eclipse.persistence.exceptions.XMLMarshalException [ERROR] Exception Description: An error occurred unmarshalling the document [ERROR] Internal Exception: javax.json.stream.JsonParsingException: Unexpected char 60 at (line no=1, column no=1, offset=0)] [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project instDBParse: An exception occured while executing the Java class. javax.xml.bind.UnmarshalException