Serban Cameron

Ranch Hand
+ Follow
since Jan 02, 2017
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Serban Cameron

I build 2 apps one for mobile phone (Android) that receives notifications with Firebase and another in Java (desktop) from which i send the notifications. The app works very well but I need to move it to a computer that is behind a proxy. How can I bypass the proxy ?

This is what I`ve tried:



This doesn`t work. Can please someone give me an example that works so I can send notifications from behind the proxy ?

Thanks and have a nice day
3 weeks ago


I have a Java web app made in JSF that connects to a API fills a datatable with info and every row has download button. When I press download button it does another get request with an id taken from the row the button was clicked. But when I press the download button I get this message :

The server log doesn`t show any error. This is the code:
8 months ago


I have this JSON for example:



This is the code that I have written in Java:



This prints out the serial number...but what I would like to do is to acces for example in mesaje -> cif , or. mesaje -> data_creare....the library used is json-simple...can you please help me with how I could do that ? Thanks in advance
8 months ago
Hello I have an API and I created a POST method that sends an xml and if everything is ok it saves the data from xml to database.

I would like to get the xml that the user inputs (for the test case the data that I input in Postman) to check it against xsd schema so no extra tags are in the xml. The second part I figured it out...I just want to know how to get xml from post request

Thanks in advance
11 months ago


I have a java app that has to connect thru a proxy to some addresses This is what I've tried

final String authUser = "xxx";
final String authPassword = "xxx";
Authenticator.setDefault(
new Authenticator(){
  public PasswordAuthentication getPasswordauthentication(){
      return new PasswordAuthentication(
      authUser, authPassword.toCharArray());
  }
});

System.setProperty("http.proxyUser", authUser);
System.setProperty("http.proxyPassword",authPassword);
System.setProperty("http.proxyHost","xxx");
System.setProperty("http.proxyPort","8080");

After I run the program it gives me this error:

java.net.ConnectException: Connection refused: connect

Is it correct how I tried to connect through the proxy and authenticate?

Any Help is appreciated!
1 year ago
I copied the log4j library in the jar folder on Linux and executed your command and I get the same error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
       at arhivare.Arhivare.<clinit>(Arhivare.java:29)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
       at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
       ... 1 more


I tested on windows and it works from cmd
1 year ago
Hello I have a Java app and I uploaded it on a Linux server and when I run it with this command : java -jar ArhivareProd.jar it gives me this error : .

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logg                 er
       at arhivare.Arhivare.<clinit>(Arhivare.java:29)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
       at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
       ... 1 more

What can I do so it will run ? Am I missing something ?

Thanks in advance
1 year ago
Solved it, it had 2 invisible characters at the start of the path string
1 year ago
Wha does it have to do with the path ?
1 year ago
Hello I have an oauth app and i have to use a certificate and i have this code : and when i run the app it gives me this error : java.io.FileNotFoundException: ‪‪D:\john.doe.pfx (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at testoauth.TestOAUTH.main(TestOAUTH.java:58)


How can I modify the path of the certificate to make it work ?

Thanks
1 year ago
Thank you for your detailed reply, i am a junior developer started working for two months and we use jsf at work
1 year ago
JSF
Hello, I have a datatable and i would like to have a delete option on every row. This is what i`ve tried but it doesnt work:
XHTML -->

JAVA-->


The button works, it calls the function (if i set the id that i want to delete it works) but if the id is taken with <f:param it doesnt work....please help

I would like when pressing delete button the delete the row that is located on...thanks
1 year ago
JSF
Hello, I am new to JSF and such libraries as BootsFaces.
I am trying to get the value from selectOneMenu (BootsFaces) and pass it to javascript...i tried different methods but nothing works...please help :)
1 year ago
JSF
Hello, I am a beginner, I am trying to navigate from one page to another when pressing a button but it doesn`t do anything.
This is what I`ve tried:

this is the managed bean class ->


This is the xhtml code from index ->


The page that I am trying to navigate is response.xhtml