Why Server Cannot Produce Same Warning Message Compared To Local Deployed Project

Feb 26, 2014

I have a question: I have a Java/JSP/JavaScript project that access back end Oracle database, and provide interaction through tomcat. After we deployed our project, I found one button does not generate necessary warning message from server, but when I deployed and tested our project on local PC, it does generate correct warning message. I am using the same IE, same tomcat version, and I am sure my container is pointing to the same database, and I am sure I using same version of project code by checking with GIT.
 
Here is the button that I click:

<a target="frmMain" href="RealignServlet?button=REALIGNMENT" title="Procedure Alignment">Align</a><br> 

And here is part of the code of RealignServlet:
 
    public class RealignServlet extends SiapBaseServlet { 
    private static final long serialVersionUID = 1L;
    private static final Logger logger = AppLogger.getLogger(RealignServlet.class.getName());
    private static final String PROC_QUERY_JSP = "ProcQuery.jsp";
    private static final String REALIGN = "REALIGNMENT";
 
[Code] .....
 
Our problem is server could not generate alignMsg. But we can get it on local deployed project.

View Replies


ADVERTISEMENT

EJB / EE :: Unable To Access Session Deployed In Weblogic Server From JBOSS

Jan 13, 2009

I am currently trying to access an EJB Session deployed in a Weblogic server from JBOSS.

The client code looks like this :

Hashtable environment = new Hashtable();
environment.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
environment.put(Context.URL_PKG_PREFIXES, "weblogic.jndi.factories");
environment.put(Context.PROVIDER_URL, "t3://<ip>:<port>");
InitialContext context = new InitialContext(environment);
ServiceHome home = (ServiceHome)context.lookup("ejb/Service");

When I run this code from a standalone java program it executes ok, but when I try to run it from an application deployed in JBOSS, the line (5) which creates the InitialContext object throws this Exception :

java.lang.ThreadDeath
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1221)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:696)
weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:742)

[Code]....

In order to be able to use weblogic naming factory I put the archive weblogic-8.1.6.0.jar in jboss's /server/default/lib directory. But I think it has to do with JNDI conflicts between JBOSS and weblogic.

View Replies View Related

Read Chars In Text Area And Produce Desired Output For Text Editor Project?

Nov 27, 2014

