M Sparks

Greenhorn
+ Follow
since Sep 17, 2015
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by M Sparks

K. Tsang wrote:First how is the app connecting to the database? JDBC inside app or through Glassfish JNDI? If latter is the resource set up properly?

What does the Glassfish log say?



To be honest, this is my first time ever trying to do a Web App so I have MySQL running with a Database I created called "IT351" and connected by jdbc:mysql://localhost:3306/IT351?zeroDateTimeBehavior=convertToNull [root on Default schema]. For my desktop app I built I was storing data from the GUI into a database and then using NetBeans to check and see if the data was being added/updated to the database. This was successful. Then, I made a Web App that I wanted to take input on the GUI and store in the same database I had been using before (for the desktop app). I get errors now when do that: Ping Connection Pool failed for IT351Pool. No password credential found Please check the server.log for more details is the error when inside the GlassFish Admin Domain Console and
HTTP Status 500 - Internal Server Error

type Exception report

messageInternal Server Error

descriptionThe server encountered an internal error that prevented it from fulfilling this request.

exception

javax.ejb.EJBException

note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.1 logs.

When I click my SHOW ALL Button from the GUI. I made a new data resource and pool.
Hello, I am trying to get the data that is typed into my GUI in my web browser to be added to a MySQL database I have running and connected to via NetBeans. I recently took the desktop app and made a web app and am having a hard time getting the data into the database? I don'y know if it's code related or that I don't have a file or path set in NetBeans or both? I also go to display the database info in the GUI on the browser and it gives me tho error:

HTTP Status 500 - Internal Server Error

type Exception report

messageInternal Server Error

descriptionThe server encountered an internal error that prevented it from fulfilling this request.

exception

javax.ejb.EJBException

note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.1 logs.

Thanks for any help!

-M
I have a MySQL database I am connected to in NetBeans called "IT351". Any chance anyone could point me to a "how to" or explain briefly how to take all the data typed in the GUI and store in said MySQL database (IT351)? Then I how I would check to see the data in the database on NetBeans. Thanks.
8 years ago
Awesome, can't believe I missed that! Also, I have already changed to PreparedStatement, that is way better. Thanks for your help!

-M
8 years ago
Hello, I am getting errors in my code (lines 26, 29 34) for ";" expected on String sql "INSERT INTO Customer VALUES ('"+ customer.getCustomerID() +"', '"+ customer.getFirstName() +"'," and "variable sql may not have been initialized on line [i]executeModifyQuery(sql); I have been adding and subtracting ";" everywhere but I just don't get it? I also don't get the other error as it is written 2 other times and is not returning an error? Any help for a new guy would be great. Thanks!

-M

[/i]
8 years ago
Thanks for the info and the heads up on no java in JSP. I'll get cracking on improving!
8 years ago
JSP
I am trying to make a Web App that accesses a MySQL database I created and
hooked up to NetBeans as a desktop app on localhost. I wrote code for a GUI
using a JSP for web and I believe the code works to add records into a table
but cannot see the database (the MySQL one I made and accessed via NetBeans)
to check! I'm very new to all this, so any help would be appreciated. My
code is below:
8 years ago
JSP

Winston Gutkowski wrote:

M Sparks wrote:Sorry, I'm new to coding . . .


. . .

Hope it helps.

Winston



Gotcha, that makes a lot of sense, thanks!
8 years ago

Winston Gutkowski wrote:

Winston Gutkowski wrote:Not being a Swing expert, I don't feel competent to reply right now; but if anything leaps out at me, I'll let you know.


And something has.

You are controlling your loop with an empty List. Have a look at lines 5, 21 and 33: they just don't make sense - you're trying to add to a List inside a loop that uses that List, and that's never going to work. And because it's empty, the loop never gets executed anyway.

Why don't you back up and tell us what you're trying to do?

Winston

PS: 'aList1' is a really bad name for a variable - especially in the context you've used it. It's just plain lazy.



Sorry, I'm new to coding and new to this site and new to it all. I want to read in the data from a text file called "stars.txt", create objects for all the sales reps in the file, load the objects onto an ArrayList and display them into my JTextField using an enhanced for loop and formatted with the toString method. As for the lazy aList1 I don't know whats lazy and whats not as of yet so I guess thanks for pointing it out, I wouldn't know what non lazy coding is yet.
8 years ago
Hello, I'm working on a project and I am suppose to read in the data from a text file called "stars.txt", create objects for all the sales reps in the file, load the objects onto an ArrayList and display them into my JTextField using an enhanced for loop and formatted with the toString method. I have been at this for days and cannot get the stars.txt data to display in the JTextField!!! It compiles in NetBeans and displays the format for which I want the data in the stars.txt file to be, but not the actual data (which is salesID, firstName, lastName, osField, bsField, psField, buttonGroup1, buttonGroup2). This is all under class (JButton) displayActionButtonPerformed. I created another class called SalesReps to store the variables, sets/gets and constructor (I made this under the main class, does it matter in NetBeans I did not create a new class, i.e. a new TAB outside the main?) I would love any help I can get. Thanks. Heres my code:



8 years ago