Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

VijayRawat Rawat

Greenhorn
+ Follow
since Aug 19, 2004
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 VijayRawat Rawat

I have a application which has got GUI in swing. It uses http to interact with server side code which is deployed in JBOSS.I have a question here.

During the application process there are some updates done by some process on database(server) and I need to pass the notication of these updates to GUI. Notifaction could be enabling a icon on Toolbar or showing notication on status bar

Is there a convenient way to do.
Any help would be greatly appreciated
13 years ago
Hi,
I have a application which I have build successfully but when I deploy and start server, I get this error

[exec] weblogic.utils.compiler.CodeGenerationException: Error in RDBMSCodeGenerator.generateCmrGetterMethod: weblogic.utils.compiler.CodeGenerationExceptio
n: [EJB:012017]Error while generating One to Many Collection.

Does any body know anything about it


Thanks and Regards
Vijay Rawat
14 years ago
Thanks Merril for your suggestion but I do not need to re-start the application also.
Can you tell me any other way
14 years ago
Hi,
I have a application in struts where if there is change in ResourceBundle properties file, I have to reload it without starting the server.

I have created the Action which is called after there is change in ResourceBundle,
The code is shown below :


But this does not work. Is there a way to reload?
If somebody has sample code, please can you forward
[ July 28, 2006: Message edited by: Merrill Higginson ]
14 years ago
I having problem connecting to DB2 in WSAD.

I WSAD I have configured DataSource
Driver : COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource
The DB2 Client has been installed and configured.
db2java.zip is in classpath.

When I run Web Application. I get this error
Exception data: java.lang.UnsatisfiedLinkError: SQLAllocEnv
at COM.ibm.db2.jdbc.app.DB2Driver.<init>(DB2Driver.java:299)
at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(DB2Driver.java:135).null(Unknown Source)
at COM.ibm.db2.jdbc.DB2BaseDataSource.isLoaded(DB2BaseDataSource.java:327)
at COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource.getPooledConnection(DB2ConnectionPoolDataSource.java:102)
at COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource.getPooledConnection(DB2ConnectionPoolDataSource.java:74)
at com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:688)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:111)
at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:683)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:487)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:577)
at com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1280)
at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:1064)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1571)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:622)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:424)


Can some body help me

Thanks
Vijay Rawat
Hi,
I am getting problem when making connection to DB2, which resides on mainframe. I am using COM.ibm.db2.jdbc.net.DB2Driver driver

I am using this piece of code
try {
Class.forName("COM.ibm.db2.jdbc.net.DB2Driver").newInstance();
System.out.println("Class COM.ibm.db2.jdbc.net.DB2Driver loaded");
String url = "jdbc : db2://server: port/database";
System.out.println("Getting a connection");
con = DriverManager.getConnection(url, "user", "password"); (hangs up)
System.out.println("Got connection");
} catch (Exception ex) {
System.out.println("Exception : " +ex.getMessage());
ex.printStackTrace();
}
It successfully loads driver but when it tries to get connection, it hangs up.

Can some body tell me where I am going wrong

Thanks and Regards
Vijay Rawat

[ December 29, 2005: Message edited by: VijayRawat Rawat ]

[ December 29, 2005: Message edited by: VijayRawat Rawat ]
[ December 29, 2005: Message edited by: VijayRawat Rawat ]
I am using this piece of code to download file from the server using Http response. Most of the time it works fine but sometime it gives error when it is downloaded and displayed in the browser(IE). Same thing works fine in another browser(IE of another machine)


public void downloadFile(String filePath, HttpServletResponse res) {

File fileToDownload = new File(filePath);
if (filePath.endsWith(".pdf")) {
res.setContentType("application/pdf");
}
else if(filePath.endsWith(".xls")) {
res.setContentType("application/vnd.ms-excel");
}
else if (filePath.endsWith(".doc")) {
res.setContentType("application/msword");
}
else {
res.setContentType("APPLICATION/OCTET-STREAM");
//res.setContentType("multipart/data-form");
System.out.println("Content type is multipart/data-form");
}
res.setHeader("Content-disposition",
"attachment; filename=" +
fileToDownload.getName());
res.setContentLength(fileToDownload.length());

OutputStream = null;
BufferedInputStream fileInputStream = null;
try {
fileInputStream = new BufferedInputStream(
FileInputStream(fileToDownload));
bytes[] b = new bytes[1024]
out = res.getOutputStream();
int i = 0;
while((i=fileInputStream.read(b))!=-1)
{
out.write(b);
}
}
catch(IOException ex) {
System.out.println("IOException :" +ex.getMessage());
}
finally {
if (fileInputStream != null) {
try {
fileInputStream.close();
}
catch(IOException ex) {
System.out.println("Exception while closing FileInputStream :" +ex.getMessage());
}
}
if(out != null) {
out.close();
}
}
}
can any one know the cause of problem
Thanks in advance
vijay
15 years ago
Hi All,
I am using the same facility of file upload.
The problem is that when I am trying to upload file using my own servlet its working fine, but when I am trying to upload using Struts(struts tags), its giving problem. Its not able to come to Action class either.
Can somebody throw light on this

Thanks in advance
Vijay
Hi All,
I also have the same problem where multiple threads will be writing to the same file, I don't want data to be garbled up rather I want each thread write sequentially there data in the same file. I am creating wrapper classes but I am getting some kind of problem in my approach. I saw word QUEUE being referred here. Can anyone throw some light on this approach , it would be great

Thanks in advance
Vijay Rawat