luize casaretti

Greenhorn
+ Follow
since Nov 11, 2022
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by luize casaretti

I tried with:



but this new java.sql.Date(DateUtils.parseDate(formatDate, "ddMMyyyy").getTime() still returns yyyyMMdd

I just need to save the dd-MM-yyyy format

Hi!

When I execute this in SQL, it works fine:


Note 1: The third field ('18-04-2024) is a DATE in SQL.
Note 2: The third field has the format DD-MM-YYYY.

However, when I try to execute with a CallableStatement, it returns ORA-01843: not a valid month:


I don't understand why it returns  ORA-01843: not a valid month once the setString is being set with a String and the field is a DATE in SQL, I read it was supposed to work with the setString().

I tried also with setDate() passing a Date as params, but it didn't work also.


Could you help me?
9 months ago
Hi all,

I'm having some difficulty in generating multiple logs, now it generates all log files but the content in all of them is the content of fileThree (last one) only. I need to generate each file with its content.

Here is what I have:





Could you help me?
10 months ago
Hey guys!

Is my first time using HttpsURLConnection  and I've been trying to send a XML request but I'm getting 500 code as response and  the response message returns NULL.
I read that this could be encoding problems and I tried to set some connection properties but in all tests it kept returning 500 and null message.
OBS: When I get the same URL and the same xml message and test it via SoapUI it works fine.

Do you know if I'm missing some property?

XML example:


HttpsURLConnection:


Thank you.
1 year ago
Hi guys,

I'm trying to make a HttpsURLConnection request with SSL Certificates and receiving 403 always - the certificates doesn't have .key.

I have two certificates .cer and I created a Keystore for them in a folder locally:


When I list them, I can see them:


The problem is that when I run locally I always get 403 here: connection.getResponseCode()
My java code is:



I tried different things such as create an X509Certificate for each certificate and X509TrustManager with both certificates but still didn't work.
1 year ago
Websphere 8.5.5
Dynamic web module 2.5
javaee 7


What is working locally is:
Dynamic web module 3.0 (upgraded)
jax rs 2.0 (included)
build.xml: didn't add any jar

Resource.java


AppApplication.java


It works fine locally when I post or get
However, when I try to compile to deploy, I get  error: package javax.ws.rs does not exist

If I add jax rs jar it compiles.. but I do have this feature enabled on server.xml, I thought I didn't need this jar.
server.xml



1 year ago

Properties:
-Eclipse 4.16
-Websphere 18.0.0.4
-Dynamic web project - Dynamic web Module 2.5v
-Web Application
-Java: 1.8v
-I do not have MAVEN or Spring boot.

I have this application and my goal is to include a JAX-RS API in it.

When I try to access another servlet that reads an MQ line: http://localhost:9080/<contextroot>/<other_servlet>;  -> it works
When I try to access API that I included (JAX-RS):        
http://localhost:9080/<contextroot>/webapi/resource/ping -> I get SRVE0190E: File not found: /webapi/resource/ping not found
http://localhost:9080/<contextroot>/webapi/resource -> I get SRVE0190E: File not found: /webapi/resource not found

I tried to follow this tutorial: https://www.youtube.com/watch?v=d5SD4bKaOFU&list=PLqq-6Pq4lTTY40IcG584ynNqibMc1heIa&index=3 at first but I failed.
As I was searching on the internet I started adding some dependencies and trying to make this work. However, I could not do it.

Do you have any ideias?

Build.xml


Application.java




Resource.java





1 year ago
Build.xml


Application.java



Resource


When I access: http://localhost:9080/<contextroot>/<other_servlet>;  - it works
When I access http://localhost:9080/<contextroot>/webapi/resource/ping - I get SRVE0190E: File not found: /webapi/resource/ping not found
1 year ago
Hi, guys!
I have an application with Websphere 8.5, I upgraded spring boot version from 2.4.0 to 2.5.0 locally and it worked, however, when I tried to deploy it I got the error:
    NoClassDefFoundError: javax.servlet.http.HttpSessionIdListener.
I was wondering if there is any way to fix it, other than upgrading Websphere 9.0.
1 year ago
Hi guys, I'm trying to open a view in a new tab.
Now the page opens in the same tab.

I tried with th:target="_blank" too but still got it opening in the same page.

HTML


Controller
In my C:\Project\target\surefire-reports I get:

However, no imports presented problem.
2 years ago