Shivade Sanjay

Greenhorn
+ Follow
since Apr 09, 2002
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 Shivade Sanjay

Hello Guys,

Here is my situation , please help me resolve my problem.

We have been asked to develop a J2EE application which uses Crystal Report for reporting in such a way that these reports would be consumed through jsp pages or .NET client.

I have created a simple java class. This Java Class gets a database connection, executes a sql and returns a resultset. I have created report out of this class using Java Bean Connectivity feature of this report. Deployed it on Weblogic 8.1. I could call this report through jsp page which is again deployed on Weblogic 8.1. Similarly using .NET I have published it as Webservice and created a windows application to call this webservice. Everything works fine. So far so good.

No instead of a Java Class I need to go one deep which is I need to call an EJB which returns me a resultset. I followed above all steps. From JSP deployed on weblogic server my report works fine because same weblogic server has JRC components of crystal and all EJB libraries. THe problem I am facing is while publishing this report as a webservice and calling it from .NET client I get "query engine error." Unable to get the rowset. My Dilemma is am I on a right track ? Is it something I am not aware of as I am doing this first time ? Is there a different approach to achieve this ? How do u call a EJB based report from a .NET client ? If it's a simple java based report it works then why not with multiple packages , libraries ? Remember I am deploying this on IIS server so definitely I am trying something cross platform , interoperatibility is definitely an issue. I was assuming publishing webservice takes care of this part. Am I on right path ? Am I missing something ?


Please help. I will appreciate your help.

[ January 21, 2005: Message edited by: Shivade Sanjay ]
[ January 21, 2005: Message edited by: Shivade Sanjay ]
16 years ago
Hello Guys,

I want to create a report using EJBClient on Weblogic server. I have successfully deployed EJB on weblogic server. CLient is getting resultset (CachedRowSetImpl) from EJB successfully. Problem I am facing is I want to create a report based on this resultset. As per crystal I have defined JREPath and JavaBeanClassPath and added my ClientClass. Somehow I do not see this class appearing under Java Bean Connectivity. IF I write a pojo to achieve the same without EJB it works well. I am wondering same EJBCLient works well through ECLipse but no through Crystal , what could be the reason ?

Are jar files I need to put in JavaBeanClassPath ? If yes what are those ? I tried adding weblogic.jar but it takes hell of a time and still doesn't display my EJB Client class.

Please help me resolve my Dilemma , as always Crystal is giving me tough time.

Thanks
Dilemma
Hi Joel
Let me add something to your previous dicusssions.
You do not have to create directory structure manually if you are not using some kind of tool. The javac compiler has a option -d dir which after compilation of the class puts classes in respective folder as per specified in package in .java file.
eg. My java file (dt.java) has this code
package MyJava.dt;
import java.text.*;
import java.util.*;
import java.sql.*;

public class dt
{
.
.
.
while compiling I will say
javac dt.java -d C:\Test
so it creates subdirectories MyJava\dt under C:\Test folder.
It's so easy..
You might be knowing this .. but thought just let you know ...
Thanks
Sanjay
19 years ago
Hi George,
Try using SimpleDateFormat as follows :
public class dt
{
public static void main (String args[])
{
DateFormat dateTimeStamp = DateFormat.getDateTimeInstance( DateFormat.SHORT, DateFormat.SHORT );
SimpleDateFormat sdf2 = new SimpleDateFormat("dd-MMM-yy");
System.out.println("sdf2 = " + sdf2.format(new java.util.Date()));
}
The Formatting Symbols are as follows :
Symbol Meaning Presentation Example
------ ------- ------------ -------
G era designator (Text) AD
y year (Number) 1996
M month in year (Text & Number) July & 07
d day in month (Number) 10
h hour in am/pm (1~12) (Number) 12
H hour in day (0~23) (Number) 0
m minute in hour (Number) 30
s second in minute (Number) 55
S millisecond (Number) 978
E day in week (Text) Tuesday
D day in year (Number) 189
F day of week in month (Number) 2 (2nd Wed in July)
w week in year (Number) 27
W week in month (Number) 2
a am/pm marker (Text) PM
k hour in day (1~24) (Number) 24
K hour in am/pm (0~11) (Number) 0
z time zone (Text) Pacific Standard Time
' escape for text (Delimiter)
'' single quote (Literal) '
19 years ago
JSP
Couple of Questions :
What DBMS are you using ?
TRY THIS :
Define a variable :
String newId="";
//Put whatever value you want
eg. newId = "Hi";
then Use following Select :
"Select * From ProjectMaster Where Id#='"+newId+"'";
which replaces your sql
stmt.executeQuery("Select * from projectmaster where id# = 'newid'");System.out.println("String=" + rs.getString(1));
The correct way of using Class.forName is
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver:DSNName");
out.println("JDBC Driver Loaded");
Thanks
Sanjay
[ Edited by Dave to fix problem ]
[ April 09, 2002: Message edited by: David O'Meara ]