Problem in registerApplicationFromPropertyFile method
Hi,
I use the following code to get an application module instance.
oracle.jbo.html.jsp.JSPApplicationRegistry appRegistry =oracle.jbo.html.jsp.JSPApplicationRegistry.getInstance();
appRegistry.registerApplicationFromPropertyFile(session, "dgpa_bd_BdModule");
ApplicationModuleImpl appMod = (ApplicationModuleImpl) appRegistry.getAppModuleInstance("dgpa_bd_BdModule",request,session);
Some times the application stops in the registerApplicationFromPropertyFile method and i need to restart the IAS to solve my problem.
When the problem occurs all the users stop in the same line of code.
The application is in Reserved Mode and i use the jserv in IAS 1.0.2.1.
Anyone knows how can i solve this problem?
Thanks in advanced
Ricardo Constantino
Sorry, my IAS version is 1.0.2.2
Similar Messages
-
I have problem with pay method
I have problem with pay method. My card declined. I change card and I have the same problem. What can i do? Why declined my card again?
Contact iTunes store support: https://ssl.apple.com/emea/support/itunes/contact.html.
-
Hi, I am having this problem:
I made a CustomItem, a TextField, now I overloaded the traverse method, so if the keycode is Canvas.UP or Canvas.DOWN then return false else return true.
The problem is that when I press the left or rigth button it also returns false and not true.
and there is another problem with traverse, before returning false or true I set a boolean and call to repaint to draw it on some way if its selected or not, the paint method is being called but it just dont draw as desired.
protected void paint(Graphics g, int ancho, int alto) {
System.out.println ("Dentro del paint, seleccionado="+seleccionado);
try {
g.drawString(label, 0, 0, Graphics.TOP|Graphics.LEFT);
if (!seleccionado) {
g.setColor(120, 120, 120);
g.drawRect(0, 4, tama�oTexto+8, 25);
if (seleccionado) {
g.setColor(255, 255, 255);
g.fillRect(1, 5, (tama�oTexto+8-1), 23);
g.setColor(0, 0, 0);
if (!seleccionado) {
g.setColor(80, 80, 80);
g.drawString(texto, 4, 7, Graphics.TOP|Graphics.LEFT);
if (seleccionado) {
int cursorX=Font.getDefaultFont().charsWidth((texto.substring(0, idLetraActual)).toCharArray(), 0, texto.substring(0, idLetraActual).length())+4;
g.drawChar('|', cursorX, 7, Graphics.TOP|Graphics.LEFT);
} catch (Exception E){
E.printStackTrace();
}the traverse method set the seleccionado variable and calls to repaint but instead of being false the paint method is drawing it as true (most of times).I have a problem with findByxxx() method.. in
Container managed bean.
i have
Collection collection =
home.findByOwnerName("fieldValue");
specified in my Client Program, where ownerName is the
cmp fieldname..
and
public Collection findByOwnerName(String ownerName)
throws RemoteException, FinderException
defined in my home interface.
i have not mentioned the findBy() method anywhere else
(Bean class). You have to describe the query in the deployment descriptor.
>
Even if i have a same "fieldValue" in the database
(Oracle), which i specified in findBy() method, iam a
result of owner Not found, which is not the case as i
have that owner name.
for the same application if i use findByPrimaryKey(),
it is working..
Can any one please post me the solution. -
Problem with Vector method addElement
I am new to Java. I am using JDK 1.3. I am writing a program that will convert a text file to a binary file that stores a Vector object. I have narrowed my problem to the method that reads the text file and creates my vector. Each element in my vector stores an integer and a string variable. The reading of the text file works find and the creation of my record works find. It seems that the storing of the record in the vector is not working. When I print the first 10 elements of the vector, it have the same record(the last record of my text file). What is wrong with the method below? I am also appending the result of running my program.
private static void readTextFile(File f) {
try {
FileReader fileIn = new FileReader(f);
BufferedReader in = new BufferedReader(fileIn);
String line;
int i;
SsnLocationRecord recordIn = new SsnLocationRecord();
int ctr = 0;
while (true) {
line = in.readLine();
if (line == null)
break;
ctr += 1;
i = line.indexOf(" ");
recordIn.putAreaNumber(Integer.parseInt(line.substring(0,i).trim()));
recordIn.putLocation(line.substring(i+1).trim());
records.addElement(recordIn);
if (ctr < 11)
System.out.println(recordIn);
in.close();
} catch (IOException e) {
System.out.println ("Error reading file");
System.exit(0);
for (int i = 0; i < 11; i++)
System.out.println((SsnLocationRecord) records.elementAt(i));
RESULTS:
C:\Training\Java>java ConvertTextFileToObjectFile data\ssn.dat
0 null
3 New Hampshire
7 Maine
9 Vermont
34 Massachusetts
39 Rhode Island
49 Connecticut
134 New York
158 New Jersey
211 Pennsylvania
680 Nevada
680 Nevada
680 Nevada
680 Nevada
680 Nevada
680 Nevada
680 Nevada
680 Nevada
680 Nevada
680 Nevada
680 Nevada
C:\Training\Java>First of all it would be better if you did a priming read and then checked line == null in the while statement instead of the way you have it.
ctr++ will also accomplish what ctr +=1 is doing.
you need to create a new instance of SsnLocationRecord for each line read. What you are doing is overlaying the objects data each time you execute the .putxxxx methods. The reference to the object is placed in the vector. The actual object is still being updated by the .putxxx methods (NOTE : THIS IS THE ANSWER TO YOUR MAIN QUESTION).
you close should be in a finally statement.
To process through all the elements of a Vector create an Enumeration and then use the nextElement() method instead of the elementAt is probably better. (Some will argue with me on this I am sure).
Also, on a catch do not call System.exit(0). This will end your JVM normally. Instead throw an Exception (Runtime or Error level if you want an abnormal end). -
Hi,
I have a problem with the method prerender. A month ago, I started to develop a web project using Sun Studio Creator and a few page beans that i used extended the Abstract Page Bean, so I overrided the prerender and customized it.
The problem is that, now i'm using eclipse and the configuration files of the project has changed and the prerender method never execute.
I want to know why it is happening. Maybe the project is "bad-configurated"?
ThanksThe code of java bean doesn't change, the only thing that has changed is the configuration files (faces-config.xml, web.xml, etc).
I put a breakpoint in the prerender method but the lifecycle doesn�t execute this method.
After serveral changes, I wrote this code in the method prerender :
int i=0;
i = 1;
And the prerender method doesn't execute.
I'm a bit lost,
thanks -
Problem with affinetransformOp method...
I have a serious problem with filter method
I Want to make a image flipping or some other filtering by using
AffineTransformOp
but it printouts an erro like this
cannot resolve symbol
op.filter (img, flipped)
(the error pointer shows ".after the op")
a code from my one of the filters
BufferedImage flipped = new BufferedImage(img.getHeight(), img.getWidth(),BufferedImage.TYPE_INT_RGB);
AffineTransform trans = new AffineTransform(0, 1, 1, 0, 0, 0);
AffineTransformOp op = new AffineTransformOp(trans, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
op.filter(img, flipped); //img is my buffered image source
I used some other ways like (img, null) but always give out error.
thanks..Did you declare "img" as BufferedImage or something else?
What is the full error message? -
Problem with WindowClosing() method
Hello everyone,
I have some problem with WindowClosing() method, in which I gave options
to quit or not. Quit is working fine but in case of Cancel, its not returning to
the frame. Can anyone help me ....Here is my code
import javax.swing.*;
import java.awt.*;
import javax.swing.event.*;
import java.awt.event.*;
public class TestFrame extends JPanel
public static void main(String[] args)
JFrame frame = new JFrame("Frame3");
WindowListener l = new WindowAdapter() {
public void windowClosing(WindowEvent e) {
int button = JOptionPane.showConfirmDialog(null,"OK to Quit","",JOptionPane.YES_NO_OPTION, -1);
if(button == 0) {
System.exit(0);
else
return;
frame.addWindowListener(l);
frame.setSize(1200,950);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}Maybe try
int button = JOptionPane.showConfirmDialog(yourframe,"OK to
Quit","",JOptionPane.YES_NO_OPTION, -1); -
Problems using GET method in JSP
Hi,
I had some problems using GET method in JSP.
I'm using Apache web server 1.3 and Tomcat 3.3.1 in windows 2000.
And I'm using language English and Korean.
When I send messages using POST method, all is good
But when I send message using GET method, English is good, but Korean is not good.
I tried to encode using
URLEncode.encode(str, "UTF-8")
and decoding it using
URLDecode.decode(request.getParameter(tag), "UTF-8")
but it didn't work.
How can I receive request including Korean using GET method in JSP?
If anyone have solutions, please let me know.
thanks.Hi,
I had some problems using GET method in JSP.
I'm using Apache web server 1.3 and Tomcat 3.3.1 in
windows 2000.
And I'm using language English and Korean.
When I send messages using POST method, all is good
But when I send message using GET method, English is
good, but Korean is not good.
I tried to encode using
URLEncode.encode(str, "UTF-8")
and decoding it using
URLDecode.decode(request.getParameter(tag), "UTF-8")
but it didn't work.
How can I receive request including Korean using GET
method in JSP?
If anyone have solutions, please let me know.
thanks.This problem appears, when one use UTF-16 encoding in JSP - am I right?
If so there are two solutions:
1) Temporary: Use "UTF-8" - or any other 8 bit encoding scheme and
encode Korean symbols with "&1234;" kind of escapes - though it
may not work
2) Absolute: get my piece of code, which I have managed to write
just a month ago resolving absolutely similar problem with UTF-16
in code using Chinese/Russian/English encodings
But I wouldn't say that it's costs 10 DDs :) - it's much more
expensive... So try 1st variant if it wouldn't help - let me know.
I'll figure :)
Paul -
Screen Resolution Problem in Session Method
Hi
I want to use session method in BDC. How to resolve screen resolution problem in Session Method?
Please give me the code or steps regarding this.
Thanks & Regards
venkateswararaoHi
U can only run the session with the option Dynpro Standard Size setted.
In this way the system should be use the same resolution for every situation.
Max -
Problems w my method payment
Go to settings/itunes & app store tap on ID then view ID then tap payment information and see whether paypal is a payment option for you. If it is not then you will need to check from one of the available payment options
-
I have problem verifying payment method by my pre-paid visa credit card
I have a problem verifying payment method by my pre-paid visa credit card ???
Apple does not accept pre paid cards > iTunes Store: Accepted forms of payment
Purchase an iTunes gift card that you can redeem and use to purchase iTunes and App Store content.
http://www.apple.com/itunes/gifts/?cid=wwa-us-kwg-music-itu -
I am trying to install free apps but I always get billing problem? Payment Method!!?
Likely because you are trying to create a Mac App Store account with an existing Apple ID. The None option often is not available in that case. If you create a new Apple ID and iTunes/Mac App Store account following these instructions carefully, you will be successful in getting free apps without a payment method.
Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card -
http://support.apple.com/kb/HT2534 -
Problem in calling method with object in another class
Hi All,
Please tell me the solution, I have problem in calling a method I am posting the code also
First Program:-
import java.io.*;
public class One
public One()
System.out.println("One:Object created");
public void display()
System.out.println("One:executing the display method");
static
System.out.println("One:executing the static block");
Second Program:-
import java.io.*;
public class Two
public Two()
System.out.println("Two:Object created");
public static void main(String arg[])throws Exception
System.out.println("Two:executing the main method");
System.out.println("Two:loading the class and creating the object::One");
Object o=Class.forName("One").newInstance();
System.out.println(o);
o.display(); //displaying error here in compile time.
static
System.out.println("Two:executing the static block");
waiting for your answer,
thanks in advance,bye.Hi All,
Please tell me the solution, I have problem in
calling a method I am posting the code also
First Program:-
import java.io.*;
public class One
public One()
System.out.println("One:Object created");
public void display()
System.out.println("One:executing the display
method");
static
System.out.println("One:executing the static
block");
Second Program:-
import java.io.*;
public class Two
public Two()
System.out.println("Two:Object created");
public static void main(String arg[])throws
Exception
System.out.println("Two:executing the main
method");
System.out.println("Two:loading the class and
creating the object::One");
Object o=Class.forName("One").newInstance();
System.out.println(o);
o.display(); //displaying error here in compile
time.
static
System.out.println("Two:executing the static
block");
waiting for your answer,
hanks in advance,bye.the line
o.display()
could be written as
((One)o).display(); -
Problem with doubleValue() method and hashtable
Hi,
I made a type double variable named tempNumber.
and I used this to put that number in a hashtable
CODE 1 : hash.put(key, new Double(tempNumber));
Then I wrote this code to retrieve it.
CODE 2: (hash.get(st.sval)).doubleValue();
Note: I am using streamtokenizer to get the nexttoken, so st.sval is a string representation of the token.
Now my problem is when I compile CODE 2, I get an error message saying that "method doubleValue() not found in java.lang.Object". Whats going on here??
I am using java 1.1 by the way.
Thanks in advance...Hash table stored and returns objects. You have to typecast the return value of get() method to Double and then call doubleValue() on it.
Its something as follows
((Double)hash.get(key)).doubleValue() -
Problem calling a method in a servlet witch returns remote ejb
Hi, I have a problem combining servlets ands ejbs, I expose my problem :
What I have :
1 . I have a User table into a SGBD with two attributes login and pass.
2 . I have a UserBean linked to User table with a remote interface
3 . I have a stateless UserSessionBean with a remote interface
4 . I have a UserServlet linked to a jsp page which allows me to add users
5 . I use Jboss
What is working ?
1 - I have a method newUser implemented in my UserSessionBean :
public class UserSessionBean implements SessionBean {
private SessionContext sessionContext;
private UserRemoteHome userRemoteHome;
public void ejbCreate() throws CreateException {
// Initialize UserRemoteHome
// Method to add a new user
public UserRemote newUser(String login, String password) {
UserRemote newUser = null;
try {
newUser = userRemoteHome.create(login, password);
} catch (RemoteException ex) {
System.err.println("Error: " + ex);
} catch (CreateException ex) {
System.err.println("Error: " + ex);
return newUser;
}2 - When I test this method with a simple client it works perfectly :
public class TestEJB {
public static void main(String[] args) {
Context initialCtx;
try {
// Create JNDI context
// Context initialization
// Narrow UserSessionHome
// Create UserSession
UserSession session = sessionHome.create();
// Test create
UserRemote newUser = session.newUser("pierre", "hemici");
if (newUser != null) {
System.out.println(newUser.printMe());
} catch (Exception e) {
System.err.println("Error: " + e);
e.printStackTrace();
Result : I got the newUser printed on STDOUT and I check in the User table (in the SGBD) if the new user has been created.
What I want ?
I want to call the newUser method from the UserServlet and use the RemoteUser returned by the method.
What I do ?
The jsp :
1 - I have a jsp page where a get information about the new user to create
2 - I put the login parameter and the password parameter into the request
3 - I call the UserServlet when the button "add" is pressed on the jsp page.
The Servlet :
1 - I have a method doInsert which call the newUser method :
public class UserServlet extends HttpServlet {
private static final String CONTENT_TYPE = "text/html";
// EJB Context
InitialContext ejbCtx;
// Session bean
UserSession userSession;
public void init() throws ServletException {
try {
// Open JNDI context (the same as TestClient context)
// Get UserSession Home
// Create UserSession
userSession = userSessionHome.create();
} catch (NamingException ex) {
System.out.println("Error: " + ex);
} catch (RemoteException ex) {
System.out.println("Error: " + ex);
} catch (CreateException ex) {
System.out.println("Error: " + ex);
protected void service(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, IOException {
* Does insertion of the new user in the database.
public void doInsert(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, IOException {
try {
// Get parameters to create the newUser
String login = req.getParameter("login");
String password = req.getParameter("password");
// Create the newUser
System.out.println("Calling newUser before");
UserRemote user = userSession.newUser(login, password);
System.out.println("Calling newUser after");
} catch (Exception e) {
// Clean up resources
public void destroy() {
Result :
When I run my jsp page and click on the "add" button, I got the message "Calling newUser before" printed in STDOUT and the error message :
ERROR [[userservlet]] Servlet.service() for servlet userservlet threw exception
javax.servlet.ServletException: loader constraints violated when linking javax/ejb/Handle class
at noumea.user.UserServlet.service(UserServlet.java:112)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:534)
Constat :
I checked into my SGBD and the new user has been created.
The error appears only when the method return Remote ejbs, if I return simples objects (Strings, int..) it works.
What can I do to resolve this problem ?
Thank you."Why do you want to servlet to gain access to another EJB through the stateless session bean. Why cant the servlet call it directly ?"
Because I want to access to the informations included in the entity bean UserBean (which is remote).
You said that it is a bad design, but how can I access to my UserBean ejbs from the session bean if I don't do that ?
For example I want a List of all users to be seen in a jsp page :
1 - I call the method getUserList which returnsan ArrayList of UserRemote.
2 - I iterate over the ArrayList to get the users parameters to be seen.
As the other example (newUser), when I do
ArrayList users = (ArrayList) userSession.getUserList(); with the simple client it works, but in the servlet I got the same error.
But, if I call directly the findAll method (as you'are saying) in the servlet
ArrayList users = (ArrayList) userRemoteHome.findAll(); it works...
I think that if my servlet calls directly entity ejbs, I don't need UserSession bean anymore. Is that right ?
I precise that my design is this :
jsp -> servlet -> session bean -> entity bean -> sgbd
Is that a bad design ? Do I need the session bean anymore ?
Thank you.
Maybe you are looking for
-
I have activated iCloud on iPad2 and iPhone4S (both on iOS 7) using the same Apple ID and signed into 'Find my iPhone' still my iphone is not visible in my devices. I can only see my iPad.
-
Support of Korean Language(damn urgent)
Hai All, I have developed Applet application which has to run on the korean system. So i changed my systems regionsettings to korean. But when i tried to open the applet in IE. The IE got closed. Please if any one can help in this regard it would be
-
I'm trying to learn to code .jsp pages (learning from the book "Professional JSP"). I'm trying out methods of including other pages, both .jsp and .htm pages. I was able to get it to work with the statement <%@ include file="filename.jsp" %> But, I t
-
Podcast are not in the podcast directory
Hi, I just reformat my hard disk, I re-install Itunes, the latest version, I have subscribe and downloaded my favorite podcast. I sync my Ipod nano every thing went fine but my podcast are not in my podcast directory on my ipod, I have to artist... W
-
Looking for a Task/ToDo application that syncs with iCal
Can anyone recommend a good ToDo application that has due dates for tasks along with the capability to sync with iCal tasks? I just switched to the iPhone from Blackberry and I would love to have the same task features that I had with my Curve.