Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!

Ram Bu

Greenhorn
+ Follow
since Jul 15, 2005
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 Ram Bu

US - Midwest or South (TX).
[ May 31, 2007: Message edited by: Ram Bu ]
13 years ago
Hi,

My friend has about 3 years of experience in Java/Web application development. He is also certified in SCJP, SCWCD & SCJD. What's the salary range he should expect if he decides to look for another job?

Thanks.
13 years ago
Hello guys,

I am having connectivity problems when I try to connect to SQL Server 2005.

The following connection works for SQL Server 2000.
driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver" connectionURL="jdbc:sqlserver://localhost:1433;databaseName=pubs;SelectMethod=Cursor"

When I change the sql server pointing to a SQL Server 2005, I am not able to get pass by the login page. I get the following error.

2007-03-02 13:32:17 JDBCRealm[/project]: Exception performing authentication
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.getImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.setupImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.<init>(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.<init>(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.prepareStatement(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.prepareStatement(Unknown Source)
at org.apache.catalina.realm.JDBCRealm.roles(JDBCRealm.java:680)
at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:485)
at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:393)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:274)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
at java.lang.Thread.run(Thread.java:534)
[ March 08, 2007: Message edited by: Ram Bu ]
Any simple SELECT statements would throw that error message.
Hello,

I just wanted to share this fix with rest of you folks. I spent almost a day trying to fix the problem.

Those who are trying to retrieve data from SQL Server 2005 using Microsoft's JDBC driver might get the following error message.

[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 1 (""): Data type 0x38 is unknown.

All you need to do is change the connection string.

Current : jdbc:microsoft:sqlserver://<ServerName>:<PortNumber>;databaseName=<DatabaseName>;SelectMethod=Cursor

New: jdbc:microsoft:sqlserver://<ServerName>:<PortNumber>;databaseName=<DatabaseName>;SelectMethod=Direct


By changing select method from Cursor to Direct you would be able to retrieve data.

HTH
[ March 02, 2007: Message edited by: Ram Bu ]
I am getting the following error message when I try to update/add a new record in table A.

javax.servlet.ServletException: object references an unsaved transient instance - save the transient instance before flushing: com.company.struts.project.ParentClass

I have two tables TableA & TableB. The relationship is TableB 1->many TableA. The configuration files are set accordingly.

<!-- Table B config -->
<set name="TableB" inverse="false">
<key column="SId" />
<one-to-many entity-name="TableA" />
</set>

<!-- Table A config -->
<many-to-one name="TableB"
column="SId" not-null="false"
entity-name="TableA" />

So, whenever I try to update the SId column in Table A (nullable) to set to Null (this value in not in Table B, as it is primary key), the above error is being thrown.

I am sorry if I was incoherent in my explanation. Any help is greatly appreciated.
I read online the following differences,

As far as I know, Apache is used for static web pages,
and Tomcat is used for servlets/JSP. You don't really
need Apache since Tomcat also handles html pages, but
Apache does a better job of it.

<li/>For most of the web sites apache is well suited. In addition, with apache
you can build dynamic web sites using CGI scripts or PHP.

<li>Tomcat is dedicated to provide a servlet API and JSP to build web
applications. You can use it alone or bind it with apache.

But, is there any place where I can find more detailed differences between Apache & Tomcat.

Thank you.
R
14 years ago
Hi,

Is it possible to setup Tomcat's REALM to use trusted authentication in order to access SQL Server database. Currently, you have to pass userid and password in order to talk to the database server.

<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver" connectionURL="jdbc:microsoft:sqlserver://databaseServer;DatabaseName=databaseName;SelectMethod=Cursor" connectionName="userId" connectionPassword="password" userTable="users" userNameCol="username" userCredCol="password" userRoleTable="user_role" roleNameCol="role_name" />

If it is possible (using trusted authentication), can some guru show me how to do this?

Thank you,
R
14 years ago

Originally posted by Joe Zo:
I have another question:

My voucher will expire Feb 28. Does that mean I have to take the test before Feb 28 or I just need to call the test center before Feb 28 and the test can be later?

Thanks.



Lets keep different questions at forum level, not in an individual question level.

Thanks.
Hi,

I have purchased voucher for 1.4 exam, wondering if I would be able to take 1.5 instead. Does anyone know if this is possible?

Thanks.
Hi,

The following code is throwing a NullPointerException

import java.util.List;
public class Test {

public static void main(String[] args) {

List l = null;
double d = 2386870.0;
l.add(new Double(d));

}
}

Can someone shed some light on why this is happening and how to fix it.

Thank you.
14 years ago
Hi,

I am a newbie to Apache/Tomcat. Can someone guide me to achieve the following.

Instead of typing http://localhost:8080/, I want to type the web server name like http://webserver/ and this should take me to default web page.

I tried couple context name changes, but couldn't get them to work.

Any help is greatly appreciated.

Thanks,
R
15 years ago