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

I am trying to use your code but I get an error(or 12 to be exact). I would appreciate if you could help me. Thanks. #124

Open
porfanid opened this issue Oct 31, 2018 · 2 comments

Comments

@porfanid
Copy link

Exception in thread "main" java.lang.IllegalArgumentException: javax.xml.bind.JAXBException
 - with linked exception:
[Exception [EclipseLink-50055] (Eclipse Persistence Services - 2.7.3.v20180807-4be1041): org.eclipse.persistence.exceptions.JAXBException
Exception Description: Error creating DynamicJAXBContext: eclipselink.oxm.metadata-source (JAXBContextProperties.OXM_METADATA_SOURCE) not found in properties map, or map was null.]
	at me.postaddict.instagram.scraper.mapper.ModelMapper.mapObject(ModelMapper.java:191)
	at me.postaddict.instagram.scraper.mapper.ModelMapper.mapAccount(ModelMapper.java:147)
	at me.postaddict.instagram.scraper.Instagram.getAccountByUsername(Instagram.java:93)
	at me.postaddict.instagram.scraper.Instagram.getMedias(Instagram.java:98)
	at Main.main(Main.java:61)
Caused by: javax.xml.bind.JAXBException
 - with linked exception:
[Exception [EclipseLink-50055] (Eclipse Persistence Services - 2.7.3.v20180807-4be1041): org.eclipse.persistence.exceptions.JAXBException
Exception Description: Error creating DynamicJAXBContext: eclipselink.oxm.metadata-source (JAXBContextProperties.OXM_METADATA_SOURCE) not found in properties map, or map was null.]
	at org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContextFactory.createContextFromOXM(DynamicJAXBContextFactory.java:391)
	at me.postaddict.instagram.scraper.mapper.ModelMapper.getUnmarshaller(ModelMapper.java:208)
	at me.postaddict.instagram.scraper.mapper.ModelMapper.lambda$null$1(ModelMapper.java:197)
	at java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(Unknown Source)
	at java.lang.ThreadLocal.setInitialValue(Unknown Source)
	at java.lang.ThreadLocal.get(Unknown Source)
	at me.postaddict.instagram.scraper.mapper.ModelMapper.mapObject(ModelMapper.java:188)
	... 4 more
Caused by: Exception [EclipseLink-50055] (Eclipse Persistence Services - 2.7.3.v20180807-4be1041): org.eclipse.persistence.exceptions.JAXBException
Exception Description: Error creating DynamicJAXBContext: eclipselink.oxm.metadata-source (JAXBContextProperties.OXM_METADATA_SOURCE) not found in properties map, or map was null.
	at org.eclipse.persistence.exceptions.JAXBException.oxmKeyNotFound(JAXBException.java:778)
	... 11 more

The code as I am using it:

OkHttpClient httpClient = new OkHttpClient();
		        
		
		Instagram instagram = new Instagram(httpClient);
		PageObject<Media> medias;
		try {
			medias = instagram.getMedias("durov", 1);
			System.out.println(medias.getNodes().get(0).getDisplayUrl());
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
@porfanid
Copy link
Author

BTW, I am using instagramscraper-2.2.jar

@adnan175
Copy link

Hi I am getting same error. did you manage to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants