sachin bal

Greenhorn
+ Follow
since Mar 24, 2010
Merit badge: grant badges
For More
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sachin bal

Thanks for the response, Ron.

I changed the name to NEWBANK and tested again. Unfortunately, it does not work. Also, the user sa has been granted permission to access the database NEWBANK

Regards

Sachin Bal
I have an SQL Server 2012 edition. I have two databases on this server. One of these databases named BANKTEST was restored from a backup a few months ago. I have recently restored another database named NEWBANK.

The following is the java program which I had written to access NEWBANK


Unfortunately, I am getting an error which I have listed below

Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "NEWBANK" requested by the login. The login failed. ClientConnectionId:69c57dd7-38b1-413c-b8ea-8d53824f74e1 at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216) at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:254) at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:84) at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2908) at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2234) at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41) at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326) at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at com.example.myproject.client.ConnectMSSQL.main(ConnectMSSQL.java:13)


If I replace the name of the database with BANKTEST, I do not get any errors. Can someone advice me on this?

Regards

Sachin
I agree. :-) Thanks for all the help.

Regards

Sachin
9 years ago
GWT
Sure. We went through the logs and noticed java.lang.ClassNotFoundException for a 3 classes. We added the relevant jar files to the <project name>/war/WEB-INF/lib, recompiled the program and the problem was resolved.

Regards

Sachin
9 years ago
GWT
Hi,

The problem is resolved. Thanks for the help

Regards

Sachin
9 years ago
GWT
Hi,

Thank you for the prompt response.

The first screen prompts the user for the user name and the password. The screen is displayed and we are able to enter the user name and the password. When we click on "Enter", the screen does not go on the next screen. When we do a right click and do an "inspect element" we are getting the following error

Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://localhost:8080/RBIComp/gwtRequest
Uncaught #<error> localhost:8080/RBIComp/com.example.myproject.RBICompliance/CCBAFE5EF5C818536F0E6FB32882E2C0.cache.html:1908


I am not assuming that this is a GWT problem, but, I would like some help so that I would be able to run this application in the production mode.

Hope this answers your queries.

Regards

Sachin
9 years ago
GWT
Hi,

We have created an application using GWT 2.5.1, Hibernate and our database is on MariaDB. We are using RequestFactory for fetching the data from server to the client. This application works fine in Development Mode. How do we convert this to production mode. We have done the following steps

1. Installed Tomcat on our machine
2. zipped the contents of the WAR directory and renamed it from ".zip" to ".war"
3. Copied the .war file into the Webapps folder of Tomcat
4. Started the Tomcat server

We are able to access the client side code using http://localhost:8080/<application name>, but, we are not able to access the MariaDB database. We have made changes in web.xml of the application folder in Webapps and added the following lines

<resource-ref>
<description>"<application name>"</description>
<res-ref-name>jdbc/db1</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

Also, we have added the following lines in context.xml which is present in conf folder of tomcat

<Resource name="jdbc/db1" auth="Container"
type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="root"
password=""
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/<application name>"/>

Unfortunately, we are still not able to connect to the database. Can someone please help me with this?

Regards

Sachin
9 years ago
GWT
Hello,

I am using a MS-Access database. I am trying to create a new entity class from this database. I can connect to the database but due to some reason, it is not showing me any tables in the "available tables" list. Has anyone encountered such a problem and can someone help me? I am using Netbeans 7.0.1

Regards

Sachin Bal
Hello All,

What is the normal validity of a SCJP voucher in India? Can a voucher be valid for only 3 months? Please let me know

Regards

Sachin Bal



12 years ago
Hi All,

Thank you for all the help. I appreciate it.

Regards

Sachin Bal
12 years ago
Hi,

I have developed the a small program to calculate the addition of 2 numbers which are double. There seems to be some problem with the output specifically for the following 2 numbers 10.4 and 19.05. The output which I get after adding these two numbers is 29.450000000000003.

In case I add 10.4 and 29.05, I get the output as 39.45.

Can someone help me understand the reason for this discrepancy?

Regards

Sachin Bal
12 years ago