I am working on a personal project and want to create a text editor to write my code. I am wondering how could I read the last input from the user and if say it was an open curly brace {, then like netbean's my editor will supply the closing curly brace. My java experience is limited but I have tried to read key board input and a few other options that did not work.

View Replies View Related

JSP :: How To Check If Web Page Is Synchronized On Local Server

Feb 22, 2014

How to check if a web page is synchronized on a local server in JSP ? I have tried to make database updation synchronized in jsp but how can i check it on local web server (tomcat) ? I have used Oracle database.

More Info:

Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbcracle:thin:@localhost:1521:xe","username","password");
balance=balance-1500;
String query1= "update bank set bal=? where card_no='"+cnumber+"'";
PreparedStatement st1 = con.prepareStatement(query1);
st1.setString(1,String.valueOf(balance));
int qresult1 = st1.executeUpdate();

This is some of the code in which I have not applied any synchronization. In simple words, I want to know how to test if synchronization part is really working or not ?

My main motive is... I am trying to make an admission form and I want a limited number of seats but I want after every registration process my database updates the seat numbers accordingly and show the right information about how many seats are left to the user. (though in the given code i am just changing the balance)

Like in this example
<%!
PreparedStatement pst = con.prepareStatement("query");
%>
synchronization
<%
synchronized(pst) {
pst.setXXX(...);
pst.setXXX(...);
pst.executeXXX(...);
}
%>

View Replies View Related

Create A Server Which Sends Clients Connected To It Its Local Time

Apr 5, 2015

I'm trying to create a server which sends the clients connected to it its local time. Looking at a few tutorials I've managed to connect the clients to the server, but can't send data to the clients. I've successfully done easier examples, without threading. I guess the problem might be im me not knowing what exceptions are for.

Client: When running the code "AAAAAAA" does execute but "BBBB" doesn't, so I guess the problem should be in fraseRecibida = entradaDesdeServidor.readLine();

import java.io.*;
import java.net.*;
import java.util.Scanner;
public class Client {
public static void main(String[] args) throws Exception{
String fraseRecibida;

[code]....

I don't understand the exceptions, maybe I should give them a look before continuing with sockets. Being frank I'm not really sure why the while(true) is there.

import java.io.*;
import java.net.*;
import java.util.Calendar;
public class ServerThread extends Thread{
Socket socket;
ServerThread(Socket socket){
this.socket = socket;

[code].....

View Replies View Related

Unable To Run WebSocket On Hosting Server But Working Well On Local Host

Feb 16, 2015

I am developing one android chatting application. for that on Server side i am using WebSocket as war file.

It is working well on localhost the same tomcat. but when i try to connect on the hosting server, it showing http error..,

View Replies View Related

Sending Message From One Client To Another Via Server?

Apr 2, 2014

I've just recently started playing around with network programming in Java, and I've come up with a simplistic server than can handle multiple clients and return the IP and port each one is connected to (or I'm under the impression that is so). What I've been requested to do as an exercise by one of the programming teachers at my high school (I'm not in a class, this is my own time) is send a message from one client to the other through the ServerSocket so that it may "watch" everything going on. I'm not sure how to go about this at all.

EDIT : now it never seems to go the the else or else if statements...

That is now the main problem. It never, ever, goes past the first if statement, no matter what it is.

EDIT : Okay, I haven't changed a line of code but suddenly not a single if statement is working. They just stopped. The client simply hangs and I can't type anything.

Server

public class Server implements Runnable {
Socket clientSocket;
Server(Socket clientSocket) {
this.clientSocket = clientSocket;
}
public static void main(String args[]) throws Exception {
ServerSocket ssock = new ServerSocket(3480);
System.out.println("Listening on port 3480");

[code]....

View Replies View Related

RMI / How Can Client Send A Message To Server

Sep 3, 2014

I have a problem on how to make my client to send the object to a server.

So I have one interface called "RMIInterface" and client "RMIClient" and server "RMIServer":

RMIInterface
interface RMIInterface {
public String getMessage(String text) throws RemoteException;
}
RMIClient
public class RMIClient {

[code]....

With this program I can connect to a Server with a Client, and print in Client console a message.But, how can I send message from a client to a server, and print that message in server console output?

make the simpliest example with sending a message to a server, edit inteface header code to public interface RMIInterface extends Remote, I forgot to add.

View Replies View Related

How To Send Message To Specific Client In Server

Jan 22, 2015

I want to send a message to a specific client in a server. This is my code and what I tried(I have only given you 3 classes in which I believe I have the problem).

TextClient:

import java.io.*;
import java.net.*;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.concurrent.TimeUnit;
public class TextClient {
public TextClient() {

[Code] .....

View Replies View Related

Modify Or Read Http Message Before Sending To Server Within Client

Feb 25, 2014

I am trying to check the integrity in a Bank Transaction that the message sent to the server has not been modified by any malware in the client system. For this I am trying to read the message sent to the server at the client boundary so as that it enters the network as customer with customer intended values. So, firstly I need to check where to I need intercept the message within client boundary. Secondly, Can I intercept the message and read its contents using Java?

I want to check what my Online Banking Server( Leta Say Bank of America) receives if I ask to transfer amount $100 to Account A . I assume that there is a malware in client system that changes recipient to B,$10000. My aplicaion which I intend to design, shoudl inform the user that the integrity of the message is compromised and should give the option to the user to abort it. plan to track what message is being sent from client to server. This I want to achieve by reading the message from client at the last point before it leaves the client and enter the network.

View Replies View Related

Result Of Encoded Message Cannot Restore To Original Message By Decoder

Sep 28, 2014

The problem is the result of encoded message can't not restore to the original message by the decoder. Here are my three class's code

SecureMsgMain:

package securemsg.core;
 
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
 import securemsg.database.*;
 public class SecureMsgMain {
 
[Code] .....

View Replies View Related

Assembling Database Project From A Downloaded Project Zip File?

Apr 12, 2014

i downloaded a sample database code of an online payroll system. How can i assemble it to know how it works.
the files include php and mysql files. it is to build an online payroll system

View Replies View Related

How To Return A String From Project Into Android Project

Jun 26, 2014

I tried many times to return a string from java project to an android project But it keeps sending incorrect values as in 2 as it should be 1 here is an example.

Java Project:

boolean somethingboolean = false;
if(something.equals("1")){
somethingboolean = true;
}
public static String getString(){
if(somethingboolean == true){

[Code]...

Android project:

System.out.println(JavaProject.getString())

and in the android project it prints "FALSE"

So what should i do?

View Replies View Related

Warning For Not Overriding Methods

Mar 26, 2014

import javax.swing.*;
import java.awt.*;
import javax.swing.event.*;
import java.awt.event.*;
/* display selected number
if selected, bg is green
if not selected bg is pink
*/

[code]....

my compiler is telling me that the getList... method is not being overridden.but when I change the JList<String> to JList and Object to String in the parameters, i get a warning from the compiler that it's an "unchecked call".

View Replies View Related

Could Not Open / Create Prefs Warning

Jan 3, 2015

What does this error mean, and also, when I get it, the command line hangs so that I can't do anything else (Is there a way to recover from that?). I'm running Windows 7.

Jan 03, 2015 5:00:59 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node SoftwareJavaSoftPrefs at root 0
x80000002. Windows RegCreateKeyEx(...) returned error code 5.

View Replies View Related

Cannot Create Prefs Warning On Windows

Jun 12, 2014

When I run the following code from Java HeadFirst, everything goes fine but along with one error ( i don't know is it an error or exception, or some other windows stuff). The code is

import javax.sound.midi.*;
class ExceptionHandling {
public static void main(String[] args){
ExceptionHandling o = new ExceptionHandling();
o.play();

[Code] ....

And what I got on cmd ( I am using Windows 7) :

Jaspreet javac ExceptionHandling.java
Jaspreet java ExceptionHandling
Jun 11, 2014 5:19:40 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node SoftwareJavaSoftPrefs at root 0
x80000002. Windows RegCreateKeyEx(...) returned error code 5.

We got the sequencer

What is meant by code in blue? I know its some message from windows os and not from jvm. but i didn't understand it.

View Replies View Related

Compiler Does Not Show Any Warning Or Errors

May 18, 2014

public void init(Board board) {
JPanel Panel = new JPanel();
Panel.setLayout(new GridLayout(board.getWidth(), board.getHeight()));
getContentPane().add(Panel, BorderLayout.CENTER);
Panel.setBorder(new LineBorder(Color.BLACK)); // it does not work also
 
[code]....

I have a JFrame. I added two JPanels to the JFrame. The first one is GridLayout and it should be situated at CENTER. Another one is bottomPanel, and that one should be situated at SOUTH.I would like to add two new JPanels(kit and another one) to the bottomPanel.Compiler does not show any warning or errors.The problem is, that bottomPanel situates at NORTH, not at SOUTH. kit situates at CENTER of bottomPanel, not at WEST.

View Replies View Related

Error And Dead Code Warning

Mar 26, 2015

There are 2 methods and a main one. The first is a void that creates a 3x4 2d array and the second is to search for a value in the array, if found it will return the number of the row that contains that value. If not, it will return -1, but I am getting 1 error and 1 dead code warning.I will put comments at the lines that contain the problems

import java.util.Scanner;
class Question4{
public static void main(String[]args){
Scanner s = new Scanner(System.in);
int x,n;
System.out.println("Please input the value that will be used in the array");
x=s.nextInt();
System.out.println("What is the value you want to search for?");
n=s.nextInt();
createArray (x,n);

[code]....

View Replies View Related

Program Won't Produce Output

Feb 15, 2015

I'm not sure why, but my program does not produce an output. It is supposed to output total charges.

/*This program provides the user with the price of their monthly internet service based on two inputs.The program asks users which subscription they have. The options are A, B, or C. This is the first input.

The program then will ask the user how many hours they used the internet for. This is the second input.Then, based on the package number, the program will compute their monthly bill. This is the output.

The program calculates the price based on the following prices:

Package A: For $9.95 per month, 10 hours of access are provided. Additional hours are $2.00 per hour.
Package B: For $13.95 per month, 20 hours of access are provided. Additional hours are $1.00 per hour.
Package C: For $19.95 per month, access is unlimited.*/
  import java.util.Scanner;
public class Lab03SV

[code]...

View Replies View Related

What Numbers Can Be Used To Produce Determinant Of 1/2

Nov 29, 2014

How to find a set of number that will do this? I need it to test a program I am writing.

View Replies View Related

Produce A Random Number Between 1 And 54?

Sep 13, 2014

I'm trying to produce a random number between 1 and 54 . I think this is correct

int i= (int)(Math.random()*54)+1;

View Replies View Related

Warning On Class With JFrame Inheritance (extends)

Sep 2, 2014

I'll start off by showing my full code:

Main class

import javax.swing.JFrame; 
public class groupingTest {
public static void main (String[] args) {
groupWindow test = new groupWindow();

[Code]....

At the start of the groupWindow it turns yellow and it says "The serializable class groupWindow does not declare a static final serialVersionUID field of type long".

View Replies View Related

Trying To Add Database Driver (JDBC) - Not In CLASSPATH Warning?

Jun 23, 2015

This the output of java from my PC under linux platform (rhel 6.5).
 
[pentaho@vertica-srv1 Downloads]$ java -version
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
 
[Code] ....
 
But the problem is while trying to open ETL program under linux platform [pentaho@vertica-srv1 data-integration]$ ./spoon.sh .... I received the following error messages.
 
[pentaho@vertica-srv1 data-integration]$ ./spoon.sh
 
Trying to add database driver (JDBC): RmiJdbc.RJDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): jdbc.idbDriver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): org.gjt.mm.mysql.Driver - Warning, not in CLASSPATH?
Trying to add database driver (JDBC): com.mckoi.JDBCDriver - Warning, not in CLASSPATH?
[KnowledgeFlow] Loading properties and plugins...

View Replies View Related

Collection Of Files - Produce Sum Of Integers

Feb 18, 2014

Write a function (or functions) that given a collection of files will produce a sum of integers from each line of each file. Each file can have any number of lines from 1 to N. Each line can contain only one integer and no other alphanumeric characters. All of the numbers from all of the files should be added to the final result. The result is just one number.

View Replies View Related

Warning While Using Boolean Datatype In Program Execution Success

Oct 26, 2014

I am getting notification about "The value of the local variable result not used" in my program when i am using boolean data type.But code execution was successful. Results are also displayed accurately.I am using Eclipse, there i i have noticed this warning.

* program to practice about comparison operators */
public class compoperators {
public static void main(String[] args) {
boolean result;
}

[code]....

View Replies View Related

Produce Similar Output For N Characters Where N Is A Odd Number

Apr 25, 2014

1.Write a program to produce a similar output for n characters, where n is a odd number. The below output is for n=7.

Java Code:

A B C D E F G F E D C B A
A B C D E F F E D C B A
A B C D E E D C B A
A B C D D C B A
A B C C B A
A B B A
A A
mh_sh_highlight_all('java');

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved