Buffman 10 Share Posted May 17, 2020 Hi all, I've obviously messed something up in the process of uploading my script. For context i used inttelliji to write everything and used smart git. The script runs with no errors locally but when putting forward my script application i was given this error after having my request processed. [javac] Compiling 3 source files to /opt/git/sdn/buffman/KillandTan/tempdist [javac] /opt/git/sdn/buffman/KillandTan/src/Mainclass.java:1: error: package com.sun.xml.internal.bind.v2.model.core does not exist [javac] import com.sun.xml.internal.bind.v2.model.core.ID; [javac] ^ [javac] /opt/git/sdn/buffman/KillandTan/src/Mainclass.java:17: error: package com.google.gson does not exist [javac] import com.google.gson.Gson; [javac] ^ [javac] /opt/git/sdn/buffman/KillandTan/src/Mainclass.java:18: error: package com.google.gson does not exist [javac] import com.google.gson.JsonObject; [javac] ^ [javac] /opt/git/sdn/buffman/KillandTan/src/Mainclass.java:19: error: package com.google.gson does not exist [javac] import com.google.gson.JsonParser; [javac] ^ [javac] /opt/git/sdn/buffman/KillandTan/src/Pricechecker.java:1: error: package com.google.gson does not exist [javac] import com.google.gson.Gson; [javac] ^ [javac] /opt/git/sdn/buffman/KillandTan/src/Pricechecker.java:2: error: package com.google.gson does not exist [javac] import com.google.gson.JsonObject; [javac] ^ [javac] /opt/git/sdn/buffman/KillandTan/src/Pricechecker.java:3: error: package com.google.gson does not exist [javac] import com.google.gson.JsonParser; [javac] ^ [javac] /opt/git/sdn/buffman/KillandTan/src/Pricechecker.java:19: error: cannot find symbol [javac] JsonObject query = new JsonParser().parse(cache).getAsJsonObject().getAsJsonObject(Integer.toString(id)); [javac] ^ [javac] symbol: class JsonObject [javac] location: class Pricechecker [javac] /opt/git/sdn/buffman/KillandTan/src/Pricechecker.java:19: error: cannot find symbol [javac] JsonObject query = new JsonParser().parse(cache).getAsJsonObject().getAsJsonObject(Integer.toString(id)); [javac] ^ [javac] symbol: class JsonParser [javac] location: class Pricechecker [javac] /opt/git/sdn/buffman/KillandTan/src/Pricechecker.java:20: error: cannot find symbol [javac] Gson gson = new Gson(); [javac] ^ [javac] symbol: class Gson [javac] location: class Pricechecker [javac] /opt/git/sdn/buffman/KillandTan/src/Pricechecker.java:20: error: cannot find symbol [javac] Gson gson = new Gson(); [javac] ^ [javac] symbol: class Gson [javac] location: class Pricechecker [javac] 11 errors BUILD FAILED these are the files i uploaded from my src I am still very new to this all so am struggling to work out what i have done wrong, If i had to guess i would say it has to do with whats in my src , since the files got through. Ive been looking through examples and tutorials and it seems my file structure could be wrong. I do see that the error talks about not finding gson and other imports and things not being found but i cant seem to work it out. I also learnt it could have something to do with thoose particular imports not being part of the public interface. iv'e done some more research and i believe its a problem with the library i used and it not working with javac compiler still looking for the best solution to get it to work with javac At this stage it all just makes my head hurt thanks in advance Link to comment Share on other sites More sharing options...
XZybez 2 Share Posted May 17, 2020 Not sure how your project structure look like, if you are using maven, make sure Gson is compiled with dependency. Right now Intellij can't find Gson Dependency on build. Link to comment Share on other sites More sharing options...
XZybez 2 Share Posted May 17, 2020 Wth, i cant edit my posts? Try an older Version of Gson as well, i had issue with the newest build as it contained Java 9 items. <!-- https://mvnrepository.com/artifact/com.google.code.gson/gson --> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.7</version> <scope>compile</scope> </dependency> Link to comment Share on other sites More sharing options...
Buffman 10 Author Share Posted May 18, 2020 I ended up not using those libraries and changed the way that i grabbed the price, think that solved the issue, thanks for the help XZybez ill also try that because i liked using my old method of grabbing the price. Link to comment Share on other sites More sharing options...
Soldtodie 76 Share Posted May 18, 2020 External precompiled libaries aren't allowed on SDN. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